pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

modular-xorg-server-dfbsd: Update wip/modular-xorg-server-dfbsd to 1.20.3



Module Name:	pkgsrc-wip
Committed By:	David Shao <davshao%gmail.com@localhost>
Pushed By:	dshao
Date:		Sat Feb 23 20:24:02 2019 -0800
Changeset:	6067db1a758a248feffd160aad82f5efaa2d15c9

Modified Files:
	modular-xorg-server-dfbsd/Makefile
	modular-xorg-server-dfbsd/Makefile.common
	modular-xorg-server-dfbsd/PLIST
	modular-xorg-server-dfbsd/TODO
	modular-xorg-server-dfbsd/buildlink3.mk
	modular-xorg-server-dfbsd/distinfo
	modular-xorg-server-dfbsd/options.mk
	modular-xorg-server-dfbsd/patches/patch-config_devd.c
	modular-xorg-server-dfbsd/patches/patch-configure
	modular-xorg-server-dfbsd/patches/patch-hw_xfree86_common_xf86AutoConfig.c
	modular-xorg-server-dfbsd/patches/patch-hw_xfree86_common_xf86Config.c
	modular-xorg-server-dfbsd/patches/patch-hw_xfree86_common_xf86Globals.c
	modular-xorg-server-dfbsd/patches/patch-hw_xfree86_common_xf86Xinput.c
	modular-xorg-server-dfbsd/patches/patch-hw_xfree86_dri2_dri2.c
	modular-xorg-server-dfbsd/patches/patch-hw_xfree86_os-support_bsd_i386__video.c
Added Files:
	modular-xorg-server-dfbsd/patches/patch-glamor_glamor__egl.c
	modular-xorg-server-dfbsd/patches/patch-hw_xfree86_drivers_modesetting_drmmode__display.c
	modular-xorg-server-dfbsd/patches/patch-hw_xfree86_modes_xf86Cursors.c
	modular-xorg-server-dfbsd/patches/patch-hw_xfree86_os-support_bsd_bsd__init.c
	modular-xorg-server-dfbsd/patches/patch-hw_xfree86_os-support_bsd_ppc__video.c
	modular-xorg-server-dfbsd/patches/patch-hw_xfree86_xorg-wrapper.c
	modular-xorg-server-dfbsd/patches/patch-randr_randr.c
	modular-xorg-server-dfbsd/patches/patch-randr_rrlease.c
Removed Files:
	modular-xorg-server-dfbsd/patches/patch-glx_glxscreens.c
	modular-xorg-server-dfbsd/patches/patch-hw_xfree86_sdksyms.sh
	modular-xorg-server-dfbsd/patches/patch-os_xstrans.c

Log Message:
modular-xorg-server-dfbsd: Update wip/modular-xorg-server-dfbsd to 1.20.3

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=6067db1a758a248feffd160aad82f5efaa2d15c9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 modular-xorg-server-dfbsd/Makefile                 |   2 +-
 modular-xorg-server-dfbsd/Makefile.common          |  45 +++++++-
 modular-xorg-server-dfbsd/PLIST                    |   5 +-
 modular-xorg-server-dfbsd/TODO                     |   5 +
 modular-xorg-server-dfbsd/buildlink3.mk            |   4 +-
 modular-xorg-server-dfbsd/distinfo                 |  37 ++++---
 modular-xorg-server-dfbsd/options.mk               |  34 +++++-
 .../patches/patch-config_devd.c                    |  89 ++++++---------
 modular-xorg-server-dfbsd/patches/patch-configure  |  26 ++++-
 .../patches/patch-glamor_glamor__egl.c             | 122 +++++++++++++++++++++
 .../patches/patch-glx_glxscreens.c                 |  26 -----
 .../patch-hw_xfree86_common_xf86AutoConfig.c       |  36 ++++--
 .../patches/patch-hw_xfree86_common_xf86Config.c   |   3 +-
 .../patches/patch-hw_xfree86_common_xf86Globals.c  |   9 +-
 .../patches/patch-hw_xfree86_common_xf86Xinput.c   |   5 +-
 .../patches/patch-hw_xfree86_dri2_dri2.c           |   2 +-
 ..._xfree86_drivers_modesetting_drmmode__display.c |  48 ++++++++
 .../patches/patch-hw_xfree86_modes_xf86Cursors.c   |  20 ++++
 .../patch-hw_xfree86_os-support_bsd_bsd__init.c    | 103 +++++++++++++++++
 .../patch-hw_xfree86_os-support_bsd_i386__video.c  |   2 +-
 .../patch-hw_xfree86_os-support_bsd_ppc__video.c   |  18 +++
 .../patches/patch-hw_xfree86_sdksyms.sh            |  27 -----
 .../patches/patch-hw_xfree86_xorg-wrapper.c        |  37 +++++++
 .../patches/patch-os_xstrans.c                     |  21 ----
 .../patches/patch-randr_randr.c                    |  91 +++++++++++++++
 .../patches/patch-randr_rrlease.c                  |  55 ++++++++++
 26 files changed, 689 insertions(+), 183 deletions(-)

diffs:
diff --git a/modular-xorg-server-dfbsd/Makefile b/modular-xorg-server-dfbsd/Makefile
index 87ddec2efc..754cabc14e 100644
--- a/modular-xorg-server-dfbsd/Makefile
+++ b/modular-xorg-server-dfbsd/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.115 2018/03/07 11:57:38 wiz Exp $
+# $NetBSD: Makefile,v 1.117 2018/10/26 10:20:12 maya Exp $
 
 DISTNAME=	xorg-server-${XORG_VERSION}
 PKGNAME=	modular-${DISTNAME}
diff --git a/modular-xorg-server-dfbsd/Makefile.common b/modular-xorg-server-dfbsd/Makefile.common
index f9e9b8c7d4..54379a1ad4 100644
--- a/modular-xorg-server-dfbsd/Makefile.common
+++ b/modular-xorg-server-dfbsd/Makefile.common
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile.common,v 1.21 2018/03/07 11:57:38 wiz Exp $
+# $NetBSD: Makefile.common,v 1.26 2018/10/25 22:40:57 maya Exp $
 # used by x11/modular-xorg-server/Makefile
 # used by x11/modular-xorg-xephyr/Makefile
 
-XORG_VERSION=	1.19.6
+XORG_VERSION=	1.20.3
 CATEGORIES=	x11
 MASTER_SITES=	${MASTER_SITE_XORG:=xserver/}
 EXTRACT_SUFX=	.tar.bz2
@@ -63,15 +63,35 @@ CONFIGURE_ARGS+=	--with-default-font-path=${FONT_PATHS:ts,:Q}
 
 CONFIGURE_ARGS+=	--disable-config-hal
 CONFIGURE_ARGS+=	--disable-dmx
+.if ${OPSYS} != "FreeBSD" &&  ${OPSYS} != "DragonFly"
 CONFIGURE_ARGS+=	--disable-xwin
+.endif
 CONFIGURE_ARGS+=	--disable-xephyr
+
+.if ${OPSYS} != "FreeBSD" &&  ${OPSYS} != "DragonFly"
 CONFIGURE_ARGS+=	--disable-kdrive
 #CONFIGURE_ARGS+=	--disable-kdrive-vesa
-CONFIGURE_ARGS+=	--disable-xfake
-CONFIGURE_ARGS+=	--disable-xfbdev
 CONFIGURE_ARGS+=	--enable-xtrans-send-fds
 
 CONFIGURE_ARGS+=	--with-int10=x86emu
+.endif
+
+# From FreeBSD ports
+# .if ${OPSYS} == "FreeBSD" ||  ${OPSYS} == "DragonFly"
+.if ${OPSYS} == "FreeBSD"
+CONFIGURE_ARGS+=	--with-shared-memory-dir=/tmp
+CONFIGURE_ARGS+=	--disable-config-udev
+CONFIGURE_ARGS+=	--disable-config-udev-kms
+# CONFIGURE_ARGS+=	--disable-xnest
+# CONFIGURE_ARGS+=	--disable-xvfb
+CONFIGURE_ARGS+=	--disable-xwayland
+CONFIGURE_ARGS+=	--enable-xcsecurity
+.endif
+
+# FreeBSD ports devel/libunwind not ported to pkgsrc
+# .if ${OPSYS} == "FreeBSD" ||  ${OPSYS} == "DragonFly"
+# CONFIGURE_ARGS+=	--disable-libunwind
+# .endif
 
 CONFIGURE_ENV+=		APP_MAN_SUFFIX=1 FILE_MAN_SUFFIX=5
 CONFIGURE_ENV+=		DRIVER_MAN_SUFFIX=4
@@ -102,6 +122,20 @@ CONFIGURE_ENV.NetBSD+=	ac_cv_header_sys_event_h=no
 # Avoid picking up epoll on illumos
 CONFIGURE_ENV.SunOS+=	ac_cv_func_epoll_create1=no
 
+# Only available in newer releases
+CONFIGURE_ENV.SunOS+=	ac_cv_func_mkostemp=no
+
+.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly"
+# Workaround glamor lockups when drm-devel-kmod (4.15-4.17) is installed
+# with partial reverting of commit
+# 86b2d8740a330deafe8a9bbf0402705a43efbb42
+SUBST_CLASSES+=		glamor
+SUBST_STAGE.glamor=	pre-configure
+SUBST_MESSAGE.glamor=	Workaround glamor lockups
+SUBST_FILES.glamor=	glamor/glamor_egl.c
+SUBST_SED.glamor=	-e '/glamor_make_pixmap_exportable/s,FALSE,TRUE,g'
+.endif
+
 INSTALLATION_DIRS+=	lib/xorg/modules/drivers lib/xorg/modules/input
 
 BUILDLINK_API_DEPENDS.MesaLib+=		MesaLib>=7.8.0
@@ -126,6 +160,8 @@ CONFIGURE_ARGS+=	--with-sha1=libnettle
 BUILDLINK_API_DEPENDS.libpciaccess+=	libpciaccess>=0.11.0
 BUILDLINK_DEPMETHOD.libpciaccess=	full
 .include "../../sysutils/libpciaccess/buildlink3.mk"
+BUILDLINK_API_DEPENDS.xorgproto+=	xorgproto>=2018.3
+.include "../../x11/xorgproto/buildlink3.mk"
 .include "../../x11/evieext/buildlink3.mk"
 .include "../../x11/libX11/buildlink3.mk"
 .include "../../x11/libXau/buildlink3.mk"
@@ -142,6 +178,5 @@ BUILDLINK_API_DEPENDS.libXext+=	libXext>=1.1.1
 .include "../../x11/libxkbui/buildlink3.mk"
 .include "../../x11/pixman/buildlink3.mk"
 .include "../../x11/xcb-util-keysyms/buildlink3.mk"
-.include "../../x11/xorgproto/buildlink3.mk"
 .include "../../x11/xtrans/buildlink3.mk"
 .include "../../mk/pthread.buildlink3.mk"
diff --git a/modular-xorg-server-dfbsd/PLIST b/modular-xorg-server-dfbsd/PLIST
index 4a8db4432f..7fb292a14e 100644
--- a/modular-xorg-server-dfbsd/PLIST
+++ b/modular-xorg-server-dfbsd/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.27 2016/11/16 10:14:36 wiz Exp $
+@comment $NetBSD: PLIST,v 1.28 2018/05/11 13:47:35 wiz Exp $
 bin/X
 bin/Xnest
 bin/Xorg
@@ -56,6 +56,7 @@ include/xorg/geint.h
 ${PLIST.dri}include/xorg/glamor.h
 include/xorg/globals.h
 include/xorg/glx_extinit.h
+include/xorg/glxvndabi.h
 include/xorg/glyphstr.h
 include/xorg/hotplug.h
 include/xorg/i2c_def.h
@@ -117,6 +118,7 @@ include/xorg/validate.h
 include/xorg/vbe.h
 include/xorg/vbeModes.h
 include/xorg/vgaHW.h
+include/xorg/vndserver.h
 include/xorg/wfbrename.h
 include/xorg/window.h
 include/xorg/windowstr.h
@@ -127,6 +129,7 @@ include/xorg/xf86.h
 include/xorg/xf86Crtc.h
 include/xorg/xf86Cursor.h
 include/xorg/xf86DDC.h
+include/xorg/xf86MatchDrivers.h
 include/xorg/xf86Modes.h
 include/xorg/xf86Module.h
 include/xorg/xf86Opt.h
diff --git a/modular-xorg-server-dfbsd/TODO b/modular-xorg-server-dfbsd/TODO
index 93e17a5366..ff35145371 100644
--- a/modular-xorg-server-dfbsd/TODO
+++ b/modular-xorg-server-dfbsd/TODO
@@ -1,4 +1,9 @@
 Copy port to x11/modular-xorg-server, do not install from wip.
 
+Waiting for devd patches required on latest FreeBSD and DragonFly
+submitted in
+pkg/50200 (x11/modular-xorg-server)
+to be accepted.
+
 Port devd patches for 1.19.6 that have not been merged
 into FreeBSD ports, supports evdev.
diff --git a/modular-xorg-server-dfbsd/buildlink3.mk b/modular-xorg-server-dfbsd/buildlink3.mk
index 5912606e85..ca0bfae550 100644
--- a/modular-xorg-server-dfbsd/buildlink3.mk
+++ b/modular-xorg-server-dfbsd/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.21 2018/03/07 11:57:38 wiz Exp $
+# $NetBSD: buildlink3.mk,v 1.22 2018/05/11 13:47:35 wiz Exp $
 
 BUILDLINK_TREE+=	modular-xorg-server
 
@@ -21,6 +21,7 @@ BUILDLINK_DEPMETHOD.libpciaccess=	full
 .include "../../sysutils/libpciaccess/buildlink3.mk"
 .include "../../x11/pixman/buildlink3.mk"
 
+.include "../../x11/xorgproto/buildlink3.mk"
 .if !empty(USE_OLD_MODULAR_XORG_SERVER:M[yY][eE][sS])
 .include "../../graphics/MesaLib7/buildlink3.mk" # XXX should not be needed for non-dri build
 .include "../../x11/libXfont/buildlink3.mk"
@@ -28,7 +29,6 @@ BUILDLINK_DEPMETHOD.libpciaccess=	full
 .include "../../x11/libXfont2/buildlink3.mk"
 .include "../../graphics/MesaLib/buildlink3.mk" # XXX should not be needed for non-dri build
 .endif
-.include "../../x11/xorgproto/buildlink3.mk"
 .endif # MODULAR_XORG_SERVER_BUILDLINK3_MK
 
 BUILDLINK_TREE+=	-modular-xorg-server
diff --git a/modular-xorg-server-dfbsd/distinfo b/modular-xorg-server-dfbsd/distinfo
index 12c87a2eb7..c614b80fe2 100644
--- a/modular-xorg-server-dfbsd/distinfo
+++ b/modular-xorg-server-dfbsd/distinfo
@@ -1,27 +1,32 @@
-$NetBSD: distinfo,v 1.87 2018/01/25 15:06:10 jperkin Exp $
+$NetBSD: distinfo,v 1.92 2018/10/26 10:20:12 maya Exp $
 
-SHA1 (xorg-server-1.19.6.tar.bz2) = 2dd560ac49bdbda7f67166546af43541fabf517f
-RMD160 (xorg-server-1.19.6.tar.bz2) = c2b6f9fe3957c99cddd44bc3ae38343a1c4f314e
-SHA512 (xorg-server-1.19.6.tar.bz2) = 38519a8d0af9dd034045fc346959496dd718fa59b6188307974797a1cd9c349deb54987f6232ea8396baf810dcc710c0ff191f76ed2186cae4d44921b3680412
-Size (xorg-server-1.19.6.tar.bz2) = 5984528 bytes
+SHA1 (xorg-server-1.20.3.tar.bz2) = a522cd543606b4d0509d821b8061904951171c50
+RMD160 (xorg-server-1.20.3.tar.bz2) = a57a7e3d0d2e3c84f4743de6890c7d26b502e7a1
+SHA512 (xorg-server-1.20.3.tar.bz2) = ee44554f86df4297f54c5871fe7a18954eeef4338775a25f36d6577b279c4775f61128da71b86cfaeadcc080838d6749dede138d4db178866579da2056543fba
+Size (xorg-server-1.20.3.tar.bz2) = 6205000 bytes
 SHA1 (patch-config_config-backends.h) = f44868caa51e972a76949f73ac6083640af2c351
 SHA1 (patch-config_config.c) = 5a3fe4cb6c2170335ab547f438386cff77a9c152
-SHA1 (patch-config_devd.c) = 4e4cf2f61507e350cccdc04742b7d985aa84844f
-SHA1 (patch-configure) = 1f476fd71d97b84bc2e581f9b8e7d582eaece023
-SHA1 (patch-glx_glxscreens.c) = 1e8861f49537e4a23295128289dd3ede4ecb2035
-SHA1 (patch-hw_xfree86_common_xf86AutoConfig.c) = 765bbc7c8c61a0ffa5da54099e212cb981ef3bd0
-SHA1 (patch-hw_xfree86_common_xf86Config.c) = 7964ac8d32d4fcea113c8950661ab921c63ad9d0
-SHA1 (patch-hw_xfree86_common_xf86Globals.c) = 870100ea740b2c0bc1261355d3fcdf17ec50f64f
-SHA1 (patch-hw_xfree86_common_xf86Xinput.c) = 5c39ab681afa54ba24465fb9243b8fc2e71fd0ab
+SHA1 (patch-config_devd.c) = f90ca44c3ebfab5a848ab027d90101451a0f4042
+SHA1 (patch-configure) = 88707ff2b12acd81b1ec1a183a71b1141273f7b5
+SHA1 (patch-glamor_glamor__egl.c) = 8057778a5f0fd03c3ecd1191cff9123310396a1f
+SHA1 (patch-hw_xfree86_common_xf86AutoConfig.c) = 61c72780a65d423965225a2dd2206bcf2264c89f
+SHA1 (patch-hw_xfree86_common_xf86Config.c) = bcb413a2211ddcde0728a368e313bea841e03828
+SHA1 (patch-hw_xfree86_common_xf86Globals.c) = da35eb1c437eaffce0b8f8a3964e3a75631d8a73
+SHA1 (patch-hw_xfree86_common_xf86Xinput.c) = 5ad0c36fe68f87c853ac084640269e3b8f9370c9
 SHA1 (patch-hw_xfree86_common_xf86pciBus.c) = 896825ba12646431cba603938d118acbdde305dd
 SHA1 (patch-hw_xfree86_common_xf86sbusBus.h) = f56f87336b2f669413ebb1005a2b64568a111f92
-SHA1 (patch-hw_xfree86_dri2_dri2.c) = 44aa2e3d15a8985e2541a405b8a5ec7b7813b29f
+SHA1 (patch-hw_xfree86_dri2_dri2.c) = 475ea1956f2e71d684cf1e5a8a68b30279959a04
+SHA1 (patch-hw_xfree86_drivers_modesetting_drmmode__display.c) = 61735de44b0579d0a3d2bfb0d91c72c365d1b93f
+SHA1 (patch-hw_xfree86_modes_xf86Cursors.c) = bd9870edb1196a4d2eab49b2d13fbe6eefbe4c09
 SHA1 (patch-hw_xfree86_os-support_bsd_arm__video.c) = 9c03b24f44eafc5fabe27e9d6cc6c54b607e47c3
 SHA1 (patch-hw_xfree86_os-support_bsd_bsd__VTsw.c) = 90343f694c27a6fdd5070e1167687943bd056a99
-SHA1 (patch-hw_xfree86_os-support_bsd_i386__video.c) = 9bd30fa3ed7c73afd0b15e5cf5286de439f19351
+SHA1 (patch-hw_xfree86_os-support_bsd_bsd__init.c) = 0180a25df158ce3716071882fbb55cff9fe8e5ff
+SHA1 (patch-hw_xfree86_os-support_bsd_i386__video.c) = 68889e3ae80b9536d82909855ec7156caa928374
+SHA1 (patch-hw_xfree86_os-support_bsd_ppc__video.c) = 2f5126ee47cbd66c0241e8fbf66c8af363e01fd7
 SHA1 (patch-hw_xfree86_os-support_bus_Sbus.c) = 0035b970bdae1bab51b8ca6bfeed060ec4df3a60
 SHA1 (patch-hw_xfree86_os-support_solaris_solaris-amd64.S) = 088a3118deb7567194e08dd46e34cb6edba38400
 SHA1 (patch-hw_xfree86_os-support_xf86_OSproc.h) = e1c049857893d2f050d5fb297a3e8ef86f0b1d7e
 SHA1 (patch-hw_xfree86_os_support_bus_xf86Sbus.h) = 0e0a243b737f8f762c9f8f24a2265d1b6aefb544
-SHA1 (patch-hw_xfree86_sdksyms.sh) = c403149ad35ffb70ee44f70de94b4497b751c118
-SHA1 (patch-os_xstrans.c) = 489a4f4b226ecd361b922895204fb9041b065d4e
+SHA1 (patch-hw_xfree86_xorg-wrapper.c) = d1178c088307cd3781f8989522bab570b551ff55
+SHA1 (patch-randr_randr.c) = eb44a07770ca7308d706aa2324408bb8c6c6b7ba
+SHA1 (patch-randr_rrlease.c) = 82ace923fe7b65f4cf1be2ff243eabd886f3109e
diff --git a/modular-xorg-server-dfbsd/options.mk b/modular-xorg-server-dfbsd/options.mk
index fe93e91e89..dceb32b235 100644
--- a/modular-xorg-server-dfbsd/options.mk
+++ b/modular-xorg-server-dfbsd/options.mk
@@ -1,12 +1,24 @@
-# $NetBSD: options.mk,v 1.18 2018/03/07 11:57:38 wiz Exp $
+# $NetBSD: options.mk,v 1.19 2018/05/11 13:47:35 wiz Exp $
 
 PKG_OPTIONS_VAR=	PKG_OPTIONS.modular-xorg-server
 PKG_SUPPORTED_OPTIONS=	inet6 debug dtrace
+PKG_SUPPORTED_OPTIONS+=	revert_flink
+PKG_SUPPORTED_OPTIONS+=	revert_randr_lease
+PKG_SUPPORTED_OPTIONS+= allow_unprivileged
 PKG_SUGGESTED_OPTIONS=	inet6
 
+.if ${OPSYS} == "DragonFly"
+PKG_SUGGESTED_OPTIONS+=	revert_flink
+PKG_SUGGESTED_OPTIONS+=	revert_randr_lease
+.endif
+
+.if ${OPSYS} == "NetBSD"
+PKG_SUGGESTED_OPTIONS+=	allow_unprivileged
+.endif
+
 PKG_SUPPORTED_OPTIONS+=	devd
 .if ${OPSYS} == "FreeBSD" || ${OPSYS} == "DragonFly"
-PKG_SUGGESTED_OPTIONS+=	devd
+PKG_SUGGESTED_OPTIONS+= devd
 .endif
 
 .if ${X11_TYPE} == "modular"
@@ -95,3 +107,21 @@ SUBST_MESSAGE.devd_dix=		Patching include/dix-config.h for devd
 SUBST_FILES.devd_dix+=		include/dix-config.h	
 SUBST_SED.devd_dix+=		-e 's|/\* \#undef CONFIG_UDEV \*/|\#define CONFIG_DEVD 1 |'
 .endif
+
+.if !empty(PKG_OPTIONS:Mrevert_flink)
+CPPFLAGS+=	-DREVERT_FLINK
+.endif
+
+.if !empty(PKG_OPTIONS:Mrevert_randr_lease)
+CPPFLAGS+=	-DREVERT_RANDR_LEASE
+
+SUBST_CLASSES+=			lease
+SUBST_STAGE.lease=		post-configure
+SUBST_MESSAGE.lease=		Removing definition of XF86_LEASE_VERSION	
+SUBST_FILES.lease+=		hw/xfree86/modes/xf86Crtc.h
+SUBST_SED.lease+=		 -e 's|XF86_LEASE_VERSION|REVERT_XF86_LEASE_VERSION|g'
+.endif
+
+.if !empty(PKG_OPTIONS:Mallow_unprivileged)
+CPPFLAGS+=	-DALLOW_UNPRIVILEGED
+.endif
diff --git a/modular-xorg-server-dfbsd/patches/patch-config_devd.c b/modular-xorg-server-dfbsd/patches/patch-config_devd.c
index 0801591b9f..2320749070 100644
--- a/modular-xorg-server-dfbsd/patches/patch-config_devd.c
+++ b/modular-xorg-server-dfbsd/patches/patch-config_devd.c
@@ -1,10 +1,15 @@
 $NetBSD$
 
-From FreeBSD ports / DragonFly dports x11-servers/xorg-server 1.18.4.
+devd support to detect devices from FreeBSD ports / DragonFly dports
+x11-servers/xorg-server 1.18.4.
 
---- config/devd.c.orig	2018-01-06 18:38:25.992174000 +0000
+Added many debugging statements with DebugF.
+
+Adjust for update to 1.19.6 API.
+
+--- config/devd.c.orig	2018-08-04 04:32:13.580868000 +0000
 +++ config/devd.c
-@@ -0,0 +1,643 @@
+@@ -0,0 +1,613 @@
 +/*
 + * Copyright (c) 2012 Baptiste Daroussin
 + * Copyright (c) 2013, 2014 Alex Kozlov
@@ -247,9 +252,10 @@ From FreeBSD ports / DragonFly dports x11-servers/xorg-server 1.18.4.
 +			attrs.product = strdup(product);
 +			options = input_option_new(options, "name", product);
 +		}
-+		else
++		else {
 +			DebugF("[config/devd]: device_added: input_option_new([name], [(unnamed)])\n");
 +			options = input_option_new(options, "name", "(unnamed)");
++		}
 +
 +		free(vendor);
 +	}
@@ -329,7 +335,7 @@ From FreeBSD ports / DragonFly dports x11-servers/xorg-server 1.18.4.
 +			attrs.product, path);
 +
 +	NewInputDeviceRequest(options, &attrs, &dev);
-+	
++
 +	DebugF("[config/devd]: device_added: finished NewInputDeviceRequest for device %s (%s)\n",
 +			attrs.product, path);
 +
@@ -399,7 +405,7 @@ From FreeBSD ports / DragonFly dports x11-servers/xorg-server 1.18.4.
 +}
 +
 +static void
-+socket_handler(int sock, int ready, void *data);
++wakeup_handler(int sock, int ready, void *data);
 +
 +static int
 +connect_devd(void)
@@ -430,7 +436,7 @@ From FreeBSD ports / DragonFly dports x11-servers/xorg-server 1.18.4.
 +
 +	DebugF("[config/devd]: connected to devd, sock (%d), pid file (%s)\n", sock, DEVD_SOCK_PATH);
 +
-+	SetNotifyFd(sock, socket_handler, X_NOTIFY_READ, NULL);
++	SetNotifyFd(sock, wakeup_handler, X_NOTIFY_READ, NULL);
 +
 +	return	sock;
 +}
@@ -461,8 +467,6 @@ From FreeBSD ports / DragonFly dports x11-servers/xorg-server 1.18.4.
 +	ssize_t ret, cap, sz = 0;
 +	char c;
 +
-+	*out = NULL;
-+
 +	cap = 1024;
 +	buf = malloc(cap * sizeof(char));
 +	if (!buf)
@@ -480,7 +484,7 @@ From FreeBSD ports / DragonFly dports x11-servers/xorg-server 1.18.4.
 +			disconnect_devd(sock_devd);
 +			rtimer = TimerSet(NULL, 0, 1, reconnect_handler, NULL);
 +			LogMessage(X_WARNING, "config/devd: devd socket is lost\n");
-+			DebugF("[config/devd]: socket_getline: EOF devd socket (%d) is LOST\n", sock_devd);
++			DebugF("[config/devd]: WARNING socket_getline: EOF devd socket (%d) is LOST\n", sock_devd);
 +			free(buf);
 +			return -1;
 +		}
@@ -491,6 +495,7 @@ From FreeBSD ports / DragonFly dports x11-servers/xorg-server 1.18.4.
 +			cap *= 2;
 +			newbuf = realloc(buf, cap * sizeof(char));
 +			if (!newbuf) {
++				DebugF("[config/devd]: ERROR socket_getline: realloc failed on buf\n");
 +				free(buf);
 +				return -1;
 +			}
@@ -510,18 +515,24 @@ From FreeBSD ports / DragonFly dports x11-servers/xorg-server 1.18.4.
 +	return sz;
 +}
 +
-+#if 0
 +static void
-+wakeup_handler(void *data, int err)
++wakeup_handler(int sock, int ready, void *data)
 +{
 +	char *line = NULL;
 +	char *walk;
++	ssize_t sz;
 +
-+	if (err < 0)
-+		return;
-+
-+		if (socket_getline(sock_devd, &line) < 0)
++	DebugF("[config/devd]: wakeup_handler: sock_devd (%d), sock (%d), ready (%d)\n", sock_devd, sock, ready);
++	
++		sz = socket_getline(sock_devd, &line);
++		if (sz < 0)
 +			return;
++		if (sz == 0) {
++			DebugF("[config/devd]: WARNING wakeup_handler: socket_getline returned zero length line\n", line);
++			free(line);
++			return;
++		}
++		DebugF("[config/devd]: wakeup_handler: socket_getline (%s)\n", line);
 +
 +		walk = strchr(line + 1, ' ');
 +		if (walk != NULL)
@@ -529,57 +540,21 @@ From FreeBSD ports / DragonFly dports x11-servers/xorg-server 1.18.4.
 +
 +		switch (*line) {
 +		case DEVD_EVENT_ADD:
++			DebugF("[config/devd]: wakeup_handler: DEVD_EVENT_ADD line (%s)\n", line);
 +			device_added(line + 1);
 +			break;
 +		case DEVD_EVENT_REMOVE:
++			DebugF("[config/devd]: wakeup_handler: DEVD_EVENT_REMOVE line (%s)\n", line);
 +			device_removed(line + 1);
 +			break;
++		case DEVD_EVENT_NOTIFY:
++			DebugF("[config/devd]: wakeup_handler: DEVD_EVENT_NOTIFY line (%s)\n", line);
++			break;
 +		default:
 +			break;
 +		}
 +		free(line);
 +}
-+#endif
-+
-+static void
-+socket_handler(int sock, int ready, void *data)
-+{
-+	char *line = NULL;
-+	char *walk;
-+	ssize_t sz;
-+
-+	DebugF("[config/devd]: socket_handler: sock_devd (%d), sock (%d), ready (%d)\n", sock_devd, sock, ready);
-+	
-+	sz = socket_getline(sock_devd, &line);
-+	if (sz < 0)
-+		return;
-+	if (sz == 0) {
-+		free(line);
-+		return;
-+	}
-+	DebugF("[config/devd]: socket_handler: socket_getline (%s)\n", line);
-+
-+	walk = strchr(line + 1, ' ');
-+	if (walk != NULL)
-+		walk[0] = '\0';
-+
-+	switch (*line) {
-+	case DEVD_EVENT_ADD:
-+		DebugF("[config/devd]: socket_handler: DEVD_EVENT_ADD line (%s)\n", line);
-+		device_added(line + 1);
-+		break;
-+	case DEVD_EVENT_REMOVE:
-+		DebugF("[config/devd]: socket_handler: DEVD_EVENT_REMOVE line (%s)\n", line);
-+		device_removed(line + 1);
-+		break;
-+	case DEVD_EVENT_NOTIFY:
-+		DebugF("[config/devd]: socket_handler: DEVD_EVENT_NOTIFY line (%s)\n", line);
-+		break;
-+	default:
-+		break;
-+	}
-+	free(line);
-+}
 +
 +#if 0
 +static void
diff --git a/modular-xorg-server-dfbsd/patches/patch-configure b/modular-xorg-server-dfbsd/patches/patch-configure
index 5cb1a5d428..df8532fe83 100644
--- a/modular-xorg-server-dfbsd/patches/patch-configure
+++ b/modular-xorg-server-dfbsd/patches/patch-configure
@@ -5,9 +5,29 @@ Use USE_AMD64_IOPL (actually x86_64_iopl) on NetBSD/amd64.
 
 for netbsd, force pass pthread configure checks (pthread not needed)
 
---- configure.orig	2017-12-20 20:32:47.000000000 +0000
+Patches from FreeBSD ports x11-servers/xorg-server 1.18.4:
+
+* Fix xorg-server build on arm64.
+
+--- configure.orig	2015-02-10 22:49:52.000000000 +0000
 +++ configure
-@@ -23305,7 +23305,7 @@ $as_echo "#define USE_DEV_IO 1" >>confde
+@@ -23098,9 +23098,14 @@ $as_echo "#define USE_ALPHA_PIO 1" >>con
+ 	esac
+ 	GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee"
+ 	;;
+-  arm*)
++  arm*|aarch64*)
+ 	ARM_VIDEO=yes
+ 	DEFAULT_INT10="stub"
++	case $host_os in
++		*freebsd*)
++			$as_echo "#define USE_DEV_IO 1" >>confdefs.h
++		 ;;
++	esac
+ 	;;
+   i*86)
+ 	I386_VIDEO=yes
+@@ -23140,7 +23145,7 @@ $as_echo "#define USE_DEV_IO 1" >>confde
  $as_echo "#define USE_DEV_IO 1" >>confdefs.h
   ;;
  		*netbsd*)
@@ -16,7 +36,7 @@ for netbsd, force pass pthread configure checks (pthread not needed)
  
  				SYS_LIBS=-lx86_64
  				;;
-@@ -25149,7 +25149,8 @@ case ${host_os} in
+@@ -24948,7 +24953,8 @@ case ${host_os} in
  	netbsd*)
  	# use libc stubs, don't link against libpthread, to allow
  	# dynamic loading
diff --git a/modular-xorg-server-dfbsd/patches/patch-glamor_glamor__egl.c b/modular-xorg-server-dfbsd/patches/patch-glamor_glamor__egl.c
new file mode 100644
index 0000000000..ddc3a36ddb
--- /dev/null
+++ b/modular-xorg-server-dfbsd/patches/patch-glamor_glamor__egl.c
@@ -0,0 +1,122 @@
+$NetBSD$
+
+Option to revert
+
+2017-05-18	glamor_egl: Avoid flink names in glamor_egl_create_textured_pixmap().
+commit	59de50d6ef3331ee03eb82d4acba45aa75c70d42
+
+glamor_egl: Avoid flink names in glamor_egl_create_textured_pixmap().
+Using flink is banned on render nodes, and they needlessly expose our
+screen pixmap contents to any authenticated client.  This also
+incidentally drops the dependency on EGL_MESA_drm_image.
+
+--- glamor/glamor_egl.c.orig	2018-10-15 15:59:33.000000000 +0000
++++ glamor/glamor_egl.c
+@@ -93,6 +93,40 @@ glamor_egl_make_current(struct glamor_co
+     }
+ }
+ 
++#if defined(REVERT_FLINK)
++static EGLImageKHR
++_glamor_egl_create_image(struct glamor_egl_screen_private *glamor_egl,
++                         int width, int height, int stride, int name, int depth)
++{
++    EGLImageKHR image;
++
++    EGLint attribs[] = {
++        EGL_WIDTH, 0,
++        EGL_HEIGHT, 0,
++        EGL_DRM_BUFFER_STRIDE_MESA, 0,
++        EGL_DRM_BUFFER_FORMAT_MESA,
++        EGL_DRM_BUFFER_FORMAT_ARGB32_MESA,
++        EGL_DRM_BUFFER_USE_MESA,
++        EGL_DRM_BUFFER_USE_SHARE_MESA | EGL_DRM_BUFFER_USE_SCANOUT_MESA,
++        EGL_NONE
++    };
++    attribs[1] = width;
++    attribs[3] = height;
++    attribs[5] = stride;
++    if (depth != 32 && depth != 24)
++        return EGL_NO_IMAGE_KHR;
++    image = eglCreateImageKHR(glamor_egl->display,
++                              glamor_egl->context,
++                              EGL_DRM_BUFFER_MESA,
++                              (void *) (uintptr_t) name,
++                              attribs);
++    if (image == EGL_NO_IMAGE_KHR)
++        return EGL_NO_IMAGE_KHR;
++
++    return image;
++}
++#endif
++
+ static int
+ glamor_get_flink_name(int fd, int handle, int *name)
+ {
+@@ -184,6 +218,48 @@ glamor_egl_create_textured_pixmap(Pixmap
+ {
+     ScreenPtr screen = pixmap->drawable.pScreen;
+     ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
++
++#if defined(REVERT_FLINK)
++    struct glamor_screen_private *glamor_priv =
++        glamor_get_screen_private(screen);
++    struct glamor_egl_screen_private *glamor_egl;
++    EGLImageKHR image;
++    GLuint texture;
++    int name;
++    Bool ret = FALSE;
++
++    glamor_egl = glamor_egl_get_screen_private(scrn);
++
++    glamor_make_current(glamor_priv);
++    if (!glamor_get_flink_name(glamor_egl->fd, handle, &name)) {
++        xf86DrvMsg(scrn->scrnIndex, X_ERROR,
++                   "Couldn't flink pixmap handle\n");
++        glamor_set_pixmap_type(pixmap, GLAMOR_DRM_ONLY);
++        assert(0);
++        return FALSE;
++    }
++
++    image = _glamor_egl_create_image(glamor_egl,
++                                     pixmap->drawable.width,
++                                     pixmap->drawable.height,
++                                     ((stride * 8 +
++                                       7) / pixmap->drawable.bitsPerPixel),
++                                     name, pixmap->drawable.depth);
++    if (image == EGL_NO_IMAGE_KHR) {
++        glamor_set_pixmap_type(pixmap, GLAMOR_DRM_ONLY);
++        goto done;
++    }
++    glamor_create_texture_from_image(screen, image, &texture);
++    glamor_set_pixmap_type(pixmap, GLAMOR_TEXTURE_DRM);
++    glamor_set_pixmap_texture(pixmap, texture);
++    glamor_egl_set_pixmap_image(pixmap, image, FALSE);
++    ret = TRUE;
++ 
++ done:
++    return ret;
++}
++
++#else /* !REVERT_FLINK */
+     struct glamor_egl_screen_private *glamor_egl =
+         glamor_egl_get_screen_private(scrn);
+     int ret, fd;
+@@ -213,6 +289,7 @@ glamor_egl_create_textured_pixmap(Pixmap
+     close(fd);
+     return TRUE;
+ }
++#endif /* REVERT_FLINK */
+ 
+ Bool
+ glamor_egl_create_textured_pixmap_from_gbm_bo(PixmapPtr pixmap,
+@@ -934,6 +1011,9 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd
+ 		goto error;  \
+ 	}
+ 
++#if defined(REVERT_FLINK)
++    GLAMOR_CHECK_EGL_EXTENSION(MESA_drm_image);
++#endif
+     GLAMOR_CHECK_EGL_EXTENSION(KHR_surfaceless_context);
+ 
+     if (eglBindAPI(EGL_OPENGL_API)) {
diff --git a/modular-xorg-server-dfbsd/patches/patch-glx_glxscreens.c b/modular-xorg-server-dfbsd/patches/patch-glx_glxscreens.c
deleted file mode 100644
index 8e1545d3df..0000000000
--- a/modular-xorg-server-dfbsd/patches/patch-glx_glxscreens.c
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD$
-
-https://cgit.freedesktop.org/xorg/xserver/commit/?id=c2954b16c8730c7ed8441fd8dba25900f3aed265
-
-glx: do not pick sRGB config for 32-bit RGBA visual
-This fixes blending issues seen with kwin and gnome-shell when
-32bit visual has sRGB capability set.
-
-Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103699
-Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103646
-Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103655
-
---- glx/glxscreens.c.orig	2017-12-20 20:32:33.000000000 +0000
-+++ glx/glxscreens.c
-@@ -275,6 +275,11 @@ pickFBConfig(__GLXscreen * pGlxScreen, V
-         /* If it's the 32-bit RGBA visual, demand a 32-bit fbconfig. */
-         if (visual->nplanes == 32 && config->rgbBits != 32)
-             continue;
-+        /* If it's the 32-bit RGBA visual, do not pick sRGB capable config.
-+         * This can cause issues with compositors that are not sRGB aware.
-+         */
-+        if (visual->nplanes == 32 && config->sRGBCapable == GL_TRUE)
-+            continue;
-         /* Can't use the same FBconfig for multiple X visuals.  I think. */
-         if (config->visualID != 0)
-             continue;
diff --git a/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_common_xf86AutoConfig.c b/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_common_xf86AutoConfig.c
index 977de9324f..a019dacd4c 100644
--- a/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_common_xf86AutoConfig.c
+++ b/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_common_xf86AutoConfig.c
@@ -1,27 +1,39 @@
-$NetBSD$
+$NetBSD: patch-hw_xfree86_common_xf86AutoConfig.c,v 1.3 2018/10/26 10:20:12 maya Exp $
 
-From FreeBSD ports for x11-servers/xorg-server.
+Patches from FreeBSD ports /DragonFly dports for x11-servers/xorg-server 1.18.4.
 
---- hw/xfree86/common/xf86AutoConfig.c.orig	2017-12-20 20:32:33.000000000 +0000
+Look for wsfb on netbsd (needed by genfb)
+
+--- hw/xfree86/common/xf86AutoConfig.c.orig	2018-10-25 14:13:21.000000000 +0000
 +++ hw/xfree86/common/xf86AutoConfig.c
-@@ -276,7 +276,7 @@ listPossibleVideoDrivers(char *matches[]
-         i += xf86PciMatchDriver(&matches[i], nmatches - i);
+@@ -294,7 +294,7 @@ listPossibleVideoDrivers(XF86MatchedDriv
+     xf86PciMatchDriver(md);
  #endif
  
 -#if defined(__linux__)
 +#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
-     matches[i++] = xnfstrdup("modesetting");
+     xf86AddMatchedDriver(md, "modesetting");
  #endif
  
-@@ -285,8 +285,10 @@ listPossibleVideoDrivers(char *matches[]
-     if (i < (nmatches - 1)) {
+@@ -302,8 +302,10 @@ listPossibleVideoDrivers(XF86MatchedDriv
+     /* Fallback to platform default frame buffer driver */
  #if !defined(__linux__) && defined(__sparc__)
-         matches[i++] = xnfstrdup("wsfb");
+     xf86AddMatchedDriver(md, "wsfb");
 -#else
 +#elif defined(__linux__)
-         matches[i++] = xnfstrdup("fbdev");
+     xf86AddMatchedDriver(md, "fbdev");
 +#elif defined(__FreeBSD__)
-+        matches[i++] = xnfstrdup("scfb");
++    xf86AddMatchedDriver(md, "scfb");
  #endif
-     }
  #endif                          /* !__sun */
+ 
+@@ -313,6 +315,9 @@ listPossibleVideoDrivers(XF86MatchedDriv
+ #elif defined(__sparc__) && !defined(__sun)
+     xf86AddMatchedDriver(md, "sunffb");
+ #endif
++#if defined(__NetBSD__)
++    xf86AddMatchedDriver(md, "wsfb");
++#endif
+ }
+ 
+ /* copy a screen section and enter the desired driver
diff --git a/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_common_xf86Config.c b/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_common_xf86Config.c
index 1b65bc95c1..b888c06b04 100644
--- a/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_common_xf86Config.c
+++ b/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_common_xf86Config.c
@@ -1,6 +1,7 @@
 $NetBSD$
 
 devd support to detect devices from FreeBSD ports / DragonFly dports
+x11-servers/xorg-server 1.18.4.
 
 --- hw/xfree86/common/xf86Config.c.orig	2017-01-05 21:19:31.000000000 +0000
 +++ hw/xfree86/common/xf86Config.c
@@ -18,7 +19,7 @@ devd support to detect devices from FreeBSD ports / DragonFly dports
  #elif defined(CONFIG_UDEV)
          config_backend = "udev";
 +#elif defined(CONFIG_DEVD)
-+	config_backend = "devd";
++        config_backend = "devd";
  #else
          config_backend = "wscons";
  #endif
diff --git a/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_common_xf86Globals.c b/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_common_xf86Globals.c
index 2245c8c7e0..fcbe49c6cf 100644
--- a/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_common_xf86Globals.c
+++ b/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_common_xf86Globals.c
@@ -1,13 +1,14 @@
 $NetBSD$
 
 devd support to detect devices from FreeBSD ports / DragonFly dports
+x11-servers/xorg-server 1.18.4.
 
---- hw/xfree86/common/xf86Globals.c.orig	2015-07-18 23:25:51.820719000 +0000
+--- hw/xfree86/common/xf86Globals.c.orig	2018-05-10 16:32:35.000000000 +0000
 +++ hw/xfree86/common/xf86Globals.c
-@@ -122,7 +122,8 @@ xf86InfoRec xf86Info = {
+@@ -117,7 +117,8 @@ xf86InfoRec xf86Info = {
+     .miscModInDevEnabled = TRUE,
+     .miscModInDevAllowNonLocal = FALSE,
      .pmFlag = TRUE,
-     .disableRandR = FALSE,
-     .randRFrom = X_DEFAULT,
 -#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS)
 +#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || \
 +	defined(CONFIG_DEVD)
diff --git a/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_common_xf86Xinput.c b/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_common_xf86Xinput.c
index 3b6d76d78a..a8581aed25 100644
--- a/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_common_xf86Xinput.c
+++ b/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_common_xf86Xinput.c
@@ -1,8 +1,7 @@
 $NetBSD$
 
-From FreeBSD ports / DragonFly dports x11-servers/xorg-server 1.18.4.
-
-devd support
+devd support to detect devices from FreeBSD ports / DragonFly dports
+x11-servers/xorg-server 1.18.4.
 
 --- hw/xfree86/common/xf86Xinput.c.orig	2017-12-20 20:32:33.000000000 +0000
 +++ hw/xfree86/common/xf86Xinput.c
diff --git a/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_dri2_dri2.c b/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_dri2_dri2.c
index 43d15a93ae..69c3c18a54 100644
--- a/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_dri2_dri2.c
+++ b/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_dri2_dri2.c
@@ -9,7 +9,7 @@ dri2.c:320:27: note: initialize the variable 'ref' to silence this warning
 dri2.c:601:27: note: initialize the variable 'ref' to silence this warning
     DRI2DrawableRefPtr ref;
 
---- hw/xfree86/dri2/dri2.c.orig	2017-01-06 15:03:50.000000000 +0000
+--- hw/xfree86/dri2/dri2.c.orig	2015-01-26 18:42:23.000000000 +0000
 +++ hw/xfree86/dri2/dri2.c
 @@ -312,7 +312,7 @@ typedef struct DRI2DrawableRefRec {
  static DRI2DrawableRefPtr
diff --git a/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_drivers_modesetting_drmmode__display.c b/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_drivers_modesetting_drmmode__display.c
new file mode 100644
index 0000000000..0bea7afcea
--- /dev/null
+++ b/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_drivers_modesetting_drmmode__display.c
@@ -0,0 +1,48 @@
+$NetBSD$
+
+Option to revert effects of upstream:
+
+2018-02-27	Add RandR leases with modesetting driver support [v6]
+
+commit	e4e3447603b5fd3a38a92c3f972396d1f81168ad
+
+--- hw/xfree86/drivers/modesetting/drmmode_display.c.orig	2018-10-15 15:59:33.000000000 +0000
++++ hw/xfree86/drivers/modesetting/drmmode_display.c
+@@ -3196,6 +3196,7 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn
+     return FALSE;
+ }
+ 
++#if !defined(REVERT_RANDR_LEASE)
+ static void
+ drmmode_validate_leases(ScrnInfoPtr scrn)
+ {
+@@ -3233,6 +3234,7 @@ drmmode_validate_leases(ScrnInfoPtr scrn
+ 
+     free(lessees);
+ }
++#endif
+ 
+ static int
+ drmmode_create_lease(RRLeasePtr lease, int *fd)
+@@ -3485,8 +3487,10 @@ drmmode_set_desired_modes(ScrnInfoPtr pS
+         }
+     }
+ 
++#if !defined(REVERT_RANDR_LEASE)
+     /* Validate leases on VT re-entry */
+     drmmode_validate_leases(pScrn);
++#endif
+ 
+     return TRUE;
+ }
+@@ -3693,8 +3697,10 @@ drmmode_handle_uevents(int fd, void *clo
+         drmmode_output_init(scrn, drmmode, mode_res, i, TRUE, 0);
+     }
+ 
++#if !defined(REVERT_RANDR_LEASE)
+     /* Check to see if a lessee has disappeared */
+     drmmode_validate_leases(scrn);
++#endif
+ 
+     if (changed) {
+         RRSetChanged(xf86ScrnToScreen(scrn));
diff --git a/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_modes_xf86Cursors.c b/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_modes_xf86Cursors.c
new file mode 100644
index 0000000000..c5ac28359e
--- /dev/null
+++ b/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_modes_xf86Cursors.c
@@ -0,0 +1,20 @@
+$NetBSD$
+
+Option to revert effects of upstream:
+
+2018-02-27	Add RandR leases with modesetting driver support [v6]
+
+commit	e4e3447603b5fd3a38a92c3f972396d1f81168ad
+
+--- hw/xfree86/modes/xf86Cursors.c.orig	2018-10-15 15:59:33.000000000 +0000
++++ hw/xfree86/modes/xf86Cursors.c
+@@ -348,7 +348,9 @@ Bool
+ xf86_crtc_show_cursor(xf86CrtcPtr crtc)
+ {
+     if (!crtc->cursor_in_range) {
++#if !defined(REVERT_RANDR_LEASE)
+         crtc->funcs->hide_cursor(crtc);
++#endif
+         return TRUE;
+     }
+ 
diff --git a/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_os-support_bsd_bsd__init.c b/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_os-support_bsd_bsd__init.c
new file mode 100644
index 0000000000..588e43728c
--- /dev/null
+++ b/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_os-support_bsd_bsd__init.c
@@ -0,0 +1,103 @@
+$NetBSD: patch-hw_xfree86_os-support_bsd_bsd__init.c,v 1.1 2018/10/26 10:20:12 maya Exp $
+
+Don't error when running unprivileged.
+
+From FreeBSD ports for x11-servers/xorg-server 1.18.4.
+sparc64 patch
+
+Bug 196678
+x11-servers/xorg-server: Update to 1.19.6 + make config/devd recognize
+/dev/input/eventX from multimedia/webcamd
+
+https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196678
+
+Attachment #191592: update Xorg to 1.19.6 and integrate collective devd enhancements
+for bug #196678
+
+https://bugs.freebsd.org/bugzilla/attachment.cgi?id=191592&action=diff
+
+--- hw/xfree86/os-support/bsd/bsd_init.c.orig	2018-10-25 14:13:21.000000000 +0000
++++ hw/xfree86/os-support/bsd/bsd_init.c
+@@ -48,6 +48,10 @@ static int devConsoleFd = -1;
+ #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
+ static int VTnum = -1;
+ static int initialVT = -1;
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
++static struct termios tty_attr;	/* tty state to restore */
++static int tty_mode;		/* kbd mode to restore */
++#endif /* __FreeBSD__ */
+ #endif
+ 
+ #ifdef PCCONS_SUPPORT
+@@ -165,10 +169,12 @@ xf86OpenConsole()
+ #endif
+ 
+     if (serverGeneration == 1) {
++#if !defined(ALLOW_UNPRIVILEGED)
+         /* check if we are run with euid==0 */
+         if (geteuid() != 0) {
+             FatalError("xf86OpenConsole: Server must be suid root");
+         }
++#endif
+ 
+         if (!KeepTty) {
+             /*
+@@ -230,6 +236,9 @@ xf86OpenConsole()
+              * Add cases for other *BSD that behave the same.
+              */
+ #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
++#if defined(__sparc64__)
++	    pci_system_init_dev_mem(fd);
++#endif
+             uname(&uts);
+             i = atof(uts.release) * 100;
+             if (i >= 310)
+@@ -253,6 +262,9 @@ xf86OpenConsole()
+ #endif
+  acquire_vt:
+             if (!xf86Info.ShareVTs) {
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
++                struct termios nTty;
++#endif /* __FreeBSD__ */
+                 /*
+                  * now get the VT
+                  */
+@@ -287,6 +299,27 @@ xf86OpenConsole()
+                 if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0) {
+                     FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed");
+                 }
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
++                tcgetattr(xf86Info.consoleFd, &tty_attr);
++                ioctl(xf86Info.consoleFd, KDGKBMODE, &tty_mode);
++
++                /* disable special keys */
++                if (ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW) < 0) {
++                    FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed (%s)",
++                               strerror(errno));
++                }
++
++                nTty = tty_attr;
++                nTty.c_iflag = IGNPAR | IGNBRK;
++                nTty.c_oflag = 0;
++                nTty.c_cflag = CREAD | CS8;
++                nTty.c_lflag = 0;
++                nTty.c_cc[VTIME] = 0;
++                nTty.c_cc[VMIN] = 1;
++                cfsetispeed(&nTty, 9600);
++                cfsetospeed(&nTty, 9600);
++                tcsetattr(xf86Info.consoleFd, TCSANOW, &nTty);
++#endif /* __FreeBSD__ */
+             }
+             else {              /* xf86Info.ShareVTs */
+                 close(xf86Info.consoleFd);
+@@ -594,6 +627,10 @@ xf86CloseConsole()
+     case SYSCONS:
+     case PCVT:
+         ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT);  /* Back to text mode */
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
++        ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode);
++        tcsetattr(xf86Info.consoleFd, TCSANOW, &tty_attr);
++#endif /* __FreeBSD__ */
+         if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1) {
+             VT.mode = VT_AUTO;
+             ioctl(xf86Info.consoleFd, VT_SETMODE, &VT); /* dflt vt handling */
diff --git a/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_os-support_bsd_i386__video.c b/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_os-support_bsd_i386__video.c
index 457eb083c2..09e0931d81 100644
--- a/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_os-support_bsd_i386__video.c
+++ b/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_os-support_bsd_i386__video.c
@@ -2,7 +2,7 @@ $NetBSD: patch-hw_xfree86_os-support_bsd_i386__video.c,v 1.1 2015/04/25 11:47:03
 
 Added patch from FreeBSD ports / DragonFly dports
 
---- hw/xfree86/os-support/bsd/i386_video.c.orig	2017-01-05 21:19:31.000000000 +0000
+--- hw/xfree86/os-support/bsd/i386_video.c.orig	2015-01-17 23:42:52.000000000 +0000
 +++ hw/xfree86/os-support/bsd/i386_video.c
 @@ -32,6 +32,9 @@
  #include "xf86Priv.h"
diff --git a/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_os-support_bsd_ppc__video.c b/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_os-support_bsd_ppc__video.c
new file mode 100644
index 0000000000..64fdc91602
--- /dev/null
+++ b/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_os-support_bsd_ppc__video.c
@@ -0,0 +1,18 @@
+$NetBSD$
+
+From FreeBSD ports for x11-servers/xorg-server 1.18.4.
+
+--- hw/xfree86/os-support/bsd/ppc_video.c.orig	2016-07-15 16:18:11 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/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_sdksyms.sh b/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_sdksyms.sh
deleted file mode 100644
index 9f452d405b..0000000000
--- a/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_sdksyms.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD: patch-hw_xfree86_sdksyms.sh,v 1.1 2016/04/10 07:35:20 tnn Exp $
-
-Kludge sdksyms.c generator to not fail on GetClientPid.
-It returns pid_t which on NetBSD is #define pid_t __pid_t
-This slightly alters the GCC preprocessor output which this fragile
-code could not deal with when using GCC 5+
-
---- hw/xfree86/sdksyms.sh.orig	2016-03-08 20:22:17.000000000 +0000
-+++ hw/xfree86/sdksyms.sh
-@@ -357,6 +357,17 @@ BEGIN {
-                n = 1;
-             }
-         }
-+	# hack: pid_t becomes __pid_t on NetBSD.
-+	# GCC 5 inserts additional lines around this.
-+        if ($1 == "__pid_t" && NF == 1) {
-+            getline;
-+            n++;
-+            # skip line numbers GCC 5 adds (after typedef return type?)
-+            while ($n == "" || $0 ~ /^# [0-9]+ "/) {
-+               getline;
-+               n = 1;
-+            }
-+	}
- 
- 	# type specifier may not be set, as in
- 	#   extern _X_EXPORT unsigned name(...)
diff --git a/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_xorg-wrapper.c b/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_xorg-wrapper.c
new file mode 100644
index 0000000000..8a514f42a7
--- /dev/null
+++ b/modular-xorg-server-dfbsd/patches/patch-hw_xfree86_xorg-wrapper.c
@@ -0,0 +1,37 @@
+$NetBSD$
+
+Bug 196678
+x11-servers/xorg-server: Update to 1.19.6 + make config/devd recognize
+/dev/input/eventX from multimedia/webcamd
+
+https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196678
+
+Attachment #191592: update Xorg to 1.19.6 and integrate collective devd enhancements
+for bug #196678
+
+https://bugs.freebsd.org/bugzilla/attachment.cgi?id=191592&action=diff
+
+* 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	2018-08-07 16:31:04.000000000 +0000
++++ hw/xfree86/xorg-wrapper.c
+@@ -191,7 +191,7 @@ static int on_console(int fd)
+ 
+ int main(int argc, char *argv[])
+ {
+-#ifdef WITH_LIBDRM
++#if defined(WITH_LIBDRM) && !defined(__FreeBSD__) && !defined(__DragonFly__)
+     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(__FreeBSD__) && !defined(__DragonFly__)
+     /* Detect if we need root rights, except when overriden by the config */
+     if (needs_root_rights == -1) {
+         for (i = 0; i < 16; i++) {
diff --git a/modular-xorg-server-dfbsd/patches/patch-os_xstrans.c b/modular-xorg-server-dfbsd/patches/patch-os_xstrans.c
deleted file mode 100644
index 439158f0ef..0000000000
--- a/modular-xorg-server-dfbsd/patches/patch-os_xstrans.c
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD: patch-os_xstrans.c,v 1.1 2015/09/26 18:35:41 tnn Exp $
-
-CMSG_SPACE must evaluate to a constant, but doesn't on netbsd-5.
-See sys/socket.h r1.104.
-
---- os/xstrans.c.orig	2015-05-21 14:23:54.000000000 +0000
-+++ os/xstrans.c
-@@ -14,4 +14,13 @@ _X_ATTRIBUTE_PRINTF(1, 2);
- #define TRANS_REOPEN
- #define TRANS_SERVER
- #define XSERV_t
-+#if defined(__NetBSD__)
-+#include <sys/param.h>
-+#if (__NetBSD_Version__ < 600000000)
-+#include <sys/socket.h>
-+#define __MY_CMSG_ALIGN(n) (((n) + 7) & ~7)
-+#undef  CMSG_SPACE
-+#define CMSG_SPACE(l) (__MY_CMSG_ALIGN(sizeof(struct msghdr)) + __MY_CMSG_ALIGN(l))
-+#endif
-+#endif
- #include <X11/Xtrans/transport.c>
diff --git a/modular-xorg-server-dfbsd/patches/patch-randr_randr.c b/modular-xorg-server-dfbsd/patches/patch-randr_randr.c
new file mode 100644
index 0000000000..02b7862319
--- /dev/null
+++ b/modular-xorg-server-dfbsd/patches/patch-randr_randr.c
@@ -0,0 +1,91 @@
+$NetBSD$
+
+Option to revert effects of upstream:
+
+2018-02-27	Add RandR leases with modesetting driver support [v6]
+
+commit	e4e3447603b5fd3a38a92c3f972396d1f81168ad
+
+--- randr/randr.c.orig	2018-10-15 15:59:33.000000000 +0000
++++ randr/randr.c
+@@ -89,12 +89,16 @@ RRCloseScreen(ScreenPtr pScreen)
+ {
+     rrScrPriv(pScreen);
+     int j;
++#if !defined(REVERT_RANDR_LEASE)
+     RRLeasePtr lease, next;
++#endif
+ 
+     unwrap(pScrPriv, pScreen, CloseScreen);
+ 
++#if !defined(REVERT_RANDR_LEASE)
+     xorg_list_for_each_entry_safe(lease, next, &pScrPriv->leases, list)
+         RRTerminateLease(lease);
++#endif
+     for (j = pScrPriv->numCrtcs - 1; j >= 0; j--)
+         RRCrtcDestroy(pScrPriv->crtcs[j]);
+     for (j = pScrPriv->numOutputs - 1; j >= 0; j--)
+@@ -227,6 +231,7 @@ SRRResourceChangeNotifyEvent(xRRResource
+     cpswapl(from->window, to->window);
+ }
+ 
++#if !defined(REVERT_RANDR_LEASE)
+ static void _X_COLD
+ SRRLeaseNotifyEvent(xRRLeaseNotifyEvent * from,
+                     xRRLeaseNotifyEvent * to)
+@@ -239,6 +244,7 @@ SRRLeaseNotifyEvent(xRRLeaseNotifyEvent
+     cpswapl(from->lease, to->lease);
+     to->created = from->created;
+ }
++#endif
+ 
+ static void _X_COLD
+ SRRNotifyEvent(xEvent *from, xEvent *to)
+@@ -268,10 +274,12 @@ SRRNotifyEvent(xEvent *from, xEvent *to)
+         SRRResourceChangeNotifyEvent((xRRResourceChangeNotifyEvent *) from,
+                                    (xRRResourceChangeNotifyEvent *) to);
+         break;
++#if !defined(REVERT_RANDR_LEASE)
+     case RRNotify_Lease:
+         SRRLeaseNotifyEvent((xRRLeaseNotifyEvent *) from,
+                             (xRRLeaseNotifyEvent *) to);
+         break;
++#endif
+     default:
+         break;
+     }
+@@ -291,8 +299,10 @@ RRInit(void)
+             return FALSE;
+         if (!RRProviderInit())
+             return FALSE;
++#if !defined(REVERT_RANDR_LEASE)
+         if (!RRLeaseInit())
+             return FALSE;
++#endif
+         RRGeneration = serverGeneration;
+     }
+     if (!dixRegisterPrivateKey(&rrPrivKeyRec, PRIVATE_SCREEN, 0))
+@@ -360,7 +370,9 @@ RRScreenInit(ScreenPtr pScreen)
+     pScrPriv->numCrtcs = 0;
+     pScrPriv->crtcs = NULL;
+ 
++#if !defined(REVERT_RANDR_LEASE)
+     xorg_list_init(&pScrPriv->leases);
++#endif
+ 
+     RRMonitorInit(pScreen);
+ 
+@@ -560,11 +572,13 @@ TellChanged(WindowPtr pWin, void *value)
+             }
+         }
+ 
++#if !defined(REVERT_RANDR_LEASE)
+         if (pRREvent->mask & RRLeaseNotifyMask) {
+             if (pScrPriv->leasesChanged) {
+                 RRDeliverLeaseEvent(client, pWin);
+             }
+         }
++#endif
+     }
+     return WT_WALKCHILDREN;
+ }
diff --git a/modular-xorg-server-dfbsd/patches/patch-randr_rrlease.c b/modular-xorg-server-dfbsd/patches/patch-randr_rrlease.c
new file mode 100644
index 0000000000..19cae12a7f
--- /dev/null
+++ b/modular-xorg-server-dfbsd/patches/patch-randr_rrlease.c
@@ -0,0 +1,55 @@
+$NetBSD$
+
+Option to revert effects of upstream:
+
+2018-02-27	Add RandR leases with modesetting driver support [v6]
+
+commit	e4e3447603b5fd3a38a92c3f972396d1f81168ad
+
+--- randr/rrlease.c.orig	2018-10-15 15:59:33.000000000 +0000
++++ randr/rrlease.c
+@@ -101,6 +101,7 @@ RRLeaseAlloc(ScreenPtr screen, RRLease l
+ Bool
+ RRCrtcIsLeased(RRCrtcPtr crtc)
+ {
++#if !defined(REVERT_RANDR_LEASE)
+     ScreenPtr screen = crtc->pScreen;
+     rrScrPrivPtr scr_priv = rrGetScrPriv(screen);
+     RRLeasePtr lease;
+@@ -111,6 +112,7 @@ RRCrtcIsLeased(RRCrtcPtr crtc)
+             if (lease->crtcs[c] == crtc)
+                 return TRUE;
+     }
++#endif
+     return FALSE;
+ }
+ 
+@@ -120,6 +122,7 @@ RRCrtcIsLeased(RRCrtcPtr crtc)
+ Bool
+ RROutputIsLeased(RROutputPtr output)
+ {
++#if !defined(REVERT_RANDR_LEASE)
+     ScreenPtr screen = output->pScreen;
+     rrScrPrivPtr scr_priv = rrGetScrPriv(screen);
+     RRLeasePtr lease;
+@@ -130,6 +133,7 @@ RROutputIsLeased(RROutputPtr output)
+             if (lease->outputs[o] == output)
+                 return TRUE;
+     }
++#endif
+     return FALSE;
+ }
+ 
+@@ -172,10 +176,12 @@ RRLeaseFree(RRLeasePtr lease)
+ void
+ RRTerminateLease(RRLeasePtr lease)
+ {
++#if !defined(REVERT_RANDR_LEASE)
+     ScreenPtr screen = lease->screen;
+     rrScrPrivPtr scr_priv = rrGetScrPriv(screen);
+ 
+     scr_priv->rrTerminateLease(screen, lease);
++#endif
+ }
+ 
+ /*


Home | Main Index | Thread Index | Old Index