summaryrefslogtreecommitdiff
path: root/graphics/MesaDemos
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2019-09-04 11:31:34 +0000
committernia <nia@pkgsrc.org>2019-09-04 11:31:34 +0000
commitc3df82d91bc98fa6160d49dbbacdc09f1dbe6fdb (patch)
tree4c05a46bb83ae1d031b88defd13c287876b03422 /graphics/MesaDemos
parentc6b59eb871900eb36714797f58a597a5647a90b1 (diff)
downloadpkgsrc-c3df82d91bc98fa6160d49dbbacdc09f1dbe6fdb.tar.gz
MesaDemos: Install missing EGL demos and fix building without gles/x11.
Bump PKGREVISION.
Diffstat (limited to 'graphics/MesaDemos')
-rw-r--r--graphics/MesaDemos/Makefile24
-rw-r--r--graphics/MesaDemos/PLIST70
-rw-r--r--graphics/MesaDemos/options.mk4
3 files changed, 62 insertions, 36 deletions
diff --git a/graphics/MesaDemos/Makefile b/graphics/MesaDemos/Makefile
index a48e8add626..d4d7c92cb88 100644
--- a/graphics/MesaDemos/Makefile
+++ b/graphics/MesaDemos/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.46 2019/08/30 17:12:19 nia Exp $
+# $NetBSD: Makefile,v 1.47 2019/09/04 11:31:34 nia Exp $
DISTNAME= mesa-demos-8.4.0
PKGNAME= ${DISTNAME:S/mesa-demos/MesaDemos/}
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= graphics
MASTER_SITES= https://mesa.freedesktop.org/archive/demos/
EXTRACT_SUFX= .tar.bz2
@@ -27,14 +27,22 @@ SUBST_SED.bitmap+= -e 's/glxgears$$(EXEEXT)/glxgears_mesademos$$(EXEEXT)/g'
SUBST_SED.bitmap+= -e 's/glxinfo$$(EXEEXT)/glxinfo_mesademos$$(EXEEXT)/g'
# Mesa library features.
-PLIST_VARS+= egl osmesa
+PLIST_VARS+= egl glesv2 osmesa
+
+# Appended in options.mk.
+EGL_PROGS+= eglkms peglgears
.include "../../graphics/MesaLib/buildlink3.mk"
.if !empty(MESALIB_SUPPORTS_EGL:M[Yy][Ee][Ss])
PLIST.egl= yes
-CONFIGURE_ARGS+= --enable-egl
+. if !empty(MESALIB_SUPPORTS_GLESv2:M[Yy][Ee][Ss])
+PLIST.glesv2= yes
+. else
+CONFIGURE_ARGS+= --disable-gles2
+. endif
# eglfbdev.c:43:10: fatal error: linux/kd.h: No such file or directory
CONFIGURE_ARGS+= --disable-gles1
+CONFIGURE_ARGS+= --enable-egl
.else
CONFIGURE_ARGS+= --disable-egl
.endif
@@ -47,6 +55,14 @@ CONFIGURE_ARGS+= --disable-osmesa
.endif
.include "options.mk"
+
+post-install:
+.if !empty(MESALIB_SUPPORTS_EGL:M[Yy][Ee][Ss])
+. for prog in ${EGL_PROGS}
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/egl/opengl/${prog} ${DESTDIR}${PREFIX}/bin
+. endfor
+.endif
+
.include "../../graphics/freeglut/buildlink3.mk"
.include "../../graphics/freetype2/buildlink3.mk"
.include "../../graphics/glew/buildlink3.mk"
diff --git a/graphics/MesaDemos/PLIST b/graphics/MesaDemos/PLIST
index 7e369abd990..cfbe68fc620 100644
--- a/graphics/MesaDemos/PLIST
+++ b/graphics/MesaDemos/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.19 2019/08/30 17:12:19 nia Exp $
+@comment $NetBSD: PLIST,v 1.20 2019/09/04 11:31:34 nia Exp $
bin/arbfplight
bin/arbfslight
bin/arbocclude
@@ -45,12 +45,17 @@ bin/drawelements-large
bin/drawoverhead
bin/drawpix
bin/drawrange
+${PLIST.egl}${PLIST.wayland}bin/eglgears_wayland
+${PLIST.egl}${PLIST.x11}bin/eglgears_x11
${PLIST.egl}bin/eglinfo
+${PLIST.egl}bin/eglkms
+${PLIST.egl}${PLIST.wayland}bin/egltri_wayland
+${PLIST.egl}${PLIST.x11}bin/egltri_x11
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
+${PLIST.egl}${PLIST.glesv2}bin/es2_info
+${PLIST.egl}${PLIST.glesv2}${PLIST.wayland}bin/es2gears_wayland
+${PLIST.egl}${PLIST.glesv2}${PLIST.x11}bin/es2gears_x11
+${PLIST.egl}${PLIST.glesv2}bin/es2tri
bin/fbo_firecube
bin/fbobind
bin/fbotexture
@@ -77,20 +82,20 @@ bin/glinfo
bin/gloss
bin/glsl-compile-time
bin/glslstateschange
-bin/glsync
+${PLIST.x11}bin/glsync
bin/gltestperf
-bin/glthreads
-bin/glxcontexts
-bin/glxdemo
-bin/glxgears_fbconfig
-bin/glxgears_mesademos
-bin/glxgears_pixmap
-bin/glxheads
-bin/glxinfo_mesademos
-bin/glxpbdemo
-bin/glxpixmap
-bin/glxsnoop
-bin/glxswapcontrol
+${PLIST.x11}bin/glthreads
+${PLIST.x11}bin/glxcontexts
+${PLIST.x11}bin/glxdemo
+${PLIST.x11}bin/glxgears_fbconfig
+${PLIST.x11}bin/glxgears_mesademos
+${PLIST.x11}bin/glxgears_pixmap
+${PLIST.x11}bin/glxheads
+${PLIST.x11}bin/glxinfo_mesademos
+${PLIST.x11}bin/glxpbdemo
+${PLIST.x11}bin/glxpixmap
+${PLIST.x11}bin/glxsnoop
+${PLIST.x11}bin/glxswapcontrol
bin/gs-tri
bin/gsraytrace
bin/identity
@@ -120,22 +125,23 @@ bin/linktest
bin/lodbias
bin/long-fixed-func
bin/mandelbrot
-bin/manywin
+${PLIST.x11}bin/manywin
bin/morph3d
bin/multiarb
-bin/multictx
+${PLIST.x11}bin/multictx
bin/multinoise
bin/multitex
bin/noise
bin/noise2
-bin/offset
+${PLIST.x11}bin/offset
${PLIST.osmesa}bin/osdemo
${PLIST.osmesa}bin/osdemo16
${PLIST.osmesa}bin/osdemo32
-bin/overlay
+${PLIST.x11}bin/overlay
bin/paltex
-bin/pbdemo
-bin/pbinfo
+${PLIST.x11}bin/pbdemo
+${PLIST.x11}bin/pbinfo
+${PLIST.egl}bin/peglgears
bin/pgon-mode
bin/pixeltest
bin/point
@@ -184,9 +190,9 @@ bin/samplers
bin/samplers_array
bin/shadow_sampler
bin/shadowtex
-bin/shape
-bin/sharedtex
-bin/sharedtex_mt
+${PLIST.x11}bin/shape
+${PLIST.x11}bin/sharedtex
+${PLIST.x11}bin/sharedtex_mt
bin/shtest
bin/simplex-noise
bin/singlebuffer
@@ -205,7 +211,7 @@ bin/texcyl
bin/texdemo1
bin/texenv
bin/teximage
-bin/texture_from_pixmap
+${PLIST.x11}bin/texture_from_pixmap
bin/textures
bin/toyball
bin/tri
@@ -311,10 +317,12 @@ bin/vp-tri-swap
bin/vp-tri-tex
bin/vp-unfilled
bin/vsraytrace
-bin/wincopy
+${PLIST.x11}bin/wincopy
bin/winpos
-bin/xfont
-bin/xrotfontdemo
+${PLIST.egl}${PLIST.x11}bin/xeglgears
+${PLIST.egl}${PLIST.x11}bin/xeglthreads
+${PLIST.x11}bin/xfont
+${PLIST.x11}bin/xrotfontdemo
share/mesa-demos/arch.rgb
share/mesa-demos/bw.rgb
share/mesa-demos/geartrain.dat
diff --git a/graphics/MesaDemos/options.mk b/graphics/MesaDemos/options.mk
index 7631a1ada7b..ca7c573b728 100644
--- a/graphics/MesaDemos/options.mk
+++ b/graphics/MesaDemos/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.2 2019/08/30 17:12:19 nia Exp $
+# $NetBSD: options.mk,v 1.3 2019/09/04 11:31:34 nia Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.MesaDemos
PKG_SUPPORTED_OPTIONS= libdrm wayland x11
@@ -18,6 +18,7 @@ CONFIGURE_ARGS+= --disable-libdrm
.if !empty(PKG_OPTIONS:Mwayland)
PLIST.wayland= yes
CONFIGURE_ARGS+= --enable-wayland
+EGL_PROGS+= eglgears_wayland egltri_wayland
.include "../../devel/wayland/buildlink3.mk"
.else
CONFIGURE_ARGS+= --disable-wayland
@@ -26,6 +27,7 @@ CONFIGURE_ARGS+= --disable-wayland
.if !empty(PKG_OPTIONS:Mx11)
PLIST.x11= yes
CONFIGURE_ARGS+= --enable-x11
+EGL_PROGS+= eglgears_x11 egltri_x11 xeglgears xeglthreads
.include "../../x11/libX11/buildlink3.mk"
.include "../../x11/libXext/buildlink3.mk"
.else