From owner-svn-ports-all@freebsd.org Sun Jan 22 21:44:38 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F12A7CB966F; Sun, 22 Jan 2017 21:44:38 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6FBE1B8; Sun, 22 Jan 2017 21:44:38 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0MLib20042541; Sun, 22 Jan 2017 21:44:37 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0MLibIW042533; Sun, 22 Jan 2017 21:44:37 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201701222144.v0MLibIW042533@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 22 Jan 2017 21:44:37 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r432164 - in head/graphics/mesa-demos: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jan 2017 21:44:39 -0000 Author: bapt Date: Sun Jan 22 21:44:36 2017 New Revision: 432164 URL: https://svnweb.freebsd.org/changeset/ports/432164 Log: Enable the EGL and GLESv2 demos PR: 214708 Submitted by: matthew@reztek.cz Added: head/graphics/mesa-demos/files/patch-src_egl_opengl_Makefile.am (contents, props changed) head/graphics/mesa-demos/files/patch-src_egl_opengl_Makefile.in (contents, props changed) head/graphics/mesa-demos/files/patch-src_egl_opengl_eglkms.c (contents, props changed) head/graphics/mesa-demos/files/patch-src_egl_opengles2_es2gears.c (contents, props changed) Modified: head/graphics/mesa-demos/Makefile head/graphics/mesa-demos/files/patch-src-glsl-Makefile.am head/graphics/mesa-demos/files/patch-src-glsl-Makefile.in head/graphics/mesa-demos/pkg-plist Modified: head/graphics/mesa-demos/Makefile ============================================================================== --- head/graphics/mesa-demos/Makefile Sun Jan 22 21:30:15 2017 (r432163) +++ head/graphics/mesa-demos/Makefile Sun Jan 22 21:44:36 2017 (r432164) @@ -3,22 +3,26 @@ PORTNAME= mesa-demos PORTVERSION= 8.3.0 +PORTREVISION= 1 CATEGORIES= graphics MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/demos/${PORTVERSION}/ MAINTAINER= x11@FreeBSD.org COMMENT= OpenGL demos distributed with Mesa +LICENSE= MIT + +LIB_DEPENDS= libdrm.so:graphics/libdrm + GNU_CONFIGURE= yes USES= gmake pkgconfig tar:bzip2 -USE_GL= glew glu glut +USE_GL= egl gbm gl glesv2 glew glu glut USE_XORG= dri2proto glproto x11 xdamage xext xfixes xi xxf86vm CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib -CONFIGURE_ARGS+=--disable-egl --disable-gbm --disable-gles2 \ - --disable-osmesa --disable-vg --disable-wayland \ - --with-system-data-files --disable-freetype2 +CONFIGURE_ARGS+=--disable-osmesa --disable-vg --disable-wayland \ + --with-system-data-files .include Modified: head/graphics/mesa-demos/files/patch-src-glsl-Makefile.am ============================================================================== --- head/graphics/mesa-demos/files/patch-src-glsl-Makefile.am Sun Jan 22 21:30:15 2017 (r432163) +++ head/graphics/mesa-demos/files/patch-src-glsl-Makefile.am Sun Jan 22 21:44:36 2017 (r432164) @@ -1,6 +1,8 @@ ---- src/glsl/Makefile.am.orig 2012-12-15 08:17:06.000000000 +0100 -+++ src/glsl/Makefile.am 2013-03-08 14:03:15.236159234 +0100 -@@ -34,7 +34,7 @@ +# Prevent conflict with x11/bitmap +# +--- src/glsl/Makefile.am.orig 2014-03-22 12:59:24 UTC ++++ src/glsl/Makefile.am +@@ -38,7 +38,7 @@ if HAVE_GLUT bin_PROGRAMS = \ array \ bezier \ @@ -9,7 +11,7 @@ brick \ bump \ blinking-teapot \ -@@ -76,7 +76,7 @@ +@@ -83,7 +83,7 @@ samplers_array_SOURCES = samplers.c samplers_array_CFLAGS = $(AM_CFLAGS) -DSAMPLERS_ARRAY array_LDADD = ../util/libutil.la Modified: head/graphics/mesa-demos/files/patch-src-glsl-Makefile.in ============================================================================== --- head/graphics/mesa-demos/files/patch-src-glsl-Makefile.in Sun Jan 22 21:30:15 2017 (r432163) +++ head/graphics/mesa-demos/files/patch-src-glsl-Makefile.in Sun Jan 22 21:44:36 2017 (r432164) @@ -1,6 +1,8 @@ ---- src/glsl/Makefile.in.orig 2014-07-05 05:13:28.000000000 -0400 -+++ src/glsl/Makefile.in 2015-04-17 16:41:57.556848000 -0400 -@@ -103,7 +103,7 @@ +# Prevent conflict with x11/bitmap +# +--- src/glsl/Makefile.in.orig 2015-12-09 21:24:01 UTC ++++ src/glsl/Makefile.in +@@ -113,7 +113,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @HAVE_GLUT_TRUE@bin_PROGRAMS = array$(EXEEXT) bezier$(EXEEXT) \ @@ -9,7 +11,7 @@ @HAVE_GLUT_TRUE@ blinking-teapot$(EXEEXT) convolutions$(EXEEXT) \ @HAVE_GLUT_TRUE@ deriv$(EXEEXT) fragcoord$(EXEEXT) \ @HAVE_GLUT_TRUE@ fsraytrace$(EXEEXT) \ -@@ -149,9 +149,9 @@ +@@ -158,9 +158,9 @@ am__v_lt_1 = bezier_SOURCES = bezier.c bezier_OBJECTS = bezier.$(OBJEXT) bezier_DEPENDENCIES = ../util/libutil.la @@ -22,7 +24,7 @@ blinking_teapot_SOURCES = blinking-teapot.c blinking_teapot_OBJECTS = blinking-teapot.$(OBJEXT) blinking_teapot_DEPENDENCIES = ../util/libutil.la -@@ -535,7 +535,7 @@ +@@ -546,7 +546,7 @@ gsraytrace_SOURCES = gsraytrace.cpp samplers_array_SOURCES = samplers.c samplers_array_CFLAGS = $(AM_CFLAGS) -DSAMPLERS_ARRAY array_LDADD = ../util/libutil.la @@ -31,7 +33,7 @@ bezier_LDADD = ../util/libutil.la brick_LDADD = ../util/libutil.la bump_LDADD = ../util/libutil.la -@@ -684,9 +684,9 @@ +@@ -694,9 +694,9 @@ bezier$(EXEEXT): $(bezier_OBJECTS) $(bez @rm -f bezier$(EXEEXT) $(AM_V_CCLD)$(LINK) $(bezier_OBJECTS) $(bezier_LDADD) $(LIBS) Added: head/graphics/mesa-demos/files/patch-src_egl_opengl_Makefile.am ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/mesa-demos/files/patch-src_egl_opengl_Makefile.am Sun Jan 22 21:44:36 2017 (r432164) @@ -0,0 +1,13 @@ +# Install the EGL demos +# +--- src/egl/opengl/Makefile.am.orig 2015-12-09 21:04:02 UTC ++++ src/egl/opengl/Makefile.am +@@ -50,7 +50,7 @@ endif + endif + + if HAVE_EGL +-noinst_PROGRAMS = \ ++bin_PROGRAMS = \ + eglinfo \ + peglgears \ + $(EGL_DRM_DEMOS) \ Added: head/graphics/mesa-demos/files/patch-src_egl_opengl_Makefile.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/mesa-demos/files/patch-src_egl_opengl_Makefile.in Sun Jan 22 21:44:36 2017 (r432164) @@ -0,0 +1,147 @@ +# Install the EGL demos +# +--- src/egl/opengl/Makefile.in.orig 2015-12-09 21:24:01 UTC ++++ src/egl/opengl/Makefile.in +@@ -115,7 +115,7 @@ PRE_UNINSTALL = : + POST_UNINSTALL = : + build_triplet = @build@ + host_triplet = @host@ +-@HAVE_EGL_TRUE@noinst_PROGRAMS = eglinfo$(EXEEXT) peglgears$(EXEEXT) \ ++@HAVE_EGL_TRUE@bin_PROGRAMS = eglinfo$(EXEEXT) peglgears$(EXEEXT) \ + @HAVE_EGL_TRUE@ $(am__EXEEXT_1) $(am__EXEEXT_2) + subdir = src/egl/opengl + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +@@ -133,7 +133,8 @@ CONFIG_CLEAN_VPATH_FILES = + @HAVE_X11_TRUE@am__EXEEXT_2 = eglgears_x11$(EXEEXT) \ + @HAVE_X11_TRUE@ egltri_x11$(EXEEXT) xeglgears$(EXEEXT) \ + @HAVE_X11_TRUE@ xeglthreads$(EXEEXT) +-PROGRAMS = $(noinst_PROGRAMS) ++am__installdirs = "$(DESTDIR)$(bindir)" ++PROGRAMS = $(bin_PROGRAMS) + am_eglgears_x11_OBJECTS = eglgears.$(OBJEXT) + eglgears_x11_OBJECTS = $(am_eglgears_x11_OBJECTS) + eglgears_x11_DEPENDENCIES = ../eglut/libeglut_x11.la +@@ -389,7 +390,6 @@ pdfdir = @pdfdir@ + prefix = @prefix@ + program_transform_name = @program_transform_name@ + psdir = @psdir@ +-runstatedir = @runstatedir@ + sbindir = @sbindir@ + sharedstatedir = @sharedstatedir@ + srcdir = @srcdir@ +@@ -461,9 +461,49 @@ $(top_srcdir)/configure: $(am__configur + $(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + $(am__aclocal_m4_deps): ++install-binPROGRAMS: $(bin_PROGRAMS) ++ @$(NORMAL_INSTALL) ++ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ ++ if test -n "$$list"; then \ ++ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ ++ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ ++ fi; \ ++ for p in $$list; do echo "$$p $$p"; done | \ ++ sed 's/$(EXEEXT)$$//' | \ ++ while read p p1; do if test -f $$p \ ++ || test -f $$p1 \ ++ ; then echo "$$p"; echo "$$p"; else :; fi; \ ++ done | \ ++ sed -e 'p;s,.*/,,;n;h' \ ++ -e 's|.*|.|' \ ++ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ ++ sed 'N;N;N;s,\n, ,g' | \ ++ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ ++ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ ++ if ($$2 == $$4) files[d] = files[d] " " $$1; \ ++ else { print "f", $$3 "/" $$4, $$1; } } \ ++ END { for (d in files) print "f", d, files[d] }' | \ ++ while read type dir files; do \ ++ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ ++ test -z "$$files" || { \ ++ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ ++ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ ++ } \ ++ ; done + +-clean-noinstPROGRAMS: +- @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ ++uninstall-binPROGRAMS: ++ @$(NORMAL_UNINSTALL) ++ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ ++ files=`for p in $$list; do echo "$$p"; done | \ ++ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ ++ -e 's/$$/$(EXEEXT)/' \ ++ `; \ ++ test -n "$$list" || exit 0; \ ++ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ ++ cd "$(DESTDIR)$(bindir)" && rm -f $$files ++ ++clean-binPROGRAMS: ++ @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ +@@ -640,6 +680,9 @@ check-am: all-am + check: check-am + all-am: Makefile $(PROGRAMS) + installdirs: ++ for dir in "$(DESTDIR)$(bindir)"; do \ ++ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ ++ done + install: install-am + install-exec: install-exec-am + install-data: install-data-am +@@ -672,8 +715,7 @@ maintainer-clean-generic: + @echo "it deletes files that may require special tools to rebuild." + clean: clean-am + +-clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ +- mostlyclean-am ++clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + + distclean: distclean-am + -rm -rf ./$(DEPDIR) +@@ -699,7 +741,7 @@ install-dvi: install-dvi-am + + install-dvi-am: + +-install-exec-am: ++install-exec-am: install-binPROGRAMS + + install-html: install-html-am + +@@ -739,23 +781,23 @@ ps: ps-am + + ps-am: + +-uninstall-am: ++uninstall-am: uninstall-binPROGRAMS + + .MAKE: install-am install-strip + +-.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ +- clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \ +- ctags-am distclean distclean-compile distclean-generic \ ++.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ ++ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ++ ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ +- html-am info info-am install install-am install-data \ +- install-data-am install-dvi install-dvi-am install-exec \ +- install-exec-am install-html install-html-am install-info \ +- install-info-am install-man install-pdf install-pdf-am \ +- install-ps install-ps-am install-strip installcheck \ +- installcheck-am installdirs maintainer-clean \ ++ html-am info info-am install install-am install-binPROGRAMS \ ++ install-data install-data-am install-dvi install-dvi-am \ ++ install-exec install-exec-am install-html install-html-am \ ++ install-info install-info-am install-man install-pdf \ ++ install-pdf-am install-ps install-ps-am install-strip \ ++ installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ +- tags tags-am uninstall uninstall-am ++ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS + + .PRECIOUS: Makefile + Added: head/graphics/mesa-demos/files/patch-src_egl_opengl_eglkms.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/mesa-demos/files/patch-src_egl_opengl_eglkms.c Sun Jan 22 21:44:36 2017 (r432164) @@ -0,0 +1,16 @@ +# Fix an uninitialized variable in a particular execution path +# +# While it would be better design to initialize the error value +# at the start, it is set in every other error path so the least +# intrusive correction is to set it in the one missed path. +# +--- src/egl/opengl/eglkms.c.orig 2012-08-28 14:31:17 UTC ++++ src/egl/opengl/eglkms.c +@@ -212,6 +212,7 @@ int main(int argc, char *argv[]) + + if (!eglChooseConfig(dpy, attribs, &config, 1, &n) || n != 1) { + fprintf(stderr, "failed to choose argb config\n"); ++ ret = -1; + goto egl_terminate; + } + Added: head/graphics/mesa-demos/files/patch-src_egl_opengles2_es2gears.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/mesa-demos/files/patch-src_egl_opengles2_es2gears.c Sun Jan 22 21:44:36 2017 (r432164) @@ -0,0 +1,17 @@ +# Provide a fallback for missing sincos() +# +--- src/egl/opengles2/es2gears.c.orig 2012-06-25 15:34:58 UTC ++++ src/egl/opengles2/es2gears.c +@@ -168,6 +168,12 @@ create_gear(GLfloat inner_radius, GLfloa + gear->vertices = calloc(VERTICES_PER_TOOTH * teeth, sizeof(*gear->vertices)); + v = gear->vertices; + ++#ifndef sincos ++#define sincos(__x, _s, _c) do { \ ++ float _x = (__x); *(_s) = sin(_x); *(_c) = cos(_x); \ ++} while(0) ++#endif ++ + for (i = 0; i < teeth; i++) { + /* Calculate needed sin/cos for varius angles */ + sincos(i * 2.0 * M_PI / teeth, &s[0], &c[0]); Modified: head/graphics/mesa-demos/pkg-plist ============================================================================== --- head/graphics/mesa-demos/pkg-plist Sun Jan 22 21:30:15 2017 (r432163) +++ head/graphics/mesa-demos/pkg-plist Sun Jan 22 21:44:36 2017 (r432164) @@ -44,7 +44,14 @@ bin/drawelements-large bin/drawoverhead bin/drawpix bin/drawrange +bin/eglgears_x11 +bin/eglinfo +bin/eglkms +bin/egltri_x11 bin/engine +bin/es2_info +bin/es2gears_x11 +bin/es2tri bin/fbo_firecube bin/fbobind bin/fbotexture @@ -126,6 +133,7 @@ bin/overlay bin/paltex bin/pbdemo bin/pbinfo +bin/peglgears bin/pgon-mode bin/pixeltest bin/point @@ -303,6 +311,8 @@ bin/vp-unfilled bin/vsraytrace bin/wincopy bin/winpos +bin/xeglgears +bin/xeglthreads bin/xfont bin/xrotfontdemo %%DATADIR%%/arch.rgb