summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkwm <kwm@058c260c-8361-11dd-a0ac-aa2bafec7d09>2011-04-10 03:28:28 +0800
committerkwm <kwm@058c260c-8361-11dd-a0ac-aa2bafec7d09>2011-04-10 03:28:28 +0800
commitad4323811fbee1cc6e85e67dcc7c57271fc942aa (patch)
tree5c9c5f4b4a65dde892b9ebb04e37622f62de5290
parent9d615509d41b8de7f426378924561471fa4127e2 (diff)
downloadxorg-devel-ports-ad4323811fbee1cc6e85e67dcc7c57271fc942aa.tar
xorg-devel-ports-ad4323811fbee1cc6e85e67dcc7c57271fc942aa.tar.gz
xorg-devel-ports-ad4323811fbee1cc6e85e67dcc7c57271fc942aa.tar.bz2
xorg-devel-ports-ad4323811fbee1cc6e85e67dcc7c57271fc942aa.tar.lz
xorg-devel-ports-ad4323811fbee1cc6e85e67dcc7c57271fc942aa.tar.xz
xorg-devel-ports-ad4323811fbee1cc6e85e67dcc7c57271fc942aa.tar.zst
xorg-devel-ports-ad4323811fbee1cc6e85e67dcc7c57271fc942aa.zip
Add mesa-demos 7.6.1. This is now a stand alone version.
Sync with ports, update maintainer to x11@. git-svn-id: https://trillian.chruetertee.ch/svn/ports/branches/xorg-dev@250 058c260c-8361-11dd-a0ac-aa2bafec7d09
-rw-r--r--graphics/mesa-demos/Makefile93
-rw-r--r--graphics/mesa-demos/distinfo4
-rw-r--r--graphics/mesa-demos/files/config30
-rw-r--r--graphics/mesa-demos/files/patch-progs-xdemos-glxpixmap.c11
-rw-r--r--graphics/mesa-demos/files/patch-progs-xdemos-yuvrect_client.c28
-rw-r--r--graphics/mesa-demos/pkg-descr10
-rw-r--r--graphics/mesa-demos/pkg-plist94
7 files changed, 270 insertions, 0 deletions
diff --git a/graphics/mesa-demos/Makefile b/graphics/mesa-demos/Makefile
new file mode 100644
index 0000000..6d0988f
--- /dev/null
+++ b/graphics/mesa-demos/Makefile
@@ -0,0 +1,93 @@
+# New ports collection makefile for: mesa-demos
+# Date created: 7 Nov 2003
+# Whom: anholt@FreeBSD.org
+#
+# $FreeBSD: ports/graphics/mesa-demos/Makefile,v 1.35 2011/03/02 23:59:52 linimon Exp $
+#
+
+PORTNAME= mesa-demos
+PORTVERSION= 7.6.1
+CATEGORIES= graphics
+MASTER_SITES= CRITICAL/mesa3d:mesa,glut,demos
+DISTFILES= MesaLib-${PORTVERSION}${EXTRACT_SUFX}:mesa \
+ MesaDemos-${PORTVERSION}${EXTRACT_SUFX}:demos
+
+MAINTAINER= x11@FreeBSD.org
+COMMENT= OpenGL demos distributed with Mesa
+
+USE_BZIP2= yes
+USE_GMAKE= yes
+USE_LDCONFIG= yes
+GNU_CONFIGURE= yes
+MAKE_JOBS_SAFE= yes
+USE_GL= glu glut
+USE_XORG= glproto x11 xext xxf86vm xdamage xfixes dri2proto
+CPPFLAGS= -I${LOCALBASE}/include
+CONFIGURE_ENV= LDFLAGS=-L${LOCALBASE}/lib
+CONFIGURE_ARGS= --disable-gallium --with-demos=demos,xdemos
+
+#ALL_TARGET= yes
+
+#PATCHDIR= ${.CURDIR}/../../graphics/libGL/files
+WRKSRC= ${WRKDIR}/Mesa-${PORTVERSION}/
+
+DATADIR= ${PREFIX}/share/${PKGNAMEPREFIX}${PORTNAME}
+
+OPTIONS= NVIDIA_GL "Use NVIDIA's libraries" off
+
+#EXTRA_PATCHES+= ${FILESDIR}/patch-progs-xdemos-glxpixmap.c \
+# ${FILESDIR}/patch-progs-xdemos-yuvrect_client.c
+
+.if defined(WITHOUT_XCB)
+CONFIGURE_ARGS+= --disable-xcb
+.else
+CONFIGURE_ARGS+= --enable-xcb
+.endif
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|-ffast-math|${FAST_MATH}|' -e 's|x86_64|amd64|' \
+ ${WRKSRC}/configure
+ @${REINPLACE_CMD} -e 's|[$$](INSTALL_LIB_DIR)/pkgconfig|${PREFIX}/libdata/pkgconfig|' \
+ ${WRKSRC}/src/glu/Makefile \
+ ${WRKSRC}/src/glw/Makefile \
+ ${WRKSRC}/src/mesa/Makefile \
+ ${WRKSRC}/src/mesa/drivers/dri/Makefile
+ @${REINPLACE_CMD} -e 's|../images/|${DATADIR}/images/|g' \
+ -e 's|geartrain.dat|${DATADIR}/data/geartrain.dat|g' \
+ -e 's|terrain.dat|${DATADIR}/data/terrain.dat|g' \
+ -e 's|isosurf.dat|${DATADIR}/data/isosurf.dat|g' \
+ ${WRKSRC}/progs/demos/*.c ${WRKSRC}/progs/xdemos/*.c
+
+do-install:
+ @for i in demos xdemos; do \
+ cd ${WRKSRC}/progs/$$i; \
+ for j in `${MAKE} -V PROGS`; do \
+ ${ECHO_CMD} ${INSTALL_PROGRAM} $$j ${PREFIX}/bin; \
+ ${INSTALL_PROGRAM} $$j ${PREFIX}/bin; \
+ done; \
+ done
+ ${MKDIR} ${DATADIR}/images ${DATADIR}/data
+ @cd ${WRKSRC}/progs/images; \
+ for i in `ls *.rgb*`; do \
+ ${ECHO_CMD} ${INSTALL_DATA} $$i ${DATADIR}/images; \
+ ${INSTALL_DATA} $$i ${DATADIR}/images; \
+ done
+ @cd ${WRKSRC}/progs/demos; \
+ for i in `ls *.dat`; do \
+ ${ECHO_CMD} ${INSTALL_DATA} $$i ${DATADIR}/data; \
+ ${INSTALL_DATA} $$i ${DATADIR}/data; \
+ done
+
+.include <bsd.port.pre.mk>
+CONFIGURE_ENV= CPPFLAGS="${PTHREAD_CFLAGS} -I${LOCALBASE}/include" \
+ LDFLAGS="${PTHREAD_LIBS} -L${LOCALBASE}/lib"
+
+.if defined(WITH_NVIDIA_GL)
+CFLAGS+= -DWITH_NVIDIA_GL=1
+.endif
+
+.if !defined(ARCH)
+ARCH!= uname -p
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/graphics/mesa-demos/distinfo b/graphics/mesa-demos/distinfo
new file mode 100644
index 0000000..738047a
--- /dev/null
+++ b/graphics/mesa-demos/distinfo
@@ -0,0 +1,4 @@
+SHA256 (MesaLib-7.6.1.tar.bz2) = 701f0e4cb85d6298181651b780d1c0a439fadd02aad29ee6623fc05588bb8d44
+SIZE (MesaLib-7.6.1.tar.bz2) = 4886995
+SHA256 (MesaDemos-7.6.1.tar.bz2) = d2368fc86d032dc6478df70f99b114abdf6c0c1da57bf1d3927ab179876f9c4b
+SIZE (MesaDemos-7.6.1.tar.bz2) = 1547790
diff --git a/graphics/mesa-demos/files/config b/graphics/mesa-demos/files/config
new file mode 100644
index 0000000..bbf7203
--- /dev/null
+++ b/graphics/mesa-demos/files/config
@@ -0,0 +1,30 @@
+# Configuration for mesa-demos port for FreeBSD
+# Taken from Mesa CVS mesa/Mesa/configs/freebsd Rev 1.2
+# $FreeBSD: ports/graphics/mesa-demos/files/config,v 1.4 2008/04/19 17:50:27 miwi Exp $
+#
+
+# Set and remember $CFLAGS, $CXXFLAGS, $CC and $CXX before they are
+# overriden in default include
+
+_CC := $(CC)
+_CXX := $(CXX)
+_CFLAGS := -fPIC -pedantic -I$(LOCALBASE)/include -DUSE_XSHM -DHZ=100 $(CFLAGS) \
+ -DPTHREADS $(PTHREAD_CFLAGS)
+_CXXFLAGS := -fPIC -pedantic $(CXXFLAGS)
+
+include $(TOP)/configs/default
+
+CONFIG_NAME = FreeBSD
+
+# Now reset compiler and flags
+CC = $(_CC)
+CXX = $(_CXX)
+CFLAGS = $(_CFLAGS)
+CXXFLAGS = $(_CXXFLAGS)
+
+GLUT_CFLAGS = -fexceptions
+
+LIB_DIR = $(LOCALBASE)/lib
+
+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXext -lXmu -lXi -lX11 -lm $(PTHREAD_LIBS)
+
diff --git a/graphics/mesa-demos/files/patch-progs-xdemos-glxpixmap.c b/graphics/mesa-demos/files/patch-progs-xdemos-glxpixmap.c
new file mode 100644
index 0000000..1dfc2c4
--- /dev/null
+++ b/graphics/mesa-demos/files/patch-progs-xdemos-glxpixmap.c
@@ -0,0 +1,11 @@
+--- progs/xdemos/glxpixmap.c.orig Fri Apr 6 22:29:09 2007
++++ progs/xdemos/glxpixmap.c Fri Apr 6 22:38:33 2007
+@@ -105,7 +105,7 @@
+ * to render correctly. This is because Mesa allows RGB rendering
+ * into any kind of visual, not just TrueColor or DirectColor.
+ */
+-#ifdef GLX_MESA_pixmap_colormap
++#if defined(GLX_MESA_pixmap_colormap) && !defined(WITH_NVIDIA_GL)
+ if (strstr(glXQueryExtensionsString(dpy, 0), "GLX_MESA_pixmap_colormap")) {
+ /* stand-alone Mesa, specify the colormap */
+ glxpm = glXCreateGLXPixmapMESA( dpy, visinfo, pm, attr.colormap );
diff --git a/graphics/mesa-demos/files/patch-progs-xdemos-yuvrect_client.c b/graphics/mesa-demos/files/patch-progs-xdemos-yuvrect_client.c
new file mode 100644
index 0000000..1dbf8e3
--- /dev/null
+++ b/graphics/mesa-demos/files/patch-progs-xdemos-yuvrect_client.c
@@ -0,0 +1,28 @@
+--- progs/xdemos/yuvrect_client.c.orig Fri Apr 6 22:42:30 2007
++++ progs/xdemos/yuvrect_client.c Fri Apr 6 22:48:05 2007
+@@ -140,7 +140,11 @@
+ exit(0);
+ }
+
+- glx_memory = glXAllocateMemoryMESA(dpy, screen, ImgWidth * ImgHeight * 2, 0, 0 ,0);
++ #ifdef WITH_NVIDIA_GL
++ glx_memory = glXAllocateMemoryNV(ImgWidth * ImgHeight * 2, 0, 0 ,0);
++ #else
++ glx_memory = glXAllocateMemoryMESA(dpy, screen, ImgWidth * ImgHeight * 2, 0, 0 ,0);
++ #endif
+ if (!glx_memory)
+ {
+ fprintf(stderr,"Failed to allocate MESA memory\n");
+@@ -317,7 +321,11 @@
+ glXSwapBuffers(dpy, win);
+ event_loop(dpy, win);
+
+- glXFreeMemoryMESA(dpy, DefaultScreen(dpy), glx_memory);
++ #ifdef WITH_NVIDIA_GL
++ glXFreeMemoryNV(glx_memory);
++ #else
++ glXFreeMemoryMESA(dpy, DefaultScreen(dpy), glx_memory);
++ #endif
+ glXDestroyContext(dpy, ctx);
+ XDestroyWindow(dpy, win);
+ XCloseDisplay(dpy);
diff --git a/graphics/mesa-demos/pkg-descr b/graphics/mesa-demos/pkg-descr
new file mode 100644
index 0000000..2d69b2e
--- /dev/null
+++ b/graphics/mesa-demos/pkg-descr
@@ -0,0 +1,10 @@
+Mesa is a 3-D graphics library with an API which is very similar to that
+of OpenGL*. To the extent that Mesa utilizes the OpenGL command syntax
+or state machine, it is being used with authorization from Silicon Graphics,
+Inc. However, the author makes no claim that Mesa is in any way a
+compatible replacement for OpenGL or associated with Silicon Graphics, Inc.
+Those who want a licensed implementation of OpenGL should contact a licensed
+vendor. This software is distributed under the terms of the GNU Library
+General Public License, see the LICENSE file for details.
+
+WWW: http://www.mesa3d.org/
diff --git a/graphics/mesa-demos/pkg-plist b/graphics/mesa-demos/pkg-plist
new file mode 100644
index 0000000..e4cbf2e
--- /dev/null
+++ b/graphics/mesa-demos/pkg-plist
@@ -0,0 +1,94 @@
+bin/arbfplight
+bin/arbfslight
+bin/arbocclude
+bin/bounce
+bin/clearspd
+bin/copypix
+bin/corender
+bin/cubemap
+bin/dinoshade
+bin/drawpix
+bin/engine
+bin/fbo_firecube
+bin/fbotexture
+bin/fire
+bin/fogcoord
+bin/fplight
+bin/fslight
+bin/gamma
+bin/gearbox
+bin/gears
+bin/geartrain
+bin/glinfo
+bin/gloss
+bin/glsync
+bin/gltestperf
+bin/glthreads
+bin/glxcontexts
+bin/glxdemo
+bin/glxgears
+bin/glxgears_fbconfig
+bin/glxgears_pixmap
+bin/glxheads
+bin/glxinfo
+bin/glxpbdemo
+bin/glxpixmap
+bin/glxsnoop
+bin/glxswapcontrol
+bin/ipers
+bin/isosurf
+bin/lodbias
+bin/manywin
+bin/morph3d
+bin/multiarb
+bin/multictx
+bin/offset
+bin/overlay
+bin/paltex
+bin/pbdemo
+bin/pbinfo
+bin/pointblast
+bin/projtex
+bin/rain
+bin/ray
+bin/readpix
+bin/reflect
+bin/renormal
+bin/shadowtex
+bin/sharedtex
+bin/sharedtex_mt
+bin/singlebuffer
+bin/spectex
+bin/spriteblast
+bin/stex3d
+bin/teapot
+bin/terrain
+bin/tessdemo
+bin/texcyl
+bin/texenv
+bin/texture_from_pixmap
+bin/textures
+bin/trispd
+bin/tunnel
+bin/tunnel2
+bin/vao_demo
+bin/wincopy
+bin/winpos
+bin/xfont
+bin/xrotfontdemo
+%%DATADIR%%/data/geartrain.dat
+%%DATADIR%%/data/isosurf.dat
+%%DATADIR%%/data/terrain.dat
+%%DATADIR%%/images/arch.rgb
+%%DATADIR%%/images/bw.rgb
+%%DATADIR%%/images/girl.rgb
+%%DATADIR%%/images/girl2.rgb
+%%DATADIR%%/images/reflect.rgb
+%%DATADIR%%/images/s128.rgb
+%%DATADIR%%/images/tile.rgb
+%%DATADIR%%/images/tree2.rgba
+%%DATADIR%%/images/tree3.rgb
+%%DATADIR%%/images/wrs_logo.rgb
+@dirrm %%DATADIR%%/images
+@dirrm %%DATADIR%%/data
+@dirrm %%DATADIR%%