| 1 | defpkgbuild(xorgproto, |
| 2 | #:pkgname, "xorgproto", |
| 3 | #:pkgver, "2024.1", |
| 4 | #:pkgrel, 1, |
| 5 | #:pkgdesc, "X11 protocol headers and pkg-config definitions", |
| 6 | #:arch, [#:any], |
| 7 | #:license, "BSD-2-Clause AND MIT AND X11", |
| 8 | #:url, "https://xorg.freedesktop.org/", |
| 9 | #:makedepends, ["musl"], |
| 10 | #:source, ["https://xorg.freedesktop.org/archive/individual/proto/xorgproto-2024.1.tar.gz"], |
| 11 | #:sha256sums, ["4f6b9b4faf91e5df8265b71843a91fc73dc895be6210c84117a996545df296ce"], |
| 12 | |
| 13 | #:build, fn() { |
| 14 | root := get-environment-variable("VPAC_MAKEPKG_ROOT") |
| 15 | run("env", "-u", "CPATH", "-u", "C_INCLUDE_PATH", "-u", "LIBRARY_PATH", "CC=vinix-cc", |
| 16 | "PKG_CONFIG_PATH=", string-append("PKG_CONFIG_LIBDIR=", root, "/usr/lib/pkgconfig:", root, "/usr/share/pkgconfig"), |
| 17 | string-append("PKG_CONFIG_SYSROOT_DIR=", root), |
| 18 | "xorgproto-2024.1/configure", "--build=x86_64-pc-linux-gnu", "--host=x86_64-linux-musl", "--prefix=/usr", "--enable-legacy", "--disable-specs") |
| 19 | run("make") |
| 20 | }, |
| 21 | #:check, fn() { |
| 22 | run("test", "-s", "xproto.pc") |
| 23 | }, |
| 24 | #:package, fn() { |
| 25 | run("make", "install", string-append("DESTDIR=", pkgdir())) |
| 26 | ; The owning libraries install the maintained versions of these legacy headers. |
| 27 | run("rm", "-f", string-append(pkgdir(), "/usr/include/X11/extensions/vldXvMC.h"), |
| 28 | string-append(pkgdir(), "/usr/include/X11/extensions/XKBgeom.h")) |
| 29 | licenses := string-append(pkgdir(), "/usr/share/licenses/xorgproto") |
| 30 | run("mkdir", "-p", licenses) |
| 31 | for-each(fn(file) { run("install", "-m644", file, licenses) }, glob("xorgproto-2024.1/COPYING-*")) |
| 32 | }) |
| 33 | |