diff --git a/x11-servers/xorg-server/Makefile b/x11-servers/xorg-server/Makefile index dcb4b4c46399..d9f613af45ad 100644 --- a/x11-servers/xorg-server/Makefile +++ b/x11-servers/xorg-server/Makefile @@ -1,135 +1,134 @@ PORTNAME= xorg -PORTVERSION= 21.1.23 -PORTREVISION= 1 +PORTVERSION= 21.1.24 PORTEPOCH= 1 CATEGORIES= x11-servers MASTER_SITES= XORG/individual/xserver DISTNAME= xorg-server-${PORTVERSION} MAINTAINER= x11@FreeBSD.org COMMENT= X.Org X server and related programs WWW= https://www.freedesktop.org/Software/xorg LICENSE= MIT FLAVORS= xorg xnest xephyr xvfb FLAVOR?= ${FLAVORS:[1]} USES= compiler:c11 cpe gl meson pkgconfig tar:xz xorg USE_GL= gl .if ${FLAVOR} == xephyr PORTNAME= xephyr .elif ${FLAVOR} == xorg PKGNAMESUFFIX= -server .elif ${FLAVOR} == xnest PORTEPOCH= 2 PKGNAMESUFFIX= -nestserver .elif ${FLAVOR} == xvfb PKGNAMESUFFIX= -vfbserver .endif .if ${FLAVOR} != xorg PLIST= PKGMESSAGE= BINARY_NAME= ${FLAVOR:C/^(.).*/\1/:tu}${FLAVOR:C/^.//} PLIST_FILES= bin/${BINARY_NAME} \ share/man/man1/${BINARY_NAME}.1.gz .endif DESCR= ${.CURDIR}/pkg-descr-${FLAVOR} BUILD_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-libs RUN_DEPENDS+= xkeyboard-config>=2.5:x11/xkeyboard-config \ xkbcomp:x11/xkbcomp \ ${LOCALBASE}/lib/dri/libdril_dri.so:graphics/mesa-dri MESON_ARGS+= -Dxwin=false \ -Dxquartz=false \ -Ddtrace=false \ -Dhal=false \ -Dsystemd_logind=false \ -Dxselinux=false \ -Dfallback_input_driver=libinput \ -Ddocs=false \ -Dxcsecurity=true \ -Dsecure-rpc=false \ -D${FLAVOR}=true .for f in ${FLAVORS:N${FLAVOR}} MESON_ARGS+= -D${f}=false .endfor .if ${FLAVOR} == xorg LIB_DEPENDS+= libudev.so:devel/libudev-devd \ libxcvt.so:x11/libxcvt MESON_ARGS+= -Dudev=true \ -Dudev_kms=true \ -Dlog_dir=/var/log \ -Dsuid_wrapper=true .else MESON_ARGS+= -Dudev=false \ -Dudev_kms=false .endif .if ${FLAVOR} == xorg || ${FLAVOR} == xephyr MESON_ARGS+= -Ddrm=true LIB_DEPENDS+= libdrm.so:graphics/libdrm \ libepoxy.so:graphics/libepoxy .endif .if ${FLAVOR} == xephyr LIB_DEPENDS+= libxcb-render-util.so:x11/xcb-util-renderutil \ libxcb-image.so:x11/xcb-util-image \ libxcb-icccm.so:x11/xcb-util-wm \ libxcb-keysyms.so:x11/xcb-util-keysyms .endif FONTPATH_ROOT?= ${LOCALBASE}/share/fonts FONTPATHD?= ${PREFIX}/etc/X11/fontpath.d DEFAULT_FONTPATH_LIST= \ ${FONTPATH_ROOT}/misc/ \ ${FONTPATH_ROOT}/TTF/ \ ${FONTPATH_ROOT}/OTF/ \ ${FONTPATH_ROOT}/Type1/ \ ${FONTPATH_ROOT}/100dpi/ \ ${FONTPATH_ROOT}/75dpi/ \ catalogue:${FONTPATHD} MESON_ARGS+= -Ddefault_font_path=${DEFAULT_FONTPATH_LIST:ts,} PLIST_SUB+= FONTPATHD="${FONTPATHD:S,^${PREFIX}/,,}" USE_GL+= gl USE_XORG+= pixman xau xdmcp xfont2 xkbfile xorgproto xshmfence xtrans CPE_VENDOR= x.org CPE_PRODUCT= x_server .if ${FLAVOR} == xorg USE_GL+= gbm USE_XORG+= pciaccess .endif .include .if ${OPSYS} == FreeBSD MESON_ARGS+= -Dsha1=libmd .endif .if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH} == armv7 || ${ARCH} == i386 || ${ARCH} == powerpc || ${ARCH} == powerpc64 || ${ARCH} == powerpc64le LIB_DEPENDS+= libunwind.so:devel/libunwind .endif .if ${FLAVOR} == xorg post-install: @${MKDIR} ${STAGEDIR}${PREFIX}/etc/X11/xorg.conf.d @${MKDIR} ${STAGEDIR}${FONTPATHD} @${MKDIR} ${STAGEDIR}${PREFIX}/share/X11/xorg.conf.d @${INSTALL_DATA} ${FILESDIR}/20-evdev-kbd.conf \ ${STAGEDIR}${PREFIX}/share/X11/xorg.conf.d .else post-install: ${RM} -r ${STAGEDIR}${PREFIX}/lib/xorg/protocol.txt ${RMDIR} ${STAGEDIR}${PREFIX}/lib/xorg ${RM} ${STAGEDIR}${PREFIX}/share/man/man1/Xserver.1 .endif .include diff --git a/x11-servers/xorg-server/distinfo b/x11-servers/xorg-server/distinfo index 80de4593bbcc..be4f20f09bca 100644 --- a/x11-servers/xorg-server/distinfo +++ b/x11-servers/xorg-server/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1780361051 -SHA256 (xorg-server-21.1.23.tar.xz) = e39832e5617dadaf072fdf9f0e19e5d2e1c2a13607ac280bac1aba9f8fe14634 -SIZE (xorg-server-21.1.23.tar.xz) = 5069780 +TIMESTAMP = 1783480518 +SHA256 (xorg-server-21.1.24.tar.xz) = 1a4eb36ca65cc3b1b936566d677a9786e13c11cd5806e951ac55f3f5ce3984af +SIZE (xorg-server-21.1.24.tar.xz) = 5072780 diff --git a/x11-servers/xorg-server/files/patch-config_udev.c b/x11-servers/xorg-server/files/patch-config_udev.c index 38b3e84db5ad..9188f89d4348 100644 --- a/x11-servers/xorg-server/files/patch-config_udev.c +++ b/x11-servers/xorg-server/files/patch-config_udev.c @@ -1,56 +1,56 @@ * Don't pass the device parameter when using kbdmux to prevent conflict * * Specify a driver to use for basic devices (keyboard and mouse), otherwise none attaches * ---- config/udev.c.orig 2017-03-15 18:05:25 UTC +--- config/udev.c.orig 2026-07-08 01:35:09 UTC +++ config/udev.c @@ -29,6 +29,7 @@ #include #include +#include #include #include "input.h" -@@ -188,7 +189,21 @@ device_added(struct udev_device *udev_de +@@ -198,7 +199,21 @@ device_added(struct udev_device *udev_device) attrs.product = strdup(name); input_options = input_option_new(input_options, "name", name); input_options = input_option_new(input_options, "path", path); - input_options = input_option_new(input_options, "device", path); + if(strstr(path, "kbdmux") != NULL) { + /* + * Don't pass "device" option if the keyboard is already attached + * to the console (ie. open() fails). This would activate a special + * logic in xf86-input-keyboard. Prevent any other attached to console + * keyboards being processed. There can be only one such device. + */ + int fd = open(path, O_RDONLY); + if (fd > -1) { + close(fd); + input_options = input_option_new(input_options, "device", path); + } + } + else + input_options = input_option_new(input_options, "device", path); input_options = input_option_new(input_options, "major", itoa(major(devnum))); input_options = input_option_new(input_options, "minor", itoa(minor(devnum))); if (path) -@@ -272,6 +287,18 @@ device_added(struct udev_device *udev_de - } - } - +@@ -277,6 +292,18 @@ device_added(struct udev_device *udev_device) + m++; + } + } ++ } ++ } ++ + if (attrs.flags & (ATTR_KEY | ATTR_KEYBOARD)) { + if (!feature_present("evdev_support")) + input_options = input_option_new(input_options, "driver", "kbd"); + } else if (attrs.flags & ATTR_POINTER) { + if (strstr(path, "vbox")) + input_options = input_option_new(input_options, "driver", "vboxmouse"); + else { + if (!feature_present("evdev_support")) + input_options = input_option_new(input_options, "driver", "mouse"); -+ } -+ } -+ - input_options = input_option_new(input_options, "config_info", config_info); + } + } - /* Default setting needed for non-seat0 seats */ diff --git a/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86AutoConfig.c b/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86AutoConfig.c index 6f8bb9321863..22a1398ec78b 100644 --- a/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86AutoConfig.c +++ b/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86AutoConfig.c @@ -1,27 +1,27 @@ * Try using modesetting driver before falling back to scfb or vesa * * Use our scfb driver as fallback instead of Linux's fbdev * ---- hw/xfree86/common/xf86AutoConfig.c.orig 2022-01-02 23:41:56.000000000 +0100 -+++ hw/xfree86/common/xf86AutoConfig.c 2022-06-29 11:57:25.400030000 +0200 +--- hw/xfree86/common/xf86AutoConfig.c.orig 2026-07-08 01:35:09 UTC ++++ hw/xfree86/common/xf86AutoConfig.c @@ -294,7 +294,7 @@ listPossibleVideoDrivers(XF86MatchedDrivers *md) xf86PciMatchDriver(md); #endif -#if defined(__linux__) +#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__) xf86AddMatchedDriver(md, "modesetting"); #endif @@ -302,8 +302,10 @@ listPossibleVideoDrivers(XF86MatchedDrivers *md) /* Fallback to platform default frame buffer driver */ #if !defined(__linux__) && defined(__sparc__) xf86AddMatchedDriver(md, "wsfb"); -#else +#elif defined(__linux__) xf86AddMatchedDriver(md, "fbdev"); +#elif defined(__FreeBSD__) + xf86AddMatchedDriver(md, "scfb"); #endif #endif /* !__sun */ diff --git a/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86str.h b/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86str.h index 4f39ce2e3f2d..bf7b10e15223 100644 --- a/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86str.h +++ b/x11-servers/xorg-server/files/patch-hw_xfree86_common_xf86str.h @@ -1,11 +1,11 @@ ---- hw/xfree86/common/xf86str.h.orig 2022-01-02 23:41:56.000000000 +0100 -+++ hw/xfree86/common/xf86str.h 2022-06-29 11:57:25.502421000 +0200 +--- hw/xfree86/common/xf86str.h.orig 2026-07-08 01:35:09 UTC ++++ hw/xfree86/common/xf86str.h @@ -249,7 +249,7 @@ typedef struct _DriverRec { */ /* Tolerate prior #include */ -#if defined(__linux__) +#if defined(__linux__) || defined(__FreeBSD__) #undef BUS_NONE #undef BUS_PCI #undef BUS_SBUS diff --git a/x11-servers/xorg-server/files/patch-hw_xfree86_meson.build b/x11-servers/xorg-server/files/patch-hw_xfree86_meson.build index 5b5e9e9bc038..fc3e4a0fa468 100644 --- a/x11-servers/xorg-server/files/patch-hw_xfree86_meson.build +++ b/x11-servers/xorg-server/files/patch-hw_xfree86_meson.build @@ -1,11 +1,11 @@ ---- hw/xfree86/meson.build.orig 2022-06-29 14:37:28.042085000 +0000 -+++ hw/xfree86/meson.build 2022-06-29 14:37:36.259147000 +0000 +--- hw/xfree86/meson.build.orig 2026-07-08 01:35:09 UTC ++++ hw/xfree86/meson.build @@ -152,7 +152,7 @@ if get_option('suid_wrapper') c_args: xorg_c_args, install: true, install_dir: get_option('libexecdir'), - install_mode: ['r-sr-xr-x', 0, 0], + # install_mode: ['r-sr-xr-x', 0, 0], ) # meson gets confused when there are two targets of the same name diff --git a/x11-servers/xorg-server/files/patch-hw_xfree86_os-support_bsd_ppc__video.c b/x11-servers/xorg-server/files/patch-hw_xfree86_os-support_bsd_ppc__video.c index 478d009dfebe..25119affe22e 100644 --- a/x11-servers/xorg-server/files/patch-hw_xfree86_os-support_bsd_ppc__video.c +++ b/x11-servers/xorg-server/files/patch-hw_xfree86_os-support_bsd_ppc__video.c @@ -1,14 +1,14 @@ ---- hw/xfree86/os-support/bsd/ppc_video.c.orig 2022-01-02 23:41:56.000000000 +0100 -+++ hw/xfree86/os-support/bsd/ppc_video.c 2022-06-29 11:57:25.691481000 +0200 +--- hw/xfree86/os-support/bsd/ppc_video.c.orig 2026-07-08 01:35:09 UTC ++++ hw/xfree86/os-support/bsd/ppc_video.c @@ -79,7 +79,11 @@ xf86DisableIO() { if (ioBase != MAP_FAILED) { +#if defined(__FreeBSD__) + munmap(__DEVOLATILE(unsigned char *, ioBase), 0x10000); +#else munmap(__UNVOLATILE(ioBase), 0x10000); +#endif ioBase = MAP_FAILED; } } diff --git a/x11-servers/xorg-server/files/patch-hw_xfree86_xorg-wrapper.c b/x11-servers/xorg-server/files/patch-hw_xfree86_xorg-wrapper.c index 9a4327eff91f..02ddfe20d48c 100644 --- a/x11-servers/xorg-server/files/patch-hw_xfree86_xorg-wrapper.c +++ b/x11-servers/xorg-server/files/patch-hw_xfree86_xorg-wrapper.c @@ -1,23 +1,23 @@ * Skip the detection of root rights requirement, the assumption that presence * of KMS drivers removes the root requirement is only valid for Linux * ---- hw/xfree86/xorg-wrapper.c.orig 2022-01-02 23:41:56.000000000 +0100 -+++ hw/xfree86/xorg-wrapper.c 2022-06-29 16:28:24.797008000 +0200 +--- hw/xfree86/xorg-wrapper.c.orig 2026-07-08 01:35:09 UTC ++++ hw/xfree86/xorg-wrapper.c @@ -191,7 +191,7 @@ int main(int argc, char *argv[]) int main(int argc, char *argv[]) { -#ifdef WITH_LIBDRM +#if defined(WITH_LIBDRM) && defined(__linux__) struct drm_mode_card_res res; #endif char buf[PATH_MAX]; @@ -230,7 +230,7 @@ int main(int argc, char *argv[]) } } -#ifdef WITH_LIBDRM +#if defined(WITH_LIBDRM) && defined(__linux__) /* Detect if we need root rights, except when overridden by the config */ if (needs_root_rights == -1) { for (i = 0; i < 16; i++) { diff --git a/x11-servers/xorg-server/files/patch-include_meson.build b/x11-servers/xorg-server/files/patch-include_meson.build index b716f8efcb94..c4c80bb7b66b 100644 --- a/x11-servers/xorg-server/files/patch-include_meson.build +++ b/x11-servers/xorg-server/files/patch-include_meson.build @@ -1,11 +1,11 @@ ---- include/meson.build.orig 2022-07-12 13:27:57.000000000 +0000 -+++ include/meson.build 2022-08-09 00:48:12.688887000 +0000 -@@ -377,7 +377,7 @@ +--- include/meson.build.orig 2026-07-08 01:35:09 UTC ++++ include/meson.build +@@ -382,7 +382,7 @@ if host_machine.system() == 'freebsd' or host_machine. xorg_data.set('HAVE_SYS_VT_H', cc.has_header('sys/vt.h') ? '1' : false) if host_machine.system() == 'freebsd' or host_machine.system() == 'dragonfly' - if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64' + if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64' or host_machine.cpu_family() == 'aarch64' or host_machine.cpu_family() == 'arm' xorg_data.set('USE_DEV_IO', '1') endif elif host_machine.system() == 'netbsd' diff --git a/x11-servers/xorg-server/files/patch-os-utils.c b/x11-servers/xorg-server/files/patch-os-utils.c index 8f9c4f1f137d..654569a1e40b 100644 --- a/x11-servers/xorg-server/files/patch-os-utils.c +++ b/x11-servers/xorg-server/files/patch-os-utils.c @@ -1,18 +1,18 @@ ---- os/utils.c.orig 2014-04-15 01:01:57 UTC +--- os/utils.c.orig 2026-07-08 01:35:09 UTC +++ os/utils.c -@@ -443,11 +443,11 @@ GetTimeInMillis(void) - static clockid_t clockid; +@@ -471,11 +471,11 @@ GetTimeInMillis(void) + struct timespec tp; if (!clockid) { -#ifdef CLOCK_MONOTONIC_COARSE - if (clock_getres(CLOCK_MONOTONIC_COARSE, &tp) == 0 && +#ifdef CLOCK_MONOTONIC_FAST + if (clock_getres(CLOCK_MONOTONIC_FAST, &tp) == 0 && (tp.tv_nsec / 1000) <= 1000 && - clock_gettime(CLOCK_MONOTONIC_COARSE, &tp) == 0) - clockid = CLOCK_MONOTONIC_COARSE; + clock_gettime(CLOCK_MONOTONIC_FAST, &tp) == 0) + clockid = CLOCK_MONOTONIC_FAST; else #endif if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0)