mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-08 10:12:59 +01:00
72 lines
1.8 KiB
Plaintext
72 lines
1.8 KiB
Plaintext
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
|
pkgname=gdb
|
|
pkgver=7.12.1
|
|
pkgrel=0
|
|
pkgdesc="The GNU Debugger"
|
|
url="http://sources.redhat.com/gdb/"
|
|
arch="all"
|
|
license="GPL3"
|
|
depends=
|
|
makedepends="ncurses-dev expat-dev texinfo readline-dev python2-dev
|
|
zlib-dev autoconf automake libtool linux-headers"
|
|
subpackages="$pkgname-doc"
|
|
source="http://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz
|
|
"
|
|
|
|
_builddir="$srcdir"/$pkgname-$pkgver
|
|
prepare() {
|
|
cd "$_builddir"
|
|
for i in $source; do
|
|
case $i in
|
|
*.patch)
|
|
msg "Applying $i"
|
|
patch -p1 -i "$srcdir"/$i || return 1
|
|
;;
|
|
esac
|
|
done
|
|
}
|
|
|
|
build () {
|
|
cd "$_builddir"
|
|
local _config="
|
|
--build=$CBUILD
|
|
--host=$CHOST
|
|
--prefix=/usr
|
|
--target=$CTARGET
|
|
--with-build-sysroot=$CBUILDROOT
|
|
--disable-nls
|
|
--disable-werror
|
|
--mandir=/usr/share/man
|
|
--infodir=/usr/share/info"
|
|
|
|
# use system readline if not cross compiling
|
|
[ "$CBUILD" = "$CHOST" ] && _config="$_config --with-system-readline"
|
|
|
|
# use system zlib if not cross compiling
|
|
[ "$CBUILD" = "$CHOST" ] && _config="$_config --with-system-zlib"
|
|
|
|
# gdb server does not compile with musl
|
|
[ "$CTARGET_LIBC" = musl ] && _config="$_config --disable-gdbserver"
|
|
|
|
./configure $_config || return 1
|
|
(cd opcodes && ./configure $_config) || return 1
|
|
make || return 1
|
|
}
|
|
|
|
package() {
|
|
cd "$_builddir"
|
|
make DESTDIR="$pkgdir" install || return 1
|
|
|
|
# resolve conflict with binutils-doc
|
|
rm -f "$pkgdir"/usr/share/info/bfd.info
|
|
rm -f "$pkgdir"/usr/share/info/dir
|
|
|
|
# those are provided by binutils
|
|
rm -rf "$pkgdir"/usr/include
|
|
rm -rf "$pkgdir"/usr/lib
|
|
}
|
|
|
|
md5sums="193453347ddced7acb6b1cd2ee8f2e4b gdb-7.12.1.tar.xz"
|
|
sha256sums="4607680b973d3ec92c30ad029f1b7dbde3876869e6b3a117d8a7e90081113186 gdb-7.12.1.tar.xz"
|
|
sha512sums="0ac8d0a495103611ef41167a08313a010dce6ca4c6d827cbe8558a0c1a1a8a6bfa53f1b7704251289cababbfaaf9e075550cdf741a54d6cd9ca3433d910efcd8 gdb-7.12.1.tar.xz"
|