From d914b2bbe5e1296a6ee3cdd5ff76cf12d6b65175 Mon Sep 17 00:00:00 2001 From: diviocity Date: Mon, 30 Nov 2026 20:11:32 +0100 Subject: [PATCH] Track the remaining X11 source recipes --- ports/freeglut/PKGBUILD.vile | 26 +++++++++++++++++ ports/glu/PKGBUILD.vile | 27 ++++++++++++++++++ ports/mesa-demos/PKGBUILD.vile | 42 ++++++++++++++++++++++++++++ ports/xf86-video-fbdev/PKGBUILD.vile | 36 ++++++++++++++++++++++++ ports/xinit/PKGBUILD.vile | 28 +++++++++++++++++++ ports/xorg-server/PKGBUILD.vile | 42 ++++++++++++++++++++++++++++ tests/x11/README.md | 2 ++ 7 files changed, 203 insertions(+) create mode 100644 ports/freeglut/PKGBUILD.vile create mode 100644 ports/glu/PKGBUILD.vile create mode 100644 ports/mesa-demos/PKGBUILD.vile create mode 100644 ports/xf86-video-fbdev/PKGBUILD.vile create mode 100644 ports/xinit/PKGBUILD.vile create mode 100644 ports/xorg-server/PKGBUILD.vile diff --git a/ports/freeglut/PKGBUILD.vile b/ports/freeglut/PKGBUILD.vile new file mode 100644 index 0000000..8c2b5db --- /dev/null +++ b/ports/freeglut/PKGBUILD.vile @@ -0,0 +1,26 @@ +defpkgbuild(freeglut, + #:pkgname, "freeglut", + #:pkgver, "3.4.0", + #:pkgrel, 1, + #:pkgdesc, "OpenGL Utility Toolkit for X11", + #:arch, [#:x86-64, #:aarch64], + #:url, "https://freeglut.sourceforge.net/", + #:license, "MIT", + #:depends, ["mesa-glx-legacy", "libx11", "libxi", "libxxf86vm"], + #:makedepends, ["mesa", "libice", "glu"], + #:source, ["https://distfiles.alpinelinux.org/distfiles/v3.21/freeglut-3.4.0.tar.gz"], + #:sha256sums, ["3c0bcb915d9b180a97edaebd011b7a1de54583a838644dcd42bb0ea0c6f3eaec"], + #:build, fn() { + run("vinix-cmake", "freeglut-3.4.0", "build", "-DFREEGLUT_BUILD_STATIC_LIBS=OFF", + "-DFREEGLUT_BUILD_DEMOS=OFF", "-DFREEGLUT_REPLACE_GLUT=ON", "-DFREEGLUT_WAYLAND=OFF") + run("cmake", "--build", "build", "--parallel", "2") + }, + #:check, fn() { + run("readelf", "-d", "build/lib/libglut.so.3") + }, + #:package, fn() { + run("env", string-append("DESTDIR=", pkgdir()), "cmake", "--install", "build") + run("test", "-s", string-append(pkgdir(), "/usr/lib/pkgconfig/glut.pc")) + run("ln", "-s", "glut.pc", string-append(pkgdir(), "/usr/lib/pkgconfig/freeglut.pc")) + run("install", "-Dm644", "freeglut-3.4.0/COPYING", string-append(pkgdir(), "/usr/share/licenses/freeglut/COPYING")) + }) diff --git a/ports/glu/PKGBUILD.vile b/ports/glu/PKGBUILD.vile new file mode 100644 index 0000000..82c3fa2 --- /dev/null +++ b/ports/glu/PKGBUILD.vile @@ -0,0 +1,27 @@ +defpkgbuild(glu, + #:pkgname, "glu", + #:pkgver, "9.0.3", + #:pkgrel, 1, + #:pkgdesc, "OpenGL utility library for the Vinix Mesa SDK", + #:arch, [#:x86-64, #:aarch64], + #:license, "SGI-B-1.1 AND SGI-B-2.0", + #:url, "https://archive.mesa3d.org/glu/", + #:depends, ["mesa-gallium-sdk", "gcc-libs", "glu-headers"], + #:source, ["https://archive.mesa3d.org/glu/glu-9.0.3.tar.xz"], + #:sha256sums, ["bd43fe12f374b1192eb15fe20e45ff456b9bc26ab57f0eee919f96ca0f8a330f"], + #:build, fn() { + run("vinix-meson", "glu-9.0.3", "build", "-Ddefault_library=shared", "-Dgl_provider=osmesa") + run("meson", "compile", "-C", "build", "-j2") + }, + #:check, fn() { + run("readelf", "-d", "build/src/libGLU.so") + }, + #:package, fn() { + run("meson", "install", "--no-rebuild", "-C", "build", "--destdir", pkgdir()) + run("rm", string-append(pkgdir(), "/usr/include/GL/glu.h")) + for-each(fn(file) { + notice := string-append(pkgdir(), "/usr/share/licenses/glu/", file) + run("install", "-Dm644", string-append("glu-9.0.3/", file), notice) + run("sed", "-i", "/^[[:space:]]*\\*\\//q", notice) + }, list("include/GL/glu.h", "src/libnurbs/interface/glinterface.cc")) + }) diff --git a/ports/mesa-demos/PKGBUILD.vile b/ports/mesa-demos/PKGBUILD.vile new file mode 100644 index 0000000..297460c --- /dev/null +++ b/ports/mesa-demos/PKGBUILD.vile @@ -0,0 +1,42 @@ +defpkgbuild(mesa-demos, + #:pkgname, "mesa-demos", + #:pkgver, "9.0.0", + #:pkgrel, 1, + #:pkgdesc, "GLX utilities and OpenGL demos used by the Vinix X11 sidecar", + #:arch, [#:x86-64, #:aarch64], + #:license, ["MIT", "LicenseRef-SGI-triangle", "LicenseRef-Public-Domain"], + #:url, "https://www.mesa3d.org/", + #:depends, ["mesa-glx-legacy", "libx11", "freeglut"], + #:makedepends, ["mesa", "glu", "libxext"], + #:source, ["https://archive.mesa3d.org/demos/mesa-demos-9.0.0.tar.xz", + "https://raw.githubusercontent.com/alpinelinux/aports/a7de3e63cc8015474a4feadd8bb7c0ecc097b1fa/community/mesa-demos/glx.patch"], + #:sha256sums, ["3046a3d26a7b051af7ebdd257a5f23bfeb160cad6ed952329cdff1e9f1ed496b", + "ea5d5c8e1908f5c32906d0e0df804f15ecc8c36c71a26af538f012b0f0d1ccfa"], + #:prepare, fn() { + ; Mesa's GLX implementation is exported by libGL and has no separate glx.pc. + run("patch", "--batch", "--fuzz=0", "-d", "mesa-demos-9.0.0", "-p1", "-i", "../glx.patch") + }, + #:build, fn() { + run("vinix-meson", "mesa-demos-9.0.0", "build", "--wrap-mode=nofallback", + "-Dx11=enabled", "-Dglut=enabled", "-Dvulkan=disabled", "-Dwayland=disabled", + "-Degl=disabled", "-Dgles1=disabled", "-Dgles2=disabled", "-Dosmesa=disabled", "-Dlibdrm=disabled") + ; src/samples also defines a distinct program named tri; upstream installs src/trivial/tri. + run("ninja", "-C", "build", "-j2", "src/xdemos/glxinfo", "src/xdemos/glxgears", + "src/xdemos/glxdemo", "src/trivial/tri") + }, + #:check, fn() { + run("vinix-run", "build/src/xdemos/glxinfo", "-h") + }, + #:package, fn() { + for-each(fn(program) { + run("install", "-Dm755", string-append("build/src/xdemos/", program), + string-append(pkgdir(), "/usr/bin/", program)) + }, list("glxinfo", "glxgears", "glxdemo")) + run("install", "-Dm755", "build/src/trivial/tri", string-append(pkgdir(), "/usr/bin/tri")) + for-each(fn(file) { + notice := string-append(pkgdir(), "/usr/share/licenses/mesa-demos/", file) + run("install", "-Dm644", string-append("mesa-demos-9.0.0/src/", file), notice) + run("sed", "-i", "/^[[:space:]]*\\*\\//q", notice) + }, list("xdemos/glxinfo.c", "xdemos/glxgears.c", "xdemos/glxdemo.c", + "util/glinfo_common.c", "glad/include/KHR/khrplatform.h", "trivial/tri.c")) + }) diff --git a/ports/xf86-video-fbdev/PKGBUILD.vile b/ports/xf86-video-fbdev/PKGBUILD.vile new file mode 100644 index 0000000..fa62813 --- /dev/null +++ b/ports/xf86-video-fbdev/PKGBUILD.vile @@ -0,0 +1,36 @@ +defpkgbuild(xf86-video-fbdev, + #:pkgname, "xf86-video-fbdev", + #:pkgver, "0.5.1", + #:pkgrel, 1, + #:pkgdesc, "Vinix Xorg framebuffer driver", + #:arch, [#:x86-64, #:aarch64], + #:license, "MIT", + #:url, "https://www.x.org/", + #:depends, ["xorg-server"], + #:makedepends, ["linux-headers", "xorgproto"], + #:source, [ + "https://xorg.freedesktop.org/archive/individual/driver/xf86-video-fbdev-0.5.1.tar.xz", + "https://raw.githubusercontent.com/vlang/vinix/c34a6707e1d8d3a23d0b1bfe6e6dbb16290e4f75/patches/xf86-video-fbdev/jinx-working-patch.patch" + ], + #:sha256sums, [ + "9c2bc0fb9af092804138e8d5cb5627cabf2919ef60f0d1544a95c4ac2047f387", + "3b4460c13dc2b3216df24f2638a64d9b8e49ce88bd2c1a1fdd74c2ad72d9a9d4" + ], + #:prepare, fn() { + run("patch", "--batch", "--fuzz=0", "-d", "xf86-video-fbdev-0.5.1", "-p1", "-i", "../jinx-working-patch.patch") + }, + #:build, fn() { + root := get-environment-variable("VPAC_MAKEPKG_ROOT") + modules := string-append(root, "/usr/lib/xorg/modules") + run("env", "CPPFLAGS=-D__vinix__", string-append("LDFLAGS=-L", modules, " -Wl,-rpath-link,", modules), + "vinix-configure", "xf86-video-fbdev-0.5.1/configure", "--disable-pciaccess") + run("make", string-append("SYSROOT=", root), "moduledir=/usr/lib/xorg/modules") + }, + #:check, fn() { + run("readelf", "-d", "src/.libs/fbdev_drv.so") + }, + #:package, fn() { + run("make", "install", "moduledir=/usr/lib/xorg/modules", string-append("DESTDIR=", pkgdir())) + run("find", pkgdir(), "-name", "*.la", "-delete") + run("install", "-Dm644", "xf86-video-fbdev-0.5.1/COPYING", string-append(pkgdir(), "/usr/share/licenses/xf86-video-fbdev/COPYING")) + }) diff --git a/ports/xinit/PKGBUILD.vile b/ports/xinit/PKGBUILD.vile new file mode 100644 index 0000000..85c38e4 --- /dev/null +++ b/ports/xinit/PKGBUILD.vile @@ -0,0 +1,28 @@ +defpkgbuild(xinit, + #:pkgname, "xinit", + #:pkgver, "1.4.2", + #:pkgrel, 1, + #:pkgdesc, "X.Org initialisation program", + #:arch, [#:x86-64, #:aarch64], + #:license, "MIT AND GPL-2.0-or-later", + #:url, "https://www.x.org/", + #:depends, ["libx11", "busybox", "vinix-x11", "xorg-server", "xclock", "xset"], + #:makedepends, ["xorgproto"], + #:source, ["https://xorg.freedesktop.org/archive/individual/app/xinit-1.4.2.tar.xz", + "vinix-startx::https://raw.githubusercontent.com/vlang/vinix/c34a6707e1d8d3a23d0b1bfe6e6dbb16290e4f75/build-support/xorg-server/startx"], + #:sha256sums, ["b7d8dc8d22ef9f15985a10b606ee4f2aad6828befa437359934647e88d331f23", + "386ca12bda697cf94793693708b0b28f51c43a21c5a911f5ab3f2f815ca09821"], + + #:build, fn() { + run("vinix-configure", "xinit-1.4.2/configure", "--with-xinitdir=/etc/X11/xinit", "--with-xrdb=/usr/bin/xrdb", "--with-xmodmap=/usr/bin/xmodmap") + run("make") + }, + #:check, fn() { + run("readelf", "-l", "xinit") + }, + #:package, fn() { + run("make", "install", string-append("DESTDIR=", pkgdir())) + run("install", "-m755", "vinix-startx", string-append(pkgdir(), "/usr/bin/startx")) + run("install", "-Dm644", "xinit-1.4.2/COPYING", + string-append(pkgdir(), "/usr/share/licenses/xinit/COPYING")) + }) diff --git a/ports/xorg-server/PKGBUILD.vile b/ports/xorg-server/PKGBUILD.vile new file mode 100644 index 0000000..a83e30c --- /dev/null +++ b/ports/xorg-server/PKGBUILD.vile @@ -0,0 +1,42 @@ +defpkgbuild(xorg-server, + #:pkgname, "xorg-server", + #:pkgver, "21.1.16", + #:pkgrel, 1, + #:pkgdesc, "Vinix Xorg server and GLX-enabled Xvfb", + #:arch, [#:x86-64, #:aarch64], + #:license, "MIT", + #:url, "https://www.x.org/", + #:depends, ["musl", "libdrm", "libepoxy", "libxau", "libxcvt", "libxdmcp", "libxfont2", + "libxshmfence", "mesa", "mesa-glx-legacy", "nettle", "pixman", "xkbcomp", "xkeyboard-config", + "font-cursor-misc", "font-misc-misc", "xvfb"], + #: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", "accelerated", "xorg-server-21.1.16", "accelerated") + run("sed", "-i", "s|^#define DRI_DRIVER_PATH .*|#define DRI_DRIVER_PATH \"/usr/lib/xorg/modules/dri\"|", "accelerated/include/dix-config.h") + run("sed", "-i", "s|^export_dynamic_flag_spec=\"\"$|export_dynamic_flag_spec=\"\\${wl}--export-dynamic\"|", "accelerated/libtool") + run("make", "-C", "accelerated") + }, + #:check, fn() { + run("vinix-run", "accelerated/hw/xfree86/Xorg", "-version") + run("test", "-x", "accelerated/hw/vfb/Xvfb") + }, + #:package, fn() { + run("make", "-C", "accelerated", "install", string-append("DESTDIR=", pkgdir())) + run("mv", string-append(pkgdir(), "/usr/bin/Xvfb"), string-append(pkgdir(), "/usr/bin/Xvfb-glx")) + run("rm", "-f", string-append(pkgdir(), "/usr/share/man/man1/Xvfb.1")) + run("find", pkgdir(), "-name", "*.la", "-delete") + run("install", "-Dm644", "xorg-server-21.1.16/COPYING", string-append(pkgdir(), "/usr/share/licenses/xorg-server/COPYING")) + }) diff --git a/tests/x11/README.md b/tests/x11/README.md index d75c496..9127e2f 100644 --- a/tests/x11/README.md +++ b/tests/x11/README.md @@ -81,4 +81,6 @@ Set `VINIX_MESA_NATIVE_FILE` to a Meson native machine file whose `pkg_config_pa When 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`. +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`. + The 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`. -- 2.56.1