defpkgbuild(xvfb, #:pkgname, "xvfb", #:pkgver, "21.1.16", #:pkgrel, 2, #:pkgdesc, "Vinix headless X server with a virtual framebuffer", #:arch, [#:x86-64, #:aarch64], #:license, "MIT", #:url, "https://www.x.org/", #:depends, ["musl", "libbsd", "libmd", "libxau", "libxdmcp", "libxfont2", "libxshmfence", "pixman", "xkbcomp", "xkeyboard-config", "font-misc-misc", "font-cursor-misc"], #:makedepends, ["xorgproto", "xtrans", "linux-headers", "libx11", "libxcb", "libxext", "libxkbfile"], #:source, ["https://xorg.freedesktop.org/archive/individual/xserver/xorg-server-21.1.16.tar.xz", "https://raw.githubusercontent.com/vlang/vinix/c34a6707e1d8d3a23d0b1bfe6e6dbb16290e4f75/patches/xorg-server/jinx-working-patch.patch", "configure.v"], #:sha256sums, ["b14a116d2d805debc5b5b2aac505a279e69b217dae2fae2dfcb62400471a9970", "74929113283893aff082d39edfa4a39f6e4f68134572831ce55ad75ebbc47449", "9ac9cb2e6ae8e24833ba13c8cf6a34bfdf6ca49fa6e9f3bc16f2e876cbcbede5"], #:prepare, fn() { run("patch", "--batch", "--fuzz=0", "-d", "xorg-server-21.1.16", "-p1", "-i", "../jinx-working-patch.patch") }, #:build, fn() { run("v", "run", "configure.v", "headless", "xorg-server-21.1.16", "headless") run("make", "-C", "headless") }, #:check, fn() { run("readelf", "-d", "headless/hw/vfb/Xvfb") run("vinix-run", "headless/hw/vfb/Xvfb", "-help") }, #:package, fn() { run("make", "-C", "headless/hw/vfb", "install", string-append("DESTDIR=", pkgdir())) run("install", "-d", "-m755", string-append(pkgdir(), "/var/lib/xkb")) run("install", "-Dm644", "xorg-server-21.1.16/COPYING", string-append(pkgdir(), "/usr/share/licenses/xvfb/COPYING")) })