87 lines
2.8 KiB
Bash
87 lines
2.8 KiB
Bash
# Template file for 'gdb'
|
|
pkgname=gdb
|
|
version=15.2
|
|
revision=1
|
|
build_style=gnu-configure
|
|
pycompile_dirs="/usr/share/gdb/python"
|
|
configure_args="--disable-werror --disable-nls --with-system-readline
|
|
--with-system-gdbinit=/etc/gdb/gdbinit --with-system-zlib
|
|
$(vopt_enable gdbserver) $(vopt_if multiarch --enable-targets=all)
|
|
$(vopt_if static 'CFLAGS=-static CXXFLAGS=-static LDFLAGS=-static')
|
|
$(vopt_with guile) $(vopt_if python --with-python=/usr/bin/python3)
|
|
$(vopt_with debuginfod)"
|
|
hostmakedepends="pkg-config texinfo $(vopt_if python python3-devel) $(vopt_if guile guile)"
|
|
makedepends="expat-devel ncurses-devel readline-devel zlib-devel gmp-devel mpfr-devel
|
|
$(vopt_if debuginfod elfutils-devel) $(vopt_if guile guile-devel)
|
|
$(vopt_if python 'gettext-devel python3-devel')"
|
|
depends="gdb-common>=${version}_${revision}"
|
|
checkdepends="dejagnu"
|
|
short_desc="GNU Debugger"
|
|
maintainer="Duncaen <duncaen@voidlinux.org>"
|
|
license="GPL-3.0-or-later"
|
|
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=83350ccd35b5b5a0cba6b334c41294ea968158c573940904f00b92f76345314d
|
|
make_check=extended # Tests take too long, not all of them pass.
|
|
|
|
python_version="3"
|
|
|
|
ignore_elf_files="
|
|
/usr/share/gdb/guile/gdb/support.go
|
|
/usr/share/gdb/guile/gdb/experimental.go
|
|
/usr/share/gdb/guile/gdb/iterator.go
|
|
/usr/share/gdb/guile/gdb/types.go
|
|
/usr/share/gdb/guile/gdb/printing.go
|
|
/usr/share/gdb/guile/gdb.go"
|
|
|
|
if [ "${CROSS_BUILD}" ]; then
|
|
# Make python3.x detection work in cross builds
|
|
CPPFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}"
|
|
fi
|
|
|
|
build_options="debuginfod gdbserver guile multiarch python static"
|
|
desc_option_gdbserver="Enable support for building GDB server"
|
|
desc_option_debuginfod="Enable support for libdebuginfod"
|
|
desc_option_multiarch="Enable support for all architectures"
|
|
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() {
|
|
short_desc+=" - common files"
|
|
pkg_install() {
|
|
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
|
|
}
|
|
}
|