| 1 | selected := get-environment-variable("VPAC_TARGET_ARCH") |
| 2 | arch := if string?(selected) { selected } else if memq(string->symbol("aarch64"), features()) { "aarch64" } else { "x86_64" } |
| 3 | |
| 4 | defpkgbuild(libxcvt, |
| 5 | #:pkgname, "libxcvt", |
| 6 | #:pkgver, "0.1.2", |
| 7 | #:pkgrel, if string=?("aarch64", arch) { 2 } else { 1 }, |
| 8 | #:pkgdesc, "xorg xcvt library and cvt program", |
| 9 | #:arch, [#:x86-64, #:aarch64], |
| 10 | #:license, "MIT", |
| 11 | #:url, "https://www.x.org/", |
| 12 | #:depends, if string=?("aarch64", arch) { ["musl>=1.2.6-4"] } else { ["musl"] }, |
| 13 | #:source, ["https://xorg.freedesktop.org/archive/individual/lib/libxcvt-0.1.2.tar.xz"], |
| 14 | #:sha256sums, ["0561690544796e25cfbd71806ba1b0d797ffe464e9796411123e79450f71db38"], |
| 15 | |
| 16 | #:build, fn() { |
| 17 | run("vinix-meson", "libxcvt-0.1.2", "build") |
| 18 | run("meson", "compile", "-C", "build", "-j2") |
| 19 | }, |
| 20 | #:check, fn() { |
| 21 | run("readelf", "-d", "build/lib/libxcvt.so") |
| 22 | run("vinix-run", "--library-path", "build/lib", "build/cvt/cvt", "640", "480", "60") |
| 23 | }, |
| 24 | #:package, fn() { |
| 25 | run("meson", "install", "--no-rebuild", "-C", "build", "--destdir", pkgdir()) |
| 26 | run("install", "-Dm644", "libxcvt-0.1.2/COPYING", |
| 27 | string-append(pkgdir(), "/usr/share/licenses/libxcvt/COPYING")) |
| 28 | }) |
| 29 | |