# $Id: PKGBUILD 205618 2014-02-10 03:08:15Z allan $ # Maintainer: Allan McRae # Contributor: Jan de Groot pkgname=gdb pkgver=7.7 pkgrel=1 pkgdesc="The GNU Debugger" arch=('i686' 'x86_64' 'mips64el') url="http://www.gnu.org/software/gdb/" license=('GPL3') depends=('ncurses' 'expat' 'python2') makedepends=('texinfo') backup=('etc/gdb/gdbinit') install=gdb.install source=(http://ftp.gnu.org/gnu/gdb/${pkgname}-${pkgver}.tar.bz2{,.sig}) md5sums=('271a18f41858a7e98b28ae4eb91287c9' 'SKIP') prepare() { cd ${srcdir}/${pkgname}-${pkgver} # hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS" sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure } build() { cd ${srcdir}/${pkgname}-${pkgver} ./configure --prefix=/usr --disable-nls \ --with-system-readline \ --with-python=/usr/bin/python2 \ --with-system-gdbinit=/etc/gdb/gdbinit make } package() { cd ${srcdir}/${pkgname}-${pkgver} make DESTDIR=${pkgdir} install # install "custom" system gdbinit install -dm755 $pkgdir/etc/gdb touch $pkgdir/etc/gdb/gdbinit # resolve conflicts with binutils rm ${pkgdir}/usr/include/{ansidecl,bfd,bfdlink,dis-asm,symcat}.h rm ${pkgdir}/usr/share/info/{bfd,configure,standards}.info }