Track the remaining X11 source recipes
@@ -0,0 +1,26 @@
1+defpkgbuild(freeglut,
2+ #:pkgname, "freeglut",
3+ #:pkgver, "3.4.0",
4+ #:pkgrel, 1,
5+ #:pkgdesc, "OpenGL Utility Toolkit for X11",
6+ #:arch, [#:x86-64, #:aarch64],
7+ #:url, "https://freeglut.sourceforge.net/",
8+ #:license, "MIT",
9+ #:depends, ["mesa-glx-legacy", "libx11", "libxi", "libxxf86vm"],
10+ #:makedepends, ["mesa", "libice", "glu"],
11+ #:source, ["https://distfiles.alpinelinux.org/distfiles/v3.21/freeglut-3.4.0.tar.gz"],
12+ #:sha256sums, ["3c0bcb915d9b180a97edaebd011b7a1de54583a838644dcd42bb0ea0c6f3eaec"],
13+ #:build, fn() {
14+ run("vinix-cmake", "freeglut-3.4.0", "build", "-DFREEGLUT_BUILD_STATIC_LIBS=OFF",
15+ "-DFREEGLUT_BUILD_DEMOS=OFF", "-DFREEGLUT_REPLACE_GLUT=ON", "-DFREEGLUT_WAYLAND=OFF")
16+ run("cmake", "--build", "build", "--parallel", "2")
17+ },
18+ #:check, fn() {
19+ run("readelf", "-d", "build/lib/libglut.so.3")
20+ },
21+ #:package, fn() {
22+ run("env", string-append("DESTDIR=", pkgdir()), "cmake", "--install", "build")
23+ run("test", "-s", string-append(pkgdir(), "/usr/lib/pkgconfig/glut.pc"))
24+ run("ln", "-s", "glut.pc", string-append(pkgdir(), "/usr/lib/pkgconfig/freeglut.pc"))
25+ run("install", "-Dm644", "freeglut-3.4.0/COPYING", string-append(pkgdir(), "/usr/share/licenses/freeglut/COPYING"))
26+ })
@@ -0,0 +1,27 @@
1+defpkgbuild(glu,
2+ #:pkgname, "glu",
3+ #:pkgver, "9.0.3",
4+ #:pkgrel, 1,
5+ #:pkgdesc, "OpenGL utility library for the Vinix Mesa SDK",
6+ #:arch, [#:x86-64, #:aarch64],
7+ #:license, "SGI-B-1.1 AND SGI-B-2.0",
8+ #:url, "https://archive.mesa3d.org/glu/",
9+ #:depends, ["mesa-gallium-sdk", "gcc-libs", "glu-headers"],
10+ #:source, ["https://archive.mesa3d.org/glu/glu-9.0.3.tar.xz"],
11+ #:sha256sums, ["bd43fe12f374b1192eb15fe20e45ff456b9bc26ab57f0eee919f96ca0f8a330f"],
12+ #:build, fn() {
13+ run("vinix-meson", "glu-9.0.3", "build", "-Ddefault_library=shared", "-Dgl_provider=osmesa")
14+ run("meson", "compile", "-C", "build", "-j2")
15+ },
16+ #:check, fn() {
17+ run("readelf", "-d", "build/src/libGLU.so")
18+ },
19+ #:package, fn() {
20+ run("meson", "install", "--no-rebuild", "-C", "build", "--destdir", pkgdir())
21+ run("rm", string-append(pkgdir(), "/usr/include/GL/glu.h"))
22+ for-each(fn(file) {
23+ notice := string-append(pkgdir(), "/usr/share/licenses/glu/", file)
24+ run("install", "-Dm644", string-append("glu-9.0.3/", file), notice)
25+ run("sed", "-i", "/^[[:space:]]*\\*\\//q", notice)
26+ }, list("include/GL/glu.h", "src/libnurbs/interface/glinterface.cc"))
27+ })
@@ -0,0 +1,42 @@
1+defpkgbuild(mesa-demos,
2+ #:pkgname, "mesa-demos",
3+ #:pkgver, "9.0.0",
4+ #:pkgrel, 1,
5+ #:pkgdesc, "GLX utilities and OpenGL demos used by the Vinix X11 sidecar",
6+ #:arch, [#:x86-64, #:aarch64],
7+ #:license, ["MIT", "LicenseRef-SGI-triangle", "LicenseRef-Public-Domain"],
8+ #:url, "https://www.mesa3d.org/",
9+ #:depends, ["mesa-glx-legacy", "libx11", "freeglut"],
10+ #:makedepends, ["mesa", "glu", "libxext"],
11+ #:source, ["https://archive.mesa3d.org/demos/mesa-demos-9.0.0.tar.xz",
12+ "https://raw.githubusercontent.com/alpinelinux/aports/a7de3e63cc8015474a4feadd8bb7c0ecc097b1fa/community/mesa-demos/glx.patch"],
13+ #:sha256sums, ["3046a3d26a7b051af7ebdd257a5f23bfeb160cad6ed952329cdff1e9f1ed496b",
14+ "ea5d5c8e1908f5c32906d0e0df804f15ecc8c36c71a26af538f012b0f0d1ccfa"],
15+ #:prepare, fn() {
16+ ; Mesa's GLX implementation is exported by libGL and has no separate glx.pc.
17+ run("patch", "--batch", "--fuzz=0", "-d", "mesa-demos-9.0.0", "-p1", "-i", "../glx.patch")
18+ },
19+ #:build, fn() {
20+ run("vinix-meson", "mesa-demos-9.0.0", "build", "--wrap-mode=nofallback",
21+ "-Dx11=enabled", "-Dglut=enabled", "-Dvulkan=disabled", "-Dwayland=disabled",
22+ "-Degl=disabled", "-Dgles1=disabled", "-Dgles2=disabled", "-Dosmesa=disabled", "-Dlibdrm=disabled")
23+ ; src/samples also defines a distinct program named tri; upstream installs src/trivial/tri.
24+ run("ninja", "-C", "build", "-j2", "src/xdemos/glxinfo", "src/xdemos/glxgears",
25+ "src/xdemos/glxdemo", "src/trivial/tri")
26+ },
27+ #:check, fn() {
28+ run("vinix-run", "build/src/xdemos/glxinfo", "-h")
29+ },
30+ #:package, fn() {
31+ for-each(fn(program) {
32+ run("install", "-Dm755", string-append("build/src/xdemos/", program),
33+ string-append(pkgdir(), "/usr/bin/", program))
34+ }, list("glxinfo", "glxgears", "glxdemo"))
35+ run("install", "-Dm755", "build/src/trivial/tri", string-append(pkgdir(), "/usr/bin/tri"))
36+ for-each(fn(file) {
37+ notice := string-append(pkgdir(), "/usr/share/licenses/mesa-demos/", file)
38+ run("install", "-Dm644", string-append("mesa-demos-9.0.0/src/", file), notice)
39+ run("sed", "-i", "/^[[:space:]]*\\*\\//q", notice)
40+ }, list("xdemos/glxinfo.c", "xdemos/glxgears.c", "xdemos/glxdemo.c",
41+ "util/glinfo_common.c", "glad/include/KHR/khrplatform.h", "trivial/tri.c"))
42+ })
@@ -0,0 +1,36 @@
1+defpkgbuild(xf86-video-fbdev,
2+ #:pkgname, "xf86-video-fbdev",
3+ #:pkgver, "0.5.1",
4+ #:pkgrel, 1,
5+ #:pkgdesc, "Vinix Xorg framebuffer driver",
6+ #:arch, [#:x86-64, #:aarch64],
7+ #:license, "MIT",
8+ #:url, "https://www.x.org/",
9+ #:depends, ["xorg-server"],
10+ #:makedepends, ["linux-headers", "xorgproto"],
11+ #:source, [
12+ "https://xorg.freedesktop.org/archive/individual/driver/xf86-video-fbdev-0.5.1.tar.xz",
13+ "https://raw.githubusercontent.com/vlang/vinix/c34a6707e1d8d3a23d0b1bfe6e6dbb16290e4f75/patches/xf86-video-fbdev/jinx-working-patch.patch"
14+ ],
15+ #:sha256sums, [
16+ "9c2bc0fb9af092804138e8d5cb5627cabf2919ef60f0d1544a95c4ac2047f387",
17+ "3b4460c13dc2b3216df24f2638a64d9b8e49ce88bd2c1a1fdd74c2ad72d9a9d4"
18+ ],
19+ #:prepare, fn() {
20+ run("patch", "--batch", "--fuzz=0", "-d", "xf86-video-fbdev-0.5.1", "-p1", "-i", "../jinx-working-patch.patch")
21+ },
22+ #:build, fn() {
23+ root := get-environment-variable("VPAC_MAKEPKG_ROOT")
24+ modules := string-append(root, "/usr/lib/xorg/modules")
25+ run("env", "CPPFLAGS=-D__vinix__", string-append("LDFLAGS=-L", modules, " -Wl,-rpath-link,", modules),
26+ "vinix-configure", "xf86-video-fbdev-0.5.1/configure", "--disable-pciaccess")
27+ run("make", string-append("SYSROOT=", root), "moduledir=/usr/lib/xorg/modules")
28+ },
29+ #:check, fn() {
30+ run("readelf", "-d", "src/.libs/fbdev_drv.so")
31+ },
32+ #:package, fn() {
33+ run("make", "install", "moduledir=/usr/lib/xorg/modules", string-append("DESTDIR=", pkgdir()))
34+ run("find", pkgdir(), "-name", "*.la", "-delete")
35+ run("install", "-Dm644", "xf86-video-fbdev-0.5.1/COPYING", string-append(pkgdir(), "/usr/share/licenses/xf86-video-fbdev/COPYING"))
36+ })
@@ -0,0 +1,28 @@
1+defpkgbuild(xinit,
2+ #:pkgname, "xinit",
3+ #:pkgver, "1.4.2",
4+ #:pkgrel, 1,
5+ #:pkgdesc, "X.Org initialisation program",
6+ #:arch, [#:x86-64, #:aarch64],
7+ #:license, "MIT AND GPL-2.0-or-later",
8+ #:url, "https://www.x.org/",
9+ #:depends, ["libx11", "busybox", "vinix-x11", "xorg-server", "xclock", "xset"],
10+ #:makedepends, ["xorgproto"],
11+ #:source, ["https://xorg.freedesktop.org/archive/individual/app/xinit-1.4.2.tar.xz",
12+ "vinix-startx::https://raw.githubusercontent.com/vlang/vinix/c34a6707e1d8d3a23d0b1bfe6e6dbb16290e4f75/build-support/xorg-server/startx"],
13+ #:sha256sums, ["b7d8dc8d22ef9f15985a10b606ee4f2aad6828befa437359934647e88d331f23",
14+ "386ca12bda697cf94793693708b0b28f51c43a21c5a911f5ab3f2f815ca09821"],
15+
16+ #:build, fn() {
17+ run("vinix-configure", "xinit-1.4.2/configure", "--with-xinitdir=/etc/X11/xinit", "--with-xrdb=/usr/bin/xrdb", "--with-xmodmap=/usr/bin/xmodmap")
18+ run("make")
19+ },
20+ #:check, fn() {
21+ run("readelf", "-l", "xinit")
22+ },
23+ #:package, fn() {
24+ run("make", "install", string-append("DESTDIR=", pkgdir()))
25+ run("install", "-m755", "vinix-startx", string-append(pkgdir(), "/usr/bin/startx"))
26+ run("install", "-Dm644", "xinit-1.4.2/COPYING",
27+ string-append(pkgdir(), "/usr/share/licenses/xinit/COPYING"))
28+ })
@@ -0,0 +1,42 @@
1+defpkgbuild(xorg-server,
2+ #:pkgname, "xorg-server",
3+ #:pkgver, "21.1.16",
4+ #:pkgrel, 1,
5+ #:pkgdesc, "Vinix Xorg server and GLX-enabled Xvfb",
6+ #:arch, [#:x86-64, #:aarch64],
7+ #:license, "MIT",
8+ #:url, "https://www.x.org/",
9+ #:depends, ["musl", "libdrm", "libepoxy", "libxau", "libxcvt", "libxdmcp", "libxfont2",
10+ "libxshmfence", "mesa", "mesa-glx-legacy", "nettle", "pixman", "xkbcomp", "xkeyboard-config",
11+ "font-cursor-misc", "font-misc-misc", "xvfb"],
12+ #:makedepends, ["xorgproto", "xtrans", "linux-headers", "libx11", "libxcb", "libxext", "libxkbfile"],
13+ #:source, [
14+ "https://xorg.freedesktop.org/archive/individual/xserver/xorg-server-21.1.16.tar.xz",
15+ "https://raw.githubusercontent.com/vlang/vinix/c34a6707e1d8d3a23d0b1bfe6e6dbb16290e4f75/patches/xorg-server/jinx-working-patch.patch",
16+ "configure.v"
17+ ],
18+ #:sha256sums, [
19+ "b14a116d2d805debc5b5b2aac505a279e69b217dae2fae2dfcb62400471a9970",
20+ "74929113283893aff082d39edfa4a39f6e4f68134572831ce55ad75ebbc47449",
21+ "9ac9cb2e6ae8e24833ba13c8cf6a34bfdf6ca49fa6e9f3bc16f2e876cbcbede5"
22+ ],
23+ #:prepare, fn() {
24+ run("patch", "--batch", "--fuzz=0", "-d", "xorg-server-21.1.16", "-p1", "-i", "../jinx-working-patch.patch")
25+ },
26+ #:build, fn() {
27+ run("v", "run", "configure.v", "accelerated", "xorg-server-21.1.16", "accelerated")
28+ run("sed", "-i", "s|^#define DRI_DRIVER_PATH .*|#define DRI_DRIVER_PATH \"/usr/lib/xorg/modules/dri\"|", "accelerated/include/dix-config.h")
29+ run("sed", "-i", "s|^export_dynamic_flag_spec=\"\"$|export_dynamic_flag_spec=\"\\${wl}--export-dynamic\"|", "accelerated/libtool")
30+ run("make", "-C", "accelerated")
31+ },
32+ #:check, fn() {
33+ run("vinix-run", "accelerated/hw/xfree86/Xorg", "-version")
34+ run("test", "-x", "accelerated/hw/vfb/Xvfb")
35+ },
36+ #:package, fn() {
37+ run("make", "-C", "accelerated", "install", string-append("DESTDIR=", pkgdir()))
38+ run("mv", string-append(pkgdir(), "/usr/bin/Xvfb"), string-append(pkgdir(), "/usr/bin/Xvfb-glx"))
39+ run("rm", "-f", string-append(pkgdir(), "/usr/share/man/man1/Xvfb.1"))
40+ run("find", pkgdir(), "-name", "*.la", "-delete")
41+ run("install", "-Dm644", "xorg-server-21.1.16/COPYING", string-append(pkgdir(), "/usr/share/licenses/xorg-server/COPYING"))
42+ })
@@ -81,4 +81,6 @@ Set `VINIX_MESA_NATIVE_FILE` to a Meson native machine file whose `pkg_config_pa
8181
8282When using Bison from the worker's private host sysroot, set `BISON_PKGDATADIR` to that sysroot's `usr/share/bison` and `M4` to its `usr/bin/m4`. Bison's compiled-in paths refer to the original host locations. The AArch64 legacy Mesa build hit this while generating the GLSL preprocessor parser. The worker then generated a C parser and header with both private paths set. See `foundation/mesa-bison-host-check-02`, receipt SHA-256 `2006fc3964a1dd2a17c11ea0f78208a677a3cc024825d2af416097db41fd1df0`.
8383
84+The worker verified the pinned source downloads for FreeGLUT, GLU, Mesa demos, Xorg, fbdev and xinit. Both architecture plans use the same recipe bytes for these six ports. `vpac --recipe-run RECIPE prepare` applied the Xorg, fbdev and Mesa demos patches to fresh source copies. These checks cover source preparation. The package builds require their installed Mesa and Xorg dependencies. See `xorg/release-source-preparation-01`, receipt SHA-256 `9f5c19dae1d300cae1f83de508b655a549add834039d23ee7ac38a3612d4446f`.
85+
8486The refreshed source plan includes the AArch64 GCC runtime release 2 and the split Mesa archives. The graphics dependency inventory found ready archives for 88 x86_64 and 71 AArch64 package names at their planned versions. AArch64 libxml2 had two different archives for 2.13.9-1. The graphics queue uses the archive already installed in the audited LLVM SDK, SHA-256 `b5cda4ef51da15ed533f54354aa54bdadf0b604fa3db5cfa1b903ed914206a5e`. See `xorg/mesa-dependency-pool-01` and `release-inputs/upstream-7f173671/order-02`, receipt SHA-256 `b5c322922dc200c50a7ac7d36fa9f07f5c09a699c1ca40dd7e13a6182bd01959` and `0432bbc6fff489421b88046086cd2de6f8cddc6242fd40605c2bbc70b2d0ff2b`.