vinix-ports / pkgconf / PKGBUILD.vile
30 lines · 29 sloc · 1.33 KB · 592f9232f87bf13ff85c0a8fe1a64a979e4a8f92
Raw
1defpkgbuild(pkgconf,
2 #:pkgname, "pkgconf",
3 #:pkgver, "2.3.0",
4 #:pkgrel, 1,
5 #:pkgdesc, "Query compiler and linker flags for installed libraries",
6 #:arch, [#:x86-64],
7 #:license, "ISC",
8 #:url, "https://pkgconf.org/",
9 #:depends, ["musl"],
10 #:source, ["https://distfiles.ariadne.space/pkgconf/pkgconf-2.3.0.tar.xz"],
11 #:sha256sums, ["3a9080ac51d03615e7c1910a0a2a8df08424892b5f13b0628a204d3fcce0ea8b"],
12
13 #:build, fn() {
14 run("env", "CC=vinix-cc", "pkgconf-2.3.0/configure", "--prefix=/usr",
15 "--build=x86_64-pc-linux-gnu", "--host=x86_64-linux-musl",
16 "--with-pkg-config-dir=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig")
17 run("make")
18 },
19 #:check, fn() {
20 root := get-environment-variable("VPAC_MAKEPKG_ROOT")
21 run("env", "PKG_CONFIG_PATH=", "PKG_CONFIG_LIBDIR=.",
22 string-append(root, "/lib/ld-musl-x86_64.so.1"), "--library-path", ".libs",
23 ".libs/pkgconf", "--exact-version=2.3.0", "libpkgconf")
24 },
25 #:package, fn() {
26 run("make", "install", string-append("DESTDIR=", pkgdir()))
27 run("ln", "-s", "pkgconf", string-append(pkgdir(), "/usr/bin/pkg-config"))
28 run("rm", string-append(pkgdir(), "/usr/lib/libpkgconf.la"))
29 run("install", "-Dm644", "pkgconf-2.3.0/COPYING", string-append(pkgdir(), "/usr/share/licenses/pkgconf/COPYING"))
30 })
31