diff --git a/x11-servers/xorg-server/Makefile b/x11-servers/xorg-server/Makefile --- a/x11-servers/xorg-server/Makefile +++ b/x11-servers/xorg-server/Makefile @@ -1,5 +1,6 @@ PORTNAME= xorg PORTVERSION= 21.1.12 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= x11-servers MASTER_SITES= XORG/individual/xserver @@ -34,7 +35,6 @@ BINARY_NAME= ${FLAVOR:C/^(.).*/\1/:tu}${FLAVOR:C/^.//} PLIST_FILES= bin/${BINARY_NAME} \ share/man/man1/${BINARY_NAME}.1.gz -PLIST_DIRS= /var/lib/xkb /var/lib .endif DESCR= ${.CURDIR}/pkg-descr-${FLAVOR} @@ -53,8 +53,6 @@ -Dfallback_input_driver=libinput \ -Ddocs=false \ -Dxcsecurity=true \ - -Dxkb_dir=${LOCALBASE}/share/X11/xkb \ - -Dxkb_output_dir=/var/lib/xkb \ -D${FLAVOR}=true .for f in ${FLAVORS:N${FLAVOR}} @@ -126,13 +124,11 @@ @${MKDIR} ${STAGEDIR}${PREFIX}/share/X11/xorg.conf.d @${INSTALL_DATA} ${FILESDIR}/20-evdev-kbd.conf \ ${STAGEDIR}${PREFIX}/share/X11/xorg.conf.d - ${MKDIR} -p ${STAGEDIR}/var/lib/xkb .else post-install: ${RM} -r ${STAGEDIR}${PREFIX}/lib/xorg/protocol.txt ${RMDIR} ${STAGEDIR}${PREFIX}/lib/xorg ${RM} ${STAGEDIR}${PREFIX}/share/man/man1/Xserver.1 - ${MKDIR} -p ${STAGEDIR}/var/lib/xkb .endif .include diff --git a/x11-servers/xorg-server/files/patch-xkb_ddxLoad.c b/x11-servers/xorg-server/files/patch-xkb_ddxLoad.c new file mode 100644 --- /dev/null +++ b/x11-servers/xorg-server/files/patch-xkb_ddxLoad.c @@ -0,0 +1,30 @@ +--- xkb/ddxLoad.c.orig 2024-04-03 20:50:12 UTC ++++ xkb/ddxLoad.c +@@ -31,6 +31,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. + #include + + #include ++#include + #include + #include + #include +@@ -70,9 +71,17 @@ OutputDirectory(char *outdir, size_t size) + /* Can we write an xkm and then open it too? */ + if (access(XKM_OUTPUT_DIR, W_OK | X_OK) == 0) { + directory = XKM_OUTPUT_DIR; +- if (XKM_OUTPUT_DIR[strlen(XKM_OUTPUT_DIR) - 1] != '/') +- pathsep = "/"; ++ } else { ++ const char *xdg_runtime_dir = getenv("XDG_RUNTIME_DIR"); ++ ++ if (xdg_runtime_dir && xdg_runtime_dir[0] == '/' && ++ access(xdg_runtime_dir, W_OK | X_OK) == 0) ++ directory = xdg_runtime_dir; + } ++ ++ if (directory && directory[strlen(directory) - 1] != '/') ++ pathsep = "/"; ++ + #else + directory = Win32TempDir(); + pathsep = "\\"; diff --git a/x11-servers/xorg-server/pkg-plist b/x11-servers/xorg-server/pkg-plist --- a/x11-servers/xorg-server/pkg-plist +++ b/x11-servers/xorg-server/pkg-plist @@ -189,5 +189,3 @@ share/aclocal/xorg-server.m4 @dir etc/X11/xorg.conf.d @dir %%FONTPATHD%% -@dir /var/lib/xkb -@dir /var/lib