pkgsrc-WIP-changes archive

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

Add kmscube



Module Name:	pkgsrc-wip
Committed By:	Robert Swindells <rjs%NetBSD.org@localhost>
Pushed By:	rjs
Date:		Wed Oct 16 15:14:32 2024 +0100
Changeset:	8b5d6c03b8f078bbdb53ffd4cbb030dee4c06133

Added Files:
	kmscube/DESCR
	kmscube/Makefile
	kmscube/PLIST
	kmscube/distinfo
	kmscube/options.mk
	kmscube/patches/patch-kmscube.c
	kmscube/patches/patch-texturator.c

Log Message:
Add kmscube

Doesn't have a release version.

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

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

diffstat:
 kmscube/DESCR                      |  4 ++++
 kmscube/Makefile                   | 29 +++++++++++++++++++++++++++++
 kmscube/PLIST                      |  3 +++
 kmscube/distinfo                   |  7 +++++++
 kmscube/options.mk                 | 18 ++++++++++++++++++
 kmscube/patches/patch-kmscube.c    | 18 ++++++++++++++++++
 kmscube/patches/patch-texturator.c | 18 ++++++++++++++++++
 7 files changed, 97 insertions(+)

diffs:
diff --git a/kmscube/DESCR b/kmscube/DESCR
new file mode 100644
index 0000000000..f7ade28774
--- /dev/null
+++ b/kmscube/DESCR
@@ -0,0 +1,4 @@
+kmscube is a little demonstration program for how to drive bare metal graphics
+without a compositor like X11, wayland or similar, using DRM/KMS (kernel mode
+setting), GBM (graphics buffer manager) and EGL for rendering content using
+OpenGL or OpenGL ES.
diff --git a/kmscube/Makefile b/kmscube/Makefile
new file mode 100644
index 0000000000..9e8e3a4414
--- /dev/null
+++ b/kmscube/Makefile
@@ -0,0 +1,29 @@
+# $NetBSD: $
+
+DISTNAME=	kmscube
+CATEGORIES=	graphics
+MASTER_SITES=	https://gitlab.freedesktop.org/mesa/kmscube/-/archive/master/kmscube-master/
+GIT_TAG=	467e86c5cbeb2a2051b31ce2c240d6ddf5bc3112
+WRKSRC=		${WRKDIR}/kmscube-master-${GIT_TAG}
+EXTRACT_SUFX=	.tar.bz2
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://gitlab.freedesktop.org/mesa/kmscube/
+COMMENT=	Example KMS/GBM/EGL application
+LICENSE=	gnu-gpl-v2
+
+TOOL_DEPENDS=	ninja-build-[0-9]*:../../devel/ninja-build
+USE_TOOLS+=	pkg-config
+
+USE_LANGUAGES+=		c
+
+.include "../../mk/bsd.prefs.mk"
+
+.include "options.mk"
+
+.include "../../devel/meson/build.mk"
+.include "../../devel/cmake/build.mk"
+
+.include "../../graphics/png/buildlink3.mk"
+.include "../../graphics/MesaLib/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/kmscube/PLIST b/kmscube/PLIST
new file mode 100644
index 0000000000..3406f632bd
--- /dev/null
+++ b/kmscube/PLIST
@@ -0,0 +1,3 @@
+@comment $NetBSD: $
+bin/kmscube
+bin/texturator
diff --git a/kmscube/distinfo b/kmscube/distinfo
new file mode 100644
index 0000000000..cee9483931
--- /dev/null
+++ b/kmscube/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.40 2023/12/05 20:15:23 markd Exp $
+
+BLAKE2s (kmscube.tar.bz2) = 47f84626bb895da33d2859c61b896ac54d87ca28b6b5445fc120565622b1ed34
+SHA512 (kmscube.tar.bz2) = 7c6a183a5383537da0b08fbfc4cb961eb3ed2b67398ad0d7cb0017a0e7e28ffa0e968c4e754fc5952da838e2a58d748e54c5fd92ea94aa236e0bb1fcf69cd453
+Size (kmscube.tar.bz2) = 92327 bytes
+SHA1 (patch-kmscube.c) = 732381e2ebdc522e290c7e16994bf4f24f760c9a
+SHA1 (patch-texturator.c) = 6854f5417ca0d679c97ac9772293a8d345ec51f7
diff --git a/kmscube/options.mk b/kmscube/options.mk
new file mode 100644
index 0000000000..43c5d39950
--- /dev/null
+++ b/kmscube/options.mk
@@ -0,0 +1,18 @@
+# $NetBSD: $
+
+PKG_OPTIONS_VAR=		PKG_OPTIONS.kmscube
+
+PKG_SUPPORTED_OPTIONS=		gstreamer
+
+.include "../../mk/bsd.options.mk"
+
+#
+# GStreamer support
+#
+.if !empty(PKG_OPTIONS:Mgstreamer)
+.  include "../../multimedia/gstreamer1/buildlink3.mk"
+.  include "../../multimedia/gst-plugins1-base/buildlink3.mk"
+MESON_ARGS+=	-Dgstreamer=enabled
+.else
+MESON_ARGS+=	-Dgstreamer=disabled
+.endif
diff --git a/kmscube/patches/patch-kmscube.c b/kmscube/patches/patch-kmscube.c
new file mode 100644
index 0000000000..f0a05661ef
--- /dev/null
+++ b/kmscube/patches/patch-kmscube.c
@@ -0,0 +1,18 @@
+$NetBSD$
+
+Use NetBSD getopt_long(3).
+
+--- kmscube.c.orig	2024-08-11 10:18:48.284248438 +0000
++++ kmscube.c
+@@ -122,7 +122,11 @@ int main(int argc, char *argv[])
+ 	GST_DEBUG_CATEGORY_INIT(kmscube_debug, "kmscube", 0, "kmscube video pipeline");
+ #endif
+ 
++#ifdef __NetBSD__
++	while ((opt = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1) {
++#else
+ 	while ((opt = getopt_long_only(argc, argv, shortopts, longopts, NULL)) != -1) {
++#endif
+ 		switch (opt) {
+ 		case 'A':
+ 			atomic = 1;
diff --git a/kmscube/patches/patch-texturator.c b/kmscube/patches/patch-texturator.c
new file mode 100644
index 0000000000..cf938e578a
--- /dev/null
+++ b/kmscube/patches/patch-texturator.c
@@ -0,0 +1,18 @@
+$NetBSD$
+
+Use NetBSD getopt_long(3).
+
+--- texturator.c.orig	2024-08-11 10:17:40.690591302 +0000
++++ texturator.c
+@@ -864,7 +864,11 @@ int main(int argc, char *argv[])
+ 	unsigned int len;
+ 	unsigned int vrefresh = 0;
+ 
++#ifdef __NetBSD__
++	while ((opt = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1) {
++#else
+ 	while ((opt = getopt_long_only(argc, argv, shortopts, longopts, NULL)) != -1) {
++#endif
+ 		switch (opt) {
+ 		case 'D':
+ 			device = optarg;


Home | Main Index | Thread Index | Old Index