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