vinix-ports / mpfr / PKGBUILD.vile
23 lines · 23 sloc · 1.03 KB · b7c1f288cd58534c4d4cf916617c0c6bebafb503
Raw
1defpkgbuild(mpfr,
2 #:pkgname, "mpfr",
3 #:pkgver, "4.2.1",
4 #:pkgrel, 2,
5 #:pkgdesc, "Multiple precision floating-point arithmetic with correct rounding",
6 #:arch, [#:x86-64, #:aarch64],
7 #:url, "https://www.mpfr.org/",
8 #:license, "LGPL-3.0-or-later",
9 #:depends, ["musl", "gmp"],
10 #:source, ["https://distfiles.alpinelinux.org/distfiles/v3.21/mpfr-4.2.1.tar.xz"],
11 #:sha256sums, ["277807353a6726978996945af13e52829e3abd7a9a5b7fb2793894e18f1fcbb2"],
12 #:build, fn() {
13 run("env", "CFLAGS=-O2 -std=gnu17", "CC_FOR_BUILD=gcc", "vinix-configure", "mpfr-4.2.1/configure",
14 "--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/libmpfr.so"))
21 run("rm", string-append(pkgdir(), "/usr/lib/libmpfr.la"))
22 run("install", "-Dm644", "mpfr-4.2.1/COPYING.LESSER", string-append(pkgdir(), "/usr/share/licenses/mpfr/COPYING"))
23 })
24