| 1 | defpkgbuild(xvfb, |
| 2 | #:pkgname, "xvfb", |
| 3 | #:pkgver, "21.1.16", |
| 4 | #:pkgrel, 2, |
| 5 | #:pkgdesc, "Vinix headless X server with a virtual framebuffer", |
| 6 | #:arch, [#:x86-64, #:aarch64], |
| 7 | #:license, "MIT", |
| 8 | #:url, "https://www.x.org/", |
| 9 | #:depends, ["musl", "libbsd", "libmd", "libxau", "libxdmcp", "libxfont2", "libxshmfence", "pixman", "xkbcomp", "xkeyboard-config", "font-misc-misc", "font-cursor-misc"], |
| 10 | #:makedepends, ["xorgproto", "xtrans", "linux-headers", "libx11", "libxcb", "libxext", "libxkbfile"], |
| 11 | #:source, ["https://xorg.freedesktop.org/archive/individual/xserver/xorg-server-21.1.16.tar.xz", |
| 12 | "https://raw.githubusercontent.com/vlang/vinix/c34a6707e1d8d3a23d0b1bfe6e6dbb16290e4f75/patches/xorg-server/jinx-working-patch.patch", |
| 13 | "configure.v"], |
| 14 | #:sha256sums, ["b14a116d2d805debc5b5b2aac505a279e69b217dae2fae2dfcb62400471a9970", |
| 15 | "74929113283893aff082d39edfa4a39f6e4f68134572831ce55ad75ebbc47449", |
| 16 | "9ac9cb2e6ae8e24833ba13c8cf6a34bfdf6ca49fa6e9f3bc16f2e876cbcbede5"], |
| 17 | #:prepare, fn() { |
| 18 | run("patch", "--batch", "--fuzz=0", "-d", "xorg-server-21.1.16", "-p1", "-i", "../jinx-working-patch.patch") |
| 19 | }, |
| 20 | #:build, fn() { |
| 21 | run("v", "run", "configure.v", "headless", "xorg-server-21.1.16", "headless") |
| 22 | run("make", "-C", "headless") |
| 23 | }, |
| 24 | #:check, fn() { |
| 25 | run("readelf", "-d", "headless/hw/vfb/Xvfb") |
| 26 | run("vinix-run", "headless/hw/vfb/Xvfb", "-help") |
| 27 | }, |
| 28 | #:package, fn() { |
| 29 | run("make", "-C", "headless/hw/vfb", "install", string-append("DESTDIR=", pkgdir())) |
| 30 | run("install", "-d", "-m755", string-append(pkgdir(), "/var/lib/xkb")) |
| 31 | run("install", "-Dm644", "xorg-server-21.1.16/COPYING", string-append(pkgdir(), "/usr/share/licenses/xvfb/COPYING")) |
| 32 | }) |
| 33 | |