[Midnightbsd-cvs] mports: mports/graphics:
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Wed Nov 7 18:22:51 EST 2007
Log Message:
-----------
Modified Files:
--------------
mports/graphics:
Makefile (r1.67 -> r1.68)
Added Files:
-----------
mports/graphics/mesa-demos:
Makefile (r1.1)
distinfo (r1.1)
pkg-descr (r1.1)
mports/graphics/mesa-demos/files:
config (r1.1)
patch-progs-xdemos-glthreads.c (r1.1)
patch-progs-xdemos-glxpixmap.c (r1.1)
patch-progs-xdemos-yuvrect_client.c (r1.1)
-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /home/cvs/mports/graphics/Makefile,v
retrieving revision 1.67
retrieving revision 1.68
diff -L graphics/Makefile -L graphics/Makefile -u -r1.67 -r1.68
--- graphics/Makefile
+++ graphics/Makefile
@@ -63,6 +63,7 @@
SUBDIR += linux-tiff
SUBDIR += linux-ungif
SUBDIR += linux_dri
+ SUBDIR += mesa-demos
SUBDIR += ming
SUBDIR += netpbm
SUBDIR += p5-GD
--- /dev/null
+++ 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/
--- /dev/null
+++ graphics/mesa-demos/Makefile
@@ -0,0 +1,99 @@
+# New ports collection makefile for: mesa-demos
+# Date created: 7 Nov 2003
+# Whom: anholt at FreeBSD.org
+#
+# $MidnightBSD: mports/graphics/mesa-demos/Makefile,v 1.1 2007/11/07 23:22:49 laffer1 Exp $
+# $FreeBSD: ports/graphics/mesa-demos/Makefile,v 1.17 2007/07/02 16:54:01 jkim Exp $
+#
+
+PORTNAME= demos
+PORTVERSION= 7.0
+CATEGORIES= graphics
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= mesa3d/
+PKGNAMEPREFIX= mesa-
+DISTFILES= MesaDemos-${PORTVERSION}${EXTRACT_SUFX} \
+ MesaLib-${PORTVERSION}${EXTRACT_SUFX}
+
+MAINTAINER= ports at MidnightBSD.org
+COMMENT= OpenGL demos distributed with Mesa
+LICENSE= lgpl
+
+LIB_DEPENDS= glut.4:${PORTSDIR}/graphics/libglut
+
+USE_BZIP2= yes
+USE_GMAKE= yes
+MAKE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
+ PTHREAD_LIBS="${PTHREAD_LIBS}"
+ALL_TARGET=
+MAKE_ARGS= SUBDIRS="progs/demos progs/xdemos"
+WRKSRC= ${WRKDIR}/Mesa-${PORTVERSION}
+DATADIR= ${PREFIX}/share/mesa-demos
+
+DEMO_PROGS= arbfplight arbfslight arbocclude bounce clearspd cubemap \
+ drawpix engine fire fogcoord fplight fslight gamma gearbox \
+ gears geartrain glinfo gloss glslnoise gltestperf glutfx \
+ ipers isosurf lodbias morph3d multiarb paltex pointblast \
+ ray readpix reflect renormal shadowtex singlebuffer spectex \
+ spriteblast stex3d streaming_rect teapot terrain tessdemo \
+ texcyl texdown texenv texobj trispd tunnel tunnel2 vao_demo \
+ winpos
+
+DEMO_IMAGES= arch.rgb bw.rgb girl.rgb girl2.rgb reflect.rgb s128.rgb \
+ tile.rgb tree2.rgba tree3.rgb wrs_logo.rgb
+DEMO_DATA= geartrain.dat isosurf.dat terrain.dat
+
+XDEMO_PROGS= glthreads glxcontexts glxdemo glxgears glxgears_fbconfig \
+ glxheads glxinfo glxpbdemo glxpixmap glxswapcontrol manywin \
+ offset overlay pbdemo pbinfo wincopy xfont xrotfontdemo \
+ yuvrect_client
+
+# Generate packing list
+PLIST_FILES=
+.for prog in ${DEMO_PROGS}
+PLIST_FILES+= bin/${prog}
+.endfor
+.for prog in ${XDEMO_PROGS}
+PLIST_FILES+= bin/${prog}
+.endfor
+.for img in ${DEMO_IMAGES}
+PLIST_FILES+= %%DATADIR%%/images/${img}
+.endfor
+.for dat in ${DEMO_DATA}
+PLIST_FILES+= %%DATADIR%%/data/${dat}
+.endfor
+PLIST_DIRS= %%DATADIR%%/images %%DATADIR%%/data %%DATADIR%%
+
+post-extract:
+ ${CP} ${FILESDIR}/config ${WRKSRC}/configs/current
+ ${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 prog in ${DEMO_PROGS}; do \
+ ${INSTALL_PROGRAM} ${WRKSRC}/progs/demos/$$prog \
+ ${PREFIX}/bin ; \
+ done
+ @for prog in ${XDEMO_PROGS}; do \
+ ${INSTALL_PROGRAM} ${WRKSRC}/progs/xdemos/$$prog \
+ ${PREFIX}/bin ; \
+ done
+ ${MKDIR} ${DATADIR}/images ${DATADIR}/data
+ @for img in ${DEMO_IMAGES}; do \
+ ${INSTALL_DATA} ${WRKSRC}/progs/images/$$img \
+ ${DATADIR}/images ; \
+ done
+ @for dat in ${DEMO_DATA}; do \
+ ${INSTALL_DATA} ${WRKSRC}/progs/demos/$$dat ${DATADIR}/data ; \
+ done
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_NVIDIA_GL)
+CFLAGS+= -DWITH_NVIDIA_GL=1
+.endif
+
+.include <bsd.port.post.mk>
--- /dev/null
+++ graphics/mesa-demos/distinfo
@@ -0,0 +1,6 @@
+MD5 (MesaDemos-7.0.tar.bz2) = fada2bc1f29da513e015fda1e3abd0c0
+SHA256 (MesaDemos-7.0.tar.bz2) = d674154aad2cde9c1fd5bf6931196f5ff13832efc69313bd8931efcde3df8db7
+SIZE (MesaDemos-7.0.tar.bz2) = 1334310
+MD5 (MesaLib-7.0.tar.bz2) = 50c371455fa7532c04aa0a970f9bc51f
+SHA256 (MesaLib-7.0.tar.bz2) = dc4dcd24712c4bdafc430f281e7200b9b7d9a6de1995223275def1d1bf012c08
+SIZE (MesaLib-7.0.tar.bz2) = 3366124
--- /dev/null
+++ graphics/mesa-demos/files/patch-progs-xdemos-glthreads.c
@@ -0,0 +1,11 @@
+--- progs/xdemos/glthreads.c.orig Fri May 18 20:28:57 2007
++++ progs/xdemos/glthreads.c Fri May 18 20:32:37 2007
+@@ -505,7 +505,7 @@
+ for (i = 0; i < numThreads; i++) {
+ pthread_create(&WinThreads[i].Thread, NULL, thread_function,
+ (void*) &WinThreads[i]);
+- printf("glthreads: Created thread %u\n", (unsigned int) WinThreads[i].Thread);
++ printf("glthreads: Created thread %lu\n", (unsigned long) WinThreads[i].Thread);
+ }
+
+ if (MultiDisplays)
--- /dev/null
+++ 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 );
--- /dev/null
+++ 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.3 2007/05/29 18:33:19 anholt Exp $
+#
+
+# Set and remember $CFLAGS, $CXXFLAGS, $CC and $CXX before they are
+# overriden in default include
+
+_CC := $(CC)
+_CXX := $(CXX)
+_CFLAGS := -fPIC -pedantic -I$(X11BASE)/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 = $(X11BASE)/lib
+
+APP_LIB_DEPS = -L$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXext -lXmu -lXi -lX11 -lm $(PTHREAD_LIBS)
+
--- /dev/null
+++ 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);
More information about the Midnightbsd-cvs
mailing list