aboutsummaryrefslogtreecommitdiffstats
path: root/main/gdb/APKBUILD
blob: d474bd7d50dda4f6438eb39399a8290c2469572e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gdb
pkgver=7.2
pkgrel=0
pkgdesc="The GNU Debugger"
url="http://sources.redhat.com/gdb/"
arch="x86 x86_64"
license="GPL3"
depends=
makedepends="ncurses-dev expat-dev"
subpackages="$pkgname-doc"
source="http://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.bz2
	80_all_gdb-6.5-dwarf-stack-overflow.patch
	"
# patches were found here:
# http://distfiles.gentoo.org/distfiles/gdb-7.2-patches-1.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"
	./configure --prefix=/usr \
		--disable-nls \
		--without-system-readline \
		--disable-werror \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm -f "$pkgdir"/usr/share/info/dir
	# those are provided by binutils	
	rm -rf "$pkgdir"/usr/include
	rm -rf "$pkgdir"/usr/lib
}

md5sums="64260e6c56979ee750a01055f16091a5  gdb-7.2.tar.bz2
eb81ee111ba23682d4257dad50e01de0  80_all_gdb-6.5-dwarf-stack-overflow.patch"