summaryrefslogtreecommitdiff
path: root/graphics/MesaDemos
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2019-08-30 17:12:19 +0000
committernia <nia@pkgsrc.org>2019-08-30 17:12:19 +0000
commitf51d3a6d2da9d910d4e47763a7d1bf43a8841e71 (patch)
tree57a3d72ccfb725f46580560d1e9b3b18774ec0b4 /graphics/MesaDemos
parent30545760cf33bf11e354286fd5b07364de5856af (diff)
downloadpkgsrc-f51d3a6d2da9d910d4e47763a7d1bf43a8841e71.tar.gz
MesaDemos: Update to 8.4.0nb2
- Use freeglut instead of glut - Support wayland - Support EGL - Support GLESv2 - Support OSMesa
Diffstat (limited to 'graphics/MesaDemos')
-rw-r--r--graphics/MesaDemos/Makefile29
-rw-r--r--graphics/MesaDemos/PLIST9
-rw-r--r--graphics/MesaDemos/distinfo3
-rw-r--r--graphics/MesaDemos/options.mk33
-rw-r--r--graphics/MesaDemos/patches/patch-src_egl_opengles2_es2gears.c15
5 files changed, 74 insertions, 15 deletions
diff --git a/graphics/MesaDemos/Makefile b/graphics/MesaDemos/Makefile
index 79d3e5bd6f9..a48e8add626 100644
--- a/graphics/MesaDemos/Makefile
+++ b/graphics/MesaDemos/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.45 2019/08/22 09:55:50 nia Exp $
+# $NetBSD: Makefile,v 1.46 2019/08/30 17:12:19 nia Exp $
DISTNAME= mesa-demos-8.4.0
PKGNAME= ${DISTNAME:S/mesa-demos/MesaDemos/}
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= graphics
MASTER_SITES= https://mesa.freedesktop.org/archive/demos/
EXTRACT_SUFX= .tar.bz2
@@ -10,7 +10,7 @@ EXTRACT_SUFX= .tar.bz2
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://cgit.freedesktop.org/mesa/demos/
COMMENT= OpenGL examples and Demos
-#LICENSE= # Each source file has a different license
+LICENSE= mit
GNU_CONFIGURE= yes
USE_LIBTOOL= yes
@@ -26,10 +26,29 @@ SUBST_SED.bitmap= -e 's/bitmap$$(EXEEXT)/bitmap_mesademos$$(EXEEXT)/g'
SUBST_SED.bitmap+= -e 's/glxgears$$(EXEEXT)/glxgears_mesademos$$(EXEEXT)/g'
SUBST_SED.bitmap+= -e 's/glxinfo$$(EXEEXT)/glxinfo_mesademos$$(EXEEXT)/g'
-.include "options.mk"
+# Mesa library features.
+PLIST_VARS+= egl osmesa
+
+.include "../../graphics/MesaLib/buildlink3.mk"
+.if !empty(MESALIB_SUPPORTS_EGL:M[Yy][Ee][Ss])
+PLIST.egl= yes
+CONFIGURE_ARGS+= --enable-egl
+# eglfbdev.c:43:10: fatal error: linux/kd.h: No such file or directory
+CONFIGURE_ARGS+= --disable-gles1
+.else
+CONFIGURE_ARGS+= --disable-egl
+.endif
+.if !empty(MESALIB_SUPPORTS_OSMESA:M[Yy][Ee][Ss])
+PLIST.osmesa= yes
+CONFIGURE_ARGS+= --enable-osmesa
+.else
+CONFIGURE_ARGS+= --disable-osmesa
+.endif
+
+.include "options.mk"
+.include "../../graphics/freeglut/buildlink3.mk"
.include "../../graphics/freetype2/buildlink3.mk"
.include "../../graphics/glew/buildlink3.mk"
.include "../../graphics/glu/buildlink3.mk"
-.include "../../graphics/glut/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/graphics/MesaDemos/PLIST b/graphics/MesaDemos/PLIST
index f8a3e84aace..7e369abd990 100644
--- a/graphics/MesaDemos/PLIST
+++ b/graphics/MesaDemos/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.18 2019/01/04 01:43:20 tnn Exp $
+@comment $NetBSD: PLIST,v 1.19 2019/08/30 17:12:19 nia Exp $
bin/arbfplight
bin/arbfslight
bin/arbocclude
@@ -47,6 +47,10 @@ bin/drawpix
bin/drawrange
${PLIST.egl}bin/eglinfo
bin/engine
+${PLIST.egl}bin/es2_info
+${PLIST.egl}${PLIST.wayland}bin/es2gears_wayland
+${PLIST.egl}${PLIST.x11}bin/es2gears_x11
+${PLIST.egl}bin/es2tri
bin/fbo_firecube
bin/fbobind
bin/fbotexture
@@ -125,6 +129,9 @@ bin/multitex
bin/noise
bin/noise2
bin/offset
+${PLIST.osmesa}bin/osdemo
+${PLIST.osmesa}bin/osdemo16
+${PLIST.osmesa}bin/osdemo32
bin/overlay
bin/paltex
bin/pbdemo
diff --git a/graphics/MesaDemos/distinfo b/graphics/MesaDemos/distinfo
index dcac1bb3446..1eed0143059 100644
--- a/graphics/MesaDemos/distinfo
+++ b/graphics/MesaDemos/distinfo
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.25 2019/01/04 01:43:20 tnn Exp $
+$NetBSD: distinfo,v 1.26 2019/08/30 17:12:19 nia Exp $
SHA1 (mesa-demos-8.4.0.tar.bz2) = 57ba892e919fa22ce3db9f25e7331a6fa33c652c
RMD160 (mesa-demos-8.4.0.tar.bz2) = dcbfec40c173cacef19bf929b4b8119ce78e8e1b
SHA512 (mesa-demos-8.4.0.tar.bz2) = b72d03cad36e0535ff18dcfb222ec4200064b9264f6da51a6e5f03b0dd912abe188bc1d600b6698de3ce6f63b28d2ce01565886ca8e7079edc4967fbf2fb0957
Size (mesa-demos-8.4.0.tar.bz2) = 10073259 bytes
+SHA1 (patch-src_egl_opengles2_es2gears.c) = c34c850a380ecc1171ead97b9181ebe096f0a06b
SHA1 (patch-src_xdemos_glinfo__common.c) = 1f657daf58f2ae08a161cd7ab73285af441f17b0
diff --git a/graphics/MesaDemos/options.mk b/graphics/MesaDemos/options.mk
index 4d9315e687b..7631a1ada7b 100644
--- a/graphics/MesaDemos/options.mk
+++ b/graphics/MesaDemos/options.mk
@@ -1,16 +1,33 @@
-# $NetBSD: options.mk,v 1.1 2019/01/04 01:43:20 tnn Exp $
+# $NetBSD: options.mk,v 1.2 2019/08/30 17:12:19 nia Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.MesaDemos
-PKG_SUPPORTED_OPTIONS= egl
-PKG_SUGGESTED_OPTIONS=
+PKG_SUPPORTED_OPTIONS= libdrm wayland x11
+PKG_SUGGESTED_OPTIONS= libdrm x11
.include "../../mk/bsd.options.mk"
-PLIST_VARS+= egl
+PLIST_VARS+= wayland x11
-.if !empty(PKG_OPTIONS:Megl)
-CONFIGURE_ARGS+= --enable-egl
-PLIST.egl= yes
+.if !empty(PKG_OPTIONS:Mlibdrm)
+CONFIGURE_ARGS+= --enable-libdrm
+.include "../../x11/libdrm/buildlink3.mk"
.else
-CONFIGURE_ARGS+= --disable-egl
+CONFIGURE_ARGS+= --disable-libdrm
+.endif
+
+.if !empty(PKG_OPTIONS:Mwayland)
+PLIST.wayland= yes
+CONFIGURE_ARGS+= --enable-wayland
+.include "../../devel/wayland/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-wayland
+.endif
+
+.if !empty(PKG_OPTIONS:Mx11)
+PLIST.x11= yes
+CONFIGURE_ARGS+= --enable-x11
+.include "../../x11/libX11/buildlink3.mk"
+.include "../../x11/libXext/buildlink3.mk"
+.else
+CONFIGURE_ARGS+= --disable-x11
.endif
diff --git a/graphics/MesaDemos/patches/patch-src_egl_opengles2_es2gears.c b/graphics/MesaDemos/patches/patch-src_egl_opengles2_es2gears.c
new file mode 100644
index 00000000000..2cfa93ac29c
--- /dev/null
+++ b/graphics/MesaDemos/patches/patch-src_egl_opengles2_es2gears.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_egl_opengles2_es2gears.c,v 1.1 2019/08/30 17:12:19 nia Exp $
+
+sincos is a GNU extension.
+
+--- src/egl/opengles2/es2gears.c.orig 2018-02-23 08:50:21.000000000 +0000
++++ src/egl/opengles2/es2gears.c
+@@ -55,6 +55,8 @@
+ #define VERTICES_PER_TOOTH 34
+ #define GEAR_VERTEX_STRIDE 6
+
++#define sincos(x, sinp, cosp) *sinp = sin(x); *cosp = cos(x);
++
+ /**
+ * Struct describing the vertices in triangle strip
+ */