vinix-ports / gc / PKGBUILD.vile
31 lines · 31 sloc · 1.37 KB · c745c03839fab4b74c22057f26cc1a9223701f33
Raw
1defpkgbuild(gc,
2 #:pkgname, "gc",
3 #:pkgver, "8.2.8",
4 #:pkgrel, 1,
5 #:pkgdesc, "Boehm garbage collector for the native V runtime",
6 #:arch, [#:x86-64, #:aarch64],
7 #:url, "https://www.hboehm.info/gc/",
8 #:license, "Boehm-GC",
9 #:depends, ["musl"],
10 #:makedepends, ["linux-headers"],
11 #:source, ["https://github.com/ivmai/bdwgc/releases/download/v8.2.8/gc-8.2.8.tar.gz", "collect.c"],
12 #:sha256sums, ["7649020621cb26325e1fb5c8742590d92fb48ce5c259b502faf7d9fb5dabb160",
13 "892f568199042f60be4007f16b80295b956ce23e38cabb1d74d5a33eea6261f9"],
14 #:build, fn() {
15 ; Cross configure cannot execute this upstream probe itself.
16 run("vinix-cc", "-DGC_BUILTIN_ATOMIC", "-Igc-8.2.8/include",
17 "gc-8.2.8/tests/test_atomic_ops.c", "-o", "check-atomics")
18 run("vinix-run", "./check-atomics")
19 run("vinix-configure", "gc-8.2.8/configure", "--with-libatomic-ops=none",
20 "--enable-threads=posix", "--disable-cplusplus")
21 run("make")
22 },
23 #:check, fn() {
24 run("vinix-cc", "-Igc-8.2.8/include", "collect.c", "-L.libs", "-lgc", "-o", "collect")
25 run("vinix-run", "--library-path", ".libs", "./collect")
26 },
27 #:package, fn() {
28 run("make", "install", string-append("DESTDIR=", pkgdir()))
29 run("find", pkgdir(), "-name", "*.la", "-delete")
30 run("install", "-Dm644", "gc-8.2.8/README.md", string-append(pkgdir(), "/usr/share/licenses/gc/README.md"))
31 })
32