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

build() {
	cd "$builddir"

	if [ "$CLIBC" = "musl" ]; then
		export CFLAGS="$CFLAGS -D_GNU_SOURCE -DNO_GETCONTEXT -DUSE_MMAP -DHAVE_DL_ITERATE_PHDR"
	fi
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--datadir=/usr/share/doc/gc \
		--enable-static \
		--enable-cplusplus
	make
}

check() {
	cd "$builddir"

	# two FAILs due to grsecurity
	make check
}

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

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

sha512sums="b1401abb2e82b143b9a2a9013f5b2efa4015b256e7ea8ef2c897ef3c0d2d41fc893413bf6a49efc1845018e8ab823adb485fb3358eb47715982259ace9ffd7c6  gc-8.0.2.tar.gz
0441dfe85b36e9e80b9135d62d56e5e9b67c6db1f927480dd3cf5048765f3a2ab51a45eaa0068066af97ce0398333890fff2f84cd01fec476655f34e0325bc13  0001-Fix-gctest-with-musl-libc-on-s390x.patch"