defpkgbuild(libxcb, #:pkgname, "libxcb", #:pkgver, "1.16.1", #:pkgrel, 1, #:pkgdesc, "X client connection and protocol extension libraries", #:arch, [#:x86-64], #:license, "MIT", #:url, "https://xcb.freedesktop.org/", #:depends, ["musl", "libxau", "libxdmcp"], #:makedepends, ["xcb-proto"], #:source, ["https://xorg.freedesktop.org/archive/individual/lib/libxcb-1.16.1.tar.xz"], #:sha256sums, ["f24d187154c8e027b358fc7cb6588e35e33e6a92f11c668fe77396a7ae66e311"], #:prepare, fn() { ; The 1.17 protocol description adds a DRI3 include to the generated Present header. run("sed", "-i", "/^Requires.private:/s/$/ xcb-dri3/", "libxcb-1.16.1/xcb-present.pc.in") }, #: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), "libxcb-1.16.1/configure", "--build=x86_64-pc-linux-gnu", "--host=x86_64-linux-musl", "--prefix=/usr", "--enable-xkb", "--enable-xinput", "--disable-xprint", "--disable-devel-docs") ; The generator imports modules from the installed SDK. run("env", "PYTHONDONTWRITEBYTECODE=1", "make") }, #:check, fn() { run("make", "check", "VERBOSE=1") run("test", "-s", "src/.libs/libxcb-xinput.so") run("test", "-s", "src/.libs/libxcb-xkb.so") }, #:package, fn() { run("make", "install", string-append("DESTDIR=", pkgdir())) run("find", pkgdir(), "-name", "*.la", "-delete") run("install", "-Dm644", "libxcb-1.16.1/COPYING", string-append(pkgdir(), "/usr/share/licenses/libxcb/COPYING")) })