gdb: update to 16.2.
[void-pkg.git] / srcpkgs / gdb / template
blob63440241d867cd92e552e724e111b1b39102d905
1 # Template file for 'gdb'
2 pkgname=gdb
3 version=16.2
4 revision=1
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.
28 python_version="3"
30 ignore_elf_files="
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"
58         fi
59         subpackages="gdb-multiarch"
61 subpackages+=" gdb-common"
63 post_install() {
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"
73         pkg_install() {
74                 vmove usr/share
75         }
78 gdb-multiarch_package() {
79         short_desc+=" - all architectures"
80         depends="${sourcepkg}>=${version}_${revision}"
81         pkg_install() {
82                 vmove "usr/bin/run-*"
83                 vmove usr/bin/sis
84                 vmove usr/share/gdb/dtb
85         }