modular-xorg-xspice: import modular-xorg-xspice-0.1.5 as modular-xorg-xspice
authorYorick Hardy <yorickhardy@gmail.com>
Sun, 15 Nov 2020 11:18:04 +0000 (13:18 +0200)
committerYorick Hardy <yorickhardy@gmail.com>
Sun, 15 Nov 2020 11:18:04 +0000 (13:18 +0200)
Description:

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.

Notes:

Connecting with spicy (sysutils/spice-gtk) seems to be quite slow. Using vdagent
is supposed to improve the situation, but I did not manage to get it to work
correctly. The package does not proviude documentation, see Xspice --help and

https://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl/-/blob/master/README.xspice

Makefile
modular-xorg-xspice/DESCR [new file with mode: 0644]
modular-xorg-xspice/Makefile [new file with mode: 0644]
modular-xorg-xspice/PLIST [new file with mode: 0644]
modular-xorg-xspice/distinfo [new file with mode: 0644]
modular-xorg-xspice/options.mk [new file with mode: 0644]
modular-xorg-xspice/patches/patch-src_spiceqxl__uinput.c [new file with mode: 0644]

index 37b3a43388b1394570b9d209030b7ece1cc262ca..492254dfc6c53c3786cf97f5341ffba4875df012 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2175,6 +2175,7 @@ SUBDIR+=  modglue
 SUBDIR+=       modplugplay
 SUBDIR+=       modular-xorg-server-dfbsd
 SUBDIR+=       modular-xorg-server-dfbsd-meson
+SUBDIR+=       modular-xorg-xspice
 SUBDIR+=       moe
 SUBDIR+=       molsketch
 SUBDIR+=       mona
diff --git a/modular-xorg-xspice/DESCR b/modular-xorg-xspice/DESCR
new file mode 100644 (file)
index 0000000..100ec8c
--- /dev/null
@@ -0,0 +1,3 @@
+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.
diff --git a/modular-xorg-xspice/Makefile b/modular-xorg-xspice/Makefile
new file mode 100644 (file)
index 0000000..56552fc
--- /dev/null
@@ -0,0 +1,39 @@
+# $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"
diff --git a/modular-xorg-xspice/PLIST b/modular-xorg-xspice/PLIST
new file mode 100644 (file)
index 0000000..0c89e65
--- /dev/null
@@ -0,0 +1,5 @@
+@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
diff --git a/modular-xorg-xspice/distinfo b/modular-xorg-xspice/distinfo
new file mode 100644 (file)
index 0000000..6cc4e21
--- /dev/null
@@ -0,0 +1,7 @@
+$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
diff --git a/modular-xorg-xspice/options.mk b/modular-xorg-xspice/options.mk
new file mode 100644 (file)
index 0000000..283b3ff
--- /dev/null
@@ -0,0 +1,13 @@
+# $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
diff --git a/modular-xorg-xspice/patches/patch-src_spiceqxl__uinput.c b/modular-xorg-xspice/patches/patch-src_spiceqxl__uinput.c
new file mode 100644 (file)
index 0000000..a05d17b
--- /dev/null
@@ -0,0 +1,32 @@
+$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"