summaryrefslogtreecommitdiff
path: root/system/gdb/APKBUILD
blob: 2bf45416d275d55bfc27cfb8493160cc11f358e8 (plain) (blame)
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
52
53
54
55
56
57
58
59
60
61
62
63
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=gdb
pkgver=8.1
pkgrel=0
pkgdesc="The GNU Debugger"
url="https://www.sourceware.org/gdb/"
arch="all"
options="!check"  # thousands of test failures
license="GPL-3.0+"
depends=
makedepends="ncurses-dev expat-dev texinfo python3-dev
	zlib-dev autoconf automake libtool linux-headers perl"
subpackages="$pkgname-doc $pkgname-lang"
source="https://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz
	s390x-use-elf-gdb_fpregset_t.patch
	ppc-musl.patch
	ppc-ptregs.patch
	remove-extraneous-include.patch
	"

build() {
	cd "$builddir"
	local _config="
		--build=$CBUILD
		--host=$CHOST
		--prefix=/usr
		--target=$CTARGET
		--with-build-sysroot=$CBUILDROOT
		--with-python=/usr/bin/python3
		--disable-werror
		--mandir=/usr/share/man
		--infodir=/usr/share/info"

	# use system zlib if not cross compiling
	[ "$CBUILD" = "$CHOST" ] && _config="$_config --with-system-zlib"

	# avoid generation of mangled and non-mangled objects on ppc64
	[ "$CARCH" = ppc64le ] && _config="$_config --enable-build-with-cxx=no"

	./configure $_config
	(cd opcodes && ./configure $_config)
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install

	# 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
}

sha512sums="ffd82f415d7652d62dad1716c307836f594217a363429609beb7d70239e8bf06b73b393345b0e000796228e56681ed7656ac3c8be05e91d6d652ab0d5b1dc357  gdb-8.1.tar.xz
986e68275f7692f39b5d8aedeb9f9e88f0e5bebb3f8c7f104933c525d35ca54fc90e18698c1e3e1009e8a188e5e70d6f252cb39e4c75e37db7bf479017e0da32  s390x-use-elf-gdb_fpregset_t.patch
04911f87904b62dd7662435f9182b20485afb29ddb3d6398a9d31fef13495f7b70639c77fdae3a40e2775e270d7cd40d0cfd7ddf832372b506808d33c8301e01  ppc-musl.patch
b75e1c1ee503a1948a7d5b8d90427b5c7d38ded69978056cee0adca222771a5c95ed1ac73127fcae7b795ea94296344eee5fca47e4cd04b418c164a756fb0933  ppc-ptregs.patch
3ff31774ba78c1208415289566b901debd815da8b53acefe4a0785e7b2bbcff39585a556d44ff2f7d8d639ebc047620b96e72573acae376d8f23aa98dd1fe286  remove-extraneous-include.patch"