git: 88b0ae2bb9c6 - main - xorg: upgrade to 21.1.4

From: Baptiste Daroussin <bapt_at_FreeBSD.org>
Date: Tue, 02 Aug 2022 07:26:25 UTC
The branch main has been updated by bapt:

URL: https://cgit.FreeBSD.org/ports/commit/?id=88b0ae2bb9c65edc63073dc211fb57e3dec05a9e

commit 88b0ae2bb9c65edc63073dc211fb57e3dec05a9e
Author:     Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2022-06-29 13:44:41 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2022-08-02 07:26:03 +0000

    xorg: upgrade to 21.1.4
    
    Port changes:
    - flavorize the port
    - decouple Xwayland as it has been split from Xorg
    - switch to meson
    - cleanup non necessary patches anymore
    - stop butchering the build system to play with Xorg.wrap but do it
      in post-install
    - remove dmx (no longer existing)
    - use libmd for sha1 (remove dependency on open/libre ssl)
    - always activate RPC security
    - simplify postinstall/deinstall script and make them cross install friendly
    - remove the SUID option and make it the default, we cannot startx as user without it
    - only keep the mesa-dri dependency on xorg-server not others
    
    xf86-video-ati: fix build with recent xorg
    
    While here incorporate a patch which prevent crash of the driver
    when xrandr is invoked
    
    Update x11/libxcvt to provide cvt(1) and friends which are not provided anymore
    Xorg
    
    Reviewed by:            tcberner, manu, jbeich
    Approved by:            tcberner, manu
    Differential Revision:  https://reviews.freebsd.org/D35661
---
 MOVED                                              |   5 +
 Mk/Uses/display.mk                                 |   2 +-
 Mk/Uses/xorg-cat.mk                                |  18 +-
 net/tsclient/Makefile                              |   2 +-
 www/selenium/Makefile                              |   1 +
 www/selenium/pkg-message                           |   2 +-
 x11-drivers/xf86-video-ati/Makefile                |   5 +-
 x11-drivers/xf86-video-ati/distinfo                |   4 +-
 ...01_dont_set_sourcevalidate_pointer_to_null.diff |  27 +
 x11-servers/Makefile                               |   4 -
 x11-servers/xephyr/Makefile                        |  28 -
 x11-servers/xorg-dmx/Makefile                      |  20 -
 x11-servers/xorg-dmx/pkg-descr                     |   6 -
 x11-servers/xorg-dmx/pkg-plist                     |  16 -
 x11-servers/xorg-nestserver/Makefile               |  25 -
 x11-servers/xorg-server/Makefile                   | 153 ++--
 x11-servers/xorg-server/distinfo                   |   6 +-
 ...0002-xephyr_Dont_check_for_SeatId_anymore.patch |  63 ++
 x11-servers/xorg-server/files/config_Makefile.am   |  16 -
 x11-servers/xorg-server/files/configure.ac         |  97 ---
 .../xorg-server/files/hw_xfree86_Makefile.am       |  14 -
 ...-Xserver-hw-xfree86-os-support-misc-Makefile.in |  12 -
 .../xorg-server/files/patch-config_Makefile.in     | 100 ---
 .../files/patch-config_config-backends.h           |  12 -
 .../xorg-server/files/patch-config_config.c        |  23 -
 x11-servers/xorg-server/files/patch-config_devd.c  | 858 ---------------------
 x11-servers/xorg-server/files/patch-configure      | 165 ----
 .../xorg-server/files/patch-hw_xfree86_Makefile.in |  14 -
 .../files/patch-hw_xfree86_common_xf86AutoConfig.c |   8 +-
 .../files/patch-hw_xfree86_common_xf86Config.c     |  22 -
 .../files/patch-hw_xfree86_common_xf86Globals.c    |  14 -
 .../files/patch-hw_xfree86_common_xf86Xinput.c     |  21 -
 .../files/patch-hw_xfree86_common_xf86str.h        |   4 +-
 .../xorg-server/files/patch-hw_xfree86_meson.build |  11 +
 .../patch-hw_xfree86_os-support_bsd_bsd__init.c    |   6 +-
 .../patch-hw_xfree86_os-support_bsd_ppc__video.c   |   4 +-
 .../files/patch-hw_xfree86_xorg-wrapper.c          |  20 +-
 .../files/patch-include_dix-config.h.in            |  14 -
 x11-servers/xorg-server/files/patch-test_xtest.c   |  17 -
 .../xorg-server/files/patch-xkb_Makefile.in        |  16 -
 x11-servers/xorg-server/files/pkg-deinstall.in     |   9 -
 x11-servers/xorg-server/files/pkg-install.in       |  17 -
 .../xorg-server/files/pkg-post-deinstall.in        |   1 +
 x11-servers/xorg-server/files/pkg-post-install.in  |   6 +
 x11-servers/xorg-server/files/xkb_Makefile.am      |  13 -
 .../pkg-descr => xorg-server/pkg-descr-xephyr}     |   0
 .../pkg-descr => xorg-server/pkg-descr-xnest}      |   0
 .../xorg-server/{pkg-descr => pkg-descr-xorg}      |   0
 .../pkg-descr => xorg-server/pkg-descr-xvfb}       |   0
 x11-servers/xorg-server/pkg-plist                  |  25 +-
 x11-servers/xorg-vfbserver/Makefile                |  22 -
 x11/libxcvt/Makefile                               |   1 +
 x11/libxcvt/pkg-plist                              |   4 +-
 x11/py-pyvirtualdisplay/Makefile                   |   4 +-
 x11/xorg/Makefile                                  |   5 +-
 x11/xpra/Makefile                                  |   2 +-
 56 files changed, 258 insertions(+), 1706 deletions(-)

diff --git a/MOVED b/MOVED
index 728f7c33e5d1..5537eb169726 100644
--- a/MOVED
+++ b/MOVED
@@ -17528,3 +17528,8 @@ deskutils/gnome-documents||2022-08-01|Has expired: Archived upstream
 deskutils/gnome-search-tool||2022-08-01|Has expired: Did not survive gnome3
 security/nextcloud-twofactor_u2f|security/nextcloud-twofactor_webauthn|2022-08-01|Has expired: Upstream deprecated this port in favor of twofactor_webauthn. Check https://github.com/nextcloud/twofactor_webauthn#migration-from-two-factor-u2f for migration instructions
 editors/codelite||2022-08-01|Has expired: Has been broken for over a year.
+x11-servers/xephyr|x11-servers/xorg@xephyr|2022-08-02|Merged into flavorized version
+x11-servers/xorg-nestserver|x11-servers/xorg@xnest|2022-08-02|Merged into the flavorized version
+x11-servers/xorg-nestserver|x11-servers/xorg@xnest|2022-08-02|Merged into the flavorized version
+x11-servers/xorg-vfbserver|x11-servers/xorg@xvfb|2022-08-02|Merged into the flavorized version
+x11-servers/xorg-dmx||2022-08-02|Discontinued upstream
diff --git a/Mk/Uses/display.mk b/Mk/Uses/display.mk
index d8ed976b5bff..886d65b01ad7 100644
--- a/Mk/Uses/display.mk
+++ b/Mk/Uses/display.mk
@@ -14,7 +14,7 @@ display_ARGS=	install
 .  endif
 
 .  if !defined(DISPLAY)
-BUILD_DEPENDS+=	Xvfb:x11-servers/xorg-vfbserver \
+BUILD_DEPENDS+=	Xvfb:x11-servers/xorg-server@xvfb \
 	${LOCALBASE}/share/fonts/misc/8x13O.pcf.gz:x11-fonts/xorg-fonts-miscbitmaps \
 	${LOCALBASE}/share/fonts/misc/fonts.alias:x11-fonts/font-alias \
 	${LOCALBASE}/share/X11/xkb/rules/base:x11/xkeyboard-config \
diff --git a/Mk/Uses/xorg-cat.mk b/Mk/Uses/xorg-cat.mk
index 1134ff977b94..a71628efe608 100644
--- a/Mk/Uses/xorg-cat.mk
+++ b/Mk/Uses/xorg-cat.mk
@@ -17,7 +17,6 @@
 # 		* proto    install .pc file, needs pathfix, most only needed at
 # 		           build time.
 # 		* util     no particular notes
-# 		* xserver  xorg x servers
 #
 # 		These categories has to match upstream categories.  Don't invent
 # 		your own.
@@ -35,7 +34,7 @@
 .if !defined(_INCLUDE_USES_XORG_CAT_MK)
 _INCLUDE_USES_XORG_CAT_MK=yes
 
-_XORG_CATEGORIES=	app data doc driver font lib proto util xserver
+_XORG_CATEGORIES=	app data doc driver font lib proto util
 _XORG_BUILDSYSTEMS=	autotools meson
 
 _XORG_CAT=		# empty
@@ -163,21 +162,6 @@ CONFIGURE_ARGS+=--enable-malloc0returnsnull
 .  elif ${_XORG_CAT} == proto
 .include "${USESDIR}/pathfix.mk"
 
-.  elif ${_XORG_CAT} == xserver
-DISTNAME?=	xorg-server-${PORTVERSION}
-CFLAGS+=	-Werror=uninitialized
-.include "${USESDIR}/pathfix.mk"
-.    if ${_XORG_BUILDSYS} == meson
-# put meson stuff here
-.    else
-CONFIGURE_ARGS+=	--with-xkb-path=${LOCALBASE}/share/X11/xkb \
-			--with-fontrootdir=${LOCALBASE}/share/fonts
-libtool_ARGS?=	# empty
-.include "${USESDIR}/libtool.mk"
-.    endif
-LIB_PC_DEPENDS+=	${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-dri
-USE_XORG+=	fontutil
-
 .  endif # ${_XORG_CAT} == <category>
 
 # We only need to include xorg.mk if we want USE_XORG modules
diff --git a/net/tsclient/Makefile b/net/tsclient/Makefile
index b17163c4c0ca..1912cedce1de 100644
--- a/net/tsclient/Makefile
+++ b/net/tsclient/Makefile
@@ -32,7 +32,7 @@ RUN_DEPENDS+=	vncviewer:net/tightvnc
 .endif
 
 .if ${PORT_OPTIONS:MXNEST}
-RUN_DEPENDS+=	Xnest:x11-servers/xorg-nestserver
+RUN_DEPENDS+=	Xnest:x11-servers/xorg-server@xnest
 .endif
 
 .include <bsd.port.pre.mk>
diff --git a/www/selenium/Makefile b/www/selenium/Makefile
index 7ee1672042a5..90d217daa510 100644
--- a/www/selenium/Makefile
+++ b/www/selenium/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	selenium
 PORTVERSION=	4.1.3	
+PORTREVISION=	1
 CATEGORIES=	www devel java
 MASTER_SITES=	https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.1.0/
 DISTNAME=	selenium-server-${PORTVERSION}
diff --git a/www/selenium/pkg-message b/www/selenium/pkg-message
index 4bb48934b217..b451f1ea056d 100644
--- a/www/selenium/pkg-message
+++ b/www/selenium/pkg-message
@@ -7,7 +7,7 @@ www/chromium
 
 With one or more of these complementary ports:
 www/geckodriver
-x11-servers/xorg-vfbserver
+x11-servers/xorg-server@xvfb
 x11-fonts/xorg-fonts
 x11-fonts/webfonts
 x11/xauth
diff --git a/x11-drivers/xf86-video-ati/Makefile b/x11-drivers/xf86-video-ati/Makefile
index 893396b1785e..2f28d5ba0315 100644
--- a/x11-drivers/xf86-video-ati/Makefile
+++ b/x11-drivers/xf86-video-ati/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	xf86-video-ati
 PORTVERSION=	19.1.0
-PORTREVISION=	4
+PORTREVISION=	5
 PORTEPOCH=	1
 CATEGORIES=	x11-drivers
 
@@ -12,6 +12,9 @@ PATCHFILES+=	f223035f4ffcff2a9296d1e907a5193f8e8845a3.patch:-p1
 PATCHFILES+=	4d84cf438e7f1bebf0053035ef0292e9fed257d1.patch:-p1
 PATCHFILES+=	c0eb5dbd9c1db6b6d5b1574bcd8c584170d7ab54.patch:-p1
 PATCHFILES+=	3845392426e9798c1fb2a6fc5e97bf5dfd5c443d.patch:-p1
+PATCHFILES+=	8da3e4561ef82bb78c9a17b8cd8bf139b9cfd680.patch:-p1
+
+EXTRA_PATCHES=	${FILESDIR}/0001_dont_set_sourcevalidate_pointer_to_null.diff:-p1
 
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/COPYING
diff --git a/x11-drivers/xf86-video-ati/distinfo b/x11-drivers/xf86-video-ati/distinfo
index 47fcfa2331fa..f816e412dfa2 100644
--- a/x11-drivers/xf86-video-ati/distinfo
+++ b/x11-drivers/xf86-video-ati/distinfo
@@ -1,4 +1,4 @@
-TIMESTAMP = 1586946702
+TIMESTAMP = 1656682698
 SHA256 (xorg/driver/xf86-video-ati-19.1.0.tar.bz2) = 659f5a1629eea5f5334d9b39b18e6807a63aa1efa33c1236d9cc53acbb223c49
 SIZE (xorg/driver/xf86-video-ati-19.1.0.tar.bz2) = 904558
 SHA256 (xorg/driver/f223035f4ffcff2a9296d1e907a5193f8e8845a3.patch) = 34395b16c7849b342a2db62a08eb41dacbb1878583d47692cb6a798b7fd0a60d
@@ -9,3 +9,5 @@ SHA256 (xorg/driver/c0eb5dbd9c1db6b6d5b1574bcd8c584170d7ab54.patch) = 00c001f873
 SIZE (xorg/driver/c0eb5dbd9c1db6b6d5b1574bcd8c584170d7ab54.patch) = 3679
 SHA256 (xorg/driver/3845392426e9798c1fb2a6fc5e97bf5dfd5c443d.patch) = ba978104ed1209a4e4f0a1e6067b5044745786c6f0183ba756e9860faa8ef914
 SIZE (xorg/driver/3845392426e9798c1fb2a6fc5e97bf5dfd5c443d.patch) = 1867
+SHA256 (xorg/driver/8da3e4561ef82bb78c9a17b8cd8bf139b9cfd680.patch) = fb3c215b742def4a3a412adbcefe5f4d9f36ce9c56af274dbcf50c389d2cd171
+SIZE (xorg/driver/8da3e4561ef82bb78c9a17b8cd8bf139b9cfd680.patch) = 14196
diff --git a/x11-drivers/xf86-video-ati/files/0001_dont_set_sourcevalidate_pointer_to_null.diff b/x11-drivers/xf86-video-ati/files/0001_dont_set_sourcevalidate_pointer_to_null.diff
new file mode 100644
index 000000000000..080de79e37bd
--- /dev/null
+++ b/x11-drivers/xf86-video-ati/files/0001_dont_set_sourcevalidate_pointer_to_null.diff
@@ -0,0 +1,27 @@
+diff --git a/src/radeon_kms.c b/src/radeon_kms.c
+index 62962d61d8ee22a02567b7125b4bb3a7f7230be4..51b00dd9b013d183bf93d7f5578014dc16c80ce8 100644
+--- a/src/radeon_kms.c
++++ b/src/radeon_kms.c
+@@ -931,6 +931,13 @@ radeon_dirty_update(ScrnInfoPtr scrn)
+ 	}
+ }
+ 
++static void
++radeonSourceValidate(DrawablePtr draw, int x, int y, int w, int h,
++		     unsigned int subWindowMode)
++{
++}
++
++
+ 
+ Bool
+ radeon_scanout_do_update(xf86CrtcPtr xf86_crtc, int scanout_id,
+@@ -993,7 +1000,7 @@ radeon_scanout_do_update(xf86CrtcPtr xf86_crtc, int scanout_id,
+ 	    SetPicturePictFilter(src, xf86_crtc->filter, xf86_crtc->params,
+ 				 xf86_crtc->nparams);
+ 
+-	pScreen->SourceValidate = NULL;
++	pScreen->SourceValidate = radeonSourceValidate;
+ 	CompositePicture(PictOpSrc,
+ 			 src, NULL, dst,
+ 			 extents.x1, extents.y1, 0, 0, extents.x1,
diff --git a/x11-servers/Makefile b/x11-servers/Makefile
index 1d2e30390265..a0ff71ccc5d7 100644
--- a/x11-servers/Makefile
+++ b/x11-servers/Makefile
@@ -4,11 +4,7 @@
     SUBDIR += x2vnc
     SUBDIR += x2x
     SUBDIR += xarcan
-    SUBDIR += xephyr
-    SUBDIR += xorg-dmx
-    SUBDIR += xorg-nestserver
     SUBDIR += xorg-server
-    SUBDIR += xorg-vfbserver
     SUBDIR += xwayland
     SUBDIR += xwayland-devel
 
diff --git a/x11-servers/xephyr/Makefile b/x11-servers/xephyr/Makefile
deleted file mode 100644
index f121f9571945..000000000000
--- a/x11-servers/xephyr/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-PORTNAME=	xephyr
-PORTREVISION=	0
-
-COMMENT=	X server from X.Org based on kdrive
-
-LICENSE=	MIT
-
-LIB_DEPENDS+=	libxcb-image.so:x11/xcb-util-image \
-		libxcb-icccm.so:x11/xcb-util-wm \
-		libxcb-keysyms.so:x11/xcb-util-keysyms \
-		libxcb-render-util.so:x11/xcb-util-renderutil \
-		libxcb-util.so:x11/xcb-util
-
-MASTERDIR=	${.CURDIR}/../xorg-server
-DESCR=		${.CURDIR}/pkg-descr
-
-SLAVE_PORT=	yes
-USE_XORG=	x11 xcb
-
-CONFIGURE_ARGS+=--enable-xephyr --disable-dmx --disable-xnest --disable-xvfb \
-		--enable-kdrive --disable-xwayland
-
-PLIST_FILES=	bin/Xephyr man/man1/Xephyr.1.gz
-
-do-install:
-	cd ${WRKSRC}/hw/kdrive/ephyr; DESTDIR=${STAGEDIR} ${MAKE} install
-
-.include "${MASTERDIR}/Makefile"
diff --git a/x11-servers/xorg-dmx/Makefile b/x11-servers/xorg-dmx/Makefile
deleted file mode 100644
index 99a12bcfeb02..000000000000
--- a/x11-servers/xorg-dmx/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-PORTNAME=	xorg-dmx
-PORTREVISION=	0
-
-COMMENT=	Distributed Multihead X from X.Org
-
-LICENSE=	MIT
-
-MASTERDIR=	${.CURDIR}/../xorg-server
-DESCR=		${.CURDIR}/pkg-descr
-
-SLAVE_PORT=	yes
-USE_XORG=	dmx xorgproto x11 xaw7 xext xfixes xi xmu xpm xrender xres xt xtst
-
-CONFIGURE_ARGS+=--enable-dmx --disable-xephyr --disable-xnest --disable-xvfb \
-		--disable-xwayland
-
-do-install:
-	cd ${WRKSRC}/hw/dmx; DESTDIR=${STAGEDIR} ${MAKE} install
-
-.include "${MASTERDIR}/Makefile"
diff --git a/x11-servers/xorg-dmx/pkg-descr b/x11-servers/xorg-dmx/pkg-descr
deleted file mode 100644
index 5e21690e88bf..000000000000
--- a/x11-servers/xorg-dmx/pkg-descr
+++ /dev/null
@@ -1,6 +0,0 @@
-Xdmx is proxy X server that provides multi-head support for multiple displays
-attached to different machines (each of which is running a typical X server).
-When Xinerama is used with Xdmx, the multiple displays on multiple machines
-are presented to the user as a single unified screen.
-
-WWW: https://www.x.org/
diff --git a/x11-servers/xorg-dmx/pkg-plist b/x11-servers/xorg-dmx/pkg-plist
deleted file mode 100644
index 0ec9bfaee182..000000000000
--- a/x11-servers/xorg-dmx/pkg-plist
+++ /dev/null
@@ -1,16 +0,0 @@
-bin/Xdmx
-bin/dmxaddinput
-bin/dmxaddscreen
-bin/dmxinfo
-bin/dmxreconfig
-bin/dmxresize
-bin/dmxrminput
-bin/dmxrmscreen
-bin/dmxtodmx
-bin/dmxwininfo
-bin/vdltodmx
-bin/xdmxconfig
-man/man1/Xdmx.1.gz
-man/man1/dmxtodmx.1.gz
-man/man1/vdltodmx.1.gz
-man/man1/xdmxconfig.1.gz
diff --git a/x11-servers/xorg-nestserver/Makefile b/x11-servers/xorg-nestserver/Makefile
deleted file mode 100644
index b969a5a2ec51..000000000000
--- a/x11-servers/xorg-nestserver/Makefile
+++ /dev/null
@@ -1,25 +0,0 @@
-PORTNAME=	xorg-nestserver
-PORTREVISION=	0
-PORTEPOCH=	2
-
-COMMENT=	Nesting X server from X.Org
-
-LICENSE=	MIT
-
-MASTERDIR=	${.CURDIR}/../xorg-server
-DESCR=		${.CURDIR}/pkg-descr
-
-RUN_DEPENDS=	xkeyboard-config>=2.5:x11/xkeyboard-config
-
-SLAVE_PORT=	yes
-USE_XORG=	x11 xext
-
-CONFIGURE_ARGS+=--enable-xnest --disable-dmx --disable-xephyr --disable-xvfb \
-		--disable-xwayland
-
-PLIST_FILES=	bin/Xnest man/man1/Xnest.1.gz
-
-do-install:
-	cd ${WRKSRC}/hw/xnest; DESTDIR=${STAGEDIR} ${MAKE} install
-
-.include "${MASTERDIR}/Makefile"
diff --git a/x11-servers/xorg-server/Makefile b/x11-servers/xorg-server/Makefile
index 834c61150fc0..0653e6915922 100644
--- a/x11-servers/xorg-server/Makefile
+++ b/x11-servers/xorg-server/Makefile
@@ -1,41 +1,94 @@
-PORTNAME?=	xorg-server
-PORTVERSION?=	1.20.14
-PORTREVISION?=	0
-PORTEPOCH?=	1
+PORTNAME=	xorg
+PORTVERSION=	21.1.4
+PORTREVISION=	0
+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
+COMMENT=	X.Org X server and related programs
 
 LICENSE=	MIT
 
-RUN_DEPENDS+=	xkeyboard-config>=2.5:x11/xkeyboard-config \
-		xkbcomp:x11/xkbcomp
+FLAVORS=	xorg xnest xephyr xvfb
+FLAVOR?=	${FLAVORS:[1]}
+
+EXTRA_PATCHES=	${FILESDIR}/0002-xephyr_Dont_check_for_SeatId_anymore.patch:-p1
+
+USES=		compiler:c11 cpe gl meson pkgconfig tar:xz xorg
+USE_GL=		gl
+
+.if ${FLAVOR} == xephyr
+PORTNAME=	xephyr
+.elif  ${FLAVOR} == xorg
+PKGNAMESUFFIX=	-server
+SUB_FILES=	pkg-post-deinstall pkg-post-install
+PKGPOSTINSTALL= ${WRKDIR}/pkg-post-install
+PKGPOSTDEINSTALL=	${WRKDIR}/pkg-post-deinstall
+.elif ${FLAVOR} == xnest
+PORTEPOCH=	2
+PKGNAMESUFFIX= -nestserver
+.elif ${FLAVOR} == xvfb
+PKGNAMESUFFIX=	-vfbserver
+.endif
 
-SLAVE_PORT?=	no
+.if ${FLAVOR} != xorg
+PLIST=
+PKGMESSAGE=
+BINARY_NAME=	${FLAVOR:C/^(.).*/\1/:tu}${FLAVOR:C/^.//}
+PLIST_FILES=	bin/${BINARY_NAME} \
+		man/man1/${BINARY_NAME}.1.gz
+PLIST_DIRS=	/var/lib/xkb /var/lib
+.endif
 
-OPTIONS_SUB=	yes
-OPTIONS_DEFINE+=	SUID
-OPTIONS_RADIO=	CONF
-OPTIONS_RADIO_CONF=	DEVD UDEV
-OPTIONS_DEFAULT=	SUID UDEV
-OPTIONS_DEFAULT+=	${OPTIONS_DEFAULT_${OPSYS}_${OSREL:R}}
+DESCR=	${.CURDIR}/pkg-descr-${FLAVOR}
 
-SUID_DESC=	Install setuid wrapper to allow startx as non-root
-CONF_DESC=	Backend to use for input device configuration
-DEVD_DESC=	Use devd for autoconfiguration of input devices
-UDEV_DESC=	Use udev via libudev-devd for autoconfiguration of input devices
+BUILD_DEPENDS+=	${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-dri
+RUN_DEPENDS+=	xkeyboard-config>=2.5:x11/xkeyboard-config \
+		xkbcomp:x11/xkbcomp \
+		${LOCALBASE}/libdata/pkgconfig/dri.pc:graphics/mesa-dri
+
+MESON_ARGS+=	-Dxwin=false \
+		-Dxquartz=false \
+		-Ddtrace=false \
+		-Dhal=false \
+		-Dsystemd_logind=false \
+		-Dxselinux=false \
+		-Dfallback_input_driver=libinput \
+		-Ddocs=false \
+		-Dudev_kms=false \
+		-Dxcsecurity=true \
+		-Dxkb_dir=${LOCALBASE}/share/X11/xkb \
+		-Dxkb_output_dir=/var/lib/xkb \
+		-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 \
+		-Dlog_dir=/var/log \
+		-Dsuid_wrapper=true
+.else
+MESON_ARGS+=	-Dudev=false
+.endif
 
-DEVD_CONFIGURE_ENABLE=	config-devd
-SUID_CONFIGURE_ENABLE=	suid-wrapper
-SUID_CONFIGURE_ON=	--libexecdir=${PREFIX}/bin	# set SUID_WRAPPER_DIR
-UDEV_CONFIGURE_ENABLE=	config-udev
-UDEV_CONFIGURE_ON=	--disable-config-udev-kms
-UDEV_LIB_DEPENDS=	libudev.so:devel/libudev-devd
+.if ${FLAVOR} == xorg || ${FLAVOR} == xephyr
+MESON_ARGS+=	-Ddrm=true
+LIB_DEPENDS+=	libdrm.so:graphics/libdrm \
+		libepoxy.so:graphics/libepoxy
+.endif
 
-.include <bsd.port.options.mk>
+.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
@@ -47,48 +100,23 @@ DEFAULT_FONTPATH_LIST= \
 	${FONTPATH_ROOT}/100dpi/ \
 	${FONTPATH_ROOT}/75dpi/ \
 	catalogue:${FONTPATHD}
+MESON_ARGS+=	-Ddefault_font_path=${DEFAULT_FONTPATH_LIST:ts,}
 PLIST_SUB+=	FONTPATHD="${FONTPATHD:S,^${PREFIX}/,,}"
 
-USES=		compiler:c11 cpe gl gmake perl5 ssl tar:xz xorg xorg-cat:xserver
-USE_PERL5=	build
 USE_GL+=	gl
 USE_XORG+=	pixman xau xdmcp xfont2 xkbfile xorgproto xshmfence xtrans
-CONFIGURE_ARGS+=--without-doxygen --without-xmlto --without-fop \
-		--with-default-font-path="${DEFAULT_FONTPATH_LIST:ts,}" \
-		--without-dtrace --disable-config-hal	\
-		--disable-install-setuid --disable-unit-tests \
-		--with-fallback-input-driver=libinput
-INSTALL_TARGET=	install-strip
 CPE_VENDOR=	x.org
 CPE_PRODUCT=	xorg-server
 
-.if ${SLAVE_PORT} == "no" || ${PORTNAME} == "xephyr" || ${PORTNAME} == "xwayland"
-LIB_DEPENDS+=	libdrm.so:graphics/libdrm \
-		libepoxy.so:graphics/libepoxy
-.else
-BUILD_DEPENDS+=	libepoxy>0:graphics/libepoxy	# only for configure
-.endif
-
-.if ${SLAVE_PORT} == "no"
+.if ${FLAVOR} == xorg
 USE_GL+=	gbm
 USE_XORG+=	pciaccess
-CONFIGURE_ARGS+=--disable-dmx --disable-xephyr --disable-xnest --disable-xvfb \
-		--disable-xwayland --enable-xcsecurity
-SUB_FILES=	pkg-install pkg-deinstall
-.else
-CONFIGURE_ARGS+=	--disable-xorg
-OPTIONS_EXCLUDE=	DEVD UDEV SUID
-# Set PLIST for slave ports so they only need to set PLIST_FILES
-PLIST=		${.CURDIR}/pkg-plist
 .endif
 
 .include <bsd.port.pre.mk>
 
-.if ${SSL_DEFAULT} == base
-# The reason why I use this is cause openssl from base doesn't install a .pc file
-# and configure will fail trying to find it. Setting both of those variables to
-# a *non-empty* value by-passes the pkg-config check.
-CONFIGURE_ENV=	SHA1_LIB="-L/usr/lib -lcrypto" SHA1_CFLAGS="-I/usr/include"
+.if ${OPSYS} == FreeBSD
+MESON_ARGS+=	-Dsha1=libmd
 .endif
 
 .if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH} == armv7 || ${ARCH} == i386 || ${ARCH} == powerpc64 || ${ARCH} == powerpc64le
@@ -101,13 +129,9 @@ PLIST_SUB+=	SPARC64=""
 PLIST_SUB+=	SPARC64="@comment "
 .endif
 
-post-patch:
-	@${REINPLACE_CMD} 's/test.*-traditional.*;/true;/' \
-		${WRKSRC}/configure
-
-.if ${SLAVE_PORT} == "no"
+.if ${FLAVOR} == xorg
 post-install:
-# Avoid conflict with nvidia-driver, move libglx.so into .xorg directory
+	# Avoid conflict with nvidia-driver, move libglx.so into .xorg directory
 	@${MKDIR} ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg
 	${MV} ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/libglx.so \
 		${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/.xorg/
@@ -116,6 +140,13 @@ post-install:
 	@${MKDIR} ${STAGEDIR}${PREFIX}/share/X11/xorg.conf.d
 	@${INSTALL_DATA} ${FILESDIR}/20-evdev-kbd.conf \
 		${STAGEDIR}${PREFIX}/share/X11/xorg.conf.d
-.endif # ! SLAVE_PORT
+	${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}/man/man1/Xserver.1
+	${MKDIR} -p ${STAGEDIR}/var/lib/xkb
+.endif
 
 .include <bsd.port.post.mk>
diff --git a/x11-servers/xorg-server/distinfo b/x11-servers/xorg-server/distinfo
index 132e8f53e41b..29ee5a581b11 100644
--- a/x11-servers/xorg-server/distinfo
+++ b/x11-servers/xorg-server/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1639835065
-SHA256 (xorg/xserver/xorg-server-1.20.14.tar.xz) = 5cc5b70b9be89443e2594b93656c60bd5e82cd7f01deb4ce4faf81dcf546a16b
-SIZE (xorg/xserver/xorg-server-1.20.14.tar.xz) = 5178288
+TIMESTAMP = 1659367891
+SHA256 (xorg-server-21.1.4.tar.xz) = 5cc4be8ee47edb58d4a90e603a59d56b40291ad38371b0bd2471fc3cbee1c587
+SIZE (xorg-server-21.1.4.tar.xz) = 4940176
diff --git a/x11-servers/xorg-server/files/0002-xephyr_Dont_check_for_SeatId_anymore.patch b/x11-servers/xorg-server/files/0002-xephyr_Dont_check_for_SeatId_anymore.patch
new file mode 100644
index 000000000000..f0158bfe1ad3
--- /dev/null
+++ b/x11-servers/xorg-server/files/0002-xephyr_Dont_check_for_SeatId_anymore.patch
@@ -0,0 +1,63 @@
+From 4c03b67d334b05b814239420776f2fdd4c4a98ac Mon Sep 17 00:00:00 2001
+From: nerdopolis <bluescreen_avenger@verizon.net>
+Date: Tue, 11 Jan 2022 18:41:42 -0500
+Subject: [PATCH] xephyr: Don't check for SeatId anymore
+
+After a change for the xserver to automatically determine the seat
+based on the XDG_SEAT variable, xephyr stopped working. This was
+because of an old feature where xephyr used to handle evdev
+directly. This was dropped some time ago, and now this check is
+not needed
+---
+ hw/kdrive/ephyr/ephyrinit.c | 34 ++++++++++++++++------------------
+ 1 file changed, 16 insertions(+), 18 deletions(-)
+
+diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
+index 020461db2..09cd28cb3 100644
+--- a/hw/kdrive/ephyr/ephyrinit.c
++++ b/hw/kdrive/ephyr/ephyrinit.c
+@@ -70,25 +70,23 @@ InitInput(int argc, char **argv)
+     KdKeyboardInfo *ki;
+     KdPointerInfo *pi;
+ 
+-    if (!SeatId) {
+-        KdAddKeyboardDriver(&EphyrKeyboardDriver);
+-        KdAddPointerDriver(&EphyrMouseDriver);
+-
+-        if (!kdHasKbd) {
+-            ki = KdNewKeyboard();
+-            if (!ki)
+-                FatalError("Couldn't create Xephyr keyboard\n");
+-            ki->driver = &EphyrKeyboardDriver;
+-            KdAddKeyboard(ki);
+-        }
++    KdAddKeyboardDriver(&EphyrKeyboardDriver);
++    KdAddPointerDriver(&EphyrMouseDriver);
++
++    if (!kdHasKbd) {
++        ki = KdNewKeyboard();
++        if (!ki)
++            FatalError("Couldn't create Xephyr keyboard\n");
++        ki->driver = &EphyrKeyboardDriver;
++        KdAddKeyboard(ki);
++    }
+ 
+-        if (!kdHasPointer) {
+-            pi = KdNewPointer();
+-            if (!pi)
+-                FatalError("Couldn't create Xephyr pointer\n");
+-            pi->driver = &EphyrMouseDriver;
+-            KdAddPointer(pi);
+-        }
++    if (!kdHasPointer) {
++        pi = KdNewPointer();
++        if (!pi)
++            FatalError("Couldn't create Xephyr pointer\n");
++        pi->driver = &EphyrMouseDriver;
++        KdAddPointer(pi);
+     }
+ 
+     KdInitInput();
+-- 
+GitLab
+
diff --git a/x11-servers/xorg-server/files/config_Makefile.am b/x11-servers/xorg-server/files/config_Makefile.am
deleted file mode 100644
index c62e761a4955..000000000000
--- a/x11-servers/xorg-server/files/config_Makefile.am
+++ /dev/null
@@ -1,16 +0,0 @@
-* Build the devd config backend if activated
-*
---- config/Makefile.am.orig	2017-03-16 05:24:43 UTC
-+++ config/Makefile.am
-@@ -4,6 +4,11 @@ noinst_LTLIBRARIES = libconfig.la
- libconfig_la_SOURCES = config.c config-backends.h
- libconfig_la_LIBADD =
- 
-+if CONFIG_DEVD
-+libconfig_la_SOURCES += devd.c
-+libconfig_la_LIBADD += -lusbhid
-+endif
-+
- if NEED_DBUS
- AM_CFLAGS += $(DBUS_CFLAGS)
- libconfig_la_SOURCES += dbus-core.c
diff --git a/x11-servers/xorg-server/files/configure.ac b/x11-servers/xorg-server/files/configure.ac
deleted file mode 100644
index a57e29890ad0..000000000000
--- a/x11-servers/xorg-server/files/configure.ac
+++ /dev/null
@@ -1,97 +0,0 @@
-* Plumb the devd config backend into configure
-*
-* define USE_DEV_IO for ARM platforms
-*
-* Only run pkg-config for udev if it is not disabled to prevent over-linking
-*
-* Automatically use systemd/logind only on Linux
-*
---- configure.ac.orig	2017-03-15 18:05:25 UTC
-+++ configure.ac
-@@ -266,9 +266,12 @@ case $host_cpu in
- 	esac
- 	GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee"
- 	;;
--  arm*)
-+  arm*|aarch64*|riscv*)
- 	ARM_VIDEO=yes
- 	DEFAULT_INT10="stub"
-+	case $host_os in
-+		*freebsd*)	AC_DEFINE(USE_DEV_IO) ;;
-+	esac
- 	;;
-   i*86)
- 	I386_VIDEO=yes
-@@ -565,6 +568,7 @@ AC_ARG_ENABLE(xcsecurity,     AS_HELP_ST
- AC_ARG_ENABLE(dbe,            AS_HELP_STRING([--disable-dbe], [Build DBE extension (default: enabled)]), [DBE=$enableval], [DBE=yes])
- AC_ARG_ENABLE(xf86bigfont,    AS_HELP_STRING([--enable-xf86bigfont], [Build XF86 Big Font extension (default: disabled)]), [XF86BIGFONT=$enableval], [XF86BIGFONT=no])
- AC_ARG_ENABLE(dpms,           AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes])
-+AC_ARG_ENABLE(config-devd,    AS_HELP_STRING([--enable-config-devd], [Build devd support (default: auto)]), [CONFIG_DEVD=$enableval], [CONFIG_DEVD=auto])
- AC_ARG_ENABLE(config-udev,    AS_HELP_STRING([--enable-config-udev], [Build udev support (default: auto)]), [CONFIG_UDEV=$enableval], [CONFIG_UDEV=auto])
- AC_ARG_ENABLE(config-udev-kms,    AS_HELP_STRING([--enable-config-udev-kms], [Build udev kms support (default: auto)]), [CONFIG_UDEV_KMS=$enableval], [CONFIG_UDEV_KMS=auto])
- AC_ARG_ENABLE(config-hal,     AS_HELP_STRING([--disable-config-hal], [Build HAL support (default: auto)]), [CONFIG_HAL=$enableval], [CONFIG_HAL=auto])
-@@ -856,10 +860,27 @@ if test "x$CONFIG_UDEV" = xyes && test "
- 	AC_MSG_ERROR([Hotplugging through both libudev and hal not allowed])
- fi
- 
--PKG_CHECK_MODULES(UDEV, $LIBUDEV, [HAVE_LIBUDEV=yes], [HAVE_LIBUDEV=no])
--if test "x$CONFIG_UDEV" = xauto; then
--	CONFIG_UDEV="$HAVE_LIBUDEV"
--	AC_DEFINE(HAVE_LIBUDEV, 1, [Define to 1 if libudev is available.])
-+if test "x$CONFIG_DEVD" = xauto; then
-+	case $host_os in
-+		*freebsd*)
-+			CONFIG_DEVD=yes
-+			;;
-+		*)
-+			CONFIG_DEVD=no
-+			;;
-+	esac
-+fi
-+AM_CONDITIONAL(CONFIG_DEVD, [test "x$CONFIG_DEVD" = xyes])
-+if test "x$CONFIG_DEVD" = xyes; then
-+	AC_DEFINE(CONFIG_DEVD, 1, [Use devd for input auto configuration])
-+fi
-+
-+if test "x$CONFIG_UDEV" != xno; then
-+	PKG_CHECK_MODULES(UDEV, $LIBUDEV, [HAVE_LIBUDEV=yes], [HAVE_LIBUDEV=no])
-+	if test "x$CONFIG_UDEV" = xauto; then
-+		CONFIG_UDEV="$HAVE_LIBUDEV"
-+		AC_DEFINE(HAVE_LIBUDEV, 1, [Define to 1 if libudev is available.])
-+	fi
- fi
- AM_CONDITIONAL(CONFIG_UDEV, [test "x$CONFIG_UDEV" = xyes])
- if test "x$CONFIG_UDEV" = xyes; then
-@@ -907,7 +928,14 @@ AM_CONDITIONAL(CONFIG_HAL, [test "x$CONF
- 
- if test "x$SYSTEMD_LOGIND" = xauto; then
-         if test "x$HAVE_DBUS" = xyes -a "x$CONFIG_UDEV" = xyes ; then
--                SYSTEMD_LOGIND=yes
-+            case $host_os in
-+                *linux*)
-+                        SYSTEMD_LOGIND=yes
-+                        ;;
-+                *)
-+                        SYSTEMD_LOGIND=no
-+                        ;;
-+            esac
-         else
-                 SYSTEMD_LOGIND=no
-         fi
-@@ -2467,12 +2495,12 @@ AC_SUBST([prefix])
- 
- AC_CONFIG_COMMANDS([sdksyms], [touch hw/xfree86/sdksyms.dep])
- 
--if test "x$CONFIG_HAL" = xno && test "x$CONFIG_UDEV" = xno; then
-+if test "x$CONFIG_HAL" = xno && test "x$CONFIG_UDEV" = xno && test "x$CONFIG_DEVD" = xno; then
-     AC_MSG_WARN([
--             ***********************************************
--             Neither HAL nor udev backend will be enabled.
-+             *****************************************************
-+             Neither HAL, devd, nor udev backend will be enabled.
-              Input device hotplugging will not be available!
--             ***********************************************])
-+             *****************************************************])
- fi
- 
- AC_CONFIG_FILES([
diff --git a/x11-servers/xorg-server/files/hw_xfree86_Makefile.am b/x11-servers/xorg-server/files/hw_xfree86_Makefile.am
deleted file mode 100644
index 6d9e0a0d26c6..000000000000
--- a/x11-servers/xorg-server/files/hw_xfree86_Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-* Don't overwrite Xorg binary with Xorg.sh when SUID_WRAPPER_DIR == bindir
-* Instead, relink bin/X to Xorg.wrap rather than to Xorg (which isn't Xorg.sh)
-*
---- hw/xfree86/Makefile.am.orig	2017-03-16 05:24:43 UTC
-+++ hw/xfree86/Makefile.am
-@@ -114,7 +114,7 @@ endif
- if SUID_WRAPPER
- 	$(MKDIR_P) $(DESTDIR)$(SUID_WRAPPER_DIR)
- 	mv $(DESTDIR)$(bindir)/Xorg $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg
--	${INSTALL} -m 755 Xorg.sh $(DESTDIR)$(bindir)/Xorg
-+	(test ! -f $(DESTDIR)$(bindir)/Xorg && ${INSTALL} -m 755 Xorg.sh $(DESTDIR)$(bindir)/Xorg || cd $(DESTDIR)$(bindir) && rm -f X && $(LN_S) Xorg.wrap$(EXEEXT) X)
- 	-chown 0 $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap && chmod u+s $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap
- endif
- 
diff --git a/x11-servers/xorg-server/files/patch-Xserver-hw-xfree86-os-support-misc-Makefile.in b/x11-servers/xorg-server/files/patch-Xserver-hw-xfree86-os-support-misc-Makefile.in
deleted file mode 100644
index 3815a93ea08e..000000000000
--- a/x11-servers/xorg-server/files/patch-Xserver-hw-xfree86-os-support-misc-Makefile.in
+++ /dev/null
@@ -1,12 +0,0 @@
---- hw/xfree86/os-support/misc/Makefile.in.orig	2015-09-23 10:21:18.470900000 +0200
-+++ hw/xfree86/os-support/misc/Makefile.in	2015-09-23 10:22:34.979974000 +0200
-@@ -543,7 +543,8 @@
- 
- #AM_LDFLAGS = -r
- AM_CPPFLAGS = $(XORG_INCS)
--AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS)
-+@I386_VIDEO_TRUE@I386_VIDEO_CFLAGS = -mno-sse
-+AM_CFLAGS = $(I386_VIDEO_CFLAGS) $(XORG_CFLAGS) $(DIX_CFLAGS)
- EXTRA_DIST = $(I386_SRCS) $(PORTIO_SRCS)
- all: all-am
- 
diff --git a/x11-servers/xorg-server/files/patch-config_Makefile.in b/x11-servers/xorg-server/files/patch-config_Makefile.in
deleted file mode 100644
index 400a969c470d..000000000000
--- a/x11-servers/xorg-server/files/patch-config_Makefile.in
+++ /dev/null
@@ -1,100 +0,0 @@
-* generated from patched Makefile.am; revise and regen instead of editing
-*
-* Build the devd config backend if activated
-*
---- config/Makefile.in.orig	2017-03-16 05:24:43 UTC
-+++ config/Makefile.in
-@@ -89,16 +89,18 @@ PRE_UNINSTALL = :
- POST_UNINSTALL = :
- build_triplet = @build@
- host_triplet = @host@
--@NEED_DBUS_TRUE@am__append_1 = $(DBUS_CFLAGS)
--@NEED_DBUS_TRUE@am__append_2 = dbus-core.c
--@NEED_DBUS_TRUE@am__append_3 = $(DBUS_LIBS)
--@CONFIG_UDEV_TRUE@am__append_4 = $(UDEV_CFLAGS)
--@CONFIG_UDEV_TRUE@am__append_5 = udev.c
--@CONFIG_UDEV_TRUE@am__append_6 = $(UDEV_LIBS)
--@CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@am__append_7 = $(HAL_CFLAGS)
--@CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@am__append_8 = hal.c
--@CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@am__append_9 = $(HAL_LIBS)
--@CONFIG_HAL_FALSE@@CONFIG_UDEV_FALSE@@CONFIG_WSCONS_TRUE@am__append_10 = wscons.c
-+@CONFIG_DEVD_TRUE@am__append_1 = devd.c
-+@CONFIG_DEVD_TRUE@am__append_2 = -lusbhid
-+@NEED_DBUS_TRUE@am__append_3 = $(DBUS_CFLAGS)
-+@NEED_DBUS_TRUE@am__append_4 = dbus-core.c
-+@NEED_DBUS_TRUE@am__append_5 = $(DBUS_LIBS)
-+@CONFIG_UDEV_TRUE@am__append_6 = $(UDEV_CFLAGS)
-+@CONFIG_UDEV_TRUE@am__append_7 = udev.c
-+@CONFIG_UDEV_TRUE@am__append_8 = $(UDEV_LIBS)
-+@CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@am__append_9 = $(HAL_CFLAGS)
-+@CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@am__append_10 = hal.c
-+@CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@am__append_11 = $(HAL_LIBS)
-+@CONFIG_HAL_FALSE@@CONFIG_UDEV_FALSE@@CONFIG_WSCONS_TRUE@am__append_12 = wscons.c
- subdir = config
- ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
- am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
-@@ -126,16 +128,18 @@ am__DEPENDENCIES_1 =
- @CONFIG_UDEV_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1)
- @CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@am__DEPENDENCIES_4 =  \
- @CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@	$(am__DEPENDENCIES_1)
--libconfig_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
--	$(am__DEPENDENCIES_3) $(am__DEPENDENCIES_4)
--am__libconfig_la_SOURCES_DIST = config.c config-backends.h dbus-core.c \
--	udev.c hal.c wscons.c
--@NEED_DBUS_TRUE@am__objects_1 = dbus-core.lo
--@CONFIG_UDEV_TRUE@am__objects_2 = udev.lo
--@CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@am__objects_3 = hal.lo
--@CONFIG_HAL_FALSE@@CONFIG_UDEV_FALSE@@CONFIG_WSCONS_TRUE@am__objects_4 = wscons.lo
-+libconfig_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
-+	$(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) \
-+	$(am__DEPENDENCIES_4)
-+am__libconfig_la_SOURCES_DIST = config.c config-backends.h devd.c \
-+	dbus-core.c udev.c hal.c wscons.c
-+@CONFIG_DEVD_TRUE@am__objects_1 = devd.lo
-+@NEED_DBUS_TRUE@am__objects_2 = dbus-core.lo
-+@CONFIG_UDEV_TRUE@am__objects_3 = udev.lo
-+@CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@am__objects_4 = hal.lo
-+@CONFIG_HAL_FALSE@@CONFIG_UDEV_FALSE@@CONFIG_WSCONS_TRUE@am__objects_5 = wscons.lo
- am_libconfig_la_OBJECTS = config.lo $(am__objects_1) $(am__objects_2) \
--	$(am__objects_3) $(am__objects_4)
-+	$(am__objects_3) $(am__objects_4) $(am__objects_5)
- libconfig_la_OBJECTS = $(am_libconfig_la_OBJECTS)
- AM_V_lt = $(am__v_lt_@AM_V@)
- am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
-@@ -157,7 +161,7 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top
- depcomp = $(SHELL) $(top_srcdir)/depcomp
- am__maybe_remake_depfiles = depfiles
- am__depfiles_remade = ./$(DEPDIR)/config.Plo ./$(DEPDIR)/dbus-core.Plo \
--	./$(DEPDIR)/hal.Plo ./$(DEPDIR)/udev.Plo \
-+	./$(DEPDIR)/devd.Plo ./$(DEPDIR)/hal.Plo ./$(DEPDIR)/udev.Plo \
- 	./$(DEPDIR)/wscons.Plo
- am__mv = mv -f
- COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
-@@ -593,12 +597,14 @@ target_alias = @target_alias@
- top_build_prefix = @top_build_prefix@
- top_builddir = @top_builddir@
- top_srcdir = @top_srcdir@
--AM_CFLAGS = $(DIX_CFLAGS) $(am__append_1) $(am__append_4) \
--	$(am__append_7)
-+AM_CFLAGS = $(DIX_CFLAGS) $(am__append_3) $(am__append_6) \
-+	$(am__append_9)
- noinst_LTLIBRARIES = libconfig.la
--libconfig_la_SOURCES = config.c config-backends.h $(am__append_2) \
--	$(am__append_5) $(am__append_8) $(am__append_10)
--libconfig_la_LIBADD = $(am__append_3) $(am__append_6) $(am__append_9)
-+libconfig_la_SOURCES = config.c config-backends.h $(am__append_1) \
-+	$(am__append_4) $(am__append_7) $(am__append_10) \
-+	$(am__append_12)
-+libconfig_la_LIBADD = $(am__append_2) $(am__append_5) $(am__append_8) \
-+	$(am__append_11)
- @CONFIG_UDEV_TRUE@@XORG_TRUE@xorgconfddir = $(datadir)/X11/$(XF86CONFIGDIR)
- @CONFIG_UDEV_TRUE@@XORG_TRUE@xorgconfd_DATA = 10-quirks.conf
- EXTRA_DIST = x11-input.fdi fdi2iclass.py 10-quirks.conf
-@@ -658,6 +664,7 @@ distclean-compile:
- 
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Plo@am__quote@ # am--include-marker
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-core.Plo@am__quote@ # am--include-marker
-+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/devd.Plo@am__quote@ # am--include-marker
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hal.Plo@am__quote@ # am--include-marker
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udev.Plo@am__quote@ # am--include-marker
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wscons.Plo@am__quote@ # am--include-marker
diff --git a/x11-servers/xorg-server/files/patch-config_config-backends.h b/x11-servers/xorg-server/files/patch-config_config-backends.h
deleted file mode 100644
index 7f264de90af1..000000000000
--- a/x11-servers/xorg-server/files/patch-config_config-backends.h
+++ /dev/null
@@ -1,12 +0,0 @@
-* Define required functions for devd config backend
-*
---- config/config-backends.h.orig	2017-03-15 18:05:25 UTC
-+++ config/config-backends.h
-@@ -43,4 +43,7 @@ void config_hal_fini(void);
- #elif defined(CONFIG_WSCONS)
- int config_wscons_init(void);
- void config_wscons_fini(void);
-+#elif defined(CONFIG_DEVD)
-+int config_devd_init(void);
*** 1615 LINES SKIPPED ***