summaryrefslogtreecommitdiff
path: root/graphics/MesaLib/patches
diff options
context:
space:
mode:
authorbjs <bjs@pkgsrc.org>2008-07-27 00:03:42 +0000
committerbjs <bjs@pkgsrc.org>2008-07-27 00:03:42 +0000
commitd86b2d37280d96d009d913c8a26999a4442200bd (patch)
tree7c65f0da0b8da23c4951cf9c284a77a1e0666911 /graphics/MesaLib/patches
parent11fe3b926911a3f1f9f1eaac601a1ddbe4986386 (diff)
downloadpkgsrc-d86b2d37280d96d009d913c8a26999a4442200bd.tar.gz
Update to Mesa-7.0.4 (the head of the 7.0 branch in GIT). Basically,
lots of bug fixes; the intent of my update was mostly to fix problems with i915 and r300 dri drivers and to provide the best environment possible for the xorg server update to the 1.4 branch. Morever, many of our patches from pkgsrc, i.e. those removed in this commit, are now included upstream. Additionally, MesaDemos now builds. NOTES: - MesaLib now requires xf86driproto 2.0.4, as earlier versions install dri_interface.h, which is not correct. - glu now exports its symbols via libtool's -export-symfile. The symfile is generated pre-build--see glu/Makefile. - glxinfo/glxgears do not seem to need to be linked to libpthread, and this seems to cause problems on NetBSD with the new drm code. If I am wrong about this, please let me know. The only program that seems to need libpthread is glthreads in MesaDemos.
Diffstat (limited to 'graphics/MesaLib/patches')
-rw-r--r--graphics/MesaLib/patches/patch-aa14
-rw-r--r--graphics/MesaLib/patches/patch-ab63
-rw-r--r--graphics/MesaLib/patches/patch-af44
-rw-r--r--graphics/MesaLib/patches/patch-ak22
-rw-r--r--graphics/MesaLib/patches/patch-al836
-rw-r--r--graphics/MesaLib/patches/patch-an17
-rw-r--r--graphics/MesaLib/patches/patch-ao28
-rw-r--r--graphics/MesaLib/patches/patch-ap63
-rw-r--r--graphics/MesaLib/patches/patch-ax21
-rw-r--r--graphics/MesaLib/patches/patch-ay10
10 files changed, 75 insertions, 1043 deletions
diff --git a/graphics/MesaLib/patches/patch-aa b/graphics/MesaLib/patches/patch-aa
deleted file mode 100644
index ddc6cb46bf1..00000000000
--- a/graphics/MesaLib/patches/patch-aa
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-aa,v 1.8 2008/04/24 07:40:24 bjs Exp $
-
---- src/mesa/x86/assyntax.h.orig 2007-06-21 18:10:55.000000000 -0400
-+++ src/mesa/x86/assyntax.h
-@@ -985,7 +985,8 @@ SECTION _DATA public align=16 class=DATA
-
- #if defined(Lynx) || (defined(SYSV) || defined(SVR4)) \
- || (defined(__linux__) || defined(__OS2ELF__)) && defined(__ELF__) \
-- || defined(__FreeBSD__) && __FreeBSD__ >= 3
-+ || defined(__FreeBSD__) && __FreeBSD__ >= 3 \
-+ || defined(__NetBSD__) && defined(__ELF__)
- #define GLNAME(a) a
- #else
- #define GLNAME(a) CONCAT(_, a)
diff --git a/graphics/MesaLib/patches/patch-ab b/graphics/MesaLib/patches/patch-ab
index 10e168ae5a3..e06088ac656 100644
--- a/graphics/MesaLib/patches/patch-ab
+++ b/graphics/MesaLib/patches/patch-ab
@@ -1,22 +1,47 @@
-$NetBSD: patch-ab,v 1.15 2008/04/24 07:40:24 bjs Exp $
+$NetBSD: patch-ab,v 1.16 2008/07/27 00:03:42 bjs Exp $
---- src/glu/Makefile.orig 2007-09-12 12:03:23.000000000 -0400
-+++ src/glu/Makefile
-@@ -22,10 +22,13 @@ 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
-+ $(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
+--- src/glu/sgi/Makefile.orig 2008-07-18 10:39:12.000000000 -0400
++++ src/glu/sgi/Makefile
+@@ -8,7 +8,8 @@ include $(TOP)/configs/current
+
+ GLU_MAJOR = 1
+ GLU_MINOR = 3
+-GLU_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
++GLU_TINY= 0 # What is the point of having such a strange versioning scheme?
++ # It breaks libtool, but I hate to say it: libtool is right!
+
+ INCDIRS = -I$(TOP)/include -Iinclude -Iinternals -Ilibnurbs/internals -Ilibnurbs/interface -Ilibnurbs/nurbtess
+
+@@ -115,10 +116,12 @@ OBJECTS = $(C_OBJECTS) $(CC_OBJECTS)
+ ##### RULES #####
+
+ .c.o:
+- $(CC) -c $(INCDIRS) $(CFLAGS) -DNDEBUG -DLIBRARYBUILD $< -o $@
++ $(LIBTOOL) --mode=compile --tag=CC $(CC) -c $(INCDIRS) \
++ $(CFLAGS) $(COPTS) -DNDEBUG -DLIBRARYBUILD $< -o $(@:.o=.lo)
+
+ .cc.o:
+- $(CXX) -c $(INCDIRS) $(CXXFLAGS) -DNDEBUG -DLIBRARYBUILD $< -o $@
++ $(LIBTOOL) --mode=compile --tag=CXX $(CXX) -c $(INCDIRS) \
++ $(CXXFLAGS) -DNDEBUG -DLIBRARYBUILD $< -o $(@:.o=.lo)
+
+
+ ##### TARGETS #####
+@@ -136,11 +139,12 @@ $(TOP)/$(LIB_DIR):
+
+ # Make the library:
+ $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
+- $(TOP)/bin/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 \
+- $(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
++
+
clean:
- @for dir in $(SUBDIRS) ; do \
diff --git a/graphics/MesaLib/patches/patch-af b/graphics/MesaLib/patches/patch-af
deleted file mode 100644
index d24fb5e0911..00000000000
--- a/graphics/MesaLib/patches/patch-af
+++ /dev/null
@@ -1,44 +0,0 @@
-$NetBSD: patch-af,v 1.9 2008/04/24 07:40:24 bjs Exp $
-
---- src/glu/sgi/Makefile.orig 2007-09-28 20:43:28.000000000 -0400
-+++ src/glu/sgi/Makefile
-@@ -8,7 +8,8 @@ include $(TOP)/configs/current
-
- GLU_MAJOR = 1
- GLU_MINOR = 3
--GLU_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
-+GLU_TINY= 0 # What is the point of having such a strange versioning scheme?
-+ # It breaks libtool, but I hate to say it: libtool is right!
-
- INCDIRS = -I$(TOP)/include -Iinclude -Iinternals -Ilibnurbs/internals -Ilibnurbs/interface -Ilibnurbs/nurbtess
-
-@@ -115,10 +116,12 @@ OBJECTS = $(C_OBJECTS) $(CC_OBJECTS)
- ##### RULES #####
-
- .c.o:
-- $(CC) -c $(INCDIRS) $(CFLAGS) -DNDEBUG -DLIBRARYBUILD $< -o $@
-+ $(LIBTOOL) --mode=compile --tag=CC $(CC) -c $(INCDIRS) \
-+ $(CFLAGS) $(COPTS) -DNDEBUG -DLIBRARYBUILD $< -o $(@:.o=.lo)
-
- .cc.o:
-- $(CXX) -c $(INCDIRS) $(CXXFLAGS) -DNDEBUG -DLIBRARYBUILD $< -o $@
-+ $(LIBTOOL) --mode=compile --tag=CXX $(CXX) -c $(INCDIRS) \
-+ $(CXXFLAGS) -DNDEBUG -DLIBRARYBUILD $< -o $(@:.o=.lo)
-
-
- ##### TARGETS #####
-@@ -136,10 +139,10 @@ $(TOP)/$(LIB_DIR):
-
- # Make the library:
- $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME): $(OBJECTS)
-- $(TOP)/bin/mklib -o $(GLU_LIB) -linker '$(CXX)' -ldflags '$(LDFLAGS)' \
-- -major $(GLU_MAJOR) -minor $(GLU_MINOR) -patch $(GLU_TINY) \
-- -cplusplus $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \
-- $(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)
-
-
- clean:
diff --git a/graphics/MesaLib/patches/patch-ak b/graphics/MesaLib/patches/patch-ak
deleted file mode 100644
index 242f8a41962..00000000000
--- a/graphics/MesaLib/patches/patch-ak
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-ak,v 1.6 2008/04/24 07:40:24 bjs Exp $
-
---- include/GL/glxext.h.orig 2007-06-21 18:10:53.000000000 -0400
-+++ include/GL/glxext.h
-@@ -389,7 +389,7 @@ typedef struct {
- #elif defined(__sun__) || defined(__digital__)
- #include <inttypes.h>
- #if defined(__STDC__)
--#if defined(__arch64__)
-+#if defined(__arch64__) || defined(_LP64)
- typedef long int int64_t;
- typedef unsigned long int uint64_t;
- #else
-@@ -397,7 +397,7 @@ typedef long long int int64_t;
- typedef unsigned long long int uint64_t;
- #endif /* __arch64__ */
- #endif /* __STDC__ */
--#elif defined( __VMS )
-+#elif defined( __VMS ) || defined(__sgi)
- #include <inttypes.h>
- #elif defined(__SCO__) || defined(__USLC__)
- #include <stdint.h>
diff --git a/graphics/MesaLib/patches/patch-al b/graphics/MesaLib/patches/patch-al
deleted file mode 100644
index 8e45040ab1c..00000000000
--- a/graphics/MesaLib/patches/patch-al
+++ /dev/null
@@ -1,836 +0,0 @@
-$NetBSD: patch-al,v 1.4 2008/04/24 07:40:24 bjs Exp $
-
---- src/mesa/drivers/x11/xm_tri.c.orig 2007-06-21 18:10:54.000000000 -0400
-+++ src/mesa/drivers/x11/xm_tri.c
-@@ -66,7 +66,7 @@
- XMesaContext xmesa = XMESA_CONTEXT(ctx); \
- GET_XRB(xrb);
-
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLint x = span.x, y = YFLIP(xrb, span.y); \
- GLuint i; \
- for (i = 0; i < span.end; i++, x++) { \
-@@ -82,7 +82,7 @@
- span.green += span.greenStep; \
- span.blue += span.blueStep; \
- span.z += span.zStep; \
-- }
-+ } }
-
- #include "swrast/s_tritemp.h"
-
-@@ -102,7 +102,7 @@
- #define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
- #define SETUP_CODE \
- GET_XRB(xrb);
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- for (i = 0; i < span.end; i++) { \
- const DEPTH_TYPE z = FixedToDepth(span.z); \
-@@ -117,7 +117,7 @@
- span.blue += span.blueStep; \
- span.alpha += span.alphaStep; \
- span.z += span.zStep; \
-- }
-+ } }
-
- #include "swrast/s_tritemp.h"
-
-@@ -137,7 +137,7 @@
- #define SETUP_CODE \
- GET_XRB(xrb);
-
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- for (i = 0; i < span.end; i++) { \
- const DEPTH_TYPE z = FixedToDepth(span.z); \
-@@ -152,7 +152,7 @@
- span.blue += span.blueStep; \
- span.alpha += span.alphaStep; \
- span.z += span.zStep; \
-- }
-+ } }
-
- #include "swrast/s_tritemp.h"
-
-@@ -171,7 +171,7 @@
- #define SETUP_CODE \
- GET_XRB(xrb);
-
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- for (i = 0; i < span.end; i++) { \
- const DEPTH_TYPE z = FixedToDepth(span.z); \
-@@ -184,7 +184,7 @@
- span.green += span.greenStep; \
- span.blue += span.blueStep; \
- span.z += span.zStep; \
-- }
-+ } }
-
- #include "swrast/s_tritemp.h"
-
-@@ -202,7 +202,7 @@
- #define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
- #define SETUP_CODE \
- GET_XRB(xrb);
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- for (i = 0; i < span.end; i++) { \
- const DEPTH_TYPE z = FixedToDepth(span.z); \
-@@ -217,7 +217,7 @@
- span.green += span.greenStep; \
- span.blue += span.blueStep; \
- span.z += span.zStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -232,7 +232,7 @@
- #define SETUP_CODE \
- XMesaContext xmesa = XMESA_CONTEXT(ctx); \
- GET_XRB(xrb);
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- GLint x = span.x, y = YFLIP(xrb, span.y); \
- for (i = 0; i < span.end; i++, x++) { \
-@@ -248,7 +248,7 @@
- span.green += span.greenStep; \
- span.blue += span.blueStep; \
- span.z += span.zStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -265,7 +265,7 @@
- #define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
- #define SETUP_CODE \
- GET_XRB(xrb);
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- for (i = 0; i < span.end; i++) { \
- const DEPTH_TYPE z = FixedToDepth(span.z); \
-@@ -278,7 +278,7 @@
- span.green += span.greenStep; \
- span.blue += span.blueStep; \
- span.z += span.zStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -296,7 +296,7 @@
- #define SETUP_CODE \
- XMesaContext xmesa = XMESA_CONTEXT(ctx); \
- GET_XRB(xrb);
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- GLint x = span.x, y = YFLIP(xrb, span.y); \
- for (i = 0; i < span.end; i++, x++) { \
-@@ -310,7 +310,7 @@
- span.green += span.greenStep; \
- span.blue += span.blueStep; \
- span.z += span.zStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -327,7 +327,7 @@
- #define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
- #define SETUP_CODE \
- GET_XRB(xrb);
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- GLint x = span.x, y = YFLIP(xrb, span.y); \
- XDITHER_SETUP(y); \
-@@ -342,7 +342,7 @@
- span.green += span.greenStep; \
- span.blue += span.blueStep; \
- span.z += span.zStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -357,7 +357,7 @@
- #define SETUP_CODE \
- GET_XRB(xrb); \
- XMesaImage *img = xrb->ximage;
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- GLint x = span.x, y = YFLIP(xrb, span.y); \
- XDITHER_SETUP(y); \
-@@ -373,7 +373,7 @@
- span.green += span.greenStep; \
- span.blue += span.blueStep; \
- span.z += span.zStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -390,7 +390,7 @@
- #define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
- #define SETUP_CODE \
- GET_XRB(xrb);
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- LOOKUP_SETUP; \
- for (i = 0; i < span.end; i++) { \
-@@ -404,7 +404,7 @@
- span.green += span.greenStep; \
- span.blue += span.blueStep; \
- span.z += span.zStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -422,7 +422,7 @@
- #define SETUP_CODE \
- XMesaContext xmesa = XMESA_CONTEXT(ctx); \
- GET_XRB(xrb);
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- GLint x = span.x, y = YFLIP(xrb, span.y); \
- for (i = 0; i < span.end; i++, x++) { \
-@@ -436,7 +436,7 @@
- span.green += span.greenStep; \
- span.blue += span.blueStep; \
- span.z += span.zStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -453,7 +453,7 @@
- XMesaImage *img = xrb->ximage; \
- unsigned long pixel; \
- PACK_TRUECOLOR(pixel, v2->color[0], v2->color[1], v2->color[2]);
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- GLint x = span.x, y = YFLIP(xrb, span.y); \
- for (i = 0; i < span.end; i++, x++) { \
-@@ -463,7 +463,7 @@
- zRow[i] = z; \
- } \
- span.z += span.zStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -481,7 +481,7 @@
- GET_XRB(xrb); \
- GLuint p = PACK_8A8B8G8R( v2->color[0], v2->color[1],\
- v2->color[2], v2->color[3]);
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- for (i = 0; i < span.end; i++) { \
- const DEPTH_TYPE z = FixedToDepth(span.z); \
-@@ -490,7 +490,7 @@
- zRow[i] = z; \
- } \
- span.z += span.zStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -508,7 +508,7 @@
- GET_XRB(xrb); \
- GLuint p = PACK_8A8R8G8B(v2->color[0], v2->color[1], \
- v2->color[2], v2->color[3]);
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- for (i = 0; i < span.end; i++) { \
- const DEPTH_TYPE z = FixedToDepth(span.z); \
-@@ -517,7 +517,7 @@
- zRow[i] = z; \
- } \
- span.z += span.zStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -534,7 +534,7 @@
- #define SETUP_CODE \
- GET_XRB(xrb); \
- GLuint p = PACK_8R8G8B( v2->color[0], v2->color[1], v2->color[2] );
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- for (i = 0; i < span.end; i++) { \
- DEPTH_TYPE z = FixedToDepth(span.z); \
-@@ -543,7 +543,7 @@
- zRow[i] = z; \
- } \
- span.z += span.zStep; \
-- }
-+ } }
-
- #include "swrast/s_tritemp.h"
-
-@@ -561,7 +561,7 @@
- #define SETUP_CODE \
- GET_XRB(xrb); \
- const GLubyte *color = v2->color;
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- for (i = 0; i < span.end; i++) { \
- const DEPTH_TYPE z = FixedToDepth(span.z); \
-@@ -573,7 +573,7 @@
- zRow[i] = z; \
- } \
- span.z += span.zStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -588,7 +588,7 @@
- XMesaContext xmesa = XMESA_CONTEXT(ctx); \
- GET_XRB(xrb); \
- XMesaImage *img = xrb->ximage;
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- GLint x = span.x, y = YFLIP(xrb, span.y); \
- for (i = 0; i < span.end; i++, x++) { \
-@@ -601,7 +601,7 @@
- zRow[i] = z; \
- } \
- span.z += span.zStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -618,7 +618,7 @@
- #define SETUP_CODE \
- GET_XRB(xrb); \
- GLushort p = PACK_5R6G5B( v2->color[0], v2->color[1], v2->color[2] );
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- for (i = 0; i < span.end; i++) { \
- const DEPTH_TYPE z = FixedToDepth(span.z); \
-@@ -627,7 +627,7 @@
- zRow[i] = z; \
- } \
- span.z += span.zStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -645,7 +645,7 @@
- XMesaContext xmesa = XMESA_CONTEXT(ctx); \
- GET_XRB(xrb); \
- const GLubyte *color = v2->color;
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- GLint x = span.x, y = YFLIP(xrb, span.y); \
- for (i = 0; i < span.end; i++, x++) { \
-@@ -656,7 +656,7 @@
- zRow[i] = z; \
- } \
- span.z += span.zStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -673,7 +673,7 @@
- #define SETUP_CODE \
- GET_XRB(xrb); \
- FLAT_DITHER_SETUP( v2->color[0], v2->color[1], v2->color[2] );
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- GLint x = span.x, y = YFLIP(xrb, span.y); \
- FLAT_DITHER_ROW_SETUP(YFLIP(xrb, y)); \
-@@ -684,7 +684,7 @@
- zRow[i] = z; \
- } \
- span.z += span.zStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -699,7 +699,7 @@
- GET_XRB(xrb); \
- XMesaImage *img = xrb->ximage; \
- FLAT_DITHER_SETUP( v2->color[0], v2->color[1], v2->color[2] );
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- GLint x = span.x, y = YFLIP(xrb, span.y); \
- FLAT_DITHER_ROW_SETUP(y); \
-@@ -711,7 +711,7 @@
- zRow[i] = z; \
- } \
- span.z += span.zStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -731,7 +731,7 @@
- GLubyte r = v2->color[0]; \
- GLubyte g = v2->color[1]; \
- GLubyte b = v2->color[2];
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- GLint x = span.x, y = YFLIP(xrb, span.y); \
- for (i = 0; i < span.end; i++, x++) { \
-@@ -741,7 +741,7 @@
- zRow[i] = z; \
- } \
- span.z += span.zStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -762,7 +762,7 @@
- GLubyte g = v2->color[1]; \
- GLubyte b = v2->color[2]; \
- GLubyte p = LOOKUP(r,g,b);
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- for (i = 0; i < span.end; i++) { \
- const DEPTH_TYPE z = FixedToDepth(span.z); \
-@@ -771,7 +771,7 @@
- zRow[i] = z; \
- } \
- span.z += span.zStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -785,7 +785,7 @@
- XMesaContext xmesa = XMESA_CONTEXT(ctx); \
- GET_XRB(xrb); \
- XMesaImage *img = xrb->ximage;
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- GLint x = span.x, y = YFLIP(xrb, span.y); \
- for (i = 0; i < span.end; i++, x++) { \
-@@ -796,7 +796,7 @@
- span.red += span.redStep; \
- span.green += span.greenStep; \
- span.blue += span.blueStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -812,7 +812,7 @@
- #define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
- #define SETUP_CODE \
- GET_XRB(xrb);
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- for (i = 0; i < span.end; i++) { \
- pRow[i] = PACK_8A8B8G8R(FixedToInt(span.red), \
-@@ -822,7 +822,7 @@
- span.green += span.greenStep; \
- span.blue += span.blueStep; \
- span.alpha += span.alphaStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -838,7 +838,7 @@
- #define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
- #define SETUP_CODE \
- GET_XRB(xrb);
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- for (i = 0; i < span.end; i++) { \
- pRow[i] = PACK_8A8R8G8B(FixedToInt(span.red), \
-@@ -848,7 +848,7 @@
- span.green += span.greenStep; \
- span.blue += span.blueStep; \
- span.alpha += span.alphaStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -863,7 +863,7 @@
- #define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
- #define SETUP_CODE \
- GET_XRB(xrb);
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- for (i = 0; i < span.end; i++) { \
- pRow[i] = PACK_8R8G8B(FixedToInt(span.red), \
-@@ -871,7 +871,7 @@
- span.red += span.redStep; \
- span.green += span.greenStep; \
- span.blue += span.blueStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -886,7 +886,7 @@
- #define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
- #define SETUP_CODE \
- GET_XRB(xrb);
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- PIXEL_TYPE *pixel = pRow; \
- for (i = 0; i < span.end; i++, pixel++) { \
-@@ -896,7 +896,7 @@
- span.red += span.redStep; \
- span.green += span.greenStep; \
- span.blue += span.blueStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -910,7 +910,7 @@
- XMesaContext xmesa = XMESA_CONTEXT(ctx); \
- GET_XRB(xrb); \
- XMesaImage *img = xrb->ximage;
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- GLint x = span.x, y = YFLIP(xrb, span.y); \
- for (i = 0; i < span.end; i++, x++) { \
-@@ -921,7 +921,7 @@
- span.red += span.redStep; \
- span.green += span.greenStep; \
- span.blue += span.blueStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -936,7 +936,7 @@
- #define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
- #define SETUP_CODE \
- GET_XRB(xrb);
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- for (i = 0; i < span.end; i++) { \
- pRow[i] = (PIXEL_TYPE) PACK_5R6G5B(FixedToInt(span.red), \
-@@ -944,7 +944,7 @@
- span.red += span.redStep; \
- span.green += span.greenStep; \
- span.blue += span.blueStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -960,7 +960,7 @@
- #define SETUP_CODE \
- XMesaContext xmesa = XMESA_CONTEXT(ctx); \
- GET_XRB(xrb);
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- GLint x = span.x, y = YFLIP(xrb, span.y); \
- for (i = 0; i < span.end; i++, x++) { \
-@@ -969,7 +969,7 @@
- span.red += span.redStep; \
- span.green += span.greenStep; \
- span.blue += span.blueStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -984,7 +984,7 @@
- #define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
- #define SETUP_CODE \
- GET_XRB(xrb);
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- GLint x = span.x, y = YFLIP(xrb, span.y); \
- XDITHER_SETUP(y); \
-@@ -994,7 +994,7 @@
- span.red += span.redStep; \
- span.green += span.greenStep; \
- span.blue += span.blueStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -1007,7 +1007,7 @@
- #define SETUP_CODE \
- GET_XRB(xrb); \
- XMesaImage *img = xrb->ximage;
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- GLint x = span.x, y = YFLIP(xrb, span.y); \
- XDITHER_SETUP(y); \
-@@ -1018,7 +1018,7 @@
- span.red += span.redStep; \
- span.green += span.greenStep; \
- span.blue += span.blueStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -1033,7 +1033,7 @@
- #define BYTES_PER_ROW (xrb->ximage->bytes_per_line)
- #define SETUP_CODE \
- GET_XRB(xrb);
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- LOOKUP_SETUP; \
- for (i = 0; i < span.end; i++) { \
-@@ -1042,7 +1042,7 @@
- span.red += span.redStep; \
- span.green += span.greenStep; \
- span.blue += span.blueStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -1058,7 +1058,7 @@
- #define SETUP_CODE \
- XMesaContext xmesa = XMESA_CONTEXT(ctx); \
- GET_XRB(xrb);
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- GLint x = span.x, y = YFLIP(xrb, span.y); \
- for (i = 0; i < span.end; i++, x++) { \
-@@ -1067,7 +1067,7 @@
- span.red += span.redStep; \
- span.green += span.greenStep; \
- span.blue += span.blueStep; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -1082,12 +1082,12 @@
- XMesaImage *img = xrb->ximage; \
- unsigned long pixel; \
- PACK_TRUECOLOR(pixel, v2->color[0], v2->color[1], v2->color[2]);
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- GLint x = span.x, y = YFLIP(xrb, span.y); \
- for (i = 0; i < span.end; i++, x++) { \
- XMesaPutPixel(img, x, y, pixel); \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -1103,11 +1103,11 @@
- GET_XRB(xrb); \
- unsigned long p = PACK_8B8G8R( v2->color[0], \
- v2->color[1], v2->color[2] );
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- for (i = 0; i < span.end; i++) { \
- pRow[i] = (PIXEL_TYPE) p; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -1123,11 +1123,11 @@
- GET_XRB(xrb); \
- unsigned long p = PACK_8R8G8B( v2->color[0], \
- v2->color[1], v2->color[2] );
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- for (i = 0; i < span.end; i++) { \
- pRow[i] = (PIXEL_TYPE) p; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -1143,11 +1143,11 @@
- GET_XRB(xrb); \
- unsigned long p = PACK_8R8G8B( v2->color[0], \
- v2->color[1], v2->color[2] );
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- for (i = 0; i < span.end; i++) { \
- pRow[i] = (PIXEL_TYPE) p; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -1162,14 +1162,14 @@
- #define SETUP_CODE \
- GET_XRB(xrb); \
- const GLubyte *color = v2->color;
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- PIXEL_TYPE *pixel = pRow; \
- for (i = 0; i < span.end; i++, pixel++) { \
- pixel->r = color[RCOMP]; \
- pixel->g = color[GCOMP]; \
- pixel->b = color[BCOMP]; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -1182,7 +1182,7 @@
- XMesaContext xmesa = XMESA_CONTEXT(ctx); \
- GET_XRB(xrb); \
- XMesaImage *img = xrb->ximage;
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- GLint x = span.x, y = YFLIP(xrb, span.y); \
- for (i = 0; i < span.end; i++, x++) { \
-@@ -1190,7 +1190,7 @@
- PACK_TRUEDITHER(p, x, y, v2->color[0], \
- v2->color[1], v2->color[2] ); \
- XMesaPutPixel(img, x, y, p); \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -1206,11 +1206,11 @@
- GET_XRB(xrb); \
- unsigned long p = PACK_5R6G5B( v2->color[0], \
- v2->color[1], v2->color[2] );
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- for (i = 0; i < span.end; i++) { \
- pRow[i] = (PIXEL_TYPE) p; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -1226,13 +1226,13 @@
- XMesaContext xmesa = XMESA_CONTEXT(ctx); \
- GET_XRB(xrb); \
- const GLubyte *color = v2->color;
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- GLint x = span.x, y = YFLIP(xrb, span.y); \
- for (i = 0; i < span.end; i++, x++) { \
- PACK_TRUEDITHER(pRow[i], x, y, color[RCOMP], \
- color[GCOMP], color[BCOMP]); \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -1247,13 +1247,13 @@
- #define SETUP_CODE \
- GET_XRB(xrb); \
- FLAT_DITHER_SETUP( v2->color[0], v2->color[1], v2->color[2] );
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- GLint x = span.x, y = YFLIP(xrb, span.y); \
- FLAT_DITHER_ROW_SETUP(YFLIP(xrb, y)); \
- for (i = 0; i < span.end; i++, x++) { \
- pRow[i] = (PIXEL_TYPE) FLAT_DITHER(x); \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -1266,14 +1266,14 @@
- GET_XRB(xrb); \
- XMesaImage *img = xrb->ximage; \
- FLAT_DITHER_SETUP( v2->color[0], v2->color[1], v2->color[2] );
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- GLint x = span.x, y = YFLIP(xrb, span.y); \
- FLAT_DITHER_ROW_SETUP(y); \
- for (i = 0; i < span.end; i++, x++) { \
- unsigned long p = FLAT_DITHER(x); \
- XMesaPutPixel(img, x, y, p ); \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -1291,12 +1291,12 @@
- GLubyte r = v2->color[0]; \
- GLubyte g = v2->color[1]; \
- GLubyte b = v2->color[2];
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- GLint x = span.x, y = YFLIP(xrb, span.y); \
- for (i = 0; i < span.end; i++, x++) { \
- pRow[i] = (PIXEL_TYPE) DITHER_HPCR(x, y, r, g, b); \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
-@@ -1315,11 +1315,11 @@
- GLubyte g = v2->color[1]; \
- GLubyte b = v2->color[2]; \
- GLubyte p = LOOKUP(r,g,b);
--#define RENDER_SPAN( span ) \
-+#define RENDER_SPAN( span ) { \
- GLuint i; \
- for (i = 0; i < span.end; i++) { \
- pRow[i] = (PIXEL_TYPE) p; \
-- }
-+ } }
- #include "swrast/s_tritemp.h"
-
-
diff --git a/graphics/MesaLib/patches/patch-an b/graphics/MesaLib/patches/patch-an
deleted file mode 100644
index e1d38aa10d2..00000000000
--- a/graphics/MesaLib/patches/patch-an
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-an,v 1.1 2008/04/24 07:40:24 bjs Exp $
-
---- src/mesa/main/glheader.h.orig 2008-03-09 12:53:33.000000000 -0400
-+++ src/mesa/main/glheader.h
-@@ -77,6 +77,12 @@
- # if _MSC_VER == 1200
- typedef UINT_PTR uintptr_t;
- # endif
-+#elif defined(__INTERIX)
-+/* Interix 3.x has a gcc that shadows this. */
-+# ifndef _UINTPTR_T_DEFINED
-+ typedef unsigned long uintptr_t;
-+# define _UINTPTR_T_DEFINED
-+# endif
- #else
- # include <inttypes.h>
- #endif
diff --git a/graphics/MesaLib/patches/patch-ao b/graphics/MesaLib/patches/patch-ao
deleted file mode 100644
index 56b5197ff5b..00000000000
--- a/graphics/MesaLib/patches/patch-ao
+++ /dev/null
@@ -1,28 +0,0 @@
-$NetBSD: patch-ao,v 1.2 2008/04/30 07:00:14 bjs Exp $
-
---- src/mesa/x86/common_x86.c.orig 2008-04-29 15:29:20.000000000 -0400
-+++ src/mesa/x86/common_x86.c
-@@ -38,7 +38,7 @@
- #if defined(USE_SSE_ASM) && defined(__linux__)
- #include <linux/version.h>
- #endif
--#if defined(USE_SSE_ASM) && (defined(__FreeBSD__) || defined(__DragonFly__))
-+#if defined(USE_SSE_ASM) && defined(USE_SSE_SYSCTL_DETECTION)
- #include <sys/types.h>
- #include <sys/sysctl.h>
- #endif
-@@ -113,6 +113,14 @@ static void check_os_sse_support( void )
- if (ret || !enabled)
- _mesa_x86_cpu_features &= ~(X86_FEATURE_XMM);
- }
-+#elif defined (__NetBSD__)
-+ {
-+ int ret, enabled;
-+ size_t len = sizeof(enabled);
-+ ret = sysctlbyname("machdep.sse", &enabled, &len, (void *)NULL, 0);
-+ if (ret || !enabled)
-+ _mesa_x86_cpu_features &= ~(X86_FEATURE_XMM);
-+ }
- #elif defined(WIN32)
- LPTOP_LEVEL_EXCEPTION_FILTER oldFilter;
-
diff --git a/graphics/MesaLib/patches/patch-ap b/graphics/MesaLib/patches/patch-ap
deleted file mode 100644
index 61b7e38a61e..00000000000
--- a/graphics/MesaLib/patches/patch-ap
+++ /dev/null
@@ -1,63 +0,0 @@
-$NetBSD: patch-ap,v 1.1 2008/04/24 07:40:24 bjs Exp $
-
-This patch enables code for handing out chunks of executable memory
-from an "EXEC_HEAP_SIZE-ed" anonymous area.
-
-Previously, it was only enabled for linux! Nice!
-
-While here, add code to look for the 'MESA_EXECMEM_WIRED' environment
-variable. If it is defined (assuming MAP_WIRED is defined at build
-time, of course), then the mapped anonymous pages are wired down.
-
---- src/mesa/main/execmem.c.orig 2007-11-03 10:41:44.000000000 -0400
-+++ src/mesa/main/execmem.c
-@@ -36,7 +36,7 @@
-
-
-
--#if defined(__linux__)
-+#if defined(MESA_EXECMEM_MMAP)
-
- /*
- * Allocate a large block of memory which can hold code then dole it out
-@@ -47,26 +47,38 @@
- #include <sys/mman.h>
- #include "mm.h"
-
-+#ifndef EXEC_HEAP_SIZE
- #define EXEC_HEAP_SIZE (10*1024*1024)
-+#endif
-+
-+#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
-+#define MAP_ANONYMOUS MAP_ANON
-+#endif
-
- _glthread_DECLARE_STATIC_MUTEX(exec_mutex);
-
- static struct mem_block *exec_heap = NULL;
- static unsigned char *exec_mem = NULL;
-
-+static int flags = MAP_PRIVATE | MAP_ANONYMOUS;
-+
-
- static void
- init_heap(void)
- {
-+#ifdef MAP_WIRED
-+ flags |= _mesa_getenv("MESA_EXECMEM_WIRED") ? MAP_WIRED : 0;
-+#endif
-+
- if (!exec_heap)
- exec_heap = mmInit( 0, EXEC_HEAP_SIZE );
-
- if (!exec_mem)
- exec_mem = (unsigned char *) mmap(0, EXEC_HEAP_SIZE,
- PROT_EXEC | PROT_READ | PROT_WRITE,
-- MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
--}
-+ flags, -1, 0);
-
-+}
-
- void *
- _mesa_exec_malloc(GLuint size)
diff --git a/graphics/MesaLib/patches/patch-ax b/graphics/MesaLib/patches/patch-ax
new file mode 100644
index 00000000000..8b56f9aae6d
--- /dev/null
+++ b/graphics/MesaLib/patches/patch-ax
@@ -0,0 +1,21 @@
+$NetBSD: patch-ax,v 1.1 2008/07/27 00:03:42 bjs Exp $
+
+--- src/glu/Makefile.orig 2008-07-18 10:39:12.000000000 -0400
++++ src/glu/Makefile
+@@ -22,10 +22,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
++ $(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
+
+ clean:
+ @for dir in $(SUBDIRS) ; do \
diff --git a/graphics/MesaLib/patches/patch-ay b/graphics/MesaLib/patches/patch-ay
new file mode 100644
index 00000000000..b49469feb2f
--- /dev/null
+++ b/graphics/MesaLib/patches/patch-ay
@@ -0,0 +1,10 @@
+$NetBSD: patch-ay,v 1.1 2008/07/27 00:03:42 bjs Exp $
+
+--- progs/xdemos/Makefile.orig 2008-07-18 10:39:12.000000000 -0400
++++ progs/xdemos/Makefile
+@@ -94,3 +94,5 @@ xrotfontdemo.o: xrotfontdemo.c xuserotfo
+ yuvrect_client: yuvrect_client.c
+ $(CC) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) $< $(LDFLAGS) $(LIBS) -l$(GLU_LIB) -o $@
+
++glthreads: glthreads.c
++ $(CC) $(PTHREAD_CFLAGS) -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) $< $(LDFLAGS) $(LIBS) -l$(GLU_LIB) $(PTHREAD_LDFLAGS) $(PTHREAD_LIBS) -o $@