1 # Template file for 'gdb'
5 build_style=gnu-configure
6 pycompile_dirs="/usr/share/gdb/python"
7 configure_args="--disable-werror --disable-nls --with-system-readline
8 --with-system-gdbinit=/etc/gdb/gdbinit --with-system-zlib
9 $(vopt_enable gdbserver) $(vopt_if multiarch --enable-targets=all)
10 $(vopt_if static 'CFLAGS=-static CXXFLAGS=-static LDFLAGS=-static')
11 $(vopt_with guile) $(vopt_if python --with-python=/usr/bin/python3)
12 $(vopt_with debuginfod)"
13 hostmakedepends="pkg-config texinfo $(vopt_if python python3-devel) $(vopt_if guile guile)"
14 makedepends="expat-devel ncurses-devel readline-devel zlib-devel gmp-devel mpfr-devel
15 $(vopt_if debuginfod elfutils-devel) $(vopt_if guile guile-devel)
16 $(vopt_if python 'gettext-devel python3-devel')"
17 depends="gdb-common>=${version}_${revision}"
18 checkdepends="dejagnu"
19 short_desc="GNU Debugger"
20 maintainer="Duncaen <duncaen@voidlinux.org>"
21 license="GPL-3.0-or-later"
22 homepage="https://www.gnu.org/software/gdb"
23 changelog="https://sourceware.org/git/?p=binutils-gdb.git;a=blob_plain;f=gdb/NEWS;hb=HEAD"
24 distfiles="${GNU_SITE}/gdb/gdb-${version}.tar.xz"
25 checksum=4002cb7f23f45c37c790536a13a720942ce4be0402d929c9085e92f10d480119
26 make_check=extended # Tests take too long, not all of them pass.
31 /usr/share/gdb/guile/gdb/support.go
32 /usr/share/gdb/guile/gdb/experimental.go
33 /usr/share/gdb/guile/gdb/iterator.go
34 /usr/share/gdb/guile/gdb/types.go
35 /usr/share/gdb/guile/gdb/printing.go
36 /usr/share/gdb/guile/gdb.go"
38 if [ "${CROSS_BUILD}" ]; then
39 # Make python3.x detection work in cross builds
40 CPPFLAGS="-I${XBPS_CROSS_BASE}/${py3_inc}"
43 build_options="debuginfod gdbserver guile multiarch python static"
44 desc_option_gdbserver="Enable support for building GDB server"
45 desc_option_debuginfod="Enable support for libdebuginfod"
46 desc_option_multiarch="Enable support for all architectures"
47 build_options_default="debuginfod gdbserver python"
48 vopt_conflict gdbserver static
49 vopt_conflict debuginfod static
51 if [ "$XBPS_TARGET_WORDSIZE" -eq 64 ]; then
52 build_options_default+=" multiarch"
55 if [ "$build_option_multiarch" ]; then
56 if [ "$XBPS_TARGET_WORDSIZE" -eq 32 ]; then
57 broken="run-cris link fails: undefined reference to bpf_match_insn etc"
59 subpackages="gdb-multiarch"
61 subpackages+=" gdb-common"
64 # resolve conflicts with binutils
65 rm -rf ${DESTDIR}/usr/{include,lib}
66 rm -rf ${DESTDIR}/usr/share/info/{bfd,ctf-spec,sframe-spec}.info*
67 # resolve conflict with cross-arm-non-eabi-gdb
68 rm -rf ${DESTDIR}/usr/share/doc/{arm,erc32,frv,or1k,ppc,rx}
71 gdb-common_package() {
72 short_desc+=" - common files"
78 gdb-multiarch_package() {
79 short_desc+=" - all architectures"
80 depends="${sourcepkg}>=${version}_${revision}"
84 vmove usr/share/gdb/dtb