pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
wip/modular-xorg-server-devel: import modular-xorg-server-1.19.99.901
Module Name: pkgsrc-wip
Committed By: Thomas Klausner <tk%giga.or.at@localhost>
Pushed By: wiz
Date: Wed Mar 14 21:48:21 2018 +0100
Changeset: 3d67d9fdf54b26075e3f2d6a417e77c7a3f63a68
Added Files:
modular-xorg-server-devel/DESCR
modular-xorg-server-devel/MESSAGE
modular-xorg-server-devel/Makefile
modular-xorg-server-devel/Makefile.common
modular-xorg-server-devel/PLIST
modular-xorg-server-devel/buildlink3.mk
modular-xorg-server-devel/distinfo
modular-xorg-server-devel/options.mk
modular-xorg-server-devel/patches/patch-configure
modular-xorg-server-devel/patches/patch-hw_xfree86_common_xf86pciBus.c
modular-xorg-server-devel/patches/patch-hw_xfree86_common_xf86sbusBus.h
modular-xorg-server-devel/patches/patch-hw_xfree86_dri2_dri2.c
modular-xorg-server-devel/patches/patch-hw_xfree86_drivers_modesetting_driver.c
modular-xorg-server-devel/patches/patch-hw_xfree86_os-support_bsd_arm__video.c
modular-xorg-server-devel/patches/patch-hw_xfree86_os-support_bsd_bsd__VTsw.c
modular-xorg-server-devel/patches/patch-hw_xfree86_os-support_bsd_i386__video.c
modular-xorg-server-devel/patches/patch-hw_xfree86_os-support_bus_Sbus.c
modular-xorg-server-devel/patches/patch-hw_xfree86_os-support_solaris_solaris-amd64.S
modular-xorg-server-devel/patches/patch-hw_xfree86_os-support_xf86_OSproc.h
modular-xorg-server-devel/patches/patch-hw_xfree86_os_support_bus_xf86Sbus.h
modular-xorg-server-devel/patches/patch-hw_xfree86_sdksyms.sh
modular-xorg-server-devel/patches/patch-os_xstrans.c
Log Message:
wip/modular-xorg-server-devel: import modular-xorg-server-1.19.99.901
This is the first release candidate for 1.20.
The X.org X11 Server from the modularized source tree of
X.org X11.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=3d67d9fdf54b26075e3f2d6a417e77c7a3f63a68
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
modular-xorg-server-devel/DESCR | 2 +
modular-xorg-server-devel/MESSAGE | 16 ++
modular-xorg-server-devel/Makefile | 22 +++
modular-xorg-server-devel/Makefile.common | 146 +++++++++++++++
modular-xorg-server-devel/PLIST | 198 +++++++++++++++++++++
modular-xorg-server-devel/buildlink3.mk | 34 ++++
modular-xorg-server-devel/distinfo | 20 +++
modular-xorg-server-devel/options.mk | 61 +++++++
modular-xorg-server-devel/patches/patch-configure | 28 +++
.../patches/patch-hw_xfree86_common_xf86pciBus.c | 15 ++
.../patches/patch-hw_xfree86_common_xf86sbusBus.h | 24 +++
.../patches/patch-hw_xfree86_dri2_dri2.c | 40 +++++
.../patch-hw_xfree86_drivers_modesetting_driver.c | 71 ++++++++
.../patch-hw_xfree86_os-support_bsd_arm__video.c | 24 +++
.../patch-hw_xfree86_os-support_bsd_bsd__VTsw.c | 26 +++
.../patch-hw_xfree86_os-support_bsd_i386__video.c | 14 ++
.../patches/patch-hw_xfree86_os-support_bus_Sbus.c | 172 ++++++++++++++++++
...h-hw_xfree86_os-support_solaris_solaris-amd64.S | 62 +++++++
.../patch-hw_xfree86_os-support_xf86_OSproc.h | 15 ++
.../patch-hw_xfree86_os_support_bus_xf86Sbus.h | 15 ++
.../patches/patch-hw_xfree86_sdksyms.sh | 27 +++
.../patches/patch-os_xstrans.c | 21 +++
22 files changed, 1053 insertions(+)
diffs:
diff --git a/modular-xorg-server-devel/DESCR b/modular-xorg-server-devel/DESCR
new file mode 100644
index 0000000000..232af8063f
--- /dev/null
+++ b/modular-xorg-server-devel/DESCR
@@ -0,0 +1,2 @@
+The X.org X11 Server from the modularized source tree of
+X.org X11.
diff --git a/modular-xorg-server-devel/MESSAGE b/modular-xorg-server-devel/MESSAGE
new file mode 100644
index 0000000000..095b3c63b0
--- /dev/null
+++ b/modular-xorg-server-devel/MESSAGE
@@ -0,0 +1,16 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2014/12/29 07:55:23 dholland Exp $
+
+For the X server to run you need at least some fonts installed. The
+recommended approach is to install the entire modular-xorg-fonts
+meta-package, but failing that the minimum set required is:
+
+ fonts/font-alias
+ fonts/font-misc-misc
+ fonts/font-cursor-misc
+
+This package does *not* depend on these font packages directly as
+in some circumstances installing extra copies from pkgsrc would be
+redundant or possibly harmful.
+
+===========================================================================
diff --git a/modular-xorg-server-devel/Makefile b/modular-xorg-server-devel/Makefile
new file mode 100644
index 0000000000..77bb2c0181
--- /dev/null
+++ b/modular-xorg-server-devel/Makefile
@@ -0,0 +1,22 @@
+# $NetBSD: Makefile,v 1.114 2017/10/05 15:34:13 wiz Exp $
+
+DISTNAME= xorg-server-${XORG_VERSION}
+PKGNAME= modular-${DISTNAME}
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+COMMENT= Modular X11 server from modular X.org
+
+SPECIAL_PERMS+= bin/Xorg ${SETUID_ROOT_PERMS}
+
+NOT_FOR_PLATFORM= Darwin-*-*
+
+.include "Makefile.common"
+
+CONFIGURE_ARGS+= --enable-xorg
+CONFIGURE_ARGS+= --disable-xephyr
+CONFIGURE_ARGS+= --disable-kdrive
+CONFIGURE_ARGS.SunOS+= --disable-input-thread
+
+.include "options.mk"
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/modular-xorg-server-devel/Makefile.common b/modular-xorg-server-devel/Makefile.common
new file mode 100644
index 0000000000..d9c2aa9495
--- /dev/null
+++ b/modular-xorg-server-devel/Makefile.common
@@ -0,0 +1,146 @@
+# $NetBSD: Makefile.common,v 1.20 2017/12/20 22:40:48 wiz Exp $
+# used by x11/modular-xorg-server/Makefile
+# used by x11/modular-xorg-xephyr/Makefile
+
+XORG_VERSION= 1.19.99.901
+CATEGORIES= x11
+MASTER_SITES= ${MASTER_SITE_XORG:=xserver/}
+EXTRACT_SUFX= .tar.bz2
+
+HOMEPAGE= http://xorg.freedesktop.org/
+LICENSE= mit AND modified-bsd AND x11 # with no-advertising clause
+
+GNU_CONFIGURE= yes
+USE_LIBTOOL= yes
+USE_TOOLS+= gmake pkg-config
+USE_LANGUAGES+= c99
+
+PKGCONFIG_OVERRIDE+= xorg-server.pc.in
+SHLIBTOOL_OVERRIDE= # empty
+
+BUILD_DEFS+= VARBASE
+BUILD_DEFS_EFFECTS+= XKB_OUTPUT_DIR
+
+OWN_DIRS+= ${VARBASE}/log
+OWN_DIRS+= ${XKB_OUTPUT_DIR}
+XKB_OUTPUT_DIR?= ${VARBASE}/db/xkb # XXX sync with xkeyboard-config
+
+CONFIGURE_ARGS+= --localstatedir=${VARBASE:Q}
+CONFIGURE_ARGS+= --with-xkb-output=${XKB_OUTPUT_DIR:Q}
+
+.if !empty(USE_TOOLS:Mauto*)
+TOOLS_DEPENDS+= xorg-util-macros>=1.1.5:../../devel/xorg-util-macros
+.endif
+
+DEPENDS+= xkbcomp-[0-9]*:../../x11/xkbcomp
+DEPENDS+= xkeyboard-config-[0-9]*:../../x11/xkeyboard-config
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "NetBSD"
+CPPFLAGS+= -D_OPENBSD_SOURCE # for reallocarray(3)
+CONFIGURE_ARGS+= --with-builder-addr="tech-x11%NetBSD.org@localhost"
+CONFIGURE_ARGS+= --with-os-vendor="The NetBSD Foundation"
+# TLS is not supported by NetBSD<6
+. if !empty(OS_VERSION:M[0-5].*)
+CONFIGURE_ENV+= ac_cv_tls=no
+CONFIGURE_ARGS+= --disable-glx-tls
+. endif
+.endif
+CONFIGURE_ARGS+= --with-os-name=${MACHINE_PLATFORM:Q}
+
+CONFIGURE_ARGS+= --with-fontrootdir=${PREFIX}/share/fonts/X11
+
+LEGACY_FONT_PATHS=
+DEFAULT_FONT_PATHS=
+.for f in misc TTF OTF Type1 100dpi 75dpi cyrillic
+DEFAULT_FONT_PATHS+= ${PREFIX}/share/fonts/X11/${f}
+LEGACY_FONT_PATHS+= ${PREFIX}/lib/X11/fonts/${f}
+.endfor
+FONT_PATHS= ${DEFAULT_FONT_PATHS} ${LEGACY_FONT_PATHS}
+
+CONFIGURE_ARGS+= --with-default-font-path=${FONT_PATHS:ts,:Q}
+
+CONFIGURE_ARGS+= --disable-config-hal
+CONFIGURE_ARGS+= --disable-dmx
+CONFIGURE_ARGS+= --disable-xwin
+CONFIGURE_ARGS+= --disable-xephyr
+CONFIGURE_ARGS+= --disable-kdrive
+#CONFIGURE_ARGS+= --disable-kdrive-vesa
+CONFIGURE_ARGS+= --enable-xtrans-send-fds
+
+CONFIGURE_ARGS+= --with-int10=x86emu
+
+CONFIGURE_ENV+= APP_MAN_SUFFIX=1 FILE_MAN_SUFFIX=5
+CONFIGURE_ENV+= DRIVER_MAN_SUFFIX=4
+
+PLIST_VARS+= sunos
+PLIST_SUBST+= SUNOS_ARCH=${SUNOS_ARCH}
+
+.if ${OPSYS} == "SunOS"
+PLIST.sunos= yes
+. if ${MACHINE_ARCH} == "i386"
+SUNOS_ARCH= ia32
+. elif ${MACHINE_ARCH} == "x86_64"
+SUNOS_ARCH= amd64
+. elif ${MACHINE_ARCH} == "sparc" || ${MACHINE_ARCH} == "sparc64"
+SUNOS_ARCH= sparcv8plus
+. endif
+.endif
+
+PLIST_VARS+= sparc
+.if !empty(MACHINE_ARCH:Msparc*)
+PLIST.sparc= yes
+.endif
+
+# Workaround for PR#41556.
+# Avoid to use bsd_kqueue_apm, force to use bsd_apm instead.
+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
+
+INSTALLATION_DIRS+= lib/xorg/modules/drivers lib/xorg/modules/input
+
+BUILDLINK_API_DEPENDS.MesaLib+= MesaLib>=7.8.0
+BUILDLINK_API_DEPENDS.xtrans+= xtrans>=1.2.2
+BUILDLINK_API_DEPENDS.dri+= dri>=7.8
+BUILDLINK_API_DEPENDS.xfont+= xfont>=1.4.2
+BUILDLINK_API_DEPENDS.pixman+= pixman>=0.21.8
+
+BUILD_DEPENDS+= tradcpp-[0-9]*:../../devel/tradcpp
+CONFIGURE_ENV+= ac_cv_path_RAWCPP="${PREFIX}/bin/tradcpp -Uunix"
+
+.if ${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD" || ${OPSYS} == "Bitrig" || ${OPSYS} == "MirBSD"
+CONFIGURE_ARGS+= --with-sha1=libc
+.else
+.include "../../security/nettle/buildlink3.mk"
+CONFIGURE_ARGS+= --with-sha1=libnettle
+.endif
+
+.include "../../devel/ncurses/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../fonts/libfontenc/buildlink3.mk"
+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"
+.include "../../x11/libXaw/buildlink3.mk"
+BUILDLINK_API_DEPENDS.libXext+= libXext>=1.1.1
+.include "../../x11/libXext/buildlink3.mk"
+.include "../../x11/libXfixes/buildlink3.mk"
+.include "../../x11/libXfont2/buildlink3.mk"
+.include "../../x11/libXt/buildlink3.mk"
+.include "../../x11/libXxf86misc/buildlink3.mk"
+.include "../../x11/libXxf86vm/buildlink3.mk"
+.include "../../x11/libXinerama/buildlink3.mk"
+.include "../../x11/libxkbfile/buildlink3.mk"
+.include "../../x11/libxkbui/buildlink3.mk"
+.include "../../x11/pixman/buildlink3.mk"
+.include "../../x11/xcb-util-keysyms/buildlink3.mk"
+.include "../../x11/xtrans/buildlink3.mk"
+.include "../../mk/pthread.buildlink3.mk"
diff --git a/modular-xorg-server-devel/PLIST b/modular-xorg-server-devel/PLIST
new file mode 100644
index 0000000000..3836164a00
--- /dev/null
+++ b/modular-xorg-server-devel/PLIST
@@ -0,0 +1,198 @@
+@comment $NetBSD: PLIST,v 1.27 2016/11/16 10:14:36 wiz Exp $
+bin/X
+bin/Xnest
+bin/Xorg
+bin/Xvfb
+bin/cvt
+bin/gtf
+include/xorg/BT.h
+include/xorg/IBM.h
+include/xorg/TI.h
+include/xorg/XIstubs.h
+include/xorg/Xprintf.h
+include/xorg/callback.h
+include/xorg/client.h
+include/xorg/closestr.h
+include/xorg/closure.h
+include/xorg/colormap.h
+include/xorg/colormapst.h
+include/xorg/compiler.h
+include/xorg/compositeext.h
+include/xorg/cursor.h
+include/xorg/cursorstr.h
+include/xorg/damage.h
+include/xorg/damagestr.h
+include/xorg/dbestruct.h
+include/xorg/dgaproc.h
+include/xorg/displaymode.h
+include/xorg/dix.h
+include/xorg/dixaccess.h
+include/xorg/dixevents.h
+include/xorg/dixfont.h
+include/xorg/dixfontstr.h
+include/xorg/dixgrabs.h
+include/xorg/dixstruct.h
+${PLIST.dri}include/xorg/dri.h
+${PLIST.dri}include/xorg/dri2.h
+${PLIST.dri}include/xorg/dri3.h
+${PLIST.dri}include/xorg/dristruct.h
+include/xorg/edid.h
+include/xorg/events.h
+include/xorg/exa.h
+include/xorg/exevents.h
+include/xorg/extension.h
+include/xorg/extinit.h
+include/xorg/extnsionst.h
+include/xorg/fb.h
+include/xorg/fbdevhw.h
+include/xorg/fboverlay.h
+include/xorg/fbpict.h
+include/xorg/fbrop.h
+include/xorg/fourcc.h
+include/xorg/gc.h
+include/xorg/gcstruct.h
+include/xorg/geext.h
+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
+include/xorg/input.h
+include/xorg/inputstr.h
+include/xorg/list.h
+include/xorg/mi.h
+include/xorg/micmap.h
+include/xorg/micoord.h
+include/xorg/migc.h
+include/xorg/miline.h
+include/xorg/mioverlay.h
+include/xorg/mipict.h
+include/xorg/mipointer.h
+include/xorg/mipointrst.h
+include/xorg/misc.h
+include/xorg/miscstruct.h
+include/xorg/mistruct.h
+include/xorg/misync.h
+include/xorg/misyncfd.h
+include/xorg/misyncshm.h
+include/xorg/misyncstr.h
+include/xorg/mizerarc.h
+include/xorg/nonsdk_extinit.h
+include/xorg/opaque.h
+include/xorg/optionstr.h
+include/xorg/os.h
+include/xorg/panoramiX.h
+include/xorg/panoramiXsrv.h
+include/xorg/picture.h
+include/xorg/picturestr.h
+include/xorg/pixmap.h
+include/xorg/pixmapstr.h
+${PLIST.dri}include/xorg/present.h
+${PLIST.dri}include/xorg/presentext.h
+include/xorg/privates.h
+include/xorg/property.h
+include/xorg/propertyst.h
+include/xorg/ptrveloc.h
+include/xorg/randrstr.h
+include/xorg/region.h
+include/xorg/regionstr.h
+include/xorg/registry.h
+include/xorg/resource.h
+include/xorg/rgb.h
+include/xorg/rrtransform.h
+${PLIST.dri}include/xorg/sarea.h
+include/xorg/screenint.h
+include/xorg/scrnintstr.h
+include/xorg/selection.h
+include/xorg/servermd.h
+include/xorg/shadow.h
+include/xorg/shadowfb.h
+include/xorg/shmint.h
+include/xorg/site.h
+${PLIST.sunos}include/xorg/solaris-${SUNOS_ARCH}.il
+include/xorg/syncsdk.h
+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
+include/xorg/xaarop.h
+include/xorg/xace.h
+include/xorg/xacestr.h
+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
+include/xorg/xf86Optionstr.h
+include/xorg/xf86Optrec.h
+include/xorg/xf86Parser.h
+include/xorg/xf86Pci.h
+include/xorg/xf86PciInfo.h
+include/xorg/xf86Priv.h
+include/xorg/xf86Privstr.h
+include/xorg/xf86RamDac.h
+include/xorg/xf86RandR12.h
+${PLIST.sparc}include/xorg/xf86Sbus.h
+include/xorg/xf86VGAarbiter.h
+include/xorg/xf86Xinput.h
+include/xorg/xf86_OSlib.h
+include/xorg/xf86_OSproc.h
+include/xorg/xf86cmap.h
+include/xorg/xf86fbman.h
+include/xorg/xf86i2c.h
+include/xorg/xf86int10.h
+include/xorg/xf86platformBus.h
+include/xorg/xf86sbusBus.h
+include/xorg/xf86str.h
+include/xorg/xf86xv.h
+include/xorg/xf86xvmc.h
+include/xorg/xf86xvpriv.h
+include/xorg/xisb.h
+include/xorg/xkbfile.h
+include/xorg/xkbrules.h
+include/xorg/xkbsrv.h
+include/xorg/xkbstr.h
+include/xorg/xorg-server.h
+include/xorg/xorgVersion.h
+include/xorg/xserver-properties.h
+include/xorg/xserver_poll.h
+include/xorg/xvdix.h
+include/xorg/xvmcext.h
+lib/pkgconfig/xorg-server.pc
+${PLIST.dri}lib/xorg/modules/drivers/modesetting_drv.la
+${PLIST.dri}lib/xorg/modules/extensions/libglx.la
+lib/xorg/modules/libexa.la
+lib/xorg/modules/libfb.la
+lib/xorg/modules/libfbdevhw.la
+${PLIST.dri}lib/xorg/modules/libglamoregl.la
+lib/xorg/modules/libint10.la
+lib/xorg/modules/libshadow.la
+lib/xorg/modules/libshadowfb.la
+lib/xorg/modules/libvbe.la
+lib/xorg/modules/libvgahw.la
+lib/xorg/modules/libwfb.la
+lib/xorg/protocol.txt
+man/man1/Xnest.1
+man/man1/Xorg.1
+man/man1/Xserver.1
+man/man1/Xvfb.1
+man/man1/cvt.1
+man/man1/gtf.1
+man/man4/exa.4
+man/man4/fbdevhw.4
+${PLIST.dri}man/man4/modesetting.4
+man/man5/xorg.conf.5
+man/man5/xorg.conf.d.5
+share/aclocal/xorg-server.m4
+${PLIST.dtrace}share/doc/xorg-server/Xserver-DTrace.xml
+@pkgdir lib/xorg/modules/input
diff --git a/modular-xorg-server-devel/buildlink3.mk b/modular-xorg-server-devel/buildlink3.mk
new file mode 100644
index 0000000000..fb67cf13a2
--- /dev/null
+++ b/modular-xorg-server-devel/buildlink3.mk
@@ -0,0 +1,34 @@
+# $NetBSD: buildlink3.mk,v 1.20 2017/01/07 22:34:56 maya Exp $
+
+BUILDLINK_TREE+= modular-xorg-server
+
+.if !defined(MODULAR_XORG_SERVER_BUILDLINK3_MK)
+MODULAR_XORG_SERVER_BUILDLINK3_MK:=
+
+.include "../../mk/bsd.fast.prefs.mk"
+
+USE_OLD_MODULAR_XORG_SERVER?= no
+
+.if !empty(USE_OLD_MODULAR_XORG_SERVER:M[yY][eE][sS])
+BUILDLINK_API_DEPENDS.modular-xorg-server+= modular-xorg-server>=1.12.4nb12<1.17
+BUILDLINK_PKGSRCDIR.modular-xorg-server?= ../../x11/modular-xorg-server112
+.else
+BUILDLINK_API_DEPENDS.modular-xorg-server+= modular-xorg-server>=1.18
+BUILDLINK_PKGSRCDIR.modular-xorg-server?= ../../x11/modular-xorg-server
+.endif
+
+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"
+.else
+.include "../../x11/libXfont2/buildlink3.mk"
+.include "../../graphics/MesaLib/buildlink3.mk" # XXX should not be needed for non-dri build
+.endif
+.endif # MODULAR_XORG_SERVER_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -modular-xorg-server
diff --git a/modular-xorg-server-devel/distinfo b/modular-xorg-server-devel/distinfo
new file mode 100644
index 0000000000..f9cdb9e36b
--- /dev/null
+++ b/modular-xorg-server-devel/distinfo
@@ -0,0 +1,20 @@
+$NetBSD: distinfo,v 1.87 2018/01/25 15:06:10 jperkin Exp $
+
+SHA1 (xorg-server-1.19.99.901.tar.bz2) = 3d366be05b15ef6dadd4c48fd78ed19b0b8a5de5
+RMD160 (xorg-server-1.19.99.901.tar.bz2) = b32ace81d250bfbbcd5583bbff245861f1627fbd
+SHA512 (xorg-server-1.19.99.901.tar.bz2) = c2fbe4868788cd0d6d5fe546acb8c2ddec39ac3e851f352ee438a785a248a048a87073972f51ff98ef36a35a6753f8c2f22c2ecfc719d47dd9bb3c453fdb3ae5
+Size (xorg-server-1.19.99.901.tar.bz2) = 6131851 bytes
+SHA1 (patch-configure) = 9e9f497f14d563ef66f25c637a14b0bea2243c3f
+SHA1 (patch-hw_xfree86_common_xf86pciBus.c) = 896825ba12646431cba603938d118acbdde305dd
+SHA1 (patch-hw_xfree86_common_xf86sbusBus.h) = f56f87336b2f669413ebb1005a2b64568a111f92
+SHA1 (patch-hw_xfree86_dri2_dri2.c) = 0bf58305059321e10f6f58186301dbb7cb858c2a
+SHA1 (patch-hw_xfree86_drivers_modesetting_driver.c) = fbd861dd32c1b5a96b0e2318f17ad2c5009dc245
+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) = f2c72562a40c0e3109991453aff9c2c082526b1b
+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
diff --git a/modular-xorg-server-devel/options.mk b/modular-xorg-server-devel/options.mk
new file mode 100644
index 0000000000..c1c1fbcf78
--- /dev/null
+++ b/modular-xorg-server-devel/options.mk
@@ -0,0 +1,61 @@
+# $NetBSD: options.mk,v 1.17 2017/02/21 14:56:14 wiz Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.modular-xorg-server
+PKG_SUPPORTED_OPTIONS= inet6 debug dtrace
+PKG_SUGGESTED_OPTIONS= inet6
+.if ${X11_TYPE} == "modular"
+PKG_SUPPORTED_OPTIONS+= dri
+PKG_SUGGESTED_OPTIONS+= dri
+.endif
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+= dri dtrace
+
+.if !empty(PKG_OPTIONS:Mdri)
+.include "../../graphics/libepoxy/buildlink3.mk"
+BUILDLINK_API_DEPENDS.MesaLib+= MesaLib>=11
+.include "../../graphics/MesaLib/buildlink3.mk"
+.include "../../x11/xorgproto/buildlink3.mk"
+.include "../../x11/libdrm/buildlink3.mk"
+.include "../../x11/libxshmfence/buildlink3.mk"
+PLIST.dri= yes
+CONFIGURE_ARGS+= --enable-dri
+CONFIGURE_ARGS+= --enable-dri2
+CONFIGURE_ARGS+= --enable-dri3
+CONFIGURE_ARGS+= --enable-glx
+CONFIGURE_ARGS+= --enable-glamor
+CONFIGURE_ARGS+= --enable-present
+.else
+###
+### XXX Perhaps we should allow for a built-in glx without dri enabled?
+###
+CONFIGURE_ARGS+= --disable-dri
+CONFIGURE_ARGS+= --disable-dri2
+CONFIGURE_ARGS+= --disable-dri3
+CONFIGURE_ARGS+= --disable-glx
+CONFIGURE_ARGS+= --disable-glamor
+CONFIGURE_ARGS+= --disable-present
+pre-build: disable-modesetting
+.PHONY: disable-modesetting
+disable-modesetting:
+ (${ECHO} "all:"; ${ECHO} "install:") > ${WRKSRC}/hw/xfree86/drivers/modesetting/Makefile
+.endif
+
+.if !empty(PKG_OPTIONS:Minet6)
+CONFIGURE_ARGS+= --enable-ipv6
+.else
+CONFIGURE_ARGS+= --disable-ipv6
+.endif
+
+.if !empty(PKG_OPTIONS:Mdebug)
+CONFIGURE_ARGS+= --enable-debug
+CFLAGS+= -ggdb
+.endif
+
+.if !empty(PKG_OPTIONS:Mdtrace)
+PLIST.dtrace= yes
+CONFIGURE_ARGS+= --with-dtrace
+.else
+CONFIGURE_ARGS+= --without-dtrace
+.endif
diff --git a/modular-xorg-server-devel/patches/patch-configure b/modular-xorg-server-devel/patches/patch-configure
new file mode 100644
index 0000000000..6d4e33aed5
--- /dev/null
+++ b/modular-xorg-server-devel/patches/patch-configure
@@ -0,0 +1,28 @@
+$NetBSD: patch-configure,v 1.4 2017/01/28 21:47:55 maya Exp $
+
+Use USE_AMD64_IOPL (actually x86_64_iopl) on NetBSD/amd64.
+(c.f. patch-hw_xfree86_os-support_bsd_i386.c)
+
+for netbsd, force pass pthread configure checks (pthread not needed)
+
+--- configure.orig 2015-02-10 22:49:52.000000000 +0000
++++ configure
+@@ -23235,7 +23235,7 @@ $as_echo "#define USE_DEV_IO 1" >>confde
+ $as_echo "#define USE_DEV_IO 1" >>confdefs.h
+ ;;
+ *netbsd*)
+-$as_echo "#define USE_I386_IOPL 1" >>confdefs.h
++$as_echo "#define USE_AMD64_IOPL 1" >>confdefs.h
+
+ SYS_LIBS=-lx86_64
+ ;;
+@@ -25079,7 +25079,8 @@ case ${host_os} in
+ netbsd*)
+ # use libc stubs, don't link against libpthread, to allow
+ # dynamic loading
+- ax_pthread_flags=""
++ ax_pthread_flags="none"
++ ax_pthread_ok="yes"
+ ;;
+ esac
+
diff --git a/modular-xorg-server-devel/patches/patch-hw_xfree86_common_xf86pciBus.c b/modular-xorg-server-devel/patches/patch-hw_xfree86_common_xf86pciBus.c
new file mode 100644
index 0000000000..4ec8433d68
--- /dev/null
+++ b/modular-xorg-server-devel/patches/patch-hw_xfree86_common_xf86pciBus.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-hw_xfree86_common_xf86pciBus.c,v 1.1 2016/11/04 01:12:51 maya Exp $
+
+NetBSD also has nouveau, try to autoload it
+
+--- hw/xfree86/common/xf86pciBus.c.orig 2016-07-15 16:18:11.000000000 +0000
++++ hw/xfree86/common/xf86pciBus.c
+@@ -1189,7 +1189,7 @@ xf86VideoPtrToDriverList(struct pci_devi
+ {
+ int idx = 0;
+
+-#ifdef __linux__
++#if defined(__linux__) || defined(__NetBSD__)
+ driverList[idx++] = "nouveau";
+ #endif
+ driverList[idx++] = "nv";
diff --git a/modular-xorg-server-devel/patches/patch-hw_xfree86_common_xf86sbusBus.h b/modular-xorg-server-devel/patches/patch-hw_xfree86_common_xf86sbusBus.h
new file mode 100644
index 0000000000..1dd7b76d63
--- /dev/null
+++ b/modular-xorg-server-devel/patches/patch-hw_xfree86_common_xf86sbusBus.h
@@ -0,0 +1,24 @@
+$NetBSD: patch-hw_xfree86_common_xf86sbusBus.h,v 1.1 2015/04/25 11:47:03 tnn Exp $
+
+NetBSD/sparc64 support partially from xsrc.
+
+--- hw/xfree86/common/xf86sbusBus.h.orig 2014-02-05 03:08:57.000000000 +0000
++++ hw/xfree86/common/xf86sbusBus.h
+@@ -39,6 +39,8 @@
+ #define SBUS_DEVICE_FFB 0x000b
+ #define SBUS_DEVICE_GT 0x000c
+ #define SBUS_DEVICE_MGX 0x000d
++#define SBUS_DEVICE_P9100 0x000e
++#define SBUS_DEVICE_AG10E 0x000f
+
+ typedef struct sbus_prom_node {
+ int node;
+@@ -50,7 +52,7 @@ typedef struct sbus_device {
+ int devId;
+ int fbNum;
+ int fd;
+- int width, height;
++ int width, height, size;
+ sbusPromNode node;
+ const char *descr;
+ const char *device;
diff --git a/modular-xorg-server-devel/patches/patch-hw_xfree86_dri2_dri2.c b/modular-xorg-server-devel/patches/patch-hw_xfree86_dri2_dri2.c
new file mode 100644
index 0000000000..81f431291c
--- /dev/null
+++ b/modular-xorg-server-devel/patches/patch-hw_xfree86_dri2_dri2.c
@@ -0,0 +1,40 @@
+$NetBSD: patch-hw_xfree86_dri2_dri2.c,v 1.2 2015/04/25 11:47:03 tnn Exp $
+
+Fix uninitialized variables warning from clang (X crashes without this)
+
+dri2.c:242:27: note: initialize the variable 'ref' to silence this warning
+ DRI2DrawableRefPtr ref;
+dri2.c:320:27: note: initialize the variable 'ref' to silence this warning
+ DRI2DrawableRefPtr ref, next;
+dri2.c:601:27: note: initialize the variable 'ref' to silence this warning
+ DRI2DrawableRefPtr ref;
+
+--- hw/xfree86/dri2/dri2.c.orig 2015-01-26 18:42:23.000000000 +0000
++++ hw/xfree86/dri2/dri2.c
+@@ -279,7 +279,7 @@ typedef struct DRI2DrawableRefRec {
+ static DRI2DrawableRefPtr
+ DRI2LookupDrawableRef(DRI2DrawablePtr pPriv, XID id)
+ {
+- DRI2DrawableRefPtr ref;
++ DRI2DrawableRefPtr ref = NULL;
+
+ xorg_list_for_each_entry(ref, &pPriv->reference_list, link) {
+ if (ref->id == id)
+@@ -359,7 +359,7 @@ static int
+ DRI2DrawableGone(void *p, XID id)
+ {
+ DRI2DrawablePtr pPriv = p;
+- DRI2DrawableRefPtr ref, next;
++ DRI2DrawableRefPtr ref = NULL, next;
+ WindowPtr pWin;
+ PixmapPtr pPixmap;
+ DrawablePtr pDraw;
+@@ -676,7 +676,7 @@ static void
+ DRI2InvalidateDrawable(DrawablePtr pDraw)
+ {
+ DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw);
+- DRI2DrawableRefPtr ref;
++ DRI2DrawableRefPtr ref = NULL;
+
+ if (!pPriv || !pPriv->needInvalidate)
+ return;
diff --git a/modular-xorg-server-devel/patches/patch-hw_xfree86_drivers_modesetting_driver.c b/modular-xorg-server-devel/patches/patch-hw_xfree86_drivers_modesetting_driver.c
new file mode 100644
index 0000000000..7b8b9cc7a7
--- /dev/null
+++ b/modular-xorg-server-devel/patches/patch-hw_xfree86_drivers_modesetting_driver.c
@@ -0,0 +1,71 @@
+$NetBSD$
+
+Revert "modesetting: Remove #ifdefs XF86_PDEV_SERVER_FD"
+https://patchwork.freedesktop.org/patch/207937/
+
+--- hw/xfree86/drivers/modesetting/driver.c.orig 2018-02-28 18:22:20.000000000 +0000
++++ hw/xfree86/drivers/modesetting/driver.c
+@@ -244,12 +244,14 @@ probe_hw(const char *dev, struct xf86_pl
+ {
+ int fd;
+
++#ifdef XF86_PDEV_SERVER_FD
+ if (platform_dev && (platform_dev->flags & XF86_PDEV_SERVER_FD)) {
+ fd = xf86_platform_device_odev_attributes(platform_dev)->fd;
+ if (fd == -1)
+ return FALSE;
+ return check_outputs(fd, NULL);
+ }
++#endif
+
+ fd = open_hw(dev);
+ if (fd != -1) {
+@@ -710,8 +712,10 @@ FreeRec(ScrnInfoPtr pScrn)
+ if (ms->pEnt->location.type == BUS_PCI)
+ ret = drmClose(ms->fd);
+ else
++#ifdef XF86_PDEV_SERVER_FD
+ if (!(ms->pEnt->location.type == BUS_PLATFORM &&
+ (ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD)))
++#endif
+ ret = close(ms->fd);
+ (void) ret;
+ ms_ent->fd = 0;
+@@ -824,11 +828,13 @@ ms_get_drm_master_fd(ScrnInfoPtr pScrn)
+
+ #ifdef XSERVER_PLATFORM_BUS
+ if (pEnt->location.type == BUS_PLATFORM) {
++#ifdef XF86_PDEV_SERVER_FD
+ if (pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD)
+ ms->fd =
+ xf86_platform_device_odev_attributes(pEnt->location.id.plat)->
+ fd;
+ else
++#endif
+ {
+ char *path =
+ xf86_platform_device_odev_attributes(pEnt->location.id.plat)->
+@@ -1491,9 +1497,11 @@ SetMaster(ScrnInfoPtr pScrn)
+ modesettingPtr ms = modesettingPTR(pScrn);
+ int ret;
+
++#ifdef XF86_PDEV_SERVER_FD
+ if (ms->pEnt->location.type == BUS_PLATFORM &&
+ (ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD))
+ return TRUE;
++#endif
+
+ ret = drmSetMaster(ms->fd);
+ if (ret)
+@@ -1742,9 +1750,11 @@ LeaveVT(ScrnInfoPtr pScrn)
+
+ pScrn->vtSema = FALSE;
+
++#ifdef XF86_PDEV_SERVER_FD
+ if (ms->pEnt->location.type == BUS_PLATFORM &&
+ (ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD))
+ return;
++#endif
+
+ drmDropMaster(ms->fd);
+ }
diff --git a/modular-xorg-server-devel/patches/patch-hw_xfree86_os-support_bsd_arm__video.c b/modular-xorg-server-devel/patches/patch-hw_xfree86_os-support_bsd_arm__video.c
new file mode 100644
index 0000000000..26cb33d063
--- /dev/null
+++ b/modular-xorg-server-devel/patches/patch-hw_xfree86_os-support_bsd_arm__video.c
@@ -0,0 +1,24 @@
+$NetBSD: patch-hw_xfree86_os-support_bsd_arm__video.c,v 1.1 2016/02/23 22:32:45 tnn Exp $
+
+XXX stubs for now, sufficient for wsfb. Need to sync this file with xsrc.
+
+--- hw/xfree86/os-support/bsd/arm_video.c.orig 2016-01-06 17:23:08.000000000 +0000
++++ hw/xfree86/os-support/bsd/arm_video.c
+@@ -66,6 +66,12 @@
+ #include "xf86_OSlib.h"
+ #include "xf86OSpriv.h"
+
++#if defined(__NetBSD__)
++Bool xf86EnableIO(void) { return TRUE; }
++void xf86DisableIO(void) { return; }
++void xf86OSInitVidMem(VidMemInfoPtr pVidMem) { pVidMem->initialised = TRUE; }
++#else /* DISABLED */
++
+ #if defined(__NetBSD__) && !defined(MAP_FILE)
+ #define MAP_FLAGS MAP_SHARED
+ #else
+@@ -203,3 +209,4 @@ xf86DisableIO()
+ }
+
+ #endif /* USE_ARC_MMAP */
++#endif /* DISABLED */
diff --git a/modular-xorg-server-devel/patches/patch-hw_xfree86_os-support_bsd_bsd__VTsw.c b/modular-xorg-server-devel/patches/patch-hw_xfree86_os-support_bsd_bsd__VTsw.c
new file mode 100644
index 0000000000..b2053bec7e
--- /dev/null
+++ b/modular-xorg-server-devel/patches/patch-hw_xfree86_os-support_bsd_bsd__VTsw.c
@@ -0,0 +1,26 @@
+$NetBSD: patch-hw_xfree86_os-support_bsd_bsd__VTsw.c,v 1.1 2015/10/11 18:28:53 tnn Exp $
+
+VT switching support. From xsrc.
+
+--- hw/xfree86/os-support/bsd/bsd_VTsw.c.orig 2015-05-21 14:21:39.000000000 +0000
++++ hw/xfree86/os-support/bsd/bsd_VTsw.c
+@@ -68,6 +68,9 @@ xf86VTSwitchAway()
+ {
+ #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
+ if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
++#ifdef WSCONS_SUPPORT
++ ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT);
++#endif
+ xf86Info.vtRequestsPending = FALSE;
+ if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0)
+ return FALSE;
+@@ -83,6 +86,9 @@ xf86VTSwitchTo()
+ {
+ #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT)
+ if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) {
++#ifdef WSCONS_SUPPORT
++ ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS);
++#endif
+ xf86Info.vtRequestsPending = FALSE;
+ if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0)
+ return FALSE;
diff --git a/modular-xorg-server-devel/patches/patch-hw_xfree86_os-support_bsd_i386__video.c b/modular-xorg-server-devel/patches/patch-hw_xfree86_os-support_bsd_i386__video.c
new file mode 100644
index 0000000000..3427d35f7d
--- /dev/null
+++ b/modular-xorg-server-devel/patches/patch-hw_xfree86_os-support_bsd_i386__video.c
@@ -0,0 +1,14 @@
+$NetBSD: patch-hw_xfree86_os-support_bsd_i386__video.c,v 1.1 2015/04/25 11:47:03 tnn Exp $
+
+--- 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
+@@ -42,6 +42,9 @@
+ #else
+ #define MAP_FLAGS (MAP_FILE | MAP_SHARED)
+ #endif
++#if defined(__NetBSD__) && defined(USE_AMD64_IOPL)
++#define amd64_iopl x86_64_iopl
++#endif
+
+ #ifdef __OpenBSD__
+ #define SYSCTL_MSG "\tCheck that you have set 'machdep.allowaperture=1'\n"\
diff --git a/modular-xorg-server-devel/patches/patch-hw_xfree86_os-support_bus_Sbus.c b/modular-xorg-server-devel/patches/patch-hw_xfree86_os-support_bus_Sbus.c
new file mode 100644
index 0000000000..311ceb7a8b
--- /dev/null
+++ b/modular-xorg-server-devel/patches/patch-hw_xfree86_os-support_bus_Sbus.c
@@ -0,0 +1,172 @@
+$NetBSD: patch-hw_xfree86_os-support_bus_Sbus.c,v 1.3 2016/11/16 10:14:37 wiz Exp $
+
+Merge most of netbsdSbus.c from xsrc.
+
+--- hw/xfree86/os-support/bus/Sbus.c.orig 2016-08-11 19:08:48.000000000 +0000
++++ hw/xfree86/os-support/bus/Sbus.c
+@@ -34,6 +34,9 @@
+ #ifdef __sun
+ #include <sys/utsname.h>
+ #endif
++#if defined(__NetBSD__) && defined(__sparc__)
++#include <dev/ofw/openfirmio.h>
++#endif
+ #include "xf86.h"
+ #include "xf86Priv.h"
+ #include "xf86_OSlib.h"
+@@ -50,7 +53,6 @@ static int promP1275 = -1;
+
+ #define MAX_PROP 128
+ #define MAX_VAL (4096-128-4)
+-static struct openpromio *promOpio;
+
+ sbusDevicePtr *xf86SbusInfo = NULL;
+
+@@ -68,68 +70,75 @@ struct sbus_devtable sbusDeviceTable[] =
+ {SBUS_DEVICE_GT, FBTYPE_SUNGT, "gt", NULL, "Sun Graphics Tower"},
+ {SBUS_DEVICE_MGX, -1, "mgx", NULL, "Quantum 3D MGXplus"},
+ {SBUS_DEVICE_LEO, FBTYPE_SUNLEO, "leo", "sunleo", "Sun ZX or Turbo ZX"},
+- {SBUS_DEVICE_TCX, FBTYPE_TCXCOLOR, "tcx", "suntcx", "Sun TCX"},
++ {SBUS_DEVICE_TCX, FBTYPE_TCXCOLOR, "tcx", "suntcx", "Sun TCX or S24"},
+ {SBUS_DEVICE_FFB, FBTYPE_CREATOR, "ffb", "sunffb", "Sun FFB"},
+ {SBUS_DEVICE_FFB, FBTYPE_CREATOR, "afb", "sunffb", "Sun Elite3D"},
++ {SBUS_DEVICE_P9100, FBTYPE_P9100, "pnozz", "pnozz", "Weitek P9100"},
++ {SBUS_DEVICE_AG10E, FBTYPE_AG10E, "ag10e", "ag10e", "Fujitsu AG-10e"},
+ {0, 0, NULL}
+ };
+
++static struct ofiocdesc ofio;
++static char of_buf[256];
++
+ int
+ promGetSibling(int node)
+ {
+- promOpio->oprom_size = sizeof(int);
+
+ if (node == -1)
+ return 0;
+- *(int *) promOpio->oprom_array = node;
+- if (ioctl(promFd, OPROMNEXT, promOpio) < 0)
++ if (ioctl(promFd, OFIOCGETNEXT, &node) < 0)
+ return 0;
+- promCurrentNode = *(int *) promOpio->oprom_array;
+- return *(int *) promOpio->oprom_array;
++ promCurrentNode = node;
++ return node;
+ }
+
+ int
+ promGetChild(int node)
+ {
+- promOpio->oprom_size = sizeof(int);
+
+ if (!node || node == -1)
+ return 0;
+- *(int *) promOpio->oprom_array = node;
+- if (ioctl(promFd, OPROMCHILD, promOpio) < 0)
++ if (ioctl(promFd, OFIOCGETCHILD, &node) < 0)
+ return 0;
+- promCurrentNode = *(int *) promOpio->oprom_array;
+- return *(int *) promOpio->oprom_array;
++ promCurrentNode = node;
++ return node;
+ }
+
+ char *
+ promGetProperty(const char *prop, int *lenp)
+ {
+- promOpio->oprom_size = MAX_VAL;
+
+- strcpy(promOpio->oprom_array, prop);
+- if (ioctl(promFd, OPROMGETPROP, promOpio) < 0)
++ ofio.of_nodeid = promCurrentNode;
++ ofio.of_name = (char *)prop;
++ ofio.of_namelen = strlen(prop);
++ ofio.of_buf = of_buf;
++ ofio.of_buflen = sizeof(of_buf);
++
++ if (ioctl(promFd, OFIOCGET, &ofio) < 0)
+ return 0;
++
++ of_buf[ofio.of_buflen] = '\0';
++
+ if (lenp)
+- *lenp = promOpio->oprom_size;
+- return promOpio->oprom_array;
++ *lenp = ofio.of_buflen;
++ return of_buf;
+ }
+
+ int
+ promGetBool(const char *prop)
+ {
+- promOpio->oprom_size = 0;
++ ofio.of_nodeid = promCurrentNode;
++ ofio.of_name = (char *)prop;
++ ofio.of_namelen = strlen(prop);
++ ofio.of_buf = of_buf;
++ ofio.of_buflen = sizeof(of_buf);
+
+- *(int *) promOpio->oprom_array = 0;
+- for (;;) {
+- promOpio->oprom_size = MAX_PROP;
+- if (ioctl(promFd, OPROMNXTPROP, promOpio) < 0)
+- return 0;
+- if (!promOpio->oprom_size)
+- return 0;
+- if (!strcmp(promOpio->oprom_array, prop))
+- return 1;
+- }
++ if (ioctl(promFd, OFIOCGET, &ofio) < 0)
++ return 0;
++ if (ofio.of_buflen < 0)
++ return 0;
++ return 1;
+ }
+
+ #define PROM_NODE_SIBLING 0x01
+@@ -180,8 +189,8 @@ promIsP1275(void)
+ promP1275 = TRUE;
+ else
+ promP1275 = FALSE;
+-#elif defined(__FreeBSD__)
+- promP1275 = TRUE;
++#elif defined(__FreeBSD__) || defined(__NetBSD__)
++ promP1275 = TRUE;
+ #else
+ #error Missing promIsP1275() function for this OS
+ #endif
+@@ -198,8 +207,6 @@ sparcPromClose(void)
+ close(promFd);
+ promFd = -1;
+ }
+- free(promOpio);
+- promOpio = NULL;
+ promOpenCount = 0;
+ }
+
+@@ -213,11 +220,6 @@ sparcPromInit(void)
+ promFd = open("/dev/openprom", O_RDONLY, 0);
+ if (promFd == -1)
+ return -1;
+- promOpio = (struct openpromio *) malloc(4096);
+- if (!promOpio) {
+- sparcPromClose();
+- return -1;
+- }
+ promRootNode = promGetSibling(0);
+ if (!promRootNode) {
+ sparcPromClose();
+@@ -399,9 +401,9 @@ sparcPromAssignNodes(void)
+ * were the types of the cards missed. */
+ char buffer[64];
+ int fbNum, devId;
+- static struct {
+- int devId;
+- char *prefix;
++ static const struct {
++ const int devId;
++ const char *prefix;
+ } procFbPrefixes[] = {
+ {SBUS_DEVICE_BW2, "BWtwo"},
+ {SBUS_DEVICE_CG14, "CGfourteen"},
diff --git a/modular-xorg-server-devel/patches/patch-hw_xfree86_os-support_solaris_solaris-amd64.S b/modular-xorg-server-devel/patches/patch-hw_xfree86_os-support_solaris_solaris-amd64.S
new file mode 100644
index 0000000000..6ec5b859e2
--- /dev/null
+++ b/modular-xorg-server-devel/patches/patch-hw_xfree86_os-support_solaris_solaris-amd64.S
@@ -0,0 +1,62 @@
+$NetBSD: patch-hw_xfree86_os-support_solaris_solaris-amd64.S,v 1.1 2018/01/25 15:06:10 jperkin Exp $
+
+Make assembly work with clang.
+
+--- hw/xfree86/os-support/solaris/solaris-amd64.S.orig 2017-12-20 20:32:33.000000000 +0000
++++ hw/xfree86/os-support/solaris/solaris-amd64.S
+@@ -1,3 +1,4 @@
++#if 0
+ / Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ /
+ / Permission is hereby granted, free of charge, to any person obtaining a
+@@ -18,6 +19,7 @@
+ / LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ / FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ / DEALINGS IN THE SOFTWARE.
++#endif
+
+ #ifdef INLINE_ASM
+ #define FUNCTION_START(f,n) .inline f,n
+@@ -32,36 +34,36 @@
+ FUNCTION_START(inb,4)
+ movq %rdi, %rdx
+ xorq %rax, %rax
+- inb (%dx)
++ inb %dx
+ FUNCTION_END(inb)
+
+ FUNCTION_START(inw,4)
+ movq %rdi, %rdx
+ xorq %rax, %rax
+- inw (%dx)
++ inw %dx
+ FUNCTION_END(inw)
+
+ FUNCTION_START(inl,4)
+ movq %rdi, %rdx
+ xorq %rax, %rax
+- inl (%dx)
++ inl %dx
+ FUNCTION_END(inl)
+
+ FUNCTION_START(outb,8)
+ movq %rdi, %rdx
+ movq %rsi, %rax
+- outb (%dx)
++ outb %dx
+ FUNCTION_END(outb)
+
+ FUNCTION_START(outw,8)
+ movq %rdi, %rdx
+ movq %rsi, %rax
+- outw (%dx)
++ outw %dx
+ FUNCTION_END(outw)
+
+ FUNCTION_START(outl,8)
+ movq %rdi, %rdx
+ movq %rsi, %rax
+- outl (%dx)
++ outl %dx
+ FUNCTION_END(outl)
+
diff --git a/modular-xorg-server-devel/patches/patch-hw_xfree86_os-support_xf86_OSproc.h b/modular-xorg-server-devel/patches/patch-hw_xfree86_os-support_xf86_OSproc.h
new file mode 100644
index 0000000000..c781830a26
--- /dev/null
+++ b/modular-xorg-server-devel/patches/patch-hw_xfree86_os-support_xf86_OSproc.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-hw_xfree86_os-support_xf86_OSproc.h,v 1.1 2016/02/23 22:32:45 tnn Exp $
+
+These are in i386_video.c only. XXX what are they used for?
+
+--- hw/xfree86/os-support/xf86_OSproc.h.orig 2016-01-06 17:23:08.000000000 +0000
++++ hw/xfree86/os-support/xf86_OSproc.h
+@@ -115,7 +115,7 @@ _XFUNCPROTOBEGIN
+ extern _X_EXPORT Bool xf86EnableIO(void);
+ extern _X_EXPORT void xf86DisableIO(void);
+
+-#ifdef __NetBSD__
++#if defined(__NetBSD__) && (defined(__i386__) || defined(__x86_64__))
+ extern _X_EXPORT void xf86SetTVOut(int);
+ extern _X_EXPORT void xf86SetRGBOut(void);
+ #endif
diff --git a/modular-xorg-server-devel/patches/patch-hw_xfree86_os_support_bus_xf86Sbus.h b/modular-xorg-server-devel/patches/patch-hw_xfree86_os_support_bus_xf86Sbus.h
new file mode 100644
index 0000000000..816cbbd895
--- /dev/null
+++ b/modular-xorg-server-devel/patches/patch-hw_xfree86_os_support_bus_xf86Sbus.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-hw_xfree86_os_support_bus_xf86Sbus.h,v 1.1 2015/04/25 11:47:03 tnn Exp $
+
+NetBSD/sparc64 support.
+
+--- hw/xfree86/os-support/bus/xf86Sbus.h.orig 2014-02-05 03:08:57.000000000 +0000
++++ hw/xfree86/os-support/bus/xf86Sbus.h
+@@ -36,6 +36,8 @@
+ #elif defined(SVR4)
+ #include <sys/fbio.h>
+ #include <sys/openpromio.h>
++#elif defined(__NetBSD__) && defined(__sparc64__)
++#include <dev/sun/fbio.h>
+ #elif defined(__OpenBSD__) && defined(__sparc64__)
+ /* XXX */
+ #elif defined(CSRG_BASED)
diff --git a/modular-xorg-server-devel/patches/patch-hw_xfree86_sdksyms.sh b/modular-xorg-server-devel/patches/patch-hw_xfree86_sdksyms.sh
new file mode 100644
index 0000000000..9f452d405b
--- /dev/null
+++ b/modular-xorg-server-devel/patches/patch-hw_xfree86_sdksyms.sh
@@ -0,0 +1,27 @@
+$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-devel/patches/patch-os_xstrans.c b/modular-xorg-server-devel/patches/patch-os_xstrans.c
new file mode 100644
index 0000000000..439158f0ef
--- /dev/null
+++ b/modular-xorg-server-devel/patches/patch-os_xstrans.c
@@ -0,0 +1,21 @@
+$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>
Home |
Main Index |
Thread Index |
Old Index