gdb: enable multiarch by default and split

This commit is contained in:
classabbyamp 2024-06-10 13:02:27 -04:00 committed by classabbyamp
parent e3cf42bb6f
commit fe628e0737
2 changed files with 27 additions and 2 deletions

1
srcpkgs/gdb-multiarch Symbolic link
View File

@ -0,0 +1 @@
gdb

View File

@ -1,7 +1,7 @@
# Template file for 'gdb'
pkgname=gdb
version=14.2
revision=2
revision=3
build_style=gnu-configure
pycompile_dirs="/usr/share/gdb/python"
configure_args="--disable-werror --disable-nls --with-system-readline
@ -19,8 +19,8 @@ checkdepends="dejagnu"
short_desc="GNU Debugger"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="GPL-3.0-or-later"
changelog="https://sourceware.org/git/?p=binutils-gdb.git;a=blob_plain;f=gdb/NEWS;hb=HEAD"
homepage="https://www.gnu.org/software/gdb"
changelog="https://sourceware.org/git/?p=binutils-gdb.git;a=blob_plain;f=gdb/NEWS;hb=HEAD"
distfiles="${GNU_SITE}/gdb/gdb-${version}.tar.xz"
checksum=2d4dd8061d8ded12b6c63f55e45344881e8226105f4d2a9b234040efa5ce7772
make_check=extended # Tests take too long, not all of them pass.
@ -48,10 +48,24 @@ build_options_default="debuginfod gdbserver python"
vopt_conflict gdbserver static
vopt_conflict debuginfod static
if [ "$XBPS_TARGET_WORDSIZE" -eq 64 ]; then
build_options_default+=" multiarch"
fi
if [ "$build_option_multiarch" ]; then
if [ "$XBPS_TARGET_WORDSIZE" -eq 32 ]; then
broken="run-cris link fails: undefined reference to bpf_match_insn etc"
fi
subpackages="gdb-multiarch"
fi
subpackages+=" gdb-common"
post_install() {
# resolve conflicts with binutils
rm -rf ${DESTDIR}/usr/{include,lib}
rm -rf ${DESTDIR}/usr/share/info/{bfd,ctf-spec,sframe-spec}.info*
# resolve conflict with cross-arm-non-eabi-gdb
rm -rf ${DESTDIR}/usr/share/doc/{arm,erc32,frv,or1k,ppc,rx}
}
gdb-common_package() {
@ -60,3 +74,13 @@ gdb-common_package() {
vmove usr/share
}
}
gdb-multiarch_package() {
short_desc+=" - all architectures"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove "usr/bin/run-*"
vmove usr/bin/sis
vmove usr/share/gdb/dtb
}
}