| 1 | defpkgbuild(expat, |
| 2 | #:pkgname, "expat", |
| 3 | #:pkgver, "2.11.0", |
| 4 | #:pkgrel, 1, |
| 5 | #:pkgdesc, "Expat XML parser, headers and xmlwf", |
| 6 | #:arch, [#:x86-64], |
| 7 | #:license, "MIT", |
| 8 | #:url, "https://libexpat.github.io/", |
| 9 | #:depends, ["musl"], |
| 10 | #:source, ["https://github.com/libexpat/libexpat/releases/download/R_2_11_0/expat-2.11.0.tar.xz"], |
| 11 | #:sha256sums, ["61e7614b602201c28a189dafee78f5bceaee192bbde46a930752ff09cf5542fa"], |
| 12 | |
| 13 | #:build, fn() { |
| 14 | run("env", "CC=vinix-cc", "expat-2.11.0/configure", "--prefix=/usr", |
| 15 | "--build=x86_64-pc-linux-gnu", "--host=x86_64-linux-musl", |
| 16 | "--without-docbook", "--without-examples", "--without-tests") |
| 17 | run("make") |
| 18 | }, |
| 19 | #:check, fn() { |
| 20 | root := get-environment-variable("VPAC_MAKEPKG_ROOT") |
| 21 | run(string-append(root, "/lib/ld-musl-x86_64.so.1"), "--library-path", "lib/.libs", |
| 22 | "xmlwf/.libs/xmlwf", "expat-2.11.0/doc/xmlwf.xml") |
| 23 | }, |
| 24 | #:package, fn() { |
| 25 | run("make", "install", string-append("DESTDIR=", pkgdir())) |
| 26 | run("rm", string-append(pkgdir(), "/usr/lib/libexpat.la")) |
| 27 | run("install", "-Dm644", "expat-2.11.0/COPYING", string-append(pkgdir(), "/usr/share/licenses/expat/COPYING")) |
| 28 | }) |
| 29 | |