vinix-ports / isl25 / PKGBUILD.vile
31 lines · 30 sloc · 1.51 KB · 94543b2f8076afb9ff47c15b8c4ea094dabe718d
Raw
1selected := get-environment-variable("VPAC_TARGET_ARCH")
2arch := if string?(selected) { selected } else if memq(string->symbol("aarch64"), features()) { "aarch64" } else { "x86_64" }
3arm := string=?(arch, "aarch64")
4musl := if arm { "musl>=1.2.6-4" } else { "musl" }
5
6defpkgbuild(isl25,
7 #:pkgname, "isl25",
8 #:pkgver, "0.25",
9 #:pkgrel, if arm { 2 } else { 1 },
10 #:pkgdesc, "Integer set and relation library with the libisl.so.23 ABI",
11 #:arch, [#:x86-64, #:aarch64],
12 #:url, "https://libisl.sourceforge.io/",
13 #:license, "MIT",
14 #:depends, [musl, "gmp"],
15 #:source, ["https://distfiles.alpinelinux.org/distfiles/v3.21/isl-0.25.tar.bz2", "count.c"],
16 #:sha256sums, ["4305c54d4eebc4bf3ce365af85f04984ef5aa97a52e01128445e26da5b1f467a", "6d9c89822656eb1ae360cdb00b37774cd1cbe790ec5028f64209947404bee201"],
17 #:build, fn() {
18 run("vinix-configure", "isl-0.25/configure", "--with-int=gmp", "--disable-static")
19 run("make", "gitversion.h")
20 run("make", "libisl.la")
21 },
22 #:check, fn() {
23 run("vinix-cc", "-Iinclude", "-Iisl-0.25/include", "count.c", "-L.libs", "-lisl", "-lgmp", "-o", "count")
24 run("vinix-run", "--library-path", ".libs", "./count")
25 },
26 #:package, fn() {
27 run("make", "install-libLTLIBRARIES", "install-pkgincludeHEADERS", "install-nodist_pkgincludeHEADERS",
28 "install-pkgconfigDATA", string-append("DESTDIR=", pkgdir()))
29 run("find", pkgdir(), "-name", "*.la", "-delete")
30 run("install", "-Dm644", "isl-0.25/LICENSE", string-append(pkgdir(), "/usr/share/licenses/isl25/LICENSE"))
31 })
32