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