1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Maintainer: Anatol Pomozov <anatol.pomozov@gmail.com>
3 # Contributor: Allan McRae <allan@archlinux.org>
4 # Contributor: Jan de Groot <jgc@archlinux.org>
7 # gdb-common is a package that contains files common for all cross compiled versions
8 # of gdb (for arm/avr/...)
9 pkgname=(gdb gdb-common)
12 pkgdesc='The GNU Debugger'
14 url='https://www.gnu.org/software/gdb/'
16 makedepends=(glibc gcc-libs texinfo python guile ncurses expat xz mpfr source-highlight
18 source=(https://ftp.gnu.org/gnu/gdb/${pkgname}-${pkgver}.tar.xz{,.sig}
19 mte-detection.patch::"https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=7fd8546853e3f0333ba8d8238413aba7eb45c69f;hp=5fff6115feae7aaa23c0ae8d144e1c8418ee2ee1")
21 sha1sums=('6cb3361c7f2b22d6d2c25ab4992264aa41bc2471'
23 '1b773465886dd06f09d0e7a50b3a01de52adc754')
24 b2sums=('6a639f6533f4008bfb469c23a26c4fcd039f1bc5dd33745f4876344451beb595d7a8843caeb5db70214924624c5b999f8831237d459bebf1cb2d2866f8b41ee2'
26 'f23983de92b935423d14703d3dd2c0c75f11ae95d8a5f94be929ccce501d4eeebdbc6c6108c7a625f6ed4e8c09a25bd7dcf4f864a81ef411fd3821bccf3730bd')
27 validpgpkeys=('F40ADB902B24264AA42E50BF92EDB04BFF325CF3') # Joel Brobecker
32 # hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS"
33 sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
35 patch -p1 < ../mte-detection.patch # FS#72583
41 mkdir -p build && cd build
45 --enable-source-highlight \
47 --with-system-readline \
48 --with-python=/usr/bin/python \
49 --with-guile=guile-2.2 \
50 --with-system-gdbinit=/etc/gdb/gdbinit
54 package_gdb-common() {
55 depends=(python guile)
58 make -C gdb/data-directory DESTDIR="$pkgdir" install
62 depends=(glibc ncurses libncursesw.so gcc-libs expat xz mpfr source-highlight gdb-common=$pkgver
63 readline libreadline.so guile python libelf)
64 backup=(etc/gdb/gdbinit)
67 make -C gdb DESTDIR="$pkgdir" install
68 make -C gdbserver DESTDIR="$pkgdir" install
70 # install "custom" system gdbinit
71 install -dm 755 "$pkgdir/etc/gdb"
72 touch "$pkgdir/etc/gdb/gdbinit"
74 # comes from gdb-common
75 rm -r "$pkgdir/usr/share/gdb/"