defpkgbuild(gc, #:pkgname, "gc", #:pkgver, "8.2.8", #:pkgrel, 1, #:pkgdesc, "Boehm garbage collector for the native V runtime", #:arch, [#:x86-64, #:aarch64], #:url, "https://www.hboehm.info/gc/", #:license, "Boehm-GC", #:depends, ["musl"], #:makedepends, ["linux-headers"], #:source, ["https://github.com/ivmai/bdwgc/releases/download/v8.2.8/gc-8.2.8.tar.gz", "collect.c"], #:sha256sums, ["7649020621cb26325e1fb5c8742590d92fb48ce5c259b502faf7d9fb5dabb160", "892f568199042f60be4007f16b80295b956ce23e38cabb1d74d5a33eea6261f9"], #:build, fn() { ; Cross configure cannot execute this upstream probe itself. run("vinix-cc", "-DGC_BUILTIN_ATOMIC", "-Igc-8.2.8/include", "gc-8.2.8/tests/test_atomic_ops.c", "-o", "check-atomics") run("vinix-run", "./check-atomics") run("vinix-configure", "gc-8.2.8/configure", "--with-libatomic-ops=none", "--enable-threads=posix", "--disable-cplusplus") run("make") }, #:check, fn() { run("vinix-cc", "-Igc-8.2.8/include", "collect.c", "-L.libs", "-lgc", "-o", "collect") run("vinix-run", "--library-path", ".libs", "./collect") }, #:package, fn() { run("make", "install", string-append("DESTDIR=", pkgdir())) run("find", pkgdir(), "-name", "*.la", "-delete") run("install", "-Dm644", "gc-8.2.8/README.md", string-append(pkgdir(), "/usr/share/licenses/gc/README.md")) })