vinix-ports / mpc / PKGBUILD.vile
23 lines · 23 sloc · 1.08 KB
Raw
1defpkgbuild(mpc,
2 #:pkgname, "mpc",
3 #:pkgver, "1.3.1",
4 #:pkgrel, 1,
5 #:pkgdesc, "Multiple precision complex arithmetic",
6 #:arch, [#:x86-64],
7 #:url, "https://www.multiprecision.org/mpc/",
8 #:license, "LGPL-3.0-or-later",
9 #:depends, ["musl", "gmp", "mpfr"],
10 #:source, ["https://distfiles.alpinelinux.org/distfiles/v3.21/mpc-1.3.1.tar.gz"],
11 #:sha256sums, ["ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8"],
12 #:build, fn() {
13 run("env", "CC=vinix-cc", "CFLAGS=-O2 -std=gnu17", "CC_FOR_BUILD=gcc", "mpc-1.3.1/configure", "--prefix=/usr",
14 "--build=x86_64-pc-linux-gnu", "--host=x86_64-linux-musl", "--enable-shared", "--enable-static")
15 run("make")
16 },
17 #:package, fn() {
18 run("make", string-append("DESTDIR=", pkgdir()), "install")
19 run("rm", "-f", string-append(pkgdir(), "/usr/share/info/dir"))
20 run("test", "-f", string-append(pkgdir(), "/usr/lib/libmpc.so"))
21 run("rm", string-append(pkgdir(), "/usr/lib/libmpc.la"))
22 run("install", "-Dm644", "mpc-1.3.1/COPYING.LESSER", string-append(pkgdir(), "/usr/share/licenses/mpc/COPYING"))
23 })
24