From 746e8aae66750970127c98c9320fd3e0c626a164 Mon Sep 17 00:00:00 2001 From: diviocity Date: Mon, 30 Nov 2026 23:04:49 +0100 Subject: [PATCH] Use the SDK libdrm headers for Xorg glamor --- ports/xorg-server/PKGBUILD.vile | 3 ++- ports/xorg-server/configure.v | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ports/xorg-server/PKGBUILD.vile b/ports/xorg-server/PKGBUILD.vile index a83e30c..2a7cbd6 100644 --- a/ports/xorg-server/PKGBUILD.vile +++ b/ports/xorg-server/PKGBUILD.vile @@ -18,7 +18,7 @@ defpkgbuild(xorg-server, #:sha256sums, [ "b14a116d2d805debc5b5b2aac505a279e69b217dae2fae2dfcb62400471a9970", "74929113283893aff082d39edfa4a39f6e4f68134572831ce55ad75ebbc47449", - "9ac9cb2e6ae8e24833ba13c8cf6a34bfdf6ca49fa6e9f3bc16f2e876cbcbede5" + "7db6b08c06911f0c59916bda8c5fd61d6c610833f6e461fdaac8333dc06458cb" ], #:prepare, fn() { run("patch", "--batch", "--fuzz=0", "-d", "xorg-server-21.1.16", "-p1", "-i", "../jinx-working-patch.patch") @@ -27,6 +27,7 @@ defpkgbuild(xorg-server, 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/hw/xfree86/glamor_egl", "glamor_egl.lo") run("make", "-C", "accelerated") }, #:check, fn() { diff --git a/ports/xorg-server/configure.v b/ports/xorg-server/configure.v index 9a176a3..b5df87c 100644 --- a/ports/xorg-server/configure.v +++ b/ports/xorg-server/configure.v @@ -14,7 +14,12 @@ fn configure(profile string, source string, build string) ! { script := os.abs_path(os.join_path(source, 'configure')) os.mkdir_all(build)! os.chdir(build)! - os.setenv('CPPFLAGS', (os.getenv('CPPFLAGS') + ' -D__vinix__').trim_space(), true) + mut cppflags := os.getenv('CPPFLAGS') + ' -D__vinix__' + if profile == 'accelerated' { + // The Xorg-only glamor module includes xf86drm.h outside the DRI3 build. + cppflags += ' -I' + root + '/usr/include/libdrm' + } + os.setenv('CPPFLAGS', cppflags.trim_space(), true) os.setenv('LDFLAGS', (os.getenv('LDFLAGS') + ' -Wl,-rpath-link,' + root + '/usr/lib -rdynamic').trim_space(), true) mut args := [script, '--localstatedir=/var', '--with-xkb-bin-directory=/usr/bin', '--with-xkb-path=/usr/share/X11/xkb', '--with-xkb-output=/var/lib/xkb', -- 2.56.1