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
17 source-highlight boost readline)
18 source=(https://ftp.gnu.org/gnu/gdb/${pkgname}-${pkgver}.tar.xz{,.sig}
19 rust.patch::"https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=562403d4f5483e0787219fdb88da72c707c8d7f6")
20 sha1sums=('6f0f5f905085f447672d9f52af66b42207d56e46'
22 '8dc1c2e44ebb3442d292cf6a594f70a97fa24123')
23 b2sums=('ab3a77ef35d21597dd1299787eebc422c3ca9764d0866223752c3036c0f9e198bf25ab4730bf6e7025bc2db148c66e98b191e15abc2d69c3088aed146728beef'
25 '99ffd3597fa61c51c2aae129387e266121597eadcaaec15cdcfdb9e798d7b7da57ae837454143d6c4e196d98068dc19c1588e36bde2d7f05e710465fc15fd766')
26 validpgpkeys=('F40ADB902B24264AA42E50BF92EDB04BFF325CF3') # Joel Brobecker
31 patch -p1 < ../rust.patch
37 mkdir -p build && cd build
41 --enable-source-highlight \
43 --with-system-readline \
44 --with-python=/usr/bin/python \
45 --with-system-gdbinit=/etc/gdb/gdbinit
49 package_gdb-common() {
50 depends=(python guile)
53 make -C gdb/data-directory DESTDIR="$pkgdir" install
57 depends=(glibc ncurses libncursesw.so gcc-libs expat xz mpfr source-highlight gdb-common=$pkgver
58 readline libreadline.so guile python libelf)
59 backup=(etc/gdb/gdbinit)
62 make -C gdb DESTDIR="$pkgdir" install
63 make -C gdbserver DESTDIR="$pkgdir" install
65 # install "custom" system gdbinit
66 install -dm 755 "$pkgdir/etc/gdb"
67 touch "$pkgdir/etc/gdb/gdbinit"
69 # comes from gdb-common
70 rm -r "$pkgdir/usr/share/gdb/"