SUBDIR+= modplugplay
SUBDIR+= modular-xorg-server-dfbsd
SUBDIR+= modular-xorg-server-dfbsd-meson
+SUBDIR+= modular-xorg-xspice
SUBDIR+= moe
SUBDIR+= molsketch
SUBDIR+= mona
--- /dev/null
+The QXL virtual GPU is found in the RedHat Enterprise Virtualisation system,
+and also in the spice project. This package provides the Xspice server script
+and Xorg drivers.
--- /dev/null
+# $NetBSD$
+
+DISTNAME= xf86-video-qxl-0.1.5
+PKGNAME= modular-xorg-xspice-0.1.5
+CATEGORIES= x11
+MASTER_SITES= ${MASTER_SITE_XORG:=driver/}
+EXTRACT_SUFX= .tar.bz2
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://xorg.freedesktop.org/
+COMMENT= Xspice Xorg server
+LICENSE= mit
+
+GNU_CONFIGURE= yes
+USE_LIBTOOL= yes
+USE_TOOLS+= pkg-config
+
+.include "options.mk"
+
+DEPENDS+= spice-vdagent-[0-9]*:../../wip/spice-vdagent
+
+CPPFLAGS.SunOS+= -D__EXTENSIONS__
+CONFIGURE_ENV.SunOS+= DRIVER_MAN_SUFFIX=4
+CONFIGURE_ARGS+= --enable-xspice=only
+REPLACE_PYTHON+= scripts/Xspice
+
+PYTHON_VERSIONS_ACCEPTED= 27
+
+.include "../../lang/python/application.mk"
+.include "../../mk/jpeg.buildlink3.mk"
+.include "../../x11/libXext/buildlink3.mk"
+BUILDLINK_API_DEPENDS.libdrm+= libdrm>=2.4.46
+.include "../../x11/libdrm/buildlink3.mk"
+.include "../../sysutils/libpciaccess/buildlink3.mk"
+.include "../../sysutils/spice-protocol/buildlink3.mk"
+.include "../../sysutils/spice-server/buildlink3.mk"
+.include "../../x11/xorgproto/buildlink3.mk"
+.include "../../x11/modular-xorg-server/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
--- /dev/null
+@comment $NetBSD$
+bin/Xspice
+lib/xorg/modules/drivers/spiceqxl_drv.la
+share/doc/xf86-video-qxl/spiceqxl.xorg.conf.example
+@pkgdir share/doc/xf86-video-qxl
--- /dev/null
+$NetBSD$
+
+SHA1 (xf86-video-qxl-0.1.5.tar.bz2) = 150bbd8bf2218e33c30ca6e88422870ae08ff1af
+RMD160 (xf86-video-qxl-0.1.5.tar.bz2) = 09f8498561cfab19c5089d0237bf558ececaef00
+SHA512 (xf86-video-qxl-0.1.5.tar.bz2) = 7510b2d037b3e978df6063b29e2406f3d1270695a239f29fdaec9b1dc65a30ab10cb959f15eb336f78e93aa708d41c64c5ea43803958feffc64542229605b782
+Size (xf86-video-qxl-0.1.5.tar.bz2) = 508266 bytes
+SHA1 (patch-src_spiceqxl__uinput.c) = f4c5230a90ee64717f2c5ce43fd8afab15b6425e
--- /dev/null
+# $NetBSD$
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.modular-xorg-xspice
+PKG_SUPPORTED_OPTIONS= static
+PKG_SUGGESTED_OPTIONS+= # blank
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mstatic)
+CONFIGURE_ARGS+= --enable-static=yes
+.else
+CONFIGURE_ARGS+= --enable-static=no
+.endif
--- /dev/null
+$NetBSD$
+
+Provide the necessary defintions for non-linux.
+
+--- src/spiceqxl_uinput.c.orig 2016-03-23 17:14:16.000000000 +0000
++++ src/spiceqxl_uinput.c
+@@ -9,8 +9,25 @@
+ #include <errno.h>
+ #include <stdio.h>
+
++#ifdef __linux__
+ #include <linux/input.h>
+ #include <linux/uinput.h>
++#else
++struct input_event {
++ struct timeval time;
++ uint16_t type;
++ uint16_t code;
++ int32_t value;
++};
++#define ABS_X 0x00
++#define ABS_Y 0x01
++#define BTN_LEFT 0x110
++#define BTN_RIGHT 0x111
++#define BTN_MIDDLE 0x112
++#define EV_KEY 0x01
++#define EV_REL 0x02
++#define EV_ABS 0x03
++#endif
+
+ #include "qxl_option_helpers.h"
+ #include "spiceqxl_util.h"