Index: graphics/Mesa/Makefile.version
===================================================================
RCS file: /NetBSD/pkgsrc/graphics/Mesa/Makefile.version,v
retrieving revision 1.5
diff -u -p graphics/Mesa/Makefile.version
--- graphics/Mesa/Makefile.version	29 Oct 2008 22:20:28 -0000	1.5
+++ graphics/Mesa/Makefile.version	20 May 2009 09:17:29 -0000
@@ -12,13 +12,5 @@
 MESA_DISTNAME= 		MesaLib-${MESA_VERSION}
 MESA_SITES=		${MASTER_SITE_SOURCEFORGE:=mesa3d/}
 
-MESA_VERSION=		7.0.4
-MESA_PKGVERSION=	${MESA_VERSION}${MESA_PATCHLEVEL}
-MESA_PATCHFILES=	001 002
-MESA_PATCHLEVEL=	.1
-
-.if defined(PKGPATH) && empty(PKGPATH:Mx11/modular-xorg-server)
-PATCHFILES+=		${MESA_PATCHFILES:@.p.@Mesa-${MESA_VERSION}-${.p.}@}
-PATCH_SITES+=		ftp://ftp.NetBSD.org/pub/NetBSD/misc/bjs/patchfiles/
-PATCH_DIST_STRIP=	-p0
-.endif
+MESA_VERSION=		7.4.2
+MESA_PKGVERSION=	${MESA_VERSION}
Index: graphics/MesaDemos/Makefile
===================================================================
RCS file: /NetBSD/pkgsrc/graphics/MesaDemos/Makefile,v
retrieving revision 1.34
diff -u -p graphics/MesaDemos/Makefile
--- graphics/MesaDemos/Makefile	1 Oct 2008 22:25:53 -0000	1.34
+++ graphics/MesaDemos/Makefile	20 May 2009 09:17:37 -0000
@@ -1,7 +1,6 @@
 # $NetBSD: Makefile,v 1.34 2008/10/01 22:25:53 bjs Exp $
 
 PKGNAME=	MesaDemos-${MESA_VERSION}
-PKGREVISION=	1
 COMMENT=	OpenGL examples and Demos
 
 
Index: graphics/MesaDemos/PLIST
===================================================================
RCS file: /NetBSD/pkgsrc/graphics/MesaDemos/PLIST,v
retrieving revision 1.12
diff -u -p graphics/MesaDemos/PLIST
--- graphics/MesaDemos/PLIST	1 Oct 2008 22:25:53 -0000	1.12
+++ graphics/MesaDemos/PLIST	20 May 2009 09:17:37 -0000
@@ -13,6 +13,8 @@ share/examples/${PKGNAME}/demos/bounce
 share/examples/${PKGNAME}/demos/bounce.c
 share/examples/${PKGNAME}/demos/clearspd
 share/examples/${PKGNAME}/demos/clearspd.c
+share/examples/${PKGNAME}/demos/copypix
+share/examples/${PKGNAME}/demos/copypix.c
 share/examples/${PKGNAME}/demos/cubemap
 share/examples/${PKGNAME}/demos/cubemap.c
 share/examples/${PKGNAME}/demos/descrip.mms
@@ -21,6 +23,8 @@ share/examples/${PKGNAME}/demos/drawpix.c
 share/examples/${PKGNAME}/demos/engine
 share/examples/${PKGNAME}/demos/engine.c
 share/examples/${PKGNAME}/demos/extfuncs.h
+share/examples/${PKGNAME}/demos/fbo_firecube
+share/examples/${PKGNAME}/demos/fbo_firecube.c
 share/examples/${PKGNAME}/demos/fire
 share/examples/${PKGNAME}/demos/fire.c
 share/examples/${PKGNAME}/demos/fogcoord
@@ -66,6 +70,7 @@ share/examples/${PKGNAME}/demos/particles.cxx
 share/examples/${PKGNAME}/demos/particles.h
 share/examples/${PKGNAME}/demos/pointblast
 share/examples/${PKGNAME}/demos/pointblast.c
+share/examples/${PKGNAME}/demos/rain
 share/examples/${PKGNAME}/demos/rain.cxx
 share/examples/${PKGNAME}/demos/ray
 share/examples/${PKGNAME}/demos/ray.c
@@ -123,35 +128,69 @@ share/examples/${PKGNAME}/fbdev/glfbdevtest.c
 share/examples/${PKGNAME}/ggi/asc-view.c
 share/examples/${PKGNAME}/ggi/gears.c
 share/examples/${PKGNAME}/ggi/gears2.c
-share/examples/${PKGNAME}/glsl/CH06-brick.frag.txt
-share/examples/${PKGNAME}/glsl/CH06-brick.vert.txt
-share/examples/${PKGNAME}/glsl/CH11-bumpmap.frag.txt
-share/examples/${PKGNAME}/glsl/CH11-bumpmap.vert.txt
-share/examples/${PKGNAME}/glsl/CH11-toyball.frag.txt
-share/examples/${PKGNAME}/glsl/CH11-toyball.vert.txt
-share/examples/${PKGNAME}/glsl/CH18-mandel.frag.txt
-share/examples/${PKGNAME}/glsl/CH18-mandel.vert.txt
+share/examples/${PKGNAME}/glsl/CH06-brick.frag
+share/examples/${PKGNAME}/glsl/CH06-brick.vert
+share/examples/${PKGNAME}/glsl/CH11-bumpmap.frag
+share/examples/${PKGNAME}/glsl/CH11-bumpmap.vert
+share/examples/${PKGNAME}/glsl/CH11-toyball.frag
+share/examples/${PKGNAME}/glsl/CH11-toyball.vert
+share/examples/${PKGNAME}/glsl/CH18-mandel.frag
+share/examples/${PKGNAME}/glsl/CH18-mandel.vert
+share/examples/${PKGNAME}/glsl/bitmap
+share/examples/${PKGNAME}/glsl/bitmap.c
 share/examples/${PKGNAME}/glsl/brick
 share/examples/${PKGNAME}/glsl/brick.c
 share/examples/${PKGNAME}/glsl/bump
 share/examples/${PKGNAME}/glsl/bump.c
-share/examples/${PKGNAME}/glsl/cubemap.frag.txt
+share/examples/${PKGNAME}/glsl/convolution.frag
+share/examples/${PKGNAME}/glsl/convolution.vert
+share/examples/${PKGNAME}/glsl/convolutions
+share/examples/${PKGNAME}/glsl/convolutions.c
+share/examples/${PKGNAME}/glsl/cubemap.frag
 share/examples/${PKGNAME}/glsl/deriv
 share/examples/${PKGNAME}/glsl/deriv.c
 share/examples/${PKGNAME}/glsl/extfuncs.h
+share/examples/${PKGNAME}/glsl/fragcoord
+share/examples/${PKGNAME}/glsl/fragcoord.c
 share/examples/${PKGNAME}/glsl/mandelbrot
 share/examples/${PKGNAME}/glsl/mandelbrot.c
+share/examples/${PKGNAME}/glsl/multinoise
+share/examples/${PKGNAME}/glsl/multinoise.c
+share/examples/${PKGNAME}/glsl/multitex
+share/examples/${PKGNAME}/glsl/multitex.c
+share/examples/${PKGNAME}/glsl/multitex.frag
+share/examples/${PKGNAME}/glsl/multitex.vert
 share/examples/${PKGNAME}/glsl/noise
 share/examples/${PKGNAME}/glsl/noise.c
+share/examples/${PKGNAME}/glsl/pointcoord
+share/examples/${PKGNAME}/glsl/pointcoord.c
+share/examples/${PKGNAME}/glsl/points
+share/examples/${PKGNAME}/glsl/points.c
 share/examples/${PKGNAME}/glsl/readtex.c
 share/examples/${PKGNAME}/glsl/readtex.h
-share/examples/${PKGNAME}/glsl/reflect.vert.txt
-share/examples/${PKGNAME}/glsl/shadowtex.frag.txt
-share/examples/${PKGNAME}/glsl/simple.vert.txt
+share/examples/${PKGNAME}/glsl/reflect.vert
+share/examples/${PKGNAME}/glsl/samplers
+share/examples/${PKGNAME}/glsl/samplers.c
+share/examples/${PKGNAME}/glsl/shaderutil.c
+share/examples/${PKGNAME}/glsl/shaderutil.h
+share/examples/${PKGNAME}/glsl/shadowtex.frag
+share/examples/${PKGNAME}/glsl/simple.vert
+share/examples/${PKGNAME}/glsl/skinning
+share/examples/${PKGNAME}/glsl/skinning.c
+share/examples/${PKGNAME}/glsl/skinning.frag
+share/examples/${PKGNAME}/glsl/skinning.vert
 share/examples/${PKGNAME}/glsl/texdemo1
 share/examples/${PKGNAME}/glsl/texdemo1.c
 share/examples/${PKGNAME}/glsl/toyball
 share/examples/${PKGNAME}/glsl/toyball.c
+share/examples/${PKGNAME}/glsl/trirast
+share/examples/${PKGNAME}/glsl/trirast.c
+share/examples/${PKGNAME}/glsl/twoside
+share/examples/${PKGNAME}/glsl/twoside.c
+share/examples/${PKGNAME}/glsl/vert-or-frag-only
+share/examples/${PKGNAME}/glsl/vert-or-frag-only.c
+share/examples/${PKGNAME}/glsl/vert-tex
+share/examples/${PKGNAME}/glsl/vert-tex.c
 share/examples/${PKGNAME}/images/arch.rgb
 share/examples/${PKGNAME}/images/bw.rgb
 share/examples/${PKGNAME}/images/girl.rgb
@@ -166,7 +205,6 @@ share/examples/${PKGNAME}/osdemos/osdemo.c
 share/examples/${PKGNAME}/osdemos/osdemo16.c
 share/examples/${PKGNAME}/osdemos/osdemo32.c
 share/examples/${PKGNAME}/osdemos/ostest1.c
-share/examples/${PKGNAME}/osdemos/readtex.c
 share/examples/${PKGNAME}/redbook/README
 share/examples/${PKGNAME}/redbook/aaindex
 share/examples/${PKGNAME}/redbook/aaindex.c
@@ -371,6 +409,8 @@ share/examples/${PKGNAME}/util/matrix.c
 share/examples/${PKGNAME}/util/mwmborder.c
 share/examples/${PKGNAME}/util/readtex.c
 share/examples/${PKGNAME}/util/readtex.h
+share/examples/${PKGNAME}/util/shaderutil.c
+share/examples/${PKGNAME}/util/shaderutil.h
 share/examples/${PKGNAME}/util/showbuffer.c
 share/examples/${PKGNAME}/util/showbuffer.h
 share/examples/${PKGNAME}/util/trackball.c
@@ -393,7 +433,11 @@ share/examples/${PKGNAME}/windml/uglteapot.c
 share/examples/${PKGNAME}/windml/ugltexcube.c
 share/examples/${PKGNAME}/windml/ugltexcyl.c
 share/examples/${PKGNAME}/windml/wrs_logo.bmp
+share/examples/${PKGNAME}/xdemos/corender
+share/examples/${PKGNAME}/xdemos/corender.c
 share/examples/${PKGNAME}/xdemos/descrip.mms
+share/examples/${PKGNAME}/xdemos/glsync
+share/examples/${PKGNAME}/xdemos/glsync.c
 share/examples/${PKGNAME}/xdemos/glthreads
 share/examples/${PKGNAME}/xdemos/glthreads.c
 share/examples/${PKGNAME}/xdemos/glxcontexts
@@ -404,6 +448,8 @@ share/examples/${PKGNAME}/xdemos/glxgears
 share/examples/${PKGNAME}/xdemos/glxgears.c
 share/examples/${PKGNAME}/xdemos/glxgears_fbconfig
 share/examples/${PKGNAME}/xdemos/glxgears_fbconfig.c
+share/examples/${PKGNAME}/xdemos/glxgears_pixmap
+share/examples/${PKGNAME}/xdemos/glxgears_pixmap.c
 share/examples/${PKGNAME}/xdemos/glxheads
 share/examples/${PKGNAME}/xdemos/glxheads.c
 share/examples/${PKGNAME}/xdemos/glxinfo
@@ -412,8 +458,12 @@ share/examples/${PKGNAME}/xdemos/glxpbdemo
 share/examples/${PKGNAME}/xdemos/glxpbdemo.c
 share/examples/${PKGNAME}/xdemos/glxpixmap
 share/examples/${PKGNAME}/xdemos/glxpixmap.c
+share/examples/${PKGNAME}/xdemos/glxsnoop
+share/examples/${PKGNAME}/xdemos/glxsnoop.c
 share/examples/${PKGNAME}/xdemos/glxswapcontrol
 share/examples/${PKGNAME}/xdemos/glxswapcontrol.c
+share/examples/${PKGNAME}/xdemos/ipc.c
+share/examples/${PKGNAME}/xdemos/ipc.h
 share/examples/${PKGNAME}/xdemos/manywin
 share/examples/${PKGNAME}/xdemos/manywin.c
 share/examples/${PKGNAME}/xdemos/offset
@@ -428,6 +478,10 @@ share/examples/${PKGNAME}/xdemos/pbinfo.c
 share/examples/${PKGNAME}/xdemos/pbutil.c
 share/examples/${PKGNAME}/xdemos/pbutil.h
 share/examples/${PKGNAME}/xdemos/shape.c
+share/examples/${PKGNAME}/xdemos/sharedtex
+share/examples/${PKGNAME}/xdemos/sharedtex.c
+share/examples/${PKGNAME}/xdemos/texture_from_pixmap
+share/examples/${PKGNAME}/xdemos/texture_from_pixmap.c
 share/examples/${PKGNAME}/xdemos/vgears.c
 share/examples/${PKGNAME}/xdemos/vindex.c
 share/examples/${PKGNAME}/xdemos/vtest.c
Index: graphics/MesaLib/Makefile
===================================================================
RCS file: /NetBSD/pkgsrc/graphics/MesaLib/Makefile,v
retrieving revision 1.75
diff -u -p graphics/MesaLib/Makefile
--- graphics/MesaLib/Makefile	26 Oct 2008 21:03:40 -0000	1.75
+++ graphics/MesaLib/Makefile	20 May 2009 09:17:53 -0000
@@ -2,7 +2,6 @@
 
 PKGNAME=	MesaLib-${MESA_PKGVERSION}
 COMMENT=	Graphics library similar to SGI's OpenGL
-PKGREVISION=	4
 
 MESA_HEADERS=	gl.h gl_mangle.h glext.h glx.h glxext.h	\
 		glx_mangle.h osmesa.h xmesa.h xmesa_x.h	\
Index: graphics/MesaLib/PLIST
===================================================================
RCS file: /NetBSD/pkgsrc/graphics/MesaLib/PLIST,v
retrieving revision 1.19
diff -u -p graphics/MesaLib/PLIST
--- graphics/MesaLib/PLIST	6 Sep 2008 13:00:31 -0000	1.19
+++ graphics/MesaLib/PLIST	20 May 2009 09:17:53 -0000
@@ -12,9 +12,6 @@ include/GL/glxext.h
 include/GL/internal/dri_interface.h
 include/GL/internal/sarea.h
 include/GL/osmesa.h
-include/GL/xmesa.h
-include/GL/xmesa_x.h
-include/GL/xmesa_xf86.h
 lib/libGL.la
 lib/libGLw.la
 ${PLIST.nodri}lib/libOSMesa.la
@@ -29,6 +26,7 @@ ${PLIST.dri}lib/dri/r300_dri.la
 ${PLIST.dri}lib/dri/radeon_dri.la
 ${PLIST.dri}lib/dri/savage_dri.la
 ${PLIST.dri}lib/dri/sis_dri.la
+${PLIST.dri}lib/dri/swrast_dri.la
 ${PLIST.dri}lib/dri/tdfx_dri.la
 ${PLIST.dri}lib/dri/unichrome_dri.la
 lib/pkgconfig/gl.pc
Index: graphics/MesaLib/distinfo
===================================================================
RCS file: /NetBSD/pkgsrc/graphics/MesaLib/distinfo,v
retrieving revision 1.61
diff -u -p graphics/MesaLib/distinfo
--- graphics/MesaLib/distinfo	26 Oct 2008 21:03:40 -0000	1.61
+++ graphics/MesaLib/distinfo	20 May 2009 09:17:53 -0000
@@ -1,37 +1,32 @@
 $NetBSD: distinfo,v 1.61 2008/10/26 21:03:40 bjs Exp $
 
-SHA1 (Mesa-7.0.4.1/Mesa-7.0.4-001) = a49b9094272abb2484447fb35c9adf3fe391a4bb
-RMD160 (Mesa-7.0.4.1/Mesa-7.0.4-001) = 1992bb054742924f1f39a19ab35e621f53e6fbf2
-Size (Mesa-7.0.4.1/Mesa-7.0.4-001) = 38003 bytes
-SHA1 (Mesa-7.0.4.1/Mesa-7.0.4-002) = 1f7fe7b19a9ec6cc036021df8c9016fc1f1cb234
-RMD160 (Mesa-7.0.4.1/Mesa-7.0.4-002) = 5e11808b59ea3e8c4459c671c9236b18a95d8fba
-Size (Mesa-7.0.4.1/Mesa-7.0.4-002) = 4379 bytes
-SHA1 (Mesa-7.0.4.1/MesaDemos-7.0.4.tar.bz2) = 1adb2010d6d3103bd57c08f228e2bbed38178e14
-RMD160 (Mesa-7.0.4.1/MesaDemos-7.0.4.tar.bz2) = 3e5b414bf1a40603367fcd0ba321b6e2caf84626
-Size (Mesa-7.0.4.1/MesaDemos-7.0.4.tar.bz2) = 1341624 bytes
-SHA1 (Mesa-7.0.4.1/MesaGLUT-7.0.4.tar.bz2) = 488a9e39f5ec4ad6b7fa84dd9bc91844337462d5
-RMD160 (Mesa-7.0.4.1/MesaGLUT-7.0.4.tar.bz2) = 480dd15cb35874e9165d08af5a0ff0cbded9f3cf
-Size (Mesa-7.0.4.1/MesaGLUT-7.0.4.tar.bz2) = 329563 bytes
-SHA1 (Mesa-7.0.4.1/MesaLib-7.0.4.tar.bz2) = 7e2ecbe89d245510d2681d04e959aee6adc205c5
-RMD160 (Mesa-7.0.4.1/MesaLib-7.0.4.tar.bz2) = 0394bb9e00ea13f2399bc5895d4264221bbc03ac
-Size (Mesa-7.0.4.1/MesaLib-7.0.4.tar.bz2) = 3414357 bytes
-SHA1 (patch-aa) = 230d96c82fdfdbb40aa304572c4696dd241f24c7
-SHA1 (patch-ab) = 06e2b4159bbda8c87cd264babe129b6bea017cbc
+SHA1 (Mesa-7.4.2/MesaDemos-7.4.2.tar.bz2) = cbba586829c76a5e7a54a906567b4b2174d6e1aa
+RMD160 (Mesa-7.4.2/MesaDemos-7.4.2.tar.bz2) = c6434d325897540618130e97891f391721b543b5
+Size (Mesa-7.4.2/MesaDemos-7.4.2.tar.bz2) = 1367293 bytes
+SHA1 (Mesa-7.4.2/MesaGLUT-7.4.2.tar.bz2) = 85f357345d71dfe60b785f0cbb03d1e070841c2d
+RMD160 (Mesa-7.4.2/MesaGLUT-7.4.2.tar.bz2) = caa69b7f2aa7136377cda2f690699415396c64ab
+Size (Mesa-7.4.2/MesaGLUT-7.4.2.tar.bz2) = 328646 bytes
+SHA1 (Mesa-7.4.2/MesaLib-7.4.2.tar.bz2) = fe70945ccf2c08d18ae4e83000018f0400352065
+RMD160 (Mesa-7.4.2/MesaLib-7.4.2.tar.bz2) = e70b8fd203325e676d90485632bf266e39d46a7e
+Size (Mesa-7.4.2/MesaLib-7.4.2.tar.bz2) = 3371577 bytes
+SHA1 (patch-aa) = 9afc2758ebbef3737f8c858f74f0c93d86bb0861
+SHA1 (patch-ab) = 27b44d856602d590d2596f41cd17cdaf18bdc96e
 SHA1 (patch-ac) = ed3ec49ea2aacf231bbcb38093f3dc01a0cb2468
-SHA1 (patch-ad) = 5667b1bfab7cfeb1b9ea8750798f027fd0ccfd44
-SHA1 (patch-ae) = e1c37a279cf3fc78d7eb43e392abbb40d3419a5f
-SHA1 (patch-af) = bdfb8218b79f82a5c37cae27d0db33f5fdbcf94f
-SHA1 (patch-ag) = 9010c8c90a43a37bbc5766957e25536ac67e55b5
-SHA1 (patch-ah) = 3e60a700697f200fb2819f9270a37ad4a5cfa695
-SHA1 (patch-ai) = 171a27e6e4a5ed92c6c2355283179e2091031a79
+SHA1 (patch-ad) = 47da546b7cebd9d05a9122b606e71c0d83e98a05
+SHA1 (patch-ae) = 07cf84391b4e828b558129eb90daaeb48e43e1ab
+SHA1 (patch-af) = 670259e92d1cd3b2695113cfd5fb3ad4a46bdc04
+SHA1 (patch-ag) = da4de00aaebf226489ca3f5c25470fe3ed41e3b7
+SHA1 (patch-ai) = 620c80ffbca1249469138f0af28eec575c546b87
 SHA1 (patch-aj) = 3749b279b500b1a93e45985ae956e8a70d854d9c
 SHA1 (patch-am) = 744f13b6a2fc79746bcacecf11461e78de7bf1ef
 SHA1 (patch-aq) = 0e6099b0d23f5931b5d6ee80debc2231f9a58de5
-SHA1 (patch-at) = 4b3d95a116734ad8951816e042b497f638c4cf6b
+SHA1 (patch-at) = a6ec9a663b8d1634ae20216fc3e6a0b52220e905
 SHA1 (patch-au) = 6ce0d6236e5fb9f53db3bcb388b328ab0e132907
 SHA1 (patch-av) = 5b03aeed0c4a9405be77f08cb0b1e56e544f7ef7
 SHA1 (patch-aw) = d2c81d420aafad8ba5a2dcbe59fb331016535e32
-SHA1 (patch-ax) = 63edfecd17dfaf2a76f69ba3cedb1610738bf9cc
+SHA1 (patch-ax) = 9a1c488526ba1a7a0cdd0f34c85861edcd5976e3
 SHA1 (patch-ay) = 8a5eb2d874026032f9b9c15e06abb40863a21a8a
-SHA1 (patch-az) = 168f054532760792dd7203d5474c593bead0686e
-SHA1 (patch-cb) = 0eac61e6656c8a8d6452504dd06ed6969ddbeba2
+SHA1 (patch-ba) = 44e258235ac949713c4fcead25cb7ab7498cbb7f
+SHA1 (patch-bb) = 4fd8a770bd0275c3467447f77f51e957996c93ac
+SHA1 (patch-bc) = 6b8df3762d666c2e7720183b6d292053bda86f5a
+SHA1 (patch-cb) = 83789d71de41aed2ba81a8239fb035a4cd295477
Index: graphics/MesaLib/dri.mk
===================================================================
RCS file: /NetBSD/pkgsrc/graphics/MesaLib/dri.mk,v
retrieving revision 1.1
diff -u -p graphics/MesaLib/dri.mk
--- graphics/MesaLib/dri.mk	24 Apr 2008 07:40:24 -0000	1.1
+++ graphics/MesaLib/dri.mk	20 May 2009 09:17:53 -0000
@@ -6,6 +6,7 @@
 DRI_MK=		# defined
 
 .  include "../../textproc/expat/buildlink3.mk"
+.  include "../../x11/dri2proto/buildlink3.mk"
 .  include "../../x11/glproto/buildlink3.mk"
 .  include "../../x11/libXdamage/buildlink3.mk"
 .  include "../../x11/libXfixes/buildlink3.mk"
Index: graphics/MesaLib/files/configs/default
===================================================================
RCS file: /NetBSD/pkgsrc/graphics/MesaLib/files/configs/default,v
retrieving revision 1.2
diff -u -p graphics/MesaLib/files/configs/default
--- graphics/MesaLib/files/configs/default	27 Jul 2008 00:03:42 -0000	1.2
+++ graphics/MesaLib/files/configs/default	20 May 2009 09:17:53 -0000
@@ -4,8 +4,8 @@ CONFIG_NAME = default
 
 # Version info
 MESA_MAJOR=	7
-MESA_MINOR=	0
-MESA_TINY=	3
+MESA_MINOR=	4
+MESA_TINY=	2
 
 GLU_CFLAGS=	# defined
 
Index: graphics/MesaLib/files/configs/pkgsrc-dri
===================================================================
RCS file: /NetBSD/pkgsrc/graphics/MesaLib/files/configs/pkgsrc-dri,v
retrieving revision 1.3
diff -u -p graphics/MesaLib/files/configs/pkgsrc-dri
--- graphics/MesaLib/files/configs/pkgsrc-dri	30 Jul 2008 00:27:55 -0000	1.3
+++ graphics/MesaLib/files/configs/pkgsrc-dri	20 May 2009 09:17:53 -0000
@@ -37,4 +37,4 @@ PROGRAM_DIRS=	# defined
 WINDOW_SYSTEM=	dri
 
 DRI_DIRS?=	i810 i915 i965 mach64 mga r128 r200  \
-		r300 radeon tdfx unichrome savage sis
+		r300 radeon tdfx unichrome savage sis swrast
Index: graphics/MesaLib/files/configs/pkgsrc-indirect
===================================================================
RCS file: /NetBSD/pkgsrc/graphics/MesaLib/files/configs/pkgsrc-indirect,v
retrieving revision 1.1
diff -u -p graphics/MesaLib/files/configs/pkgsrc-indirect
--- graphics/MesaLib/files/configs/pkgsrc-indirect	24 Apr 2008 07:40:24 -0000	1.1
+++ graphics/MesaLib/files/configs/pkgsrc-indirect	20 May 2009 09:17:53 -0000
@@ -36,4 +36,4 @@ PROGRAM_DIRS=	# defined
 WINDOW_SYSTEM=	dri
 
 DRI_DIRS?=	i810 i915 i915tex i965 mach64 mga r128 r200  \
-		r300 radeon tdfx unichrome savage sis
+		r300 radeon tdfx unichrome savage sis swrast
Index: graphics/MesaLib/patches/patch-aa
===================================================================
RCS file: /NetBSD/pkgsrc/graphics/MesaLib/patches/patch-aa,v
retrieving revision 1.10
diff -u -p graphics/MesaLib/patches/patch-aa
--- graphics/MesaLib/patches/patch-aa	17 Aug 2008 09:41:35 -0000	1.10
+++ graphics/MesaLib/patches/patch-aa	20 May 2009 09:17:53 -0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-aa,v 1.10 2008/08/17 09:41:35 bjs Exp $
+$NetBSD$
 
---- src/mesa/drivers/dri/mach64/mach64_context.h.orig	2008-07-18 10:39:12.000000000 -0400
-+++ src/mesa/drivers/dri/mach64/mach64_context.h
-@@ -296,7 +296,14 @@ extern GLboolean mach64UnbindContext( __
+--- src/mesa/drivers/dri/mach64/mach64_context.h.orig	2009-01-22 19:38:33 +0200
++++ src/mesa/drivers/dri/mach64/mach64_context.h	2009-05-19 12:13:08 +0300
+@@ -294,12 +294,19 @@ extern GLboolean mach64UnbindContext( __
  #define LE32_OUT( x, y )	do { *(GLuint *)(x) = (y); } while (0)
  #define LE32_OUT_FLOAT( x, y )	do { *(GLfloat *)(x) = (y); } while (0)
  #else
@@ -12,8 +12,13 @@ $NetBSD: patch-aa,v 1.10 2008/08/17 09:41:35 bjs Exp $
 +#include <machine/byteswap.h>
 +#define bswap_32 bswap32
 +#else
+ #ifndef __OpenBSD__
  #include <byteswap.h>
+ #else
+ #include <machine/endian.h>
+ #define bswap_32 bswap32
+ #endif
 +#endif
+ 
  #define LE32_IN( x )		bswap_32( *(GLuint *)(x) )
  #define LE32_IN_FLOAT( x )						\
- ({									\
Index: graphics/MesaLib/patches/patch-ab
===================================================================
RCS file: /NetBSD/pkgsrc/graphics/MesaLib/patches/patch-ab,v
retrieving revision 1.16
diff -u -p graphics/MesaLib/patches/patch-ab
--- graphics/MesaLib/patches/patch-ab	27 Jul 2008 00:03:42 -0000	1.16
+++ graphics/MesaLib/patches/patch-ab	20 May 2009 09:17:53 -0000
@@ -1,7 +1,7 @@
-$NetBSD: patch-ab,v 1.16 2008/07/27 00:03:42 bjs Exp $
+$NetBSD$
 
---- src/glu/sgi/Makefile.orig	2008-07-18 10:39:12.000000000 -0400
-+++ src/glu/sgi/Makefile
+--- src/glu/sgi/Makefile.orig	2008-08-25 17:46:42 +0300
++++ src/glu/sgi/Makefile	2009-05-17 16:59:39 +0300
 @@ -8,7 +8,8 @@ include $(TOP)/configs/current
  
  GLU_MAJOR = 1
@@ -27,21 +27,21 @@ $NetBSD: patch-ab,v 1.16 2008/07/27 00:03:42 bjs Exp $
  
  
  ##### TARGETS #####
-@@ -136,11 +139,12 @@ $(TOP)/$(LIB_DIR):
+@@ -136,12 +139,11 @@ $(TOP)/$(LIB_DIR):
  
  # Make the library:
  $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
--	$(TOP)/bin/mklib -o $(GLU_LIB) -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
+-	$(MKLIB) -o $(GLU_LIB) -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
 -		-major $(GLU_MAJOR) -minor $(GLU_MINOR) -patch $(GLU_TINY) \
 -		-cplusplus $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
--		-exports glu.exports \
+-		-exports glu.exports -id $(INSTALL_LIB_DIR)/lib$(GLU_LIB).$(GLU_MAJOR).dylib \
 -		$(GLU_LIB_DEPS) $(OBJECTS)
+-
 +	$(LIBTOOL) --mode=link $(CXX) \
 +		-o $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME:.so=.la) $(LDFLAGS) \
 +		-rpath $(PREFIX)/lib $(GLU_LIB_DEPS) $(OBJECTS:.o=.lo) \
 +		-version-info $(GLU_MAJOR):$(GLU_MINOR):$(GLU_TINY) \
-+		-export-symbols glu.sym
-+
++		-export-symbols glu.exports
  
- 
  clean:
+ 	-rm -f *.o */*.o */*/*.o
Index: graphics/MesaLib/patches/patch-ad
===================================================================
RCS file: /NetBSD/pkgsrc/graphics/MesaLib/patches/patch-ad,v
retrieving revision 1.13
diff -u -p graphics/MesaLib/patches/patch-ad
--- graphics/MesaLib/patches/patch-ad	1 May 2008 15:37:13 -0000	1.13
+++ graphics/MesaLib/patches/patch-ad	20 May 2009 09:17:53 -0000
@@ -1,15 +1,8 @@
-$NetBSD: patch-ad,v 1.13 2008/05/01 15:37:13 bjs Exp $
+$NetBSD$
 
---- src/mesa/Makefile.orig	2007-12-03 20:00:21.000000000 +0100
-+++ src/mesa/Makefile
-@@ -8,19 +8,22 @@ include sources
- 
- GL_MAJOR = 1
- GL_MINOR = 5
--GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
-+GL_TINY = 0
- 
- 
+--- src/mesa/Makefile.orig	2009-03-13 05:28:49 +0200
++++ src/mesa/Makefile	2009-05-17 16:29:41 +0300
+@@ -9,19 +9,22 @@ include sources
  .SUFFIXES : .cpp
  
  .c.o:
@@ -28,149 +21,86 @@ $NetBSD: patch-ad,v 1.13 2008/05/01 15:37:13 bjs Exp $
 +	$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(COPTS) $< -o $(@:.o=.lo)
  
  
- # Figure out what to make here
-@@ -51,13 +54,14 @@ beos: depend subdirs libmesa.a
- # Linux DRI drivers
  
- # Make archive of core object files
--libmesa.a: $(SOLO_OBJECTS)
--	@ $(TOP)/bin/mklib -o mesa -static $(SOLO_OBJECTS);
-+libmesa.la: $(SOLO_OBJECTS)
-+	@ $(LIBTOOL) --mode=link $(CC) \
-+		-o $@ $(SOLO_OBJECTS:.o=.lo) -static -avoid-version
- 	@if [ "${CONFIG_NAME}" = "beos" ] ; then \
- 		mimeset -f "$@" ; \
- 	fi
+ # Default: build dependencies, then asm_subdirs, then convenience
+ # libs (.a) and finally the device drivers:
+-default: depend asm_subdirs libmesa.a libglapi.a driver_subdirs
++default: depend asm_subdirs libmesa.la libglapi.la driver_subdirs
  
--linux-solo: depend subdirs libmesa.a
-+linux-solo: depend subdirs libmesa.la
- 	cd drivers/dri ; $(MAKE)
  
  
-@@ -65,10 +69,11 @@ linux-solo: depend subdirs libmesa.a
- # Stand-alone Mesa libGL, no built-in drivers (DirectFB)
+@@ -29,17 +32,19 @@ default: depend asm_subdirs libmesa.a li
+ # Helper libraries used by many drivers:
  
- libgl-core: $(CORE_OBJECTS)
--	@ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
--		-major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
--		-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) $(CORE_OBJECTS) \
--		$(GL_LIB_DEPS)
-+	@ $(LIBTOOL) --mode=link $(CC) \
-+		-o $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME:.so=.la) \
-+		$(LDFLAGS) -rpath $(PREFIX)/lib \
-+	 	-version-info $(MESA_MAJOR):$(MESA_MINOR):$(MESA_TINY) \
-+		$(CORE_OBJECTS:.o=.lo) $(GL_LIB_DEPS)
+ # Make archive of core mesa object files
+-libmesa.a: $(MESA_OBJECTS)
+-	@ $(MKLIB) -o mesa -static $(MESA_OBJECTS)
++libmesa.la: $(MESA_OBJECTS)
++	$(LIBTOOL) --mode=link $(CC) -o $@ $(MESA_OBJECTS:.o=.lo) \
++	-static -avoid-version
  
- directfb: depend subdirs libgl-core
- 	cd drivers/directfb ; $(MAKE)
-@@ -78,12 +83,12 @@ directfb: depend subdirs libgl-core
- # fbdev Mesa driver (libGL.so)
+ # Make archive of gl* API dispatcher functions only
+-libglapi.a: $(GLAPI_OBJECTS)
+-	@ $(MKLIB) -o glapi -static $(GLAPI_OBJECTS)
++libglapi.la: $(GLAPI_OBJECTS)
++	$(LIBTOOL) --mode=link $(CC) -o $@ $(GLAPI_OBJECTS:.o=.lo) \
++	-static -avoid-version
  
- fbdev: $(CORE_OBJECTS) $(FBDEV_DRIVER_OBJECTS) $(COMMON_DRIVER_OBJECTS)
--	@ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
--		-major $(MESA_MAJOR) -minor $(MESA_MINOR) -patch $(MESA_TINY) \
--		-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
--		$(CORE_OBJECTS) $(FBDEV_DRIVER_OBJECTS) \
--		$(COMMON_DRIVER_OBJECTS) $(GL_LIB_DEPS)
--
-+	@ $(LIBTOOL) --mode=link $(CC) \
-+		-o $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME:.so=.la) $(LDFLAGS) \
-+		-rpath $(PREFIX)/lib $(CORE_OBJECTS:.o=.lo) \
-+		-version-info $(MESA_MAJOR):$(MESA_MINOR):$(MESA_TINY) \
-+		$(FBDEV_DRIVER_OBJECTS:.o=.lo) \
-+		$(COMMON_DRIVER_OBJECTS:.o=.lo) $(GL_LIB_DEPS)
  
  ######################################################################
- # Stand-alone Mesa libGL and libOSMesa
-@@ -111,29 +116,29 @@ osmesa-only: depend subdirs $(TOP)/$(LIB
+ # Device drivers
+-driver_subdirs: libmesa.a libglapi.a
++driver_subdirs: libmesa.la libglapi.la
+ 	(cd drivers && $(MAKE))
  
- # Make the GL library
- $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS)
--	@ $(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
--		-major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \
--		-install $(TOP)/$(LIB_DIR) \
--		$(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(STAND_ALONE_OBJECTS)
-+	@ $(LIBTOOL) --mode=link $(CC) \
-+		-o $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME:.so=.la) \
-+		-version-info $(GL_MAJOR):$(GL_MINOR):$(GL_TINY) \
-+		-rpath $(PREFIX)/lib $(LDFLAGS) $(GL_LIB_DEPS) \
-+		$(STAND_ALONE_OBJECTS:.o=.lo)
-+
  
- # Make the OSMesa library
- # Note: version is kept at 6.5.3 to simplify app/linking issues
- $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECTS)
- 	@ if [ "${DRIVER_DIRS}" = "osmesa" ] ; then \
--		$(TOP)/bin/mklib -o $(OSMESA_LIB) -linker '$(CC)' \
--			-ldflags '$(LDFLAGS)' \
--			-major 6 -minor 5 -patch 3 \
--			-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
--			$(OSMESA_LIB_DEPS) $(OSMESA16_OBJECTS) ; \
-+		$(LIBTOOL) --mode=link $(CC) \
-+			-o $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME:.so=.la) \
-+			$(LDFLAGS) -version-info 6:5:3 -rpath $(PREFIX)/lib \
-+			$(OSMESA_LIB_DEPS) $(OSMESA16_OBJECTS:.o=.lo) ; \
- 	else \
--		$(TOP)/bin/mklib -o $(OSMESA_LIB) -linker '$(CC)' \
--			-ldflags '$(LDFLAGS)' \
--			-major 6 -minor 5 -patch 3 \
--			-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
--			$(OSMESA_LIB_DEPS) $(OSMESA_DRIVER_OBJECTS) ; \
-+		$(LIBTOOL) --mode=link $(CC) \
-+			-o $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME:.so=.la) \
-+			$(LDFLAGS) -version-info 6:5:3 \
-+			-rpath $(PREFIX)/lib $(OSMESA_LIB_DEPS) \
-+			$(OSMESA_DRIVER_OBJECTS:.o=.lo) ; \
- 	fi
+@@ -113,23 +118,27 @@ osmesa.pc: osmesa.pc.in
+ 	$(osmesa_pcedit) $< > $@
  
--
- ######################################################################
- # libGL pkg-config file
- pcedit = sed \
-@@ -164,20 +170,26 @@ subdirs:
- 
- 
- install: default gl.pc
--	$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL
--	$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
--	$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
--	$(INSTALL) -m 644 $(TOP)/include/GL/*.h $(DESTDIR)$(INSTALL_DIR)/include/GL
--	@if [ -e $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) ]; then \
--		$(INSTALL) $(TOP)/$(LIB_DIR)/libGL* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR); \
--	fi
--	$(INSTALL) -m 644 gl.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
--	@if [ -e $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME) ]; then \
--		$(INSTALL) $(TOP)/$(LIB_DIR)/libOSMesa* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR); \
+ install-headers:
+-	$(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL
+-	$(INSTALL) -m 644 $(TOP)/include/GL/*.h \
+-		$(DESTDIR)$(INSTALL_INC_DIR)/GL
 +	$(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INSTALL_DIR)/include/GL
-+	$(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
-+	$(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
-+#	@for fn in $(TOP)/include/GL/*.h; do \
-+#		$(BSD_INSTALL_DATA) $$fn $(DESTDIR)$(INSTALL_DIR)/include/GL; \
-+#	done
+ 
+ install-libgl: default gl.pc install-headers
+-	$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
+-	$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
+-	$(INSTALL) $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB) \
+-		$(DESTDIR)$(INSTALL_LIB_DIR)
+-	$(INSTALL) -m 644 gl.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
++	$(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_DIR)/lib
++	$(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_DIR)/lib/pkgconfig
 +	@if [ -f "$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME:.so=.la)" ]; then \
 +		$(LIBTOOL) --mode=install $(BSD_INSTALL_LIB) \
 +			$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME:.so=.la) \
-+			$(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR); \
++			$(DESTDIR)$(INSTALL_DIR)/lib; \
 +	fi
-+	$(BSD_INSTALL_DATA) gl.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
++	$(BSD_INSTALL_DATA) gl.pc $(DESTDIR)$(INSTALL_DIR)/lib/pkgconfig
+ 
+ install-osmesa: default osmesa.pc
+-	$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
+-	$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
+-	$(INSTALL) $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_GLOB) \
+-		$(DESTDIR)$(INSTALL_LIB_DIR)
+-	$(INSTALL) -m 644 osmesa.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
++	$(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_DIR)/lib
++	$(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_DIR)/lib/pkgconfig
 +	@if [ -f "$(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME:.so=.la)" ]; then \
 +		$(LIBTOOL) --mode=install $(BSD_INSTALL_LIB) \
 +			$(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME:.so=.la) \
-+			$(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR); \
- 	fi
- 	@if [ "${DRIVER_DIRS}" = "dri" ] ; then \
- 		cd drivers/dri ; $(MAKE) install ; \
--	fi
-+	 fi
++			$(DESTDIR)$(INSTALL_DIR)/lib; \
++	fi
++	$(BSD_INSTALL_DATA) osmesa.pc $(DESTDIR)$(INSTALL_DIR)/lib/pkgconfig
  
- ## NOT INSTALLED YET:
- ## $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GLES
-@@ -191,7 +203,7 @@ tags:
+ install-dri: default
+ 	cd drivers/dri && $(MAKE) install
+@@ -144,7 +153,7 @@ tags:
  clean:
  	-rm -f */*.o
  	-rm -f */*/*.o
--	-rm -f depend depend.bak libmesa.a
-+	-rm -f depend depend.bak libmesa*
+-	-rm -f depend depend.bak libmesa.a libglapi.a
++	-rm -f depend depend.bak libmesa* libglapi*
  	-rm -f drivers/*/*.o
- 	(cd drivers/dri ; $(MAKE) clean)
- 	(cd x86 ; $(MAKE) clean)
+ 	-rm -f *.pc
+ 	-@cd drivers/dri && $(MAKE) clean
Index: graphics/MesaLib/patches/patch-ae
===================================================================
RCS file: /NetBSD/pkgsrc/graphics/MesaLib/patches/patch-ae,v
retrieving revision 1.10
diff -u -p graphics/MesaLib/patches/patch-ae
--- graphics/MesaLib/patches/patch-ae	24 Apr 2008 07:40:24 -0000	1.10
+++ graphics/MesaLib/patches/patch-ae	20 May 2009 09:17:53 -0000
@@ -1,7 +1,7 @@
-$NetBSD: patch-ae,v 1.10 2008/04/24 07:40:24 bjs Exp $
+$NetBSD$
 
---- src/glw/Makefile.orig	2007-09-28 20:43:28.000000000 -0400
-+++ src/glw/Makefile
+--- src/glw/Makefile.orig	2009-03-13 05:28:49 +0200
++++ src/glw/Makefile	2009-05-17 11:36:19 +0300
 @@ -17,7 +17,8 @@ OBJECTS = $(GLW_SOURCES:.c=.o)
  ##### RULES #####
  
@@ -12,43 +12,44 @@ $NetBSD: patch-ae,v 1.10 2008/04/24 07:40:24 bjs Exp $
  
  
  
-@@ -34,12 +35,16 @@ glw.pc: glw.pc.in
+@@ -38,12 +39,16 @@ glw.pc: glw.pc.in
  	$(pcedit) $< > $@
  
  install: glw.pc
--	$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL
--	$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
--	$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
--	$(INSTALL) -m 644 *.h $(DESTDIR)$(INSTALL_DIR)/include/GL
--	$(INSTALL) $(TOP)/$(LIB_DIR)/libGLw.* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
--	$(INSTALL) -m 644 glw.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
+-	$(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL
+-	$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
+-	$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
+-	$(INSTALL) -m 644 *.h $(DESTDIR)$(INSTALL_INC_DIR)/GL
+-	$(INSTALL) $(TOP)/$(LIB_DIR)/$(GLW_LIB_GLOB) $(DESTDIR)$(INSTALL_LIB_DIR)
+-	$(INSTALL) -m 644 glw.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
 +	$(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INSTALL_DIR)/include/GL
-+	$(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
-+	$(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
++	$(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_DIR)/lib
++	$(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INSTALL_DIR)/lib/pkgconfig
 +	@for fn in *.h; do \
 +		$(BSD_INSTALL_DATA) $$fn $(DESTDIR)$(INSTALL_DIR)/include/GL; \
 +	done
 +	$(LIBTOOL) --mode=install \
 +		$(BSD_INSTALL_LIB) $(TOP)/$(LIB_DIR)/libGLw.la \
-+			$(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
-+	$(BSD_INSTALL_DATA) glw.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
++			$(DESTDIR)$(INSTALL_DIR)/lib
++	$(BSD_INSTALL_DATA) glw.pc $(DESTDIR)$(INSTALL_DIR)/lib/pkgconfig
  
  clean:
- 	-rm depend depend.bak
-@@ -48,10 +53,12 @@ clean:
+ 	-rm -f depend depend.bak
+@@ -52,12 +57,11 @@ clean:
  
  # Make the library
  $(TOP)/$(LIB_DIR)/$(GLW_LIB_NAME): $(OBJECTS)
--	$(TOP)/bin/mklib -o $(GLW_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+-	$(MKLIB) -o $(GLW_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
 -		-major $(MAJOR) -minor $(MINOR) -patch $(TINY) \
 -		$(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
+-		-id $(INSTALL_LIB_DIR)/lib$(GLW_LIB).$(MAJOR).dylib \
 -		$(GLW_LIB_DEPS) $(OBJECTS)
+-
 +	$(LIBTOOL) --mode=link $(CC) \
 +		-o $(TOP)/$(LIB_DIR)/$(GLW_LIB_NAME:.so=.la) \
 +		-rpath $(PREFIX)/lib $(LDFLAGS) \
 +		-version-info $(MAJOR):$(MINOR):$(TINY) \
 +		$(GLW_LIB_DEPS) $(OBJECTS:.o=.lo)
-+
  
- 
  #
+ # Run 'make depend' to update the dependencies if you change what's included
Index: graphics/MesaLib/patches/patch-af
===================================================================
RCS file: /NetBSD/pkgsrc/graphics/MesaLib/patches/patch-af,v
retrieving revision 1.11
diff -u -p graphics/MesaLib/patches/patch-af
--- graphics/MesaLib/patches/patch-af	17 Aug 2008 09:41:35 -0000	1.11
+++ graphics/MesaLib/patches/patch-af	20 May 2009 09:17:53 -0000
@@ -1,20 +1,19 @@
-$NetBSD: patch-af,v 1.11 2008/08/17 09:41:35 bjs Exp $
+$NetBSD$
 
---- src/mesa/drivers/dri/sis/sis_context.h.orig	2008-07-18 10:39:12.000000000 -0400
-+++ src/mesa/drivers/dri/sis/sis_context.h
-@@ -403,8 +403,14 @@ struct sis_context
- 
- #if defined(__i386__) || defined(__amd64__)
+--- src/mesa/drivers/dri/sis/sis_context.h.orig	2009-05-19 11:47:27 +0300
++++ src/mesa/drivers/dri/sis/sis_context.h	2009-05-19 11:48:44 +0300
+@@ -404,7 +404,14 @@ struct sis_context
  #define MMIO_WMB()	__asm __volatile("" : : : "memory")
+ #elif defined(__ia64__)
+ #define MMIO_WMB()	__asm __volatile("mf" : : : "memory")
 +#elif defined(HAVE_NETBSD_ATOMIC_H)
 +#include <sys/atomic.h>
-+#define MMIO_WMB()	membar_sync()	/* XXX is this adequate? */
-+#elif defined(__sync_synchronize)	/* gcc built-in */
-+#define MMIO_WMB()	__sync_synchronize()
++#define MMIO_WMB()     membar_sync()   /* XXX is this adequate? */
++#elif defined(__sync_synchronize)      /* gcc built-in */
++#define MMIO_WMB()     __sync_synchronize()
  #else
--#error platform needs WMB
 +#warning Please define MMIO_WMB for this platform
-+#define MMIO_WMB()	 
++#define MMIO_WMB()
+ #error platform needs WMB
  #endif
  
- #define mEndPrimitive()  \
Index: graphics/MesaLib/patches/patch-ag
===================================================================
RCS file: /NetBSD/pkgsrc/graphics/MesaLib/patches/patch-ag,v
retrieving revision 1.11
diff -u -p graphics/MesaLib/patches/patch-ag
--- graphics/MesaLib/patches/patch-ag	24 Apr 2008 07:40:24 -0000	1.11
+++ graphics/MesaLib/patches/patch-ag	20 May 2009 09:17:53 -0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ag,v 1.11 2008/04/24 07:40:24 bjs Exp $
+$NetBSD$
 
---- src/glut/glx/Makefile.orig	2007-11-20 16:12:22.000000000 +0100
-+++ src/glut/glx/Makefile
-@@ -80,9 +80,8 @@ OBJECTS = $(SOURCES:.c=.o)
+--- src/glut/glx/Makefile.orig	2009-03-13 05:28:49 +0200
++++ src/glut/glx/Makefile	2009-05-17 20:34:53 +0300
+@@ -81,9 +81,8 @@ OBJECTS = $(SOURCES:.c=.o)
  ##### RULES #####
  
  .c.o:
@@ -14,42 +14,41 @@ $NetBSD: patch-ag,v 1.11 2008/04/24 07:40:24 bjs Exp $
  
  ##### TARGETS #####
  
-@@ -91,10 +90,11 @@ default: $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NA
+@@ -92,11 +91,11 @@ default: $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NA
  
  # Make the library
  $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
--	$(TOP)/bin/mklib -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+-	$(MKLIB) -o $(GLUT_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
 -		-major $(GLUT_MAJOR) -minor $(GLUT_MINOR) -patch $(GLUT_TINY) \
 -		$(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
+-		-id $(INSTALL_LIB_DIR)/lib$(GLUT_LIB).$(GLUT_MAJOR).dylib \
 -		$(GLUT_LIB_DEPS) $(OBJECTS)
 +	$(LIBTOOL) --mode=link $(CC) \
-+	  -o $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME:.so=.la) $(LDFLAGS) \
-+	  -rpath $(PREFIX)/lib $(GLUT_LIB_DEPS) \
-+	  -version-info $(GLUT_MAJOR):$(GLUT_MINOR):$(GLUT_TINY) \
++		-o $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME:.so=.la) $(LDFLAGS) \
++		-rpath $(PREFIX)/lib $(GLUT_LIB_DEPS) \
++		-version-info $(GLUT_MAJOR):$(GLUT_MINOR):$(GLUT_TINY) \
 +		$(GLUT_LIB_DEPS) $(OBJECTS:.o=.lo)
  
  
  # glut pkgconfig file
-@@ -106,13 +106,15 @@ glut.pc: glut.pc.in
+@@ -112,12 +111,14 @@ glut.pc: glut.pc.in
  	$(pcedit) $< > $@
  
  install: glut.pc
--	$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL
--	$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
--	$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
--	$(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(DESTDIR)$(INSTALL_DIR)/include/GL
--	$(INSTALL) $(TOP)/$(LIB_DIR)/libglut* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
--	$(INSTALL) -m 644 glut.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
--
+-	$(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL
+-	$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
+-	$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
+-	$(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(DESTDIR)$(INSTALL_INC_DIR)/GL
+-	$(INSTALL) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_GLOB) $(DESTDIR)$(INSTALL_LIB_DIR)
+-	$(INSTALL) -m 644 glut.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
 +	$(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INSTALL_DIR)/include/GL
-+	$(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
-+	$(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
++	$(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_DIR)/lib
++	$(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INSTALL_DIR)/lib/pkgconfig
 +	$(BSD_INSTALL_DATA) $(TOP)/include/GL/glut.h $(DESTDIR)$(INSTALL_DIR)/include/GL
 +	$(LIBTOOL) --mode=install \
-+	  $(BSD_INSTALL_LIB) $(TOP)/$(LIB_DIR)/libglut.la \
-+	  $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
-+	$(BSD_INSTALL_DATA) glut.pc \
-+	  $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
++		$(BSD_INSTALL_LIB) $(TOP)/$(LIB_DIR)/libglut.la \
++		$(DESTDIR)$(INSTALL_DIR)/lib
++	$(BSD_INSTALL_DATA) glut.pc $(DESTDIR)$(INSTALL_DIR)/lib/pkgconfig
  
+ 
  clean:
- 	-rm -f *.o *~
Index: graphics/MesaLib/patches/patch-ai
===================================================================
RCS file: /NetBSD/pkgsrc/graphics/MesaLib/patches/patch-ai,v
retrieving revision 1.2
diff -u -p graphics/MesaLib/patches/patch-ai
--- graphics/MesaLib/patches/patch-ai	24 Apr 2008 07:40:24 -0000	1.2
+++ graphics/MesaLib/patches/patch-ai	20 May 2009 09:17:53 -0000
@@ -1,7 +1,7 @@
-$NetBSD: patch-ai,v 1.2 2008/04/24 07:40:24 bjs Exp $
+$NetBSD$
 
---- src/mesa/drivers/dri/Makefile.template.orig	2007-12-18 19:05:46.000000000 -0500
-+++ src/mesa/drivers/dri/Makefile.template
+--- ./src/mesa/drivers/dri/Makefile.template.orig	2009-03-13 05:28:49 +0200
++++ ./src/mesa/drivers/dri/Makefile.template	2009-05-17 15:52:13 +0300
 @@ -1,6 +1,6 @@
  # -*-makefile-*-
  
@@ -9,8 +9,8 @@ $NetBSD: patch-ai,v 1.2 2008/04/24 07:40:24 bjs Exp $
 +MESA_MODULES = $(TOP)/src/mesa/libmesa.la
  
  COMMON_SOURCES = \
-         ../../common/driverfuncs.c \
-@@ -61,25 +61,22 @@ SHARED_INCLUDES = \
+         ../common/utils.c \
+@@ -48,25 +48,22 @@ SHARED_INCLUDES = \
  ##### RULES #####
  
  .c.o:
@@ -20,23 +20,23 @@ $NetBSD: patch-ai,v 1.2 2008/04/24 07:40:24 bjs Exp $
  
  .S.o:
 -	$(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES)  $< -o $@
--
 +	$(LIBTOOL) --mode=compile --tag=CC $(CC) -c -prefer-pic \
 +		$(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $(@:.o=.lo)
  
+ 
  ##### TARGETS #####
  
--default: depend symlinks $(LIBNAME) $(TOP)/$(LIB_DIR)/$(LIBNAME)
+-default: symlinks depend $(LIBNAME) $(TOP)/$(LIB_DIR)/$(LIBNAME)
 -
 -
 -$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
--	$(TOP)/bin/mklib -ldflags '$(LDFLAGS)' -noprefix -o $@ \
+-	$(MKLIB) -o $@ -noprefix -linker '$(CC)' -ldflags '$(LDFLAGS)' \
 -		$(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(DRI_LIB_DEPS)
 -
-+default: depend symlinks $(TOP)/$(LIB_DIR)/$(LIBNAME)
- 
+-
 -$(TOP)/$(LIB_DIR)/$(LIBNAME): $(LIBNAME)
 -	$(INSTALL) $(LIBNAME) $(TOP)/$(LIB_DIR) 
++default: symlinks depend $(TOP)/$(LIB_DIR)/$(LIBNAME)
  
 +$(TOP)/$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template
 +	$(LIBTOOL) --mode=link $(CC) -o $(TOP)/$(LIB_DIR)/$(LIBNAME:.so=.la) \
@@ -45,7 +45,7 @@ $NetBSD: patch-ai,v 1.2 2008/04/24 07:40:24 bjs Exp $
  
  depend: $(C_SOURCES) $(ASM_SOURCES) $(SYMLINKS)
  	touch depend
-@@ -98,9 +95,11 @@ clean:
+@@ -85,9 +82,11 @@ clean:
  	-rm -f depend depend.bak
  
  
@@ -59,4 +59,4 @@ $NetBSD: patch-ai,v 1.2 2008/04/24 07:40:24 bjs Exp $
 +		$(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
  
  
- include depend
+ -include depend
Index: graphics/MesaLib/patches/patch-at
===================================================================
RCS file: /NetBSD/pkgsrc/graphics/MesaLib/patches/patch-at,v
retrieving revision 1.1
diff -u -p graphics/MesaLib/patches/patch-at
--- graphics/MesaLib/patches/patch-at	24 Apr 2008 07:40:24 -0000	1.1
+++ graphics/MesaLib/patches/patch-at	20 May 2009 09:17:53 -0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-at,v 1.1 2008/04/24 07:40:24 bjs Exp $
+$NetBSD$
 
---- src/glx/x11/Makefile.orig	2007-11-01 11:30:52.000000000 -0400
-+++ src/glx/x11/Makefile
-@@ -53,10 +53,12 @@ INCLUDES = -I. \
+--- src/glx/x11/Makefile.orig	2009-03-13 05:28:49 +0200
++++ src/glx/x11/Makefile	2009-05-17 15:56:03 +0300
+@@ -60,10 +60,12 @@ INCLUDES = -I. \
  ##### RULES #####
  
  .c.o:
@@ -17,13 +17,14 @@ $NetBSD: patch-at,v 1.1 2008/04/24 07:40:24 bjs Exp $
  
  ##### TARGETS #####
  
-@@ -64,9 +66,10 @@ default: depend $(TOP)/$(LIB_DIR)/$(GL_L
+@@ -71,10 +73,10 @@ default: depend $(TOP)/$(LIB_DIR)/$(GL_L
  
  # Make libGL
  $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME):  $(OBJECTS) Makefile
--	$(TOP)/bin/mklib -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
+-	$(MKLIB) -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
 -		-major 1 -minor 2 $(MKLIB_OPTIONS) \
--		-install $(TOP)/$(LIB_DIR) $(GL_LIB_DEPS) $(OBJECTS)
+-		-install $(TOP)/$(LIB_DIR) -id $(INSTALL_LIB_DIR)/lib$(GL_LIB).1.dylib \
+-		$(GL_LIB_DEPS) $(OBJECTS)
 +	$(LIBTOOL) --mode=link $(CC) \
 +		-o $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME:.so=.la) \
 +		$(LDFLAGS) -version-info 1:2 $(GL_LIB_DEPS) \
Index: graphics/MesaLib/patches/patch-ax
===================================================================
RCS file: /NetBSD/pkgsrc/graphics/MesaLib/patches/patch-ax,v
retrieving revision 1.1
diff -u -p graphics/MesaLib/patches/patch-ax
--- graphics/MesaLib/patches/patch-ax	27 Jul 2008 00:03:42 -0000	1.1
+++ graphics/MesaLib/patches/patch-ax	20 May 2009 09:17:53 -0000
@@ -1,21 +1,21 @@
-$NetBSD: patch-ax,v 1.1 2008/07/27 00:03:42 bjs Exp $
+$NetBSD$
 
---- src/glu/Makefile.orig	2008-07-18 10:39:12.000000000 -0400
-+++ src/glu/Makefile
-@@ -22,10 +22,12 @@ glu.pc: glu.pc.in
+--- src/glu/Makefile.orig	2009-01-22 19:38:33 +0200
++++ src/glu/Makefile	2009-05-17 16:10:41 +0300
+@@ -27,10 +27,12 @@ glu.pc: glu.pc.in
  	$(pcedit) $< > $@
  
  install: glu.pc
--	$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
--	$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
--	$(INSTALL) $(TOP)/$(LIB_DIR)/libGLU.* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
--	$(INSTALL) -m 644 glu.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
-+	$(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
-+	$(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
+-	$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
+-	$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
+-	$(INSTALL) $(TOP)/$(LIB_DIR)/$(GLU_LIB_GLOB) $(DESTDIR)$(INSTALL_LIB_DIR)
+-	$(INSTALL) -m 644 glu.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
++	$(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(INSTALL_DIR)/lib
++	$(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INSTALL_DIR)/lib/pkgconfig
 +	$(LIBTOOL) --mode=install \
 +		$(BSD_INSTALL_LIB) $(TOP)/$(LIB_DIR)/libGLU.la \
-+		$(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
-+	$(BSD_INSTALL_DATA) glu.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
++		$(DESTDIR)$(INSTALL_DIR)/lib
++	$(BSD_INSTALL_DATA) glu.pc $(DESTDIR)$(INSTALL_DIR)/lib/pkgconfig
  
  clean:
- 	@for dir in $(SUBDIRS) ; do \
+ 	-@for dir in $(SUBDIRS) ; do \
Index: graphics/MesaLib/patches/patch-cb
===================================================================
RCS file: /NetBSD/pkgsrc/graphics/MesaLib/patches/patch-cb,v
retrieving revision 1.2
diff -u -p graphics/MesaLib/patches/patch-cb
--- graphics/MesaLib/patches/patch-cb	24 Apr 2008 07:40:24 -0000	1.2
+++ graphics/MesaLib/patches/patch-cb	20 May 2009 09:17:53 -0000
@@ -1,20 +1,19 @@
-$NetBSD: patch-cb,v 1.2 2008/04/24 07:40:24 bjs Exp $
+$NetBSD$
 
---- src/mesa/x86-64/Makefile.orig	2007-06-21 18:10:54.000000000 -0400
-+++ src/mesa/x86-64/Makefile
-@@ -23,7 +23,14 @@ clean:
+--- src/mesa/x86-64/Makefile.orig	2009-05-19 11:53:27 +0300
++++ src/mesa/x86-64/Makefile	2009-05-19 11:55:54 +0300
+@@ -23,7 +23,13 @@ clean:
  
  
  # need some special rules here, unfortunately
-+ifdef CROSS_COMPILING
++#ifdef CROSS_COMPILING
  matypes.h: ../main/mtypes.h ../tnl/t_context.h ../x86/gen_matypes
--	../x86/gen_matypes | grep -v '#include "assyntax.h' > matypes.h
+-	../x86/gen_matypes > matypes.h
 +	CFLAGS="${INCLUDE_DIRS} ${CFLAGS}" $(LIBTOOL) --mode=execute \
-+	../x86/gen_matypes.sh | grep -v '#include "assyntax.h"' > matypes.h
-+else
++	../x86/gen_matypes.sh > matypes.h
++#else
 +matypes.h: ../main/mtypes.h ../tnl/t_context.h ../x86/gen_matypes
-+	$(LIBTOOL) --mode=execute ../x86/gen_matypes | \
-+	grep -v '#include "assyntax.h"' > matypes.h
-+endif
++	$(LIBTOOL) --mode=execute ../x86/gen_matypes > matypes.h
++#endif
  
  xform4.o: matypes.h
--- graphics/MesaLib/patches/patch-ah	2009-05-20 12:33:52 +0300
+++ /dev/null	2009-05-20 11:50:57 +0300
@@ -1,42 +0,0 @@
-$NetBSD: patch-ah,v 1.8 2008/04/24 07:40:24 bjs Exp $
-
---- src/mesa/drivers/dri/glcore/Makefile.orig	2007-09-28 20:43:28.000000000 -0400
-+++ src/mesa/drivers/dri/glcore/Makefile
-@@ -36,7 +36,7 @@ INCLUDE_DIRS = \
- MESA_MODULES = $(TOP)/src/mesa/libmesa.a
- 
- # Libraries that the driver shared lib depends on
--LIB_DEPS = -lm -lpthread -lc
-+LIB_DEPS = -lm -lc
- # LIB_DEPS = -lGL -lm -lpthread -lc
- 
- 
-@@ -49,10 +49,12 @@ OBJECTS = $(C_SOURCES:.c=.o) \
- ##### RULES #####
- 
- .c.o:
--	$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $@
-+	$(LIBTOOL) --mode=compile --tag=CC \
-+		$(CC) -c -prefer-pic $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $(@:.o=.lo)
- 
- .S.o:
--	$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES)  $< -o $@
-+	$(LIBTOOL) --mode=compile --tag=CC \
-+		$(CC) -c -prefer-pic $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $(@:.o=.lo)
- 
- 
- ##### TARGETS #####
-@@ -61,9 +63,10 @@ default: depend $(TOP)/$(LIB_DIR)/$(LIBN
- 
- 
- $(TOP)/$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
--	CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(LIBNAME) -noprefix \
--		-ldflags '$(LDFLAGS)' -install $(TOP)/$(LIB_DIR) \
--		$(OBJECTS) $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES)
-+	$(LIBTOOL) --mode=link $(CC) -o $(TOP)/$(LIB_DIR)/$(LIB_NAME:.so=.la) \
-+		$(LDFLAGS) $(OBJECTS:.o=.lo) $(WINLIB) $(LIB_DEPS) \
-+		$(WINOBJ:.o=.lo) $(MESA_MODULES:.a=.la) -rpath $(PREFIX)/lib \
-+		-module -avoid-version
- 
- 
- depend: $(C_SOURCES) $(ASM_SOURCES)
--- graphics/MesaLib/patches/patch-az	2009-05-20 12:33:53 +0300
+++ /dev/null	2009-05-20 11:50:57 +0300
@@ -1,15 +0,0 @@
-$NetBSD: patch-az,v 1.1 2008/10/21 06:25:26 bjs Exp $
-
-Xdriinfo won't work for r300 unless this symbol is visible.
-
---- src/mesa/drivers/dri/r300/radeon_screen.c.orig	2008-06-16 12:19:27.000000000 -0400
-+++ src/mesa/drivers/dri/r300/radeon_screen.c
-@@ -179,7 +179,7 @@ DRI_CONF_OPT_BEGIN_V(fp_optimization,enu
-         DRI_CONF_DESC_END \
- DRI_CONF_OPT_END
- 
--const char __driConfigOptions[] =
-+PUBLIC const char __driConfigOptions[] =
- DRI_CONF_BEGIN
- 	DRI_CONF_SECTION_PERFORMANCE
- 		DRI_CONF_TCL_MODE(DRI_CONF_TCL_CODEGEN)
--- /dev/null	2009-05-20 11:50:57 +0300
+++ graphics/MesaLib/patches/patch-ba	2009-05-19 12:16:34 +0300
@@ -0,0 +1,23 @@
+$NetBSD$
+
+--- src/mesa/drivers/dri/intel/intel_fbo.c.orig	2009-05-18 15:03:52 +0300
++++ src/mesa/drivers/dri/intel/intel_fbo.c	2009-05-18 15:04:28 +0300
+@@ -619,8 +619,7 @@ intel_render_texture(GLcontext * ctx,
+        return;
+    }
+ 
+-   DBG("Begin render texture tid %x tex=%u w=%d h=%d refcount=%d\n",
+-       _glthread_GetID(),
++   DBG("Begin render texture tex=%u w=%d h=%d refcount=%d\n",
+        att->Texture->Name, newImage->Width, newImage->Height,
+        irb->Base.RefCount);
+ 
+@@ -660,7 +659,7 @@ intel_finish_render_texture(GLcontext * 
+ {
+    struct intel_renderbuffer *irb = intel_renderbuffer(att->Renderbuffer);
+ 
+-   DBG("End render texture (tid %x) tex %u\n", _glthread_GetID(), att->Texture->Name);
++   DBG("End render texture tex %u\n", att->Texture->Name);
+ 
+    if (irb) {
+       /* just release the region */
--- /dev/null	2009-05-20 11:50:57 +0300
+++ graphics/MesaLib/patches/patch-bb	2009-05-19 12:16:42 +0300
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- src/mesa/drivers/dri/swrast/Makefile.orig	2009-05-19 10:25:12 +0300
++++ src/mesa/drivers/dri/swrast/Makefile	2009-05-19 10:25:27 +0300
+@@ -16,7 +16,6 @@ C_SOURCES = \
+ ASM_SOURCES =
+ 
+ SWRAST_COMMON_SOURCES = \
+-	../../common/driverfuncs.c \
+ 	../common/utils.c
+ 
+ include ../Makefile.template
--- /dev/null	2009-05-20 11:50:57 +0300
+++ graphics/MesaLib/patches/patch-bc	2009-05-19 12:02:26 +0300
@@ -0,0 +1,15 @@
+$NetBSD$
+
+http://bugs.freedesktop.org/show_bug.cgi?id=21053
+
+--- src/glx/x11/drisw_glx.c.orig	2009-05-19 12:00:40 +0300
++++ src/glx/x11/drisw_glx.c	2009-05-19 12:01:16 +0300
+@@ -405,6 +405,8 @@ driCreateScreen(__GLXscreenConfigs * psc
+    psp->createContext = driCreateContext;
+    psp->createDrawable = driCreateDrawable;
+    psp->swapBuffers = driSwapBuffers;
++   psp->waitX = NULL;
++   psp->waitGL = NULL;
+ 
+    return psp;
+ 
Index: graphics/glx-utils/distinfo
===================================================================
RCS file: /NetBSD/pkgsrc/graphics/glx-utils/distinfo,v
retrieving revision 1.10
diff -u -p graphics/glx-utils/distinfo
--- graphics/glx-utils/distinfo	23 Aug 2008 02:51:19 -0000	1.10
+++ graphics/glx-utils/distinfo	20 May 2009 10:09:30 -0000
@@ -1,5 +1,5 @@
 $NetBSD: distinfo,v 1.10 2008/08/23 02:51:19 dsainty Exp $
 
-SHA1 (Mesa-7.0.4.1/MesaDemos-7.0.4.tar.bz2) = 1adb2010d6d3103bd57c08f228e2bbed38178e14
-RMD160 (Mesa-7.0.4.1/MesaDemos-7.0.4.tar.bz2) = 3e5b414bf1a40603367fcd0ba321b6e2caf84626
-Size (Mesa-7.0.4.1/MesaDemos-7.0.4.tar.bz2) = 1341624 bytes
+SHA1 (Mesa-7.4.2/MesaDemos-7.4.2.tar.bz2) = cbba586829c76a5e7a54a906567b4b2174d6e1aa
+RMD160 (Mesa-7.4.2/MesaDemos-7.4.2.tar.bz2) = c6434d325897540618130e97891f391721b543b5
+Size (Mesa-7.4.2/MesaDemos-7.4.2.tar.bz2) = 1367293 bytes
