summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f23f86025058ee6533fcd0e023ec1d0752283c5a (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
# Maintainer: a821
# Contributor: Daniel Isenmann <daniel [at] archlinux.org>
# Contributor: dorphell <dorphell@gmx.net>

pkgname=gc-git
pkgver=8.2.0.r1165.gf2630a42
pkgrel=1
pkgdesc="A garbage collector for C and C++"
arch=('x86_64')
url="https://www.hboehm.info/gc/"
license=('MIT')
depends=('gcc-libs')
makedepends=('git')
source=($pkgname::git+https://github.com/ivmai/bdwgc.git)
sha512sums=('SKIP')
conflicts=('gc')
provides=('gc')

pkgver() {
  cd $pkgname
  git describe | sed -e 's/^v//;s/-/.r/;s/-/./g'
}

prepare() {
  cd $pkgname
  ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --enable-cplusplus --disable-static
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

check() {
  cd $pkgname
  make check
}

package() {
  cd $pkgname
  make DESTDIR="${pkgdir}" install
  sed 's|GC_MALLOC 1L|gc 3|g' gc.man |
    install -Dm644 /dev/stdin "${pkgdir}/usr/share/man/man3/gc.3"
  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}