From bcf11589caebb12f81ae9333e428c4981c045c65 Mon Sep 17 00:00:00 2001 From: diviocity Date: Sun, 29 Nov 2026 23:59:39 +0100 Subject: [PATCH] Build X.Org authentication, transport and fences against the target SDK --- libxau/PKGBUILD.vile | 16 +++++----------- libxdmcp/PKGBUILD.vile | 16 +++++----------- libxshmfence/PKGBUILD.vile | 31 +++++++++++++++++++++++++++++++ xtrans/PKGBUILD.vile | 9 +++------ 4 files changed, 44 insertions(+), 28 deletions(-) create mode 100644 libxshmfence/PKGBUILD.vile diff --git a/libxau/PKGBUILD.vile b/libxau/PKGBUILD.vile index 50bec8f..5b28d5b 100644 --- a/libxau/PKGBUILD.vile +++ b/libxau/PKGBUILD.vile @@ -1,28 +1,22 @@ defpkgbuild(libxau, #:pkgname, "libxau", #:pkgver, "1.0.11", - #:pkgrel, 1, + #:pkgrel, 2, #:pkgdesc, "X11 authorization library", - #:arch, [#:x86-64], + #:arch, [#:x86-64, #:aarch64], #:license, "MIT", #:url, "https://xorg.freedesktop.org/", - #:depends, ["musl"], - #:makedepends, ["xorgproto"], + #:depends, ["musl", "xorgproto"], #:source, ["https://xorg.freedesktop.org/archive/individual/lib/libXau-1.0.11.tar.xz"], #:sha256sums, ["f3fa3282f5570c3f6bd620244438dbfbdd580fc80f02f549587a0f8ab329bbeb"], #:build, fn() { - root := get-environment-variable("VPAC_MAKEPKG_ROOT") - run("env", "-u", "CPATH", "-u", "C_INCLUDE_PATH", "-u", "LIBRARY_PATH", "CC=vinix-cc", - "PKG_CONFIG_PATH=", string-append("PKG_CONFIG_LIBDIR=", root, "/usr/lib/pkgconfig:", root, "/usr/share/pkgconfig"), - string-append("PKG_CONFIG_SYSROOT_DIR=", root), - "libXau-1.0.11/configure", "--build=x86_64-pc-linux-gnu", "--host=x86_64-linux-musl", "--prefix=/usr") + run("vinix-configure", "libXau-1.0.11/configure") run("make") }, #:check, fn() { - root := get-environment-variable("VPAC_MAKEPKG_ROOT") run("make", "Autest") - run(string-append(root, "/lib/ld-musl-x86_64.so.1"), "--library-path", ".libs", ".libs/Autest") + run("vinix-run", "--library-path", ".libs", ".libs/Autest") }, #:package, fn() { run("make", "install", string-append("DESTDIR=", pkgdir())) diff --git a/libxdmcp/PKGBUILD.vile b/libxdmcp/PKGBUILD.vile index eb4b0aa..4761936 100644 --- a/libxdmcp/PKGBUILD.vile +++ b/libxdmcp/PKGBUILD.vile @@ -1,28 +1,22 @@ defpkgbuild(libxdmcp, #:pkgname, "libxdmcp", #:pkgver, "1.1.5", - #:pkgrel, 1, + #:pkgrel, 2, #:pkgdesc, "X display manager control protocol library", - #:arch, [#:x86-64], + #:arch, [#:x86-64, #:aarch64], #:license, "MIT", #:url, "https://xorg.freedesktop.org/", - #:depends, ["musl"], - #:makedepends, ["xorgproto"], + #:depends, ["musl", "xorgproto"], #:source, ["https://xorg.freedesktop.org/archive/individual/lib/libXdmcp-1.1.5.tar.xz"], #:sha256sums, ["d8a5222828c3adab70adf69a5583f1d32eb5ece04304f7f8392b6a353aa2228c"], #:build, fn() { - root := get-environment-variable("VPAC_MAKEPKG_ROOT") - run("env", "-u", "CPATH", "-u", "C_INCLUDE_PATH", "-u", "LIBRARY_PATH", "CC=vinix-cc", - "PKG_CONFIG_PATH=", string-append("PKG_CONFIG_LIBDIR=", root, "/usr/lib/pkgconfig:", root, "/usr/share/pkgconfig"), - string-append("PKG_CONFIG_SYSROOT_DIR=", root), - "libXdmcp-1.1.5/configure", "--build=x86_64-pc-linux-gnu", "--host=x86_64-linux-musl", "--prefix=/usr", "--disable-docs") + run("vinix-configure", "libXdmcp-1.1.5/configure", "--disable-docs") run("make") }, #:check, fn() { - root := get-environment-variable("VPAC_MAKEPKG_ROOT") run("make", "-C", "test", "Array") - run(string-append(root, "/lib/ld-musl-x86_64.so.1"), "--library-path", ".libs", "test/.libs/Array") + run("vinix-run", "--library-path", ".libs", "test/.libs/Array") }, #:package, fn() { run("make", "install", string-append("DESTDIR=", pkgdir())) diff --git a/libxshmfence/PKGBUILD.vile b/libxshmfence/PKGBUILD.vile new file mode 100644 index 0000000..9bb2b18 --- /dev/null +++ b/libxshmfence/PKGBUILD.vile @@ -0,0 +1,31 @@ +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")) + }) diff --git a/xtrans/PKGBUILD.vile b/xtrans/PKGBUILD.vile index 6bc8f63..01270b0 100644 --- a/xtrans/PKGBUILD.vile +++ b/xtrans/PKGBUILD.vile @@ -1,21 +1,18 @@ defpkgbuild(xtrans, #:pkgname, "xtrans", #:pkgver, "1.5.2", - #:pkgrel, 1, + #:pkgrel, 2, #:pkgdesc, "X.Org transport implementation headers", #:arch, [#:any], #:license, "MIT", #:url, "https://xorg.freedesktop.org/", + #:depends, ["xorgproto"], #:makedepends, ["musl"], #:source, ["https://xorg.freedesktop.org/archive/individual/lib/xtrans-1.5.2.tar.xz"], #:sha256sums, ["5c5cbfe34764a9131d048f03c31c19e57fb4c682d67713eab6a65541b4dff86c"], #:build, fn() { - root := get-environment-variable("VPAC_MAKEPKG_ROOT") - run("env", "-u", "CPATH", "-u", "C_INCLUDE_PATH", "-u", "LIBRARY_PATH", "CC=vinix-cc", - "PKG_CONFIG_PATH=", string-append("PKG_CONFIG_LIBDIR=", root, "/usr/lib/pkgconfig:", root, "/usr/share/pkgconfig"), - string-append("PKG_CONFIG_SYSROOT_DIR=", root), - "xtrans-1.5.2/configure", "--build=x86_64-pc-linux-gnu", "--host=x86_64-linux-musl", "--prefix=/usr", "--disable-docs") + run("vinix-configure", "xtrans-1.5.2/configure", "--disable-docs") run("make") }, #:check, fn() { -- 2.56.1