aboutsummaryrefslogtreecommitdiffstats
path: root/main/gc/APKBUILD
blob: dbf663023586cba94437a62ff5734ebfab6fdf3d (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.2
pkgrel=1
pkgdesc="A garbage collector for C and C++"
url="http://www.hpl.hp.com/personal/Hans_Boehm/gc/"
arch="all"
license="GPL"
depends=
makedepends=
subpackages="$pkgname-dev $pkgname-doc libgc++:libgccpp"
source="http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-$pkgver.tar.gz
	getcontext.patch
	"

prepare() {
	cd "$srcdir"/$pkgname-$pkgver
	for i in $source; do
		case $i in
		*.patch) msg $; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}
	
build() {
	cd "$srcdir"/$pkgname-$pkgver
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--datadir=/usr/share/doc/gc \
		--enable-cplusplus \
		|| return 1
	make || return 1
}

package() {
	cd "$srcdir"/$pkgname-$pkgver
	make DESTDIR="$pkgdir" install || return 1
	rm "$pkgdir"/usr/lib/*.la
}

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

md5sums="d17aecedef3d73e75387fb63558fa4eb  gc-7.2.tar.gz
4f77dfa0098f982ce42dc1580d31bf47  getcontext.patch"