aboutsummaryrefslogtreecommitdiff
path: root/graphics/mesa-demos
diff options
context:
space:
mode:
authorFlorent Thoumie <flz@FreeBSD.org>2007-05-19 20:36:56 +0000
committerFlorent Thoumie <flz@FreeBSD.org>2007-05-19 20:36:56 +0000
commitd4f0d0048a8755106a4b0445221a19761e746984 (patch)
treec87184c5bfeaf942c827c5f706186ce9786a2588 /graphics/mesa-demos
parente82affd309fc2d8e5ea19b2e003f1296920bd825 (diff)
downloadports-d4f0d0048a8755106a4b0445221a19761e746984.tar.gz
ports-d4f0d0048a8755106a4b0445221a19761e746984.zip
- Welcome X.org 7.2 \o/.
- Set X11BASE to ${LOCALBASE} for recent ${OSVERSION}. - Bump PORTREVISION for ports intalling files in ${X11BASE}.
Notes
Notes: svn path=/head/; revision=191544
Diffstat (limited to 'graphics/mesa-demos')
-rw-r--r--graphics/mesa-demos/Makefile34
-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
3 files changed, 65 insertions, 8 deletions
diff --git a/graphics/mesa-demos/Makefile b/graphics/mesa-demos/Makefile
index 0e94c9b8bdfe..e0fd2f477da9 100644
--- a/graphics/mesa-demos/Makefile
+++ b/graphics/mesa-demos/Makefile
@@ -7,6 +7,7 @@
PORTNAME= demos
PORTVERSION= 6.5.3
+PORTREVISION= 1
CATEGORIES= graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= mesa3d/
@@ -24,27 +25,36 @@ USE_GMAKE= yes
MAKE_ENV= PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
PTHREAD_LIBS="${PTHREAD_LIBS}"
ALL_TARGET=
-MAKE_ARGS= SUBDIRS="progs/demos"
+MAKE_ARGS= SUBDIRS="progs/demos progs/xdemos"
WRKSRC= ${WRKDIR}/Mesa-${PORTVERSION}
DATADIR= ${PREFIX}/share/mesa-demos
-DEMO_PROGS= glinfo winpos gamma renormal glutfx paltex clearspd glslnoise \
- singlebuffer bounce spectex readpix arbocclude texobj texdown \
- lodbias texcyl vao_demo arbfslight fplight fogcoord trispd \
- drawpix multiarb cubemap tessdemo pointblast gltestperf \
- arbfplight gears spriteblast gloss terrain gearbox teapot \
- ipers reflect shadowtex texenv fire stex3d ray morph3d \
- isosurf engine tunnel tunnel2 geartrain
+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
@@ -66,6 +76,10 @@ do-install:
${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 \
@@ -81,4 +95,8 @@ do-install:
IGNORE= does not build with XFree86
.endif
+.if defined(WITH_NVIDIA_GL)
+CFLAGS+= -DWITH_NVIDIA_GL=1
+.endif
+
.include <bsd.port.post.mk>
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 000000000000..1dfc2c4f672a
--- /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 000000000000..1dbf8e3bd700
--- /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);