defpkgbuild(libxshmfence, #:pkgname, "libxshmfence", #:pkgver, "1.3.2", #:pkgrel, 1, #:pkgdesc, "X11 shared memory fences", #:arch, [#:x86-64, #:aarch64], #:license, "MIT", #:url, "https://www.x.org/", #:depends, ["musl", "xorgproto"], #:makedepends, ["linux-headers"], #:source, ["https://xorg.freedesktop.org/archive/individual/lib/libxshmfence-1.3.2.tar.xz"], #:sha256sums, ["870df257bc40b126d91b5a8f1da6ca8a524555268c50b59c0acd1a27f361606f"], #:prepare, fn() { ; Installed pkg-config files must use the consumer's sysroot. run("sed", "-i", "s/ @XPROTO_CFLAGS@//", "libxshmfence-1.3.2/xshmfence.pc.in") }, #:build, fn() { run("vinix-configure", "libxshmfence-1.3.2/configure", "--enable-futex") run("make") }, #:check, fn() { run("test", "-s", "src/.libs/libxshmfence.so") run("readelf", "-d", "src/.libs/libxshmfence.so") }, #:package, fn() { run("make", "install", string-append("DESTDIR=", pkgdir())) run("find", pkgdir(), "-name", "*.la", "-delete") run("install", "-Dm644", "libxshmfence-1.3.2/COPYING", string-append(pkgdir(), "/usr/share/licenses/libxshmfence/COPYING")) })