archrelease: copy trunk to extra-x86_64
[arch-packages.git] / gc / repos / extra-x86_64 / PKGBUILD
blob5e9162a595dfedaf267ad654316751e28609a843
1 # Maintainer: Daniel Isenmann <daniel [at] archlinux.org>
2 # Contributor: dorphell <dorphell@gmx.net>
4 pkgname=gc
5 pkgver=8.2.0
6 pkgrel=2
7 pkgdesc="A garbage collector for C and C++"
8 arch=('x86_64')
9 url="https://www.hboehm.info/gc/"
10 license=('GPL')
11 depends=('gcc-libs')
12 source=(https://github.com/ivmai/bdwgc/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz
13         gc-missing-header.patch::https://patch-diff.githubusercontent.com/raw/ivmai/bdwgc/pull/389.patch)
14 sha512sums=('ff781360bca667f1f95fbfed073e9035f63134cac1bda4f7e4217664a3713c2846f750a3ce92732972c0435c69355b051f6e8eb6f2698b0d48d9107ff960bacf'
15             'a89d46b6826b90184e1a2724c2a1a57a4a2a215245938500aa7a652bf7eee3e0205c36fbd27e450ac59824c07b16fd38987ea77a33a41eb38878701fb70e0ad9')
17 prepare() {
18   cd $pkgname-$pkgver
19   patch -p1 < ../gc-missing-header.patch # Install missing header
20   ./autogen.sh
23 build() {
24   cd ${pkgname}-${pkgver}
25   ./configure --prefix=/usr --enable-cplusplus --disable-static
26   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
27   make
30 check() {
31   cd ${pkgname}-${pkgver}
32   make check
35 package() {
36   cd ${pkgname}-${pkgver}
37   make DESTDIR="${pkgdir}" install
38   sed 's|GC_MALLOC 1L|gc 3|g' doc/gc.man |
39     install -Dm644 /dev/stdin "${pkgdir}/usr/share/man/man3/gc.3"