aboutsummaryrefslogtreecommitdiffstats
path: root/main/gc/APKBUILD
blob: 771619170af96973ed4bd8eb5ceceeeabe06ea33 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gc
pkgver=7.6.4
pkgrel=0
pkgdesc="A garbage collector for C and C++"
url="http://hboehm.info/gc/"
arch="all"
license="GPL"
depends=
makedepends='libatomic_ops-dev linux-headers'
subpackages="$pkgname-dev $pkgname-doc libgc++:libgccpp"
source="http://hboehm.info/gc/gc_source/gc-$pkgver.tar.gz
	fix-boehm-gc.patch
	"
builddir="$srcdir"/gc-${pkgver%[a-z]}

build() {
	cd "$builddir"
	[ "$CLIBC" = "musl" ] && export CFLAGS="$CFLAGS -D_GNU_SOURCE -DNO_GETCONTEXT -DUSE_MMAP -DHAVE_DL_ITERATE_PHDR"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--datadir=/usr/share/doc/gc \
		--enable-cplusplus \
		--disable-static

	make
}

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

libgccpp() {
	install -d "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libgccpp.* "$subpkgdir"/usr/lib/
}

check() {
	cd "$builddir"

	# two FAILs due to grsecurity
	make check
}

sha512sums="2c85be3e24b85732b3dc6f08fe98cf1a82b6fb2a22ec73090f80920721c737ef92cee8f0cd7ea7228d686005d164e7da54ce3907c3a1ba5eefa43355a472085e  gc-7.6.4.tar.gz
6439505931f0d023bf27d6ce0af90d09dc23bb9dd49b561566ec54b2cddc20642be9bd7b41203f643cb6efed3db2f54aef410b436f3acc2351fe4bb0a8791ea4  fix-boehm-gc.patch"