defpkgbuild(fontconfig, #:pkgname, "fontconfig", #:pkgver, "2.15.0", #:pkgrel, 1, #:pkgdesc, "Font discovery, configuration and matching", #:arch, [#:x86-64, #:aarch64], #:url, "https://www.freedesktop.org/wiki/Software/fontconfig/", #:license, "MIT", #:depends, ["musl", "freetype", "expat", "libuuid"], #:source, ["https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.15.0.tar.gz", "https://raw.githubusercontent.com/alpinelinux/aports/a7de3e63cc8015474a4feadd8bb7c0ecc097b1fa/main/fontconfig/fix-arithmetic.patch"], #:sha256sums, ["f5f359d6332861bd497570848fcb42520964a9e83d5e3abe397b6b6db9bcaaf4", "24e14fc346fd37c4290e7cc396f4063291e3cff30b1ce447af09241101d18386"], #:prepare, fn() { run("patch", "--batch", "--fuzz=0", "-d", "fontconfig-2.15.0", "-p1", "-i", "../fix-arithmetic.patch") }, #:build, fn() { run("vinix-configure", "fontconfig-2.15.0/configure", "--disable-docs", "--disable-nls", "--localstatedir=/var") run("make") }, #:check, fn() { run("vinix-run", "--library-path", "src/.libs", "fc-query/.libs/fc-query", "--format", "%{family} %{pixelsize}\n", "fontconfig-2.15.0/test/4x6.pcf") }, #:package, fn() { run("make", "install", string-append("DESTDIR=", pkgdir())) run("find", pkgdir(), "-name", "*.la", "-delete") run("install", "-Dm644", "fontconfig-2.15.0/COPYING", string-append(pkgdir(), "/usr/share/licenses/fontconfig/COPYING")) })