me

/

vinix-ports Public
382 commits 0 issues 0 pull requests 1 contributor Discussions Projects Snippets LOC history Platform CI

gmp: build the Vinix arbitrary-precision C library

diviocity committed 6 days ago · 1d231ae8637fd859497b2dc841c1497d58fbfb4d View patch
Unverified signature 1 files changed +25 -0
gmp/PKGBUILD.vile new file +25 -0

@@ -0,0 +1,25 @@

1+defpkgbuild(gmp,

2+ #:pkgname, "gmp",

3+ #:pkgver, "6.3.0",

4+ #:pkgrel, 1,

5+ #:pkgdesc, "GNU multiple precision arithmetic library",

6+ #:arch, [#:x86-64],

7+ #:url, "https://gmplib.org/",

8+ #:license, "LGPL-3.0-or-later",

9+ #:depends, ["musl"],

10+ #:source, ["https://distfiles.alpinelinux.org/distfiles/v3.21/gmp-6.3.0.tar.xz"],

11+ #:sha256sums, ["a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898"],

12+ #:build, fn() {

13+ root := get-environment-variable("VPAC_MAKEPKG_ROOT")

14+ cc := string-append("CC=gcc --sysroot=", root, " -specs=", root, "/usr/lib/musl-gcc-sysroot.specs")

15+ run("env", cc, "CFLAGS=-O2 -std=gnu17", "CC_FOR_BUILD=gcc", "gmp-6.3.0/configure", "--prefix=/usr",

16+ "--build=x86_64-pc-linux-gnu", "--host=x86_64-linux-musl", "--enable-shared", "--enable-static", "--disable-cxx", "--enable-fat")

17+ run("make")

18+ },

19+ #:package, fn() {

20+ run("make", string-append("DESTDIR=", pkgdir()), "install")

21+ run("rm", "-f", string-append(pkgdir(), "/usr/share/info/dir"))

22+ run("test", "-f", string-append(pkgdir(), "/usr/lib/libgmp.so"))

23+ run("rm", string-append(pkgdir(), "/usr/lib/libgmp.la"))

24+ run("install", "-Dm644", "gmp-6.3.0/COPYING.LESSERv3", string-append(pkgdir(), "/usr/share/licenses/gmp/COPYING"))

25+ })