# Maintainer: A. Wilcox pkgname=gc pkgver=7.6.6 pkgrel=0 pkgdesc="A garbage collector for C and C++" url="http://hboehm.info/gc/" arch="all" license="MIT" makedepends="libatomic_ops-dev linux-headers" subpackages="$pkgname-dev $pkgname-doc libgc++:libgccpp" source="https://github.com/ivmai/bdwgc/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz fix-boehm-gc.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-cplusplus make } check() { cd "$builddir" if [ "$CARCH" = "ppc" ]; then make check || true else make check fi } package() { cd "$builddir" make DESTDIR="$pkgdir" install } libgccpp() { install -d "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libgccpp.* "$subpkgdir"/usr/lib/ } sha512sums="85be341132fa460fcad7ca323cf1c594f37e19430269d639ca796b9e3502b0d496822cdccb2b7ca77859f3d19a43165b963142b60fce6b1271ed9a3cccb6620b gc-7.6.6.tar.gz 6439505931f0d023bf27d6ce0af90d09dc23bb9dd49b561566ec54b2cddc20642be9bd7b41203f643cb6efed3db2f54aef410b436f3acc2351fe4bb0a8791ea4 fix-boehm-gc.patch"