[66184] trunk/dports/x11/mesa
jeremyhu at macports.org
jeremyhu at macports.org
Tue Apr 6 14:18:32 PDT 2010
Revision: 66184
http://trac.macports.org/changeset/66184
Author: jeremyhu at macports.org
Date: 2010-04-06 14:18:27 -0700 (Tue, 06 Apr 2010)
Log Message:
-----------
mesa: Pull in correct patchset (sorry). #24392
Modified Paths:
--------------
trunk/dports/x11/mesa/Portfile
trunk/dports/x11/mesa/files/0001-apple-Initial-import-of-libGL-for-OSX-from-AppleSGLX.patch
trunk/dports/x11/mesa/files/0002-apple-Remove-duplicate-headers-that-already-exist-in.patch
trunk/dports/x11/mesa/files/0003-apple-Change-ifdefs-for-DRI-to-be-DRI-APPLE.patch
Added Paths:
-----------
trunk/dports/x11/mesa/files/0004-darwin-Use-clientattrib.patch
trunk/dports/x11/mesa/files/0005-apple-Integrate-our-libGL-into-the-existing-build-sy.patch
trunk/dports/x11/mesa/files/0006-apple-Use-mesa-gl.h-rather-than-generating-one.patch
trunk/dports/x11/mesa/files/0007-Use-X_LIBS-from-pkg-config-instead-of-libdir-for-loc.patch
Removed Paths:
-------------
trunk/dports/x11/mesa/files/0004-apple-Integrate-our-libGL-into-the-existing-build-sy.patch
trunk/dports/x11/mesa/files/0005-apple-Use-mesa-gl.h-rather-than-generating-one.patch
trunk/dports/x11/mesa/files/0006-Use-X_LIBS-from-pkg-config-instead-of-libdir-for-loc.patch
Modified: trunk/dports/x11/mesa/Portfile
===================================================================
--- trunk/dports/x11/mesa/Portfile 2010-04-06 20:58:35 UTC (rev 66183)
+++ trunk/dports/x11/mesa/Portfile 2010-04-06 21:18:27 UTC (rev 66184)
@@ -5,6 +5,7 @@
name mesa
version 7.8.1
+revision 1
categories x11 graphics
maintainers jeremyhu openmaintainer
description Mesa 3D Graphics Library
@@ -124,9 +125,10 @@
0001-apple-Initial-import-of-libGL-for-OSX-from-AppleSGLX.patch \
0002-apple-Remove-duplicate-headers-that-already-exist-in.patch \
0003-apple-Change-ifdefs-for-DRI-to-be-DRI-APPLE.patch \
- 0004-apple-Integrate-our-libGL-into-the-existing-build-sy.patch \
- 0005-apple-Use-mesa-gl.h-rather-than-generating-one.patch \
- 0006-Use-X_LIBS-from-pkg-config-instead-of-libdir-for-loc.patch
+ 0004-darwin-Use-clientattrib.patch \
+ 0005-apple-Integrate-our-libGL-into-the-existing-build-sy.patch \
+ 0006-apple-Use-mesa-gl.h-rather-than-generating-one.patch \
+ 0007-Use-X_LIBS-from-pkg-config-instead-of-libdir-for-loc.patch
}
platform darwin 8 {
Modified: trunk/dports/x11/mesa/files/0001-apple-Initial-import-of-libGL-for-OSX-from-AppleSGLX.patch
===================================================================
--- trunk/dports/x11/mesa/files/0001-apple-Initial-import-of-libGL-for-OSX-from-AppleSGLX.patch 2010-04-06 20:58:35 UTC (rev 66183)
+++ trunk/dports/x11/mesa/files/0001-apple-Initial-import-of-libGL-for-OSX-from-AppleSGLX.patch 2010-04-06 21:18:27 UTC (rev 66184)
@@ -1,7 +1,7 @@
-From 7de473e09e1c4b24ce0a4ec6f3f41b6b0f19489d Mon Sep 17 00:00:00 2001
+From ef7a36381b8cd91fbb6d709cce7a7fb735ed69a7 Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston <jeremyhu at apple.com>
Date: Thu, 1 Apr 2010 11:01:31 -0700
-Subject: [PATCH 1/6] apple: Initial import of libGL for OSX from AppleSGLX svn repository.
+Subject: [PATCH 1/7] apple: Initial import of libGL for OSX from AppleSGLX svn repository.
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
---
@@ -69,13 +69,13 @@
src/glx/glcontextmodes.c | 4 +
src/glx/glx_pbuffer.c | 196 +-
src/glx/glxclient.h | 13 +
- src/glx/glxcmds.c | 195 +-
+ src/glx/glxcmds.c | 184 +-
src/glx/glxcurrent.c | 53 +-
src/glx/glxext.c | 76 +-
src/glx/glxextensions.c | 38 +
src/glx/indirect_size.c | 2 +-
src/glx/xfont.c | 2 +-
- 70 files changed, 71587 insertions(+), 38 deletions(-)
+ 70 files changed, 71576 insertions(+), 38 deletions(-)
create mode 100644 src/glx/apple/.gitignore
create mode 100644 src/glx/apple/GL_aliases
create mode 100644 src/glx/apple/GL_extensions
@@ -115,7 +115,7 @@
create mode 100644 src/glx/apple/gen_defs.tcl
create mode 100644 src/glx/apple/gen_exports.tcl
create mode 100644 src/glx/apple/gen_funcs.tcl
- create mode 100644 src/glx/apple/gen_gl_h.sh
+ create mode 100755 src/glx/apple/gen_gl_h.sh
create mode 100644 src/glx/apple/gen_types.tcl
create mode 100644 src/glx/apple/glx_empty.c
create mode 100644 src/glx/apple/glx_error.c
@@ -307,7 +307,7 @@
+promoted ARB_vertex_program
diff --git Mesa-7.8.1/src/glx/apple/Makefile Mesa-7.8.1/src/glx/apple/Makefile
new file mode 100644
-index 0000000..b3d163a
+index 0000000..314dd4d
--- /dev/null
+++ Mesa-7.8.1/src/glx/apple/Makefile
@@ -0,0 +1,97 @@
@@ -315,7 +315,7 @@
+X11_DIR = $(INSTALL_DIR)
+
+CC=gcc
-+GL_CFLAGS=-Wall -ggdb3 -Os -DPTHREADS -D_REENTRANT $(RC_CFLAGS) $(CFLAGS)
++GL_CFLAGS=-Wall -ggdb3 -Os -DPTHREADS -D_REENTRANT -DGLX_USE_APPLEGL -DGLX_ALIAS_UNSUPPORTED $(RC_CFLAGS) $(CFLAGS)
+GL_LDFLAGS=-L$(INSTALL_DIR)/lib -L$(X11_DIR)/lib $(LDFLAGS) -Wl,-single_module
+
+TCLSH=tclsh8.5
@@ -325,7 +325,7 @@
+LN=ln
+RM=rm
+
-+INCLUDE=-I. -Iinclude -Iinclude/internal -I.. -DGLX_ALIAS_UNSUPPORTED -I$(INSTALL_DIR)/include -I$(X11_DIR)/include
++INCLUDE=-I. -Iinclude -Iinclude/internal -I.. -I../../../include -I$(INSTALL_DIR)/include -I$(X11_DIR)/include
+COMPILE=$(CC) $(INCLUDE) $(GL_CFLAGS) -c
+
+#The directory with the final binaries.
@@ -6711,7 +6711,7 @@
+exit [main $::argc $::argv]
+
diff --git Mesa-7.8.1/src/glx/apple/gen_gl_h.sh Mesa-7.8.1/src/glx/apple/gen_gl_h.sh
-new file mode 100644
+new file mode 100755
index 0000000..f10ddd0
--- /dev/null
+++ Mesa-7.8.1/src/glx/apple/gen_gl_h.sh
@@ -71986,7 +71986,7 @@
/* Initialize the GLX extension for dpy */
extern __GLXdisplayPrivate *__glXInitialize(Display *);
diff --git Mesa-7.8.1/src/glx/glxcmds.c Mesa-7.8.1/src/glx/glxcmds.c
-index 51a75e3..d544671 100644
+index 51a75e3..c69ca74 100644
--- Mesa-7.8.1/src/glx/glxcmds.c
+++ Mesa-7.8.1/src/glx/glxcmds.c
@@ -34,11 +34,17 @@
@@ -72021,17 +72021,12 @@
return gc;
}
-@@ -365,10 +377,15 @@ CreateContext(Display * dpy, int generic_id,
- unsigned code, int renderType, int screen)
- {
- GLXContext gc;
--#ifdef GLX_DIRECT_RENDERING
-+#if defined(GLX_DIRECT_RENDERING) || defined(GLX_USE_APPLEGL)
+@@ -368,7 +380,11 @@ CreateContext(Display * dpy, int generic_id,
+ #ifdef GLX_DIRECT_RENDERING
__GLXscreenConfigs *const psc = GetGLXScreenConfigs(dpy, screen);
#endif
-
+#ifdef GLX_USE_APPLEGL
-+ const __GLcontextModes *mode;
+ int errorcode;
+ bool x11error;
+#endif
@@ -72039,7 +72034,7 @@
if (dpy == NULL)
return NULL;
-@@ -379,6 +396,7 @@ CreateContext(Display * dpy, int generic_id,
+@@ -379,6 +395,7 @@ CreateContext(Display * dpy, int generic_id,
if (!gc)
return NULL;
@@ -72047,7 +72042,7 @@
#ifdef GLX_DIRECT_RENDERING
if (allowDirect && psc->driScreen) {
gc->driContext = psc->driScreen->createContext(psc, fbconfig, gc,
-@@ -455,9 +473,34 @@ CreateContext(Display * dpy, int generic_id,
+@@ -455,9 +472,24 @@ CreateContext(Display * dpy, int generic_id,
UnlockDisplay(dpy);
SyncHandle();
@@ -72055,17 +72050,7 @@
gc->imported = GL_FALSE;
+#ifdef GLX_USE_APPLEGL
-+ mode = _gl_context_modes_find_fbconfig(psc->configs,
-+ fbconfig->fbconfigID);
-+
-+ if(NULL == mode) {
-+ __glXSendError(dpy, BadValue, fbconfig->fbconfigID, X_GLXCreateContext,
-+ true);
-+ __glXFreeContext(gc);
-+ return NULL;
-+ }
-+
-+ if(apple_glx_create_context(&gc->apple, dpy, screen, mode,
++ if(apple_glx_create_context(&gc->apple, dpy, screen, fbconfig,
+ shareList ? shareList->apple : NULL,
+ &errorcode, &x11error)) {
+ __glXSendError(dpy, errorcode, 0, X_GLXCreateContext, x11error);
@@ -72074,7 +72059,7 @@
+ }
+
+ gc->currentContextTag = -1;
-+ gc->mode = mode;
++ gc->mode = fbconfig;
+ gc->isDirect = allowDirect;
+#else
gc->renderType = renderType;
@@ -72082,7 +72067,16 @@
return gc;
}
-@@ -504,7 +547,9 @@ __glXFreeContext(__GLXcontext * gc)
+@@ -469,7 +501,7 @@ glXCreateContext(Display * dpy, XVisualInfo * vis,
+ const __GLcontextModes *mode = NULL;
+ int renderType = 0;
+
+-#ifdef GLX_DIRECT_RENDERING
++#if defined(GLX_DIRECT_RENDERING) || defined(GLX_USE_APPLEGL)
+ __GLXscreenConfigs *const psc = GetGLXScreenConfigs(dpy, vis->screen);
+
+ mode = _gl_context_modes_find_visual(psc->visuals, vis->visualid);
+@@ -504,7 +536,9 @@ __glXFreeContext(__GLXcontext * gc)
XFree((char *) gc->version);
if (gc->extensions)
XFree((char *) gc->extensions);
@@ -72092,7 +72086,7 @@
XFree((char *) gc->buf);
Xfree((char *) gc->client_state_private);
XFree((char *) gc);
-@@ -517,6 +562,7 @@ __glXFreeContext(__GLXcontext * gc)
+@@ -517,6 +551,7 @@ __glXFreeContext(__GLXcontext * gc)
static void
DestroyContext(Display * dpy, GLXContext gc)
{
@@ -72100,7 +72094,7 @@
xGLXDestroyContextReq *req;
GLXContextID xid;
CARD8 opcode;
-@@ -552,17 +598,31 @@ DestroyContext(Display * dpy, GLXContext gc)
+@@ -552,17 +587,31 @@ DestroyContext(Display * dpy, GLXContext gc)
#endif
__glXFreeVertexArrayState(gc);
@@ -72133,7 +72127,7 @@
if (!imported) {
/*
** This dpy also created the server side part of the context.
-@@ -576,6 +636,7 @@ DestroyContext(Display * dpy, GLXContext gc)
+@@ -576,6 +625,7 @@ DestroyContext(Display * dpy, GLXContext gc)
UnlockDisplay(dpy);
SyncHandle();
}
@@ -72141,7 +72135,7 @@
}
PUBLIC void
-@@ -630,7 +691,9 @@ glXQueryExtension(Display * dpy, int *errorBase, int *eventBase)
+@@ -630,7 +680,9 @@ glXQueryExtension(Display * dpy, int *errorBase, int *eventBase)
PUBLIC void
glXWaitGL(void)
{
@@ -72151,7 +72145,7 @@
GLXContext gc = __glXGetCurrentContext();
Display *dpy = gc->currentDpy;
-@@ -639,7 +702,9 @@ glXWaitGL(void)
+@@ -639,7 +691,9 @@ glXWaitGL(void)
/* Flush any pending commands out */
__glXFlushRenderBuffer(gc, gc->pc);
@@ -72162,7 +72156,7 @@
#ifdef GLX_DIRECT_RENDERING
if (gc->driContext) {
int screen;
-@@ -664,6 +729,7 @@ glXWaitGL(void)
+@@ -664,6 +718,7 @@ glXWaitGL(void)
req->contextTag = gc->currentContextTag;
UnlockDisplay(dpy);
SyncHandle();
@@ -72170,7 +72164,7 @@
}
/*
-@@ -673,7 +739,9 @@ glXWaitGL(void)
+@@ -673,7 +728,9 @@ glXWaitGL(void)
PUBLIC void
glXWaitX(void)
{
@@ -72180,7 +72174,7 @@
GLXContext gc = __glXGetCurrentContext();
Display *dpy = gc->currentDpy;
-@@ -683,6 +751,9 @@ glXWaitX(void)
+@@ -683,6 +740,9 @@ glXWaitX(void)
/* Flush any pending commands out */
__glXFlushRenderBuffer(gc, gc->pc);
@@ -72190,7 +72184,7 @@
#ifdef GLX_DIRECT_RENDERING
if (gc->driContext) {
int screen;
-@@ -710,12 +781,15 @@ glXWaitX(void)
+@@ -710,12 +770,15 @@ glXWaitX(void)
req->contextTag = gc->currentContextTag;
UnlockDisplay(dpy);
SyncHandle();
@@ -72206,7 +72200,7 @@
GLXContext gc = __glXGetCurrentContext();
Display *dpy = gc->currentDpy;
-@@ -724,7 +798,9 @@ glXUseXFont(Font font, int first, int count, int listBase)
+@@ -724,7 +787,9 @@ glXUseXFont(Font font, int first, int count, int listBase)
/* Flush any pending commands out */
(void) __glXFlushRenderBuffer(gc, gc->pc);
@@ -72217,7 +72211,7 @@
#ifdef GLX_DIRECT_RENDERING
if (gc->driContext) {
DRI_glXUseXFont(font, first, count, listBase);
-@@ -744,6 +820,7 @@ glXUseXFont(Font font, int first, int count, int listBase)
+@@ -744,6 +809,7 @@ glXUseXFont(Font font, int first, int count, int listBase)
req->listBase = listBase;
UnlockDisplay(dpy);
SyncHandle();
@@ -72225,7 +72219,7 @@
}
/************************************************************************/
-@@ -756,6 +833,17 @@ PUBLIC void
+@@ -756,6 +822,17 @@ PUBLIC void
glXCopyContext(Display * dpy, GLXContext source,
GLXContext dest, unsigned long mask)
{
@@ -72243,7 +72237,7 @@
xGLXCopyContextReq *req;
GLXContext gc = __glXGetCurrentContext();
GLXContextTag tag;
-@@ -794,9 +882,11 @@ glXCopyContext(Display * dpy, GLXContext source,
+@@ -794,9 +871,11 @@ glXCopyContext(Display * dpy, GLXContext source,
req->contextTag = tag;
UnlockDisplay(dpy);
SyncHandle();
@@ -72255,7 +72249,7 @@
/**
* Determine if a context uses direct rendering.
*
-@@ -844,6 +934,7 @@ __glXIsDirect(Display * dpy, GLXContextID contextID)
+@@ -844,6 +923,7 @@ __glXIsDirect(Display * dpy, GLXContextID contextID)
return reply.isDirect;
#endif /* USE_XCB */
}
@@ -72263,7 +72257,7 @@
/**
* \todo
-@@ -854,6 +945,17 @@ __glXIsDirect(Display * dpy, GLXContextID contextID)
+@@ -854,6 +934,17 @@ __glXIsDirect(Display * dpy, GLXContextID contextID)
PUBLIC Bool
glXIsDirect(Display * dpy, GLXContext gc)
{
@@ -72281,7 +72275,7 @@
if (!gc) {
return GL_FALSE;
}
-@@ -861,11 +963,24 @@ glXIsDirect(Display * dpy, GLXContext gc)
+@@ -861,11 +952,24 @@ glXIsDirect(Display * dpy, GLXContext gc)
return GL_TRUE;
}
return __glXIsDirect(dpy, gc->xid);
@@ -72306,7 +72300,7 @@
xGLXCreateGLXPixmapReq *req;
GLXPixmap xid;
CARD8 opcode;
-@@ -915,6 +1030,7 @@ glXCreateGLXPixmap(Display * dpy, XVisualInfo * vis, Pixmap pixmap)
+@@ -915,6 +1019,7 @@ glXCreateGLXPixmap(Display * dpy, XVisualInfo * vis, Pixmap pixmap)
#endif
return xid;
@@ -72314,7 +72308,7 @@
}
/*
-@@ -923,6 +1039,10 @@ glXCreateGLXPixmap(Display * dpy, XVisualInfo * vis, Pixmap pixmap)
+@@ -923,6 +1028,10 @@ glXCreateGLXPixmap(Display * dpy, XVisualInfo * vis, Pixmap pixmap)
PUBLIC void
glXDestroyGLXPixmap(Display * dpy, GLXPixmap glxpixmap)
{
@@ -72325,7 +72319,7 @@
xGLXDestroyGLXPixmapReq *req;
CARD8 opcode;
-@@ -953,11 +1073,20 @@ glXDestroyGLXPixmap(Display * dpy, GLXPixmap glxpixmap)
+@@ -953,11 +1062,20 @@ glXDestroyGLXPixmap(Display * dpy, GLXPixmap glxpixmap)
}
}
#endif
@@ -72346,7 +72340,7 @@
GLXContext gc;
GLXContextTag tag;
CARD8 opcode;
-@@ -1012,6 +1141,7 @@ glXSwapBuffers(Display * dpy, GLXDrawable drawable)
+@@ -1012,6 +1130,7 @@ glXSwapBuffers(Display * dpy, GLXDrawable drawable)
SyncHandle();
XFlush(dpy);
#endif /* USE_XCB */
@@ -72354,7 +72348,7 @@
}
-@@ -1436,6 +1566,12 @@ glXChooseVisual(Display * dpy, int screen, int *attribList)
+@@ -1436,6 +1555,12 @@ glXChooseVisual(Display * dpy, int screen, int *attribList)
}
}
@@ -72367,7 +72361,7 @@
return visualList;
}
-@@ -1569,6 +1705,7 @@ PUBLIC
+@@ -1569,6 +1694,7 @@ PUBLIC
GLX_ALIAS(Display *, glXGetCurrentDisplayEXT, (void), (),
glXGetCurrentDisplay)
@@ -72375,7 +72369,7 @@
/**
* Used internally by libGL to send \c xGLXQueryContextinfoExtReq requests
* to the X-server.
-@@ -1680,9 +1817,12 @@ static int __glXQueryContextInfo(Display * dpy, GLXContext ctx)
+@@ -1680,9 +1806,12 @@ static int __glXQueryContextInfo(Display * dpy, GLXContext ctx)
return retval;
}
@@ -72388,7 +72382,7 @@
int retVal;
/* get the information from the server if we don't have it already */
-@@ -1695,13 +1835,17 @@ glXQueryContext(Display * dpy, GLXContext ctx, int attribute, int *value)
+@@ -1695,13 +1824,17 @@ glXQueryContext(Display * dpy, GLXContext ctx, int attribute, int *value)
if (Success != retVal)
return retVal;
}
@@ -72407,7 +72401,7 @@
case GLX_SCREEN:
*value = (int) (ctx->screen);
break;
-@@ -1730,6 +1874,9 @@ PUBLIC GLXContextID glXGetContextIDEXT(const GLXContext ctx)
+@@ -1730,6 +1863,9 @@ PUBLIC GLXContextID glXGetContextIDEXT(const GLXContext ctx)
PUBLIC GLXContext
glXImportContextEXT(Display * dpy, GLXContextID contextID)
{
@@ -72417,7 +72411,7 @@
GLXContext ctx;
if (contextID == None) {
-@@ -1750,6 +1897,7 @@ glXImportContextEXT(Display * dpy, GLXContextID contextID)
+@@ -1750,6 +1886,7 @@ glXImportContextEXT(Display * dpy, GLXContextID contextID)
}
}
return ctx;
@@ -72425,7 +72419,7 @@
}
PUBLIC void
-@@ -1877,7 +2025,7 @@ glXGetVisualFromFBConfig(Display * dpy, GLXFBConfig config)
+@@ -1877,7 +2014,7 @@ glXGetVisualFromFBConfig(Display * dpy, GLXFBConfig config)
return XGetVisualInfo(dpy, VisualIDMask, &visualTemplate, &count);
}
@@ -72434,7 +72428,7 @@
/*
** GLX_SGI_swap_control
*/
-@@ -2232,6 +2380,7 @@ __glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
+@@ -2232,6 +2369,7 @@ __glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
return GLX_BAD_CONTEXT;
}
@@ -72442,7 +72436,7 @@
/*
** GLX_SGIX_fbconfig
-@@ -2258,17 +2407,24 @@ glXCreateGLXPixmapWithConfigSGIX(Display * dpy,
+@@ -2258,17 +2396,24 @@ glXCreateGLXPixmapWithConfigSGIX(Display * dpy,
GLXFBConfigSGIX config,
Pixmap pixmap)
{
@@ -72468,7 +72462,7 @@
psc = GetGLXScreenConfigs(dpy, fbconfig->screen);
if ((psc != NULL)
-@@ -2296,6 +2452,7 @@ glXCreateGLXPixmapWithConfigSGIX(Display * dpy,
+@@ -2296,6 +2441,7 @@ glXCreateGLXPixmapWithConfigSGIX(Display * dpy,
}
return xid;
@@ -72476,7 +72470,7 @@
}
PUBLIC GLXContext
-@@ -2341,7 +2498,7 @@ glXGetFBConfigFromVisualSGIX(Display * dpy, XVisualInfo * vis)
+@@ -2341,7 +2487,7 @@ glXGetFBConfigFromVisualSGIX(Display * dpy, XVisualInfo * vis)
return NULL;
}
@@ -72485,7 +72479,7 @@
/*
** GLX_SGIX_swap_group
*/
-@@ -2959,6 +3116,8 @@ __glXReleaseTexImageEXT(Display * dpy, GLXDrawable drawable, int buffer)
+@@ -2959,6 +3105,8 @@ __glXReleaseTexImageEXT(Display * dpy, GLXDrawable drawable, int buffer)
/*@}*/
@@ -72494,7 +72488,7 @@
/**
* \c strdup is actually not a standard ANSI C or POSIX routine.
* Irix will not define it if ANSI mode is in effect.
-@@ -3036,6 +3195,7 @@ static const struct name_address_pair GLX_functions[] = {
+@@ -3036,6 +3184,7 @@ static const struct name_address_pair GLX_functions[] = {
GLX_FUNCTION(glXQueryDrawable),
GLX_FUNCTION(glXSelectEvent),
@@ -72502,7 +72496,7 @@
/*** GLX_SGI_swap_control ***/
GLX_FUNCTION2(glXSwapIntervalSGI, __glXSwapIntervalSGI),
-@@ -3053,6 +3213,7 @@ static const struct name_address_pair GLX_functions[] = {
+@@ -3053,6 +3202,7 @@ static const struct name_address_pair GLX_functions[] = {
GLX_FUNCTION2(glXGetCurrentDisplayEXT, glXGetCurrentDisplay),
GLX_FUNCTION(glXImportContextEXT),
GLX_FUNCTION2(glXQueryContextInfoEXT, glXQueryContext),
@@ -72510,7 +72504,7 @@
/*** GLX_SGIX_fbconfig ***/
GLX_FUNCTION2(glXGetFBConfigAttribSGIX, glXGetFBConfigAttrib),
-@@ -3062,6 +3223,7 @@ static const struct name_address_pair GLX_functions[] = {
+@@ -3062,6 +3212,7 @@ static const struct name_address_pair GLX_functions[] = {
GLX_FUNCTION2(glXGetVisualFromFBConfigSGIX, glXGetVisualFromFBConfig),
GLX_FUNCTION(glXGetFBConfigFromVisualSGIX),
@@ -72518,7 +72512,7 @@
/*** GLX_SGIX_pbuffer ***/
GLX_FUNCTION(glXCreateGLXPbufferSGIX),
GLX_FUNCTION(glXDestroyGLXPbufferSGIX),
-@@ -3099,6 +3261,7 @@ static const struct name_address_pair GLX_functions[] = {
+@@ -3099,6 +3250,7 @@ static const struct name_address_pair GLX_functions[] = {
GLX_FUNCTION2(glXEndFrameTrackingMESA, __glXEndFrameTrackingMESA),
GLX_FUNCTION2(glXGetFrameUsageMESA, __glXGetFrameUsageMESA),
GLX_FUNCTION2(glXQueryFrameTrackingMESA, __glXQueryFrameTrackingMESA),
@@ -72526,7 +72520,7 @@
/*** GLX_ARB_get_proc_address ***/
GLX_FUNCTION(glXGetProcAddressARB),
-@@ -3106,6 +3269,7 @@ static const struct name_address_pair GLX_functions[] = {
+@@ -3106,6 +3258,7 @@ static const struct name_address_pair GLX_functions[] = {
/*** GLX 1.4 ***/
GLX_FUNCTION2(glXGetProcAddress, glXGetProcAddressARB),
@@ -72534,7 +72528,7 @@
/*** GLX_OML_sync_control ***/
GLX_FUNCTION2(glXWaitForSbcOML, __glXWaitForSbcOML),
GLX_FUNCTION2(glXWaitForMscOML, __glXWaitForMscOML),
-@@ -3116,6 +3280,7 @@ static const struct name_address_pair GLX_functions[] = {
+@@ -3116,6 +3269,7 @@ static const struct name_address_pair GLX_functions[] = {
/*** GLX_EXT_texture_from_pixmap ***/
GLX_FUNCTION2(glXBindTexImageEXT, __glXBindTexImageEXT),
GLX_FUNCTION2(glXReleaseTexImageEXT, __glXReleaseTexImageEXT),
@@ -72542,7 +72536,7 @@
#ifdef GLX_DIRECT_RENDERING
/*** DRI configuration ***/
-@@ -3126,7 +3291,7 @@ static const struct name_address_pair GLX_functions[] = {
+@@ -3126,7 +3280,7 @@ static const struct name_address_pair GLX_functions[] = {
{NULL, NULL} /* end of list */
};
@@ -72551,7 +72545,7 @@
static const GLvoid *
get_glx_proc_address(const char *funcName)
{
-@@ -3140,7 +3305,7 @@ get_glx_proc_address(const char *funcName)
+@@ -3140,7 +3294,7 @@ get_glx_proc_address(const char *funcName)
return NULL;
}
@@ -72560,7 +72554,7 @@
/**
* Get the address of a named GL function. This is the pre-GLX 1.4 name for
-@@ -3163,13 +3328,15 @@ PUBLIC void (*glXGetProcAddressARB(const GLubyte * procName)) (void)
+@@ -3163,13 +3317,15 @@ PUBLIC void (*glXGetProcAddressARB(const GLubyte * procName)) (void)
* DRI based drivers from searching the core GL function table for
* internal API functions.
*/
Modified: trunk/dports/x11/mesa/files/0002-apple-Remove-duplicate-headers-that-already-exist-in.patch
===================================================================
--- trunk/dports/x11/mesa/files/0002-apple-Remove-duplicate-headers-that-already-exist-in.patch 2010-04-06 20:58:35 UTC (rev 66183)
+++ trunk/dports/x11/mesa/files/0002-apple-Remove-duplicate-headers-that-already-exist-in.patch 2010-04-06 21:18:27 UTC (rev 66184)
@@ -1,7 +1,7 @@
-From 59ebc096ed6cab469c0bb38afa8e0ff850edb619 Mon Sep 17 00:00:00 2001
+From 330b3405201b0095571a3d27e5ae3e9ec7331d69 Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston <jeremyhu at freedesktop.org>
Date: Thu, 24 Dec 2009 09:51:17 -0800
-Subject: [PATCH 2/6] apple: Remove duplicate headers that already exist in mesa.
+Subject: [PATCH 2/7] apple: Remove duplicate headers that already exist in mesa.
Signed-off-by: Jeremy Huddleston <jeremyhu at freedesktop.org>
---
Modified: trunk/dports/x11/mesa/files/0003-apple-Change-ifdefs-for-DRI-to-be-DRI-APPLE.patch
===================================================================
--- trunk/dports/x11/mesa/files/0003-apple-Change-ifdefs-for-DRI-to-be-DRI-APPLE.patch 2010-04-06 20:58:35 UTC (rev 66183)
+++ trunk/dports/x11/mesa/files/0003-apple-Change-ifdefs-for-DRI-to-be-DRI-APPLE.patch 2010-04-06 21:18:27 UTC (rev 66184)
@@ -1,11 +1,12 @@
-From e36606317bad7d200a8d1c0cee537608debe0ee5 Mon Sep 17 00:00:00 2001
+From 3482203d52be09782d8c110fca18b28e60ae38de Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston <jeremyhu at apple.com>
-Date: Thu, 1 Apr 2010 11:17:04 -0700
-Subject: [PATCH 3/6] apple: Change ifdefs for DRI to be DRI && !APPLE
+Date: Fri, 2 Apr 2010 01:35:19 -0700
+Subject: [PATCH 3/7] apple: Change ifdefs for DRI to be DRI && !APPLE
Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
---
src/glx/XF86dri.c | 2 +-
+ src/glx/apple/Makefile | 4 +-
src/glx/apple/apple_xgl_api_read.c | 6 +-
src/glx/apple/apple_xgl_api_stereo.c | 4 +-
src/glx/apple/apple_xgl_api_viewport.c | 4 +-
@@ -15,13 +16,13 @@
src/glx/drisw_glx.c | 2 +-
src/glx/glx_pbuffer.c | 6 +-
src/glx/glxclient.h | 33 +++++------
- src/glx/glxcmds.c | 100 ++++++++++++++-----------------
+ src/glx/glxcmds.c | 97 +++++++++++++++-----------------
src/glx/glxcurrent.c | 20 +++---
src/glx/glxext.c | 10 ++--
src/glx/indirect.c | 30 +++++-----
src/glx/singlepix.c | 2 +-
src/glx/xfont.c | 2 +-
- 16 files changed, 106 insertions(+), 121 deletions(-)
+ 17 files changed, 108 insertions(+), 120 deletions(-)
diff --git Mesa-7.8.1/src/glx/XF86dri.c Mesa-7.8.1/src/glx/XF86dri.c
index fdbdd43..d0e8880 100644
@@ -36,6 +37,28 @@
#define NEED_REPLIES
#include <X11/Xlibint.h>
+diff --git Mesa-7.8.1/src/glx/apple/Makefile Mesa-7.8.1/src/glx/apple/Makefile
+index 314dd4d..4c05013 100644
+--- Mesa-7.8.1/src/glx/apple/Makefile
++++ Mesa-7.8.1/src/glx/apple/Makefile
+@@ -2,7 +2,7 @@ INSTALL_DIR = /usr/X11
+ X11_DIR = $(INSTALL_DIR)
+
+ CC=gcc
+-GL_CFLAGS=-Wall -ggdb3 -Os -DPTHREADS -D_REENTRANT -DGLX_USE_APPLEGL -DGLX_ALIAS_UNSUPPORTED $(RC_CFLAGS) $(CFLAGS)
++GL_CFLAGS=-Wall -ggdb3 -Os -DPTHREADS -D_REENTRANT -DGLX_DIRECT_RENDERING -DGLX_USE_APPLEGL -DGLX_ALIAS_UNSUPPORTED $(RC_CFLAGS) $(CFLAGS)
+ GL_LDFLAGS=-L$(INSTALL_DIR)/lib -L$(X11_DIR)/lib $(LDFLAGS) -Wl,-single_module
+
+ TCLSH=tclsh8.5
+@@ -12,7 +12,7 @@ INSTALL=install
+ LN=ln
+ RM=rm
+
+-INCLUDE=-I. -Iinclude -Iinclude/internal -I.. -I../../../include -I$(INSTALL_DIR)/include -I$(X11_DIR)/include
++INCLUDE=-I. -Iinclude -Iinclude/internal -I.. -I../../../include -I../../../src/mesa -I../../../src/mesa/glapi -I$(INSTALL_DIR)/include -I$(X11_DIR)/include
+ COMPILE=$(CC) $(INCLUDE) $(GL_CFLAGS) -c
+
+ #The directory with the final binaries.
diff --git Mesa-7.8.1/src/glx/apple/apple_xgl_api_read.c Mesa-7.8.1/src/glx/apple/apple_xgl_api_read.c
index 3dcb31b..36357c7 100644
--- Mesa-7.8.1/src/glx/apple/apple_xgl_api_read.c
@@ -301,7 +324,7 @@
__driGetMscRateOML(__DRIdrawable * draw,
int32_t * numerator, int32_t * denominator, void *private);
diff --git Mesa-7.8.1/src/glx/glxcmds.c Mesa-7.8.1/src/glx/glxcmds.c
-index d544671..38002f5 100644
+index c69ca74..329b841 100644
--- Mesa-7.8.1/src/glx/glxcmds.c
+++ Mesa-7.8.1/src/glx/glxcmds.c
@@ -34,21 +34,22 @@
@@ -351,26 +374,23 @@
gc->do_destroy = False;
#endif
-@@ -377,13 +378,13 @@ CreateContext(Display * dpy, int generic_id,
- unsigned code, int renderType, int screen)
+@@ -378,11 +379,12 @@ CreateContext(Display * dpy, int generic_id,
{
GLXContext gc;
--#if defined(GLX_DIRECT_RENDERING) || defined(GLX_USE_APPLEGL)
-+#ifdef GLX_DIRECT_RENDERING
+ #ifdef GLX_DIRECT_RENDERING
++#ifdef GLX_USE_APPLEGL
++ int errorcode;
++ bool x11error;
++#else
__GLXscreenConfigs *const psc = GetGLXScreenConfigs(dpy, screen);
--#endif
- #ifdef GLX_USE_APPLEGL
-- const __GLcontextModes *mode;
+ #endif
+-#ifdef GLX_USE_APPLEGL
- int errorcode;
- bool x11error;
-+ const __GLcontextModes *mode;
-+ int errorcode;
-+ bool x11error;
-+#endif
#endif
if (dpy == NULL)
-@@ -396,7 +397,7 @@ CreateContext(Display * dpy, int generic_id,
+@@ -395,7 +397,7 @@ CreateContext(Display * dpy, int generic_id,
if (!gc)
return NULL;
@@ -379,7 +399,7 @@
#ifdef GLX_DIRECT_RENDERING
if (allowDirect && psc->driScreen) {
gc->driContext = psc->driScreen->createContext(psc, fbconfig, gc,
-@@ -476,6 +477,9 @@ CreateContext(Display * dpy, int generic_id,
+@@ -475,9 +477,12 @@ CreateContext(Display * dpy, int generic_id,
#endif
gc->imported = GL_FALSE;
@@ -387,39 +407,32 @@
+
+ /* TODO: darwin: Integrate with above to do indirect */
#ifdef GLX_USE_APPLEGL
- mode = _gl_context_modes_find_fbconfig(psc->configs,
- fbconfig->fbconfigID);
-@@ -487,8 +491,8 @@ CreateContext(Display * dpy, int generic_id,
- return NULL;
- }
-
-- if(apple_glx_create_context(&gc->apple, dpy, screen, mode,
+- if(apple_glx_create_context(&gc->apple, dpy, screen, fbconfig,
- shareList ? shareList->apple : NULL,
-+ if(apple_glx_create_context(&gc->driContext, dpy, screen, mode,
++ if(apple_glx_create_context(&gc->driContext, dpy, screen, fbconfig,
+ shareList ? shareList->driContext : NULL,
&errorcode, &x11error)) {
__glXSendError(dpy, errorcode, 0, X_GLXCreateContext, x11error);
__glXFreeContext(gc);
-@@ -498,8 +502,6 @@ CreateContext(Display * dpy, int generic_id,
+@@ -487,8 +492,6 @@ CreateContext(Display * dpy, int generic_id,
gc->currentContextTag = -1;
- gc->mode = mode;
+ gc->mode = fbconfig;
gc->isDirect = allowDirect;
-#else
- gc->renderType = renderType;
#endif
return gc;
-@@ -547,9 +549,7 @@ __glXFreeContext(__GLXcontext * gc)
+@@ -536,7 +539,7 @@ __glXFreeContext(__GLXcontext * gc)
XFree((char *) gc->version);
if (gc->extensions)
XFree((char *) gc->extensions);
-#ifndef GLX_USE_APPLEGL
++#ifndef GLX_USE_APPLEGL /* TODO: clientattrib */
__glFreeAttributeState(gc);
--#endif
+ #endif
XFree((char *) gc->buf);
- Xfree((char *) gc->client_state_private);
- XFree((char *) gc);
-@@ -562,7 +562,7 @@ __glXFreeContext(__GLXcontext * gc)
+@@ -551,7 +554,7 @@ __glXFreeContext(__GLXcontext * gc)
static void
DestroyContext(Display * dpy, GLXContext gc)
{
@@ -428,7 +441,7 @@
xGLXDestroyContextReq *req;
GLXContextID xid;
CARD8 opcode;
-@@ -588,7 +588,7 @@ DestroyContext(Display * dpy, GLXContext gc)
+@@ -577,7 +580,7 @@ DestroyContext(Display * dpy, GLXContext gc)
return;
}
@@ -437,7 +450,7 @@
/* Destroy the direct rendering context */
if (gc->driContext) {
(*gc->driContext->destroyContext) (gc->driContext, gc->psc, dpy);
-@@ -617,8 +617,8 @@ DestroyContext(Display * dpy, GLXContext gc)
+@@ -606,8 +609,8 @@ DestroyContext(Display * dpy, GLXContext gc)
/* Destroy the handle if not current to anybody */
__glXUnlock();
#ifdef GLX_USE_APPLEGL
@@ -448,7 +461,7 @@
#endif
__glXFreeContext(gc);
}
-@@ -705,7 +705,7 @@ glXWaitGL(void)
+@@ -694,7 +697,7 @@ glXWaitGL(void)
#ifdef GLX_USE_APPLEGL
glFinish();
#else
@@ -457,7 +470,7 @@
if (gc->driContext) {
int screen;
__GLXDRIdrawable *pdraw =
-@@ -752,9 +752,9 @@ glXWaitX(void)
+@@ -741,9 +744,9 @@ glXWaitX(void)
__glXFlushRenderBuffer(gc, gc->pc);
#ifdef GLX_USE_APPLEGL
@@ -469,7 +482,7 @@
if (gc->driContext) {
int screen;
__GLXDRIdrawable *pdraw =
-@@ -801,7 +801,7 @@ glXUseXFont(Font font, int first, int count, int listBase)
+@@ -790,7 +793,7 @@ glXUseXFont(Font font, int first, int count, int listBase)
#ifdef GLX_USE_APPLEGL
DRI_glXUseXFont(font, first, count, listBase);
#else
@@ -478,7 +491,7 @@
if (gc->driContext) {
DRI_glXUseXFont(font, first, count, listBase);
return;
-@@ -838,7 +838,7 @@ glXCopyContext(Display * dpy, GLXContext source,
+@@ -827,7 +830,7 @@ glXCopyContext(Display * dpy, GLXContext source,
int errorcode;
bool x11error;
@@ -487,7 +500,7 @@
mask, &errorcode, &x11error)) {
__glXSendError(dpy, errorcode, 0, X_GLXCopyContext, x11error);
}
-@@ -854,7 +854,7 @@ glXCopyContext(Display * dpy, GLXContext source,
+@@ -843,7 +846,7 @@ glXCopyContext(Display * dpy, GLXContext source,
return;
}
@@ -496,7 +509,7 @@
if (gc->driContext) {
/* NOT_DONE: This does not work yet */
}
-@@ -886,7 +886,6 @@ glXCopyContext(Display * dpy, GLXContext source,
+@@ -875,7 +878,6 @@ glXCopyContext(Display * dpy, GLXContext source,
}
@@ -504,7 +517,7 @@
/**
* Determine if a context uses direct rendering.
*
-@@ -898,6 +897,9 @@ glXCopyContext(Display * dpy, GLXContext source,
+@@ -887,6 +889,9 @@ glXCopyContext(Display * dpy, GLXContext source,
static Bool
__glXIsDirect(Display * dpy, GLXContextID contextID)
{
@@ -514,7 +527,7 @@
#if !defined(USE_XCB)
xGLXIsDirectReq *req;
xGLXIsDirectReply reply;
-@@ -933,8 +935,8 @@ __glXIsDirect(Display * dpy, GLXContextID contextID)
+@@ -922,8 +927,8 @@ __glXIsDirect(Display * dpy, GLXContextID contextID)
return reply.isDirect;
#endif /* USE_XCB */
@@ -524,7 +537,7 @@
/**
* \todo
-@@ -945,17 +947,6 @@ __glXIsDirect(Display * dpy, GLXContextID contextID)
+@@ -934,17 +939,6 @@ __glXIsDirect(Display * dpy, GLXContextID contextID)
PUBLIC Bool
glXIsDirect(Display * dpy, GLXContext gc)
{
@@ -542,7 +555,7 @@
if (!gc) {
return GL_FALSE;
}
-@@ -963,7 +954,6 @@ glXIsDirect(Display * dpy, GLXContext gc)
+@@ -952,7 +946,6 @@ glXIsDirect(Display * dpy, GLXContext gc)
return GL_TRUE;
}
return __glXIsDirect(dpy, gc->xid);
@@ -550,7 +563,7 @@
}
PUBLIC GLXPixmap
-@@ -1002,7 +992,7 @@ glXCreateGLXPixmap(Display * dpy, XVisualInfo * vis, Pixmap pixmap)
+@@ -991,7 +984,7 @@ glXCreateGLXPixmap(Display * dpy, XVisualInfo * vis, Pixmap pixmap)
UnlockDisplay(dpy);
SyncHandle();
@@ -559,7 +572,7 @@
do {
/* FIXME: Maybe delay __DRIdrawable creation until the drawable
* is actually bound to a context... */
-@@ -1060,7 +1050,7 @@ glXDestroyGLXPixmap(Display * dpy, GLXPixmap glxpixmap)
+@@ -1049,7 +1042,7 @@ glXDestroyGLXPixmap(Display * dpy, GLXPixmap glxpixmap)
UnlockDisplay(dpy);
SyncHandle();
@@ -568,7 +581,7 @@
{
int screen;
__GLXdisplayPrivate *const priv = __glXInitialize(dpy);
-@@ -1081,8 +1071,8 @@ glXSwapBuffers(Display * dpy, GLXDrawable drawable)
+@@ -1070,8 +1063,8 @@ glXSwapBuffers(Display * dpy, GLXDrawable drawable)
{
#ifdef GLX_USE_APPLEGL
GLXContext gc = glXGetCurrentContext();
@@ -579,7 +592,7 @@
} else {
__glXSendError(dpy, GLXBadCurrentWindow, 0, X_GLXSwapBuffers, false);
}
-@@ -1096,7 +1086,7 @@ glXSwapBuffers(Display * dpy, GLXDrawable drawable)
+@@ -1085,7 +1078,7 @@ glXSwapBuffers(Display * dpy, GLXDrawable drawable)
xGLXSwapBuffersReq *req;
#endif
@@ -588,7 +601,7 @@
__GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, NULL);
if (pdraw != NULL) {
-@@ -1594,7 +1584,7 @@ glXQueryExtensionsString(Display * dpy, int screen)
+@@ -1583,7 +1576,7 @@ glXQueryExtensionsString(Display * dpy, int screen)
}
__glXCalculateUsableExtensions(psc,
@@ -597,7 +610,7 @@
(psc->driScreen != NULL),
#else
GL_FALSE,
-@@ -1826,7 +1816,7 @@ glXQueryContext(Display * dpy, GLXContext ctx, int attribute, int *value)
+@@ -1815,7 +1808,7 @@ glXQueryContext(Display * dpy, GLXContext ctx, int attribute, int *value)
int retVal;
/* get the information from the server if we don't have it already */
@@ -606,7 +619,7 @@
if (!ctx->driContext && (ctx->mode == NULL)) {
#else
if (ctx->mode == NULL) {
-@@ -2573,7 +2563,7 @@ __glXGetSyncValuesOML(Display * dpy, GLXDrawable drawable,
+@@ -2562,7 +2555,7 @@ __glXGetSyncValuesOML(Display * dpy, GLXDrawable drawable,
return False;
}
@@ -615,7 +628,7 @@
_X_HIDDEN GLboolean
__driGetMscRateOML(__DRIdrawable * draw,
int32_t * numerator, int32_t * denominator, void *private)
-@@ -3026,7 +3016,7 @@ __glXBindTexImageEXT(Display * dpy,
+@@ -3015,7 +3008,7 @@ __glXBindTexImageEXT(Display * dpy,
i++;
}
@@ -624,7 +637,7 @@
if (gc->driContext) {
__GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable, NULL);
-@@ -3282,7 +3272,7 @@ static const struct name_address_pair GLX_functions[] = {
+@@ -3271,7 +3264,7 @@ static const struct name_address_pair GLX_functions[] = {
GLX_FUNCTION2(glXReleaseTexImageEXT, __glXReleaseTexImageEXT),
#endif
@@ -633,7 +646,7 @@
/*** DRI configuration ***/
GLX_FUNCTION(glXGetScreenDriver),
GLX_FUNCTION(glXGetDriverConfig),
-@@ -3359,7 +3349,7 @@ PUBLIC void (*glXGetProcAddress(const GLubyte * procName)) (void)
+@@ -3348,7 +3341,7 @@ PUBLIC void (*glXGetProcAddress(const GLubyte * procName)) (void)
#endif /* __GNUC__ */
Deleted: trunk/dports/x11/mesa/files/0004-apple-Integrate-our-libGL-into-the-existing-build-sy.patch
===================================================================
--- trunk/dports/x11/mesa/files/0004-apple-Integrate-our-libGL-into-the-existing-build-sy.patch 2010-04-06 20:58:35 UTC (rev 66183)
+++ trunk/dports/x11/mesa/files/0004-apple-Integrate-our-libGL-into-the-existing-build-sy.patch 2010-04-06 21:18:27 UTC (rev 66184)
@@ -1,286 +0,0 @@
-From 3e952c217bd64229353247d2d9acc7f14be8fdab Mon Sep 17 00:00:00 2001
-From: Jeremy Huddleston <jeremyhu at apple.com>
-Date: Thu, 1 Apr 2010 11:18:42 -0700
-Subject: [PATCH 4/6] apple: Integrate our libGL into the existing build system better
-
-Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
----
- configs/darwin | 7 ++-
- src/glx/Makefile | 2 +-
- src/glx/apple/Makefile | 183 +++++++++++++++++++++++++++++-------------------
- src/glx/clientattrib.c | 2 +
- 4 files changed, 118 insertions(+), 76 deletions(-)
-
-diff --git Mesa-7.8.1/configs/darwin Mesa-7.8.1/configs/darwin
-index d28d590..e519684 100644
---- Mesa-7.8.1/configs/darwin
-+++ Mesa-7.8.1/configs/darwin
-@@ -13,7 +13,10 @@ CC = gcc
- CXX = g++
- PIC_FLAGS = -fPIC
- DEFINES = -D_DARWIN_C_SOURCE -DPTHREADS -D_GNU_SOURCE \
-- -DGLX_ALIAS_UNSUPPORTED -DGLX_INDIRECT_RENDERING
-+ -DGLX_ALIAS_UNSUPPORTED \
-+ -DGLX_DIRECT_RENDERING -DGLX_USE_APPLEGL
-+
-+# -DGLX_INDIRECT_RENDERING \
-
- # -D_GNU_SOURCE - for src/mesa/main ...
- # -DGLX_DIRECT_RENDERING - pulls in libdrm stuff in glx
-@@ -49,7 +52,7 @@ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X
- APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm
-
- # omit glw lib for now:
--SRC_DIRS = glsl glx mesa gallium glu glut/glx glew
-+SRC_DIRS = glsl glx/apple mesa gallium glu glut/glx glew
- GLU_DIRS = sgi
- DRIVER_DIRS = osmesa
- #DRIVER_DIRS = dri
-diff --git Mesa-7.8.1/src/glx/Makefile Mesa-7.8.1/src/glx/Makefile
-index 6711fdc..c6ebc49 100644
---- Mesa-7.8.1/src/glx/Makefile
-+++ Mesa-7.8.1/src/glx/Makefile
-@@ -90,7 +90,7 @@ install: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
-
- # Remove .o and backup files
- clean:
-- -rm -f $(TOP)/$(LIB_DIR)/libGL.so*
-+ -rm -f $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB)
- -rm -f *.o *~
- -rm -f depend depend.bak
-
-diff --git Mesa-7.8.1/src/glx/apple/Makefile Mesa-7.8.1/src/glx/apple/Makefile
-index b3d163a..8fa5b01 100644
---- Mesa-7.8.1/src/glx/apple/Makefile
-+++ Mesa-7.8.1/src/glx/apple/Makefile
-@@ -1,97 +1,134 @@
--INSTALL_DIR = /usr/X11
--X11_DIR = $(INSTALL_DIR)
-+TOP = ../../..
-
--CC=gcc
--GL_CFLAGS=-Wall -ggdb3 -Os -DPTHREADS -D_REENTRANT $(RC_CFLAGS) $(CFLAGS)
--GL_LDFLAGS=-L$(INSTALL_DIR)/lib -L$(X11_DIR)/lib $(LDFLAGS) -Wl,-single_module
-+include $(TOP)/configs/current
-
--TCLSH=tclsh8.5
-+#CC=gcc
-+#GL_CFLAGS=-Wall -ggdb3 -Os -DPTHREADS -D_REENTRANT $(RC_CFLAGS) $(CFLAGS)
-+#GL_LDFLAGS=-L$(INSTALL_DIR)/lib -L$(X11_DIR)/lib $(LDFLAGS) -Wl,-single_module
-
-+TCLSH=tclsh8.5
- MKDIR=mkdir
- INSTALL=install
- LN=ln
- RM=rm
-
--INCLUDE=-I. -Iinclude -Iinclude/internal -I.. -DGLX_ALIAS_UNSUPPORTED -I$(INSTALL_DIR)/include -I$(X11_DIR)/include
--COMPILE=$(CC) $(INCLUDE) $(GL_CFLAGS) -c
-+#INCLUDE=-I. -Iinclude -I.. -DGLX_ALIAS_UNSUPPORTED -I$(INSTALL_DIR)/include -I$(X11_DIR)/include
-+
-+#COMPILE=$(CC) $(INCLUDE) $(GL_CFLAGS) -c
-
- #The directory with the final binaries.
- BUILD_DIR=builds
-
--all: $(BUILD_DIR)/libGL.1.2.dylib
--
--OBJECTS=glxext.o glxcmds.o glx_pbuffer.o glx_query.o glxcurrent.o glxextensions.o \
-- appledri.o apple_glx_context.o apple_glx.o pixel.o \
-- compsize.o apple_visual.o apple_cgl.o glxreply.o glcontextmodes.o \
-- apple_xgl_api.o apple_glx_drawable.o xfont.o apple_glx_pbuffer.o \
-- apple_glx_pixmap.o apple_xgl_api_read.o glx_empty.o glx_error.o \
-- apple_xgl_api_viewport.o apple_glx_surface.o apple_xgl_api_stereo.o
--
--$(BUILD_DIR)/libGL.1.2.dylib: $(OBJECTS)
-- -if ! test -d $(BUILD_DIR); then $(MKDIR) $(BUILD_DIR); fi
-- $(CC) $(GL_CFLAGS) -o $@ -dynamiclib -install_name $(INSTALL_DIR)/lib/libGL.1.dylib -compatibility_version 1.2 -current_version 1.2 -lXplugin -framework ApplicationServices -framework CoreFoundation $(GL_LDFLAGS) -lXext -lX11 -Wl,-exported_symbols_list,exports.list $(OBJECTS)
--
--.c.o:
-- $(COMPILE) $<
--
--apple_glx_drawable.o: apple_glx_drawable.h apple_glx_drawable.c include/GL/gl.h
--apple_xgl_api.o: apple_xgl_api.h apple_xgl_api.c apple_xgl_api_stereo.c include/GL/gl.h
--apple_xgl_api_read.o: apple_xgl_api_read.h apple_xgl_api_read.c apple_xgl_api.h include/GL/gl.h
--apple_xgl_api_viewport.o: apple_xgl_api_viewport.h apple_xgl_api_viewport.c apple_xgl_api.h include/GL/gl.h
--apple_xgl_api_stereo.o: apple_xgl_api_stereo.h apple_xgl_api_stereo.c apple_xgl_api.h include/GL/gl.h
--glcontextmodes.o: glcontextmodes.c include/GL/gl.h
--glxext.o: glxext.c include/GL/gl.h
--glxreply.o: glxreply.c include/GL/gl.h
--glxcmds.o: glxcmds.c apple_glx_context.h include/GL/gl.h
--glx_pbuffer.o: glx_pbuffer.c include/GL/gl.h
--glx_error.o: glx_error.c include/GL/gl.h
--glx_query.o: glx_query.c include/GL/gl.h
--glxcurrent.o: glxcurrent.c include/GL/gl.h
--glxextensions.o: glxextensions.c include/GL/gl.h
--glxhash.o: glxhash.h glxhash.c include/GL/gl.h
--appledri.o: appledri.h appledristr.h appledri.c include/GL/gl.h
--apple_glx_context.o: apple_glx_context.c apple_glx_context.h apple_glx_context.h include/GL/gl.h
--apple_glx.o: apple_glx.h apple_glx.c apple_xgl_api.h include/GL/gl.h
--apple_visual.o: apple_visual.h apple_visual.c include/GL/gl.h
--apple_cgl.o: apple_cgl.h apple_cgl.c include/GL/gl.h
--apple_glx_pbuffer.o: apple_glx_drawable.h apple_glx_pbuffer.c include/GL/gl.h
--apple_glx_pixmap.o: apple_glx_drawable.h apple_glx_pixmap.c appledri.h include/GL/gl.h
--apple_glx_surface.o: apple_glx_drawable.h apple_glx_surface.c appledri.h include/GL/gl.h
--xfont.o: xfont.c include/GL/gl.h
--compsize.o: compsize.c include/GL/gl.h
--renderpix.o: renderpix.c include/GL/gl.h
--singlepix.o: singlepix.c include/GL/gl.h
--pixel.o: pixel.c include/GL/gl.h
--glx_empty.o: glx_empty.c include/GL/gl.h
--
--apple_xgl_api.c: apple_xgl_api.h
--apple_xgl_api.h: gen_api_header.tcl gen_api_library.tcl gen_code.tcl gen_defs.tcl gen_exports.tcl gen_funcs.tcl gen_types.tcl
-+all: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
-+
-+SOURCES = \
-+ apple_cgl.c \
-+ apple_glx.c \
-+ apple_glx_context.c \
-+ apple_glx_drawable.c \
-+ apple_glx_pbuffer.c \
-+ apple_glx_pixmap.c \
-+ apple_glx_surface.c \
-+ apple_visual.c \
-+ apple_xgl_api.c \
-+ apple_xgl_api_read.c \
-+ apple_xgl_api_stereo.c \
-+ apple_xgl_api_viewport.c \
-+ appledri.c \
-+ ../clientattrib.c \
-+ ../compsize.c \
-+ ../glcontextmodes.c \
-+ glx_empty.c \
-+ glx_error.c \
-+ ../glx_pbuffer.c \
-+ ../glx_query.c \
-+ ../glxcmds.c \
-+ ../glxcurrent.c \
-+ ../glxext.c \
-+ ../glxextensions.c \
-+ glxreply.c \
-+ ../pixel.c \
-+ ../xfont.c
-+
-+include $(TOP)/src/mesa/sources.mak
-+
-+LDFLAGS += -lXplugin -framework ApplicationServices -framework CoreFoundation
-+
-+MESA_GLAPI_ASM_SOURCES = $(addprefix $(TOP)/src/mesa/, $(GLAPI_ASM_SOURCES))
-+MESA_GLAPI_SOURCES = $(addprefix $(TOP)/src/mesa/, $(GLAPI_SOURCES))
-+MESA_GLAPI_OBJECTS = $(addprefix $(TOP)/src/mesa/, $(GLAPI_OBJECTS))
-+
-+OBJECTS = $(SOURCES:.c=.o) # $(MESA_GLAPI_OBJECTS)
-+
-+INCLUDES = -I. -Iinclude -I..\
-+ -I$(TOP)/include \
-+ -I$(TOP)/include/GL/internal \
-+ -I$(TOP)/src/mesa \
-+ -I$(TOP)/src/mesa/glapi \
-+ $(LIBDRM_CFLAGS) \
-+ $(DRI2PROTO_CFLAGS) \
-+ $(X11_INCLUDES)
-+
-+##### RULES #####
-+
-+$(OBJECTS) : include/GL/gl.h apple_xgl_api.h
-+
-+apple_xgl_api.c : apple_xgl_api.h
-+
-+apple_xgl_api.h : gen_api_header.tcl gen_api_library.tcl gen_code.tcl gen_defs.tcl gen_exports.tcl gen_funcs.tcl gen_types.tcl
- $(TCLSH) gen_code.tcl
-
- include/GL/gl.h: include/GL/gl.h.template gen_gl_h.sh
- ./gen_gl_h.sh include/GL/gl.h.template $@
-
-+.c.o:
-+ $(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $< -o $@
-+
-+.S.o:
-+ $(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $< -o $@
-+
-+##### TARGETS #####
-+
-+default: depend $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
-+
-+# Make libGL
-+$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
-+ $(MKLIB) -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-+ -major 1 -minor 2 $(MKLIB_OPTIONS) \
-+ -install $(TOP)/$(LIB_DIR) -id $(INSTALL_LIB_DIR)/lib$(GL_LIB).1.dylib \
-+ $(GL_LIB_DEPS) $(OBJECTS)
-+
-+depend: $(SOURCES) $(MESA_GLAPI_SOURCES) $(MESA_GLAPI_ASM_SOURCES) Makefile
-+ rm -f depend
-+ touch depend
-+ $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) \
-+ $(MESA_GLAPI_SOURCES) $(MESA_GLAPI_ASM_SOURCES)
-+
-+# Emacs tags
-+tags:
-+ etags `find . -name \*.[ch]` `find $(TOP)/include`
-+
- install_headers: include/GL/gl.h
- $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL
-- $(INSTALL) -m 644 include/GL/gl.h include/GL/glext.h include/GL/glx.h include/GL/glxext.h $(DESTDIR)$(INSTALL_DIR)/include/GL
-+ $(INSTALL) -m 644 include/GL/gl.h $(DESTDIR)$(INSTALL_DIR)/include/GL
-
--install_libraries: $(BUILD_DIR)/libGL.1.2.dylib
-- $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/lib
-- $(INSTALL) -m 755 $(BUILD_DIR)/libGL.1.2.dylib $(DESTDIR)$(INSTALL_DIR)/lib
-- $(RM) -f $(DESTDIR)$(INSTALL_DIR)/lib/libGL.dylib
-- $(LN) -s libGL.1.2.dylib $(DESTDIR)$(INSTALL_DIR)/lib/libGL.dylib
-- $(RM) -f $(DESTDIR)$(INSTALL_DIR)/lib/libGL.1.dylib
-- $(LN) -s libGL.1.2.dylib $(DESTDIR)$(INSTALL_DIR)/lib/libGL.1.dylib
-+install_libraries: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
-+ $(MAKE) -C $(TOP)/src/mesa install-libgl
-
- install: install_headers install_libraries
-
-+#%.c : ../%.c
-+# ln -s $<
-+
-+# Remove .o and backup files
- clean:
-- rm -rf $(BUILD_DIR)
-- rm -f *.o *.a
-- rm -f *.c~ *.h~
-- rm -f apple_xgl_api.h apple_xgl_api.c
-- rm -f *.dylib
-- rm -f include/GL/gl.h
--
--%.c : ../%.c
-- ln -s $<
-+ -rm -f *.o *.a *~
-+ -rm -f *.c~ *.h~
-+ -rm -f apple_xgl_api.h apple_xgl_api.c
-+ -rm -f *.dylib
-+ -rm -f include/GL/gl.h
-+ -rm -f $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB)
-+ -rm -f *.o *~
-+ -rm -f depend depend.bak
-+
-+-include depend
-diff --git Mesa-7.8.1/src/glx/clientattrib.c Mesa-7.8.1/src/glx/clientattrib.c
-index a7dfb53..b26c179 100644
---- Mesa-7.8.1/src/glx/clientattrib.c
-+++ Mesa-7.8.1/src/glx/clientattrib.c
-@@ -35,6 +35,7 @@
-
- /*****************************************************************************/
-
-+#ifndef GLX_USE_APPLEGL
- static void
- do_enable_disable(GLenum array, GLboolean val)
- {
-@@ -123,6 +124,7 @@ __indirect_glPopClientAttrib(void)
- return;
- }
- }
-+#endif
-
- void
- __glFreeAttributeState(__GLXcontext * gc)
---
-1.7.0.3
-
Added: trunk/dports/x11/mesa/files/0004-darwin-Use-clientattrib.patch
===================================================================
--- trunk/dports/x11/mesa/files/0004-darwin-Use-clientattrib.patch (rev 0)
+++ trunk/dports/x11/mesa/files/0004-darwin-Use-clientattrib.patch 2010-04-06 21:18:27 UTC (rev 66184)
@@ -0,0 +1,62 @@
+From 1e6a5fbe75f4cbd4a6db91fb346038048dbbe44f Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu at apple.com>
+Date: Fri, 2 Apr 2010 00:54:57 -0700
+Subject: [PATCH 4/7] darwin: Use clientattrib
+
+Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
+---
+ src/glx/apple/Makefile | 2 +-
+ src/glx/clientattrib.c | 2 ++
+ src/glx/glxcmds.c | 2 --
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git Mesa-7.8.1/src/glx/apple/Makefile Mesa-7.8.1/src/glx/apple/Makefile
+index 4c05013..a3ee888 100644
+--- Mesa-7.8.1/src/glx/apple/Makefile
++++ Mesa-7.8.1/src/glx/apple/Makefile
+@@ -20,7 +20,7 @@ BUILD_DIR=builds
+
+ all: $(BUILD_DIR)/libGL.1.2.dylib
+
+-OBJECTS=glxext.o glxcmds.o glx_pbuffer.o glx_query.o glxcurrent.o glxextensions.o \
++OBJECTS=clientattrib.o glxext.o glxcmds.o glx_pbuffer.o glx_query.o glxcurrent.o glxextensions.o \
+ appledri.o apple_glx_context.o apple_glx.o pixel.o \
+ compsize.o apple_visual.o apple_cgl.o glxreply.o glcontextmodes.o \
+ apple_xgl_api.o apple_glx_drawable.o xfont.o apple_glx_pbuffer.o \
+diff --git Mesa-7.8.1/src/glx/clientattrib.c Mesa-7.8.1/src/glx/clientattrib.c
+index a7dfb53..b26c179 100644
+--- Mesa-7.8.1/src/glx/clientattrib.c
++++ Mesa-7.8.1/src/glx/clientattrib.c
+@@ -35,6 +35,7 @@
+
+ /*****************************************************************************/
+
++#ifndef GLX_USE_APPLEGL
+ static void
+ do_enable_disable(GLenum array, GLboolean val)
+ {
+@@ -123,6 +124,7 @@ __indirect_glPopClientAttrib(void)
+ return;
+ }
+ }
++#endif
+
+ void
+ __glFreeAttributeState(__GLXcontext * gc)
+diff --git Mesa-7.8.1/src/glx/glxcmds.c Mesa-7.8.1/src/glx/glxcmds.c
+index 329b841..205ad07 100644
+--- Mesa-7.8.1/src/glx/glxcmds.c
++++ Mesa-7.8.1/src/glx/glxcmds.c
+@@ -539,9 +539,7 @@ __glXFreeContext(__GLXcontext * gc)
+ XFree((char *) gc->version);
+ if (gc->extensions)
+ XFree((char *) gc->extensions);
+-#ifndef GLX_USE_APPLEGL /* TODO: clientattrib */
+ __glFreeAttributeState(gc);
+-#endif
+ XFree((char *) gc->buf);
+ Xfree((char *) gc->client_state_private);
+ XFree((char *) gc);
+--
+1.7.0.3
+
Added: trunk/dports/x11/mesa/files/0005-apple-Integrate-our-libGL-into-the-existing-build-sy.patch
===================================================================
--- trunk/dports/x11/mesa/files/0005-apple-Integrate-our-libGL-into-the-existing-build-sy.patch (rev 0)
+++ trunk/dports/x11/mesa/files/0005-apple-Integrate-our-libGL-into-the-existing-build-sy.patch 2010-04-06 21:18:27 UTC (rev 66184)
@@ -0,0 +1,265 @@
+From a9ccdf49f7735b891c31d7ef7ca79fdd534bcf2d Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu at apple.com>
+Date: Fri, 2 Apr 2010 00:57:38 -0700
+Subject: [PATCH 5/7] apple: Integrate our libGL into the existing build system better
+
+Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
+---
+ configs/darwin | 7 ++-
+ src/glx/Makefile | 2 +-
+ src/glx/apple/Makefile | 183 +++++++++++++++++++++++++++++-------------------
+ 3 files changed, 116 insertions(+), 76 deletions(-)
+
+diff --git Mesa-7.8.1/configs/darwin Mesa-7.8.1/configs/darwin
+index d28d590..e519684 100644
+--- Mesa-7.8.1/configs/darwin
++++ Mesa-7.8.1/configs/darwin
+@@ -13,7 +13,10 @@ CC = gcc
+ CXX = g++
+ PIC_FLAGS = -fPIC
+ DEFINES = -D_DARWIN_C_SOURCE -DPTHREADS -D_GNU_SOURCE \
+- -DGLX_ALIAS_UNSUPPORTED -DGLX_INDIRECT_RENDERING
++ -DGLX_ALIAS_UNSUPPORTED \
++ -DGLX_DIRECT_RENDERING -DGLX_USE_APPLEGL
++
++# -DGLX_INDIRECT_RENDERING \
+
+ # -D_GNU_SOURCE - for src/mesa/main ...
+ # -DGLX_DIRECT_RENDERING - pulls in libdrm stuff in glx
+@@ -49,7 +52,7 @@ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X
+ APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm
+
+ # omit glw lib for now:
+-SRC_DIRS = glsl glx mesa gallium glu glut/glx glew
++SRC_DIRS = glsl glx/apple mesa gallium glu glut/glx glew
+ GLU_DIRS = sgi
+ DRIVER_DIRS = osmesa
+ #DRIVER_DIRS = dri
+diff --git Mesa-7.8.1/src/glx/Makefile Mesa-7.8.1/src/glx/Makefile
+index 6711fdc..c6ebc49 100644
+--- Mesa-7.8.1/src/glx/Makefile
++++ Mesa-7.8.1/src/glx/Makefile
+@@ -90,7 +90,7 @@ install: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
+
+ # Remove .o and backup files
+ clean:
+- -rm -f $(TOP)/$(LIB_DIR)/libGL.so*
++ -rm -f $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB)
+ -rm -f *.o *~
+ -rm -f depend depend.bak
+
+diff --git Mesa-7.8.1/src/glx/apple/Makefile Mesa-7.8.1/src/glx/apple/Makefile
+index a3ee888..8fa5b01 100644
+--- Mesa-7.8.1/src/glx/apple/Makefile
++++ Mesa-7.8.1/src/glx/apple/Makefile
+@@ -1,97 +1,134 @@
+-INSTALL_DIR = /usr/X11
+-X11_DIR = $(INSTALL_DIR)
++TOP = ../../..
+
+-CC=gcc
+-GL_CFLAGS=-Wall -ggdb3 -Os -DPTHREADS -D_REENTRANT -DGLX_DIRECT_RENDERING -DGLX_USE_APPLEGL -DGLX_ALIAS_UNSUPPORTED $(RC_CFLAGS) $(CFLAGS)
+-GL_LDFLAGS=-L$(INSTALL_DIR)/lib -L$(X11_DIR)/lib $(LDFLAGS) -Wl,-single_module
++include $(TOP)/configs/current
+
+-TCLSH=tclsh8.5
++#CC=gcc
++#GL_CFLAGS=-Wall -ggdb3 -Os -DPTHREADS -D_REENTRANT $(RC_CFLAGS) $(CFLAGS)
++#GL_LDFLAGS=-L$(INSTALL_DIR)/lib -L$(X11_DIR)/lib $(LDFLAGS) -Wl,-single_module
+
++TCLSH=tclsh8.5
+ MKDIR=mkdir
+ INSTALL=install
+ LN=ln
+ RM=rm
+
+-INCLUDE=-I. -Iinclude -Iinclude/internal -I.. -I../../../include -I../../../src/mesa -I../../../src/mesa/glapi -I$(INSTALL_DIR)/include -I$(X11_DIR)/include
+-COMPILE=$(CC) $(INCLUDE) $(GL_CFLAGS) -c
++#INCLUDE=-I. -Iinclude -I.. -DGLX_ALIAS_UNSUPPORTED -I$(INSTALL_DIR)/include -I$(X11_DIR)/include
++
++#COMPILE=$(CC) $(INCLUDE) $(GL_CFLAGS) -c
+
+ #The directory with the final binaries.
+ BUILD_DIR=builds
+
+-all: $(BUILD_DIR)/libGL.1.2.dylib
+-
+-OBJECTS=clientattrib.o glxext.o glxcmds.o glx_pbuffer.o glx_query.o glxcurrent.o glxextensions.o \
+- appledri.o apple_glx_context.o apple_glx.o pixel.o \
+- compsize.o apple_visual.o apple_cgl.o glxreply.o glcontextmodes.o \
+- apple_xgl_api.o apple_glx_drawable.o xfont.o apple_glx_pbuffer.o \
+- apple_glx_pixmap.o apple_xgl_api_read.o glx_empty.o glx_error.o \
+- apple_xgl_api_viewport.o apple_glx_surface.o apple_xgl_api_stereo.o
+-
+-$(BUILD_DIR)/libGL.1.2.dylib: $(OBJECTS)
+- -if ! test -d $(BUILD_DIR); then $(MKDIR) $(BUILD_DIR); fi
+- $(CC) $(GL_CFLAGS) -o $@ -dynamiclib -install_name $(INSTALL_DIR)/lib/libGL.1.dylib -compatibility_version 1.2 -current_version 1.2 -lXplugin -framework ApplicationServices -framework CoreFoundation $(GL_LDFLAGS) -lXext -lX11 -Wl,-exported_symbols_list,exports.list $(OBJECTS)
+-
+-.c.o:
+- $(COMPILE) $<
+-
+-apple_glx_drawable.o: apple_glx_drawable.h apple_glx_drawable.c include/GL/gl.h
+-apple_xgl_api.o: apple_xgl_api.h apple_xgl_api.c apple_xgl_api_stereo.c include/GL/gl.h
+-apple_xgl_api_read.o: apple_xgl_api_read.h apple_xgl_api_read.c apple_xgl_api.h include/GL/gl.h
+-apple_xgl_api_viewport.o: apple_xgl_api_viewport.h apple_xgl_api_viewport.c apple_xgl_api.h include/GL/gl.h
+-apple_xgl_api_stereo.o: apple_xgl_api_stereo.h apple_xgl_api_stereo.c apple_xgl_api.h include/GL/gl.h
+-glcontextmodes.o: glcontextmodes.c include/GL/gl.h
+-glxext.o: glxext.c include/GL/gl.h
+-glxreply.o: glxreply.c include/GL/gl.h
+-glxcmds.o: glxcmds.c apple_glx_context.h include/GL/gl.h
+-glx_pbuffer.o: glx_pbuffer.c include/GL/gl.h
+-glx_error.o: glx_error.c include/GL/gl.h
+-glx_query.o: glx_query.c include/GL/gl.h
+-glxcurrent.o: glxcurrent.c include/GL/gl.h
+-glxextensions.o: glxextensions.c include/GL/gl.h
+-glxhash.o: glxhash.h glxhash.c include/GL/gl.h
+-appledri.o: appledri.h appledristr.h appledri.c include/GL/gl.h
+-apple_glx_context.o: apple_glx_context.c apple_glx_context.h apple_glx_context.h include/GL/gl.h
+-apple_glx.o: apple_glx.h apple_glx.c apple_xgl_api.h include/GL/gl.h
+-apple_visual.o: apple_visual.h apple_visual.c include/GL/gl.h
+-apple_cgl.o: apple_cgl.h apple_cgl.c include/GL/gl.h
+-apple_glx_pbuffer.o: apple_glx_drawable.h apple_glx_pbuffer.c include/GL/gl.h
+-apple_glx_pixmap.o: apple_glx_drawable.h apple_glx_pixmap.c appledri.h include/GL/gl.h
+-apple_glx_surface.o: apple_glx_drawable.h apple_glx_surface.c appledri.h include/GL/gl.h
+-xfont.o: xfont.c include/GL/gl.h
+-compsize.o: compsize.c include/GL/gl.h
+-renderpix.o: renderpix.c include/GL/gl.h
+-singlepix.o: singlepix.c include/GL/gl.h
+-pixel.o: pixel.c include/GL/gl.h
+-glx_empty.o: glx_empty.c include/GL/gl.h
+-
+-apple_xgl_api.c: apple_xgl_api.h
+-apple_xgl_api.h: gen_api_header.tcl gen_api_library.tcl gen_code.tcl gen_defs.tcl gen_exports.tcl gen_funcs.tcl gen_types.tcl
++all: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
++
++SOURCES = \
++ apple_cgl.c \
++ apple_glx.c \
++ apple_glx_context.c \
++ apple_glx_drawable.c \
++ apple_glx_pbuffer.c \
++ apple_glx_pixmap.c \
++ apple_glx_surface.c \
++ apple_visual.c \
++ apple_xgl_api.c \
++ apple_xgl_api_read.c \
++ apple_xgl_api_stereo.c \
++ apple_xgl_api_viewport.c \
++ appledri.c \
++ ../clientattrib.c \
++ ../compsize.c \
++ ../glcontextmodes.c \
++ glx_empty.c \
++ glx_error.c \
++ ../glx_pbuffer.c \
++ ../glx_query.c \
++ ../glxcmds.c \
++ ../glxcurrent.c \
++ ../glxext.c \
++ ../glxextensions.c \
++ glxreply.c \
++ ../pixel.c \
++ ../xfont.c
++
++include $(TOP)/src/mesa/sources.mak
++
++LDFLAGS += -lXplugin -framework ApplicationServices -framework CoreFoundation
++
++MESA_GLAPI_ASM_SOURCES = $(addprefix $(TOP)/src/mesa/, $(GLAPI_ASM_SOURCES))
++MESA_GLAPI_SOURCES = $(addprefix $(TOP)/src/mesa/, $(GLAPI_SOURCES))
++MESA_GLAPI_OBJECTS = $(addprefix $(TOP)/src/mesa/, $(GLAPI_OBJECTS))
++
++OBJECTS = $(SOURCES:.c=.o) # $(MESA_GLAPI_OBJECTS)
++
++INCLUDES = -I. -Iinclude -I..\
++ -I$(TOP)/include \
++ -I$(TOP)/include/GL/internal \
++ -I$(TOP)/src/mesa \
++ -I$(TOP)/src/mesa/glapi \
++ $(LIBDRM_CFLAGS) \
++ $(DRI2PROTO_CFLAGS) \
++ $(X11_INCLUDES)
++
++##### RULES #####
++
++$(OBJECTS) : include/GL/gl.h apple_xgl_api.h
++
++apple_xgl_api.c : apple_xgl_api.h
++
++apple_xgl_api.h : gen_api_header.tcl gen_api_library.tcl gen_code.tcl gen_defs.tcl gen_exports.tcl gen_funcs.tcl gen_types.tcl
+ $(TCLSH) gen_code.tcl
+
+ include/GL/gl.h: include/GL/gl.h.template gen_gl_h.sh
+ ./gen_gl_h.sh include/GL/gl.h.template $@
+
++.c.o:
++ $(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $< -o $@
++
++.S.o:
++ $(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $< -o $@
++
++##### TARGETS #####
++
++default: depend $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
++
++# Make libGL
++$(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) Makefile
++ $(MKLIB) -o $(GL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
++ -major 1 -minor 2 $(MKLIB_OPTIONS) \
++ -install $(TOP)/$(LIB_DIR) -id $(INSTALL_LIB_DIR)/lib$(GL_LIB).1.dylib \
++ $(GL_LIB_DEPS) $(OBJECTS)
++
++depend: $(SOURCES) $(MESA_GLAPI_SOURCES) $(MESA_GLAPI_ASM_SOURCES) Makefile
++ rm -f depend
++ touch depend
++ $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(SOURCES) \
++ $(MESA_GLAPI_SOURCES) $(MESA_GLAPI_ASM_SOURCES)
++
++# Emacs tags
++tags:
++ etags `find . -name \*.[ch]` `find $(TOP)/include`
++
+ install_headers: include/GL/gl.h
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL
+- $(INSTALL) -m 644 include/GL/gl.h include/GL/glext.h include/GL/glx.h include/GL/glxext.h $(DESTDIR)$(INSTALL_DIR)/include/GL
++ $(INSTALL) -m 644 include/GL/gl.h $(DESTDIR)$(INSTALL_DIR)/include/GL
+
+-install_libraries: $(BUILD_DIR)/libGL.1.2.dylib
+- $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/lib
+- $(INSTALL) -m 755 $(BUILD_DIR)/libGL.1.2.dylib $(DESTDIR)$(INSTALL_DIR)/lib
+- $(RM) -f $(DESTDIR)$(INSTALL_DIR)/lib/libGL.dylib
+- $(LN) -s libGL.1.2.dylib $(DESTDIR)$(INSTALL_DIR)/lib/libGL.dylib
+- $(RM) -f $(DESTDIR)$(INSTALL_DIR)/lib/libGL.1.dylib
+- $(LN) -s libGL.1.2.dylib $(DESTDIR)$(INSTALL_DIR)/lib/libGL.1.dylib
++install_libraries: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
++ $(MAKE) -C $(TOP)/src/mesa install-libgl
+
+ install: install_headers install_libraries
+
++#%.c : ../%.c
++# ln -s $<
++
++# Remove .o and backup files
+ clean:
+- rm -rf $(BUILD_DIR)
+- rm -f *.o *.a
+- rm -f *.c~ *.h~
+- rm -f apple_xgl_api.h apple_xgl_api.c
+- rm -f *.dylib
+- rm -f include/GL/gl.h
+-
+-%.c : ../%.c
+- ln -s $<
++ -rm -f *.o *.a *~
++ -rm -f *.c~ *.h~
++ -rm -f apple_xgl_api.h apple_xgl_api.c
++ -rm -f *.dylib
++ -rm -f include/GL/gl.h
++ -rm -f $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB)
++ -rm -f *.o *~
++ -rm -f depend depend.bak
++
++-include depend
+--
+1.7.0.3
+
Deleted: trunk/dports/x11/mesa/files/0005-apple-Use-mesa-gl.h-rather-than-generating-one.patch
===================================================================
--- trunk/dports/x11/mesa/files/0005-apple-Use-mesa-gl.h-rather-than-generating-one.patch 2010-04-06 20:58:35 UTC (rev 66183)
+++ trunk/dports/x11/mesa/files/0005-apple-Use-mesa-gl.h-rather-than-generating-one.patch 2010-04-06 21:18:27 UTC (rev 66184)
@@ -1,344 +0,0 @@
-From de3ecb959c447e322cb6f0fb03f3485dc3b22c4d Mon Sep 17 00:00:00 2001
-From: Jeremy Huddleston <jeremyhu at freedesktop.org>
-Date: Sat, 2 Jan 2010 00:03:53 -0500
-Subject: [PATCH 5/6] apple: Use mesa gl.h rather than generating one.
-
-Signed-off-by: Jeremy Huddleston <jeremyhu at freedesktop.org>
----
- src/glx/apple/GL_aliases | 4 +-
- src/glx/apple/Makefile | 11 +--
- src/glx/apple/apple_glx_pbuffer.c | 1 +
- src/glx/apple/apple_xgl_api_additional.c | 37 +++++++++
- src/glx/apple/gen_funcs.tcl | 13 +--
- src/glx/apple/gen_gl_h.sh | 33 --------
- src/glx/apple/include/GL/gl.h.template | 130 ------------------------------
- 7 files changed, 48 insertions(+), 181 deletions(-)
- create mode 100644 src/glx/apple/apple_xgl_api_additional.c
- delete mode 100644 src/glx/apple/gen_gl_h.sh
- delete mode 100644 src/glx/apple/include/GL/gl.h.template
-
-diff --git Mesa-7.8.1/src/glx/apple/GL_aliases Mesa-7.8.1/src/glx/apple/GL_aliases
-index a8390d2..8de2238 100644
---- Mesa-7.8.1/src/glx/apple/GL_aliases
-+++ Mesa-7.8.1/src/glx/apple/GL_aliases
-@@ -5,4 +5,6 @@ alias DeleteTexturesEXT DeleteTextures
- alias GenTexturesEXT GenTextures
- alias IsTextureEXT IsTexture
- alias PrioritizeTexturesEXT PrioritizeTextures
--alias TexImage3DEXT TexImage3D
-+
-+# Due to type conflicts, we handle this differently
-+#alias TexImage3DEXT TexImage3D
-diff --git Mesa-7.8.1/src/glx/apple/Makefile Mesa-7.8.1/src/glx/apple/Makefile
-index 8fa5b01..279f7ad 100644
---- Mesa-7.8.1/src/glx/apple/Makefile
-+++ Mesa-7.8.1/src/glx/apple/Makefile
-@@ -31,6 +31,7 @@ SOURCES = \
- apple_glx_surface.c \
- apple_visual.c \
- apple_xgl_api.c \
-+ apple_xgl_api_additional.c \
- apple_xgl_api_read.c \
- apple_xgl_api_stereo.c \
- apple_xgl_api_viewport.c \
-@@ -71,16 +72,13 @@ INCLUDES = -I. -Iinclude -I..\
-
- ##### RULES #####
-
--$(OBJECTS) : include/GL/gl.h apple_xgl_api.h
-+$(OBJECTS) : apple_xgl_api.h
-
- apple_xgl_api.c : apple_xgl_api.h
-
- apple_xgl_api.h : gen_api_header.tcl gen_api_library.tcl gen_code.tcl gen_defs.tcl gen_exports.tcl gen_funcs.tcl gen_types.tcl
- $(TCLSH) gen_code.tcl
-
--include/GL/gl.h: include/GL/gl.h.template gen_gl_h.sh
-- ./gen_gl_h.sh include/GL/gl.h.template $@
--
- .c.o:
- $(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $< -o $@
-
-@@ -115,10 +113,7 @@ install_headers: include/GL/gl.h
- install_libraries: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
- $(MAKE) -C $(TOP)/src/mesa install-libgl
-
--install: install_headers install_libraries
--
--#%.c : ../%.c
--# ln -s $<
-+install: install_libraries
-
- # Remove .o and backup files
- clean:
-diff --git Mesa-7.8.1/src/glx/apple/apple_glx_pbuffer.c Mesa-7.8.1/src/glx/apple/apple_glx_pbuffer.c
-index 3dfdc54..fb56b75 100644
---- Mesa-7.8.1/src/glx/apple/apple_glx_pbuffer.c
-+++ Mesa-7.8.1/src/glx/apple/apple_glx_pbuffer.c
-@@ -30,6 +30,7 @@
- #include <stdlib.h>
- #include <pthread.h>
- #include <assert.h>
-+#include <GL/glew.h>
- #include "apple_glx.h"
- #include "glcontextmodes.h"
- #include "apple_glx_context.h"
-diff --git Mesa-7.8.1/src/glx/apple/apple_xgl_api_additional.c Mesa-7.8.1/src/glx/apple/apple_xgl_api_additional.c
-new file mode 100644
-index 0000000..7d40afe
---- /dev/null
-+++ Mesa-7.8.1/src/glx/apple/apple_xgl_api_additional.c
-@@ -0,0 +1,37 @@
-+/*
-+ Copyright (c) 2008, 2009 Apple Inc.
-+
-+ Permission is hereby granted, free of charge, to any person
-+ obtaining a copy of this software and associated documentation files
-+ (the "Software"), to deal in the Software without restriction,
-+ including without limitation the rights to use, copy, modify, merge,
-+ publish, distribute, sublicense, and/or sell copies of the Software,
-+ and to permit persons to whom the Software is furnished to do so,
-+ subject to the following conditions:
-+
-+ The above copyright notice and this permission notice shall be
-+ included in all copies or substantial portions of the Software.
-+
-+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
-+ HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-+ DEALINGS IN THE SOFTWARE.
-+
-+ Except as contained in this notice, the name(s) of the above
-+ copyright holders shall not be used in advertising or otherwise to
-+ promote the sale, use or other dealings in this Software without
-+ prior written authorization.
-+*/
-+
-+#define GL_GLEXT_PROTOTYPES
-+#include <GL/gl.h>
-+
-+GLAPI void APIENTRY glTexImage3DEXT(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei
-+ depth, GLint border, GLenum format, GLenum type, const void * pixels) {
-+ glTexImage3D(target, level, (GLint)internalformat, width, height, depth, border, format, type, pixels);
-+}
-+
-diff --git Mesa-7.8.1/src/glx/apple/gen_funcs.tcl Mesa-7.8.1/src/glx/apple/gen_funcs.tcl
-index ff314dc..e78eb32 100644
---- Mesa-7.8.1/src/glx/apple/gen_funcs.tcl
-+++ Mesa-7.8.1/src/glx/apple/gen_funcs.tcl
-@@ -72,6 +72,8 @@ proc is-extension-supported? name {
- }
-
- #This is going to need to be updated for OpenGL >= 2.1 in SnowLeopard.
-+# TextureComponentCount is GLenum in SL for everything
-+# It is GLint in mesa, but is GLenum for glTexImage3DEXT
- array set typemap {
- void void
- List GLuint
-@@ -126,7 +128,7 @@ array set typemap {
- ShadingModel GLenum
- TextureTarget GLenum
- TextureParameterName GLenum
-- TextureComponentCount GLenum
-+ TextureComponentCount GLint
- PixelFormat GLenum
- PixelType GLenum
- TextureEnvTarget GLenum
-@@ -412,14 +414,7 @@ proc translate-parameters {func parameters} {
-
- set type $typemap($ptype)
-
-- #In the gl.spec file is MultiDrawArrays first and count
-- #are really 'in' so we make them const.
-- #The gl.spec notes this problem.
-- if {("MultiDrawArrays" eq $func) && ("first" eq $var)} {
-- set final_type "const $type *"
-- } elseif {("MultiDrawArrays" eq $func) && ("count" eq $var)} {
-- set final_type "const $type *"
-- } elseif {"array" eq [lindex $p 3]} {
-+ if {"array" eq [lindex $p 3]} {
- if {"in" eq [lindex $p 2]} {
- set final_type "const $type *"
- } else {
-diff --git Mesa-7.8.1/src/glx/apple/gen_gl_h.sh Mesa-7.8.1/src/glx/apple/gen_gl_h.sh
-deleted file mode 100644
-index f10ddd0..0000000
---- Mesa-7.8.1/src/glx/apple/gen_gl_h.sh
-+++ /dev/null
-@@ -1,33 +0,0 @@
--#!/bin/bash
--
--INFILE=$1
--OUTFILE=$2
--
--generate_macros() {
-- grep gl.*ProcPtr /System/Library/Frameworks/OpenGL.framework/Headers/gl{,ext}.h | sed 's:^.*\(gl.*Ptr\).*$:\1:' | sort -u | perl -ne 'chomp($_); $s = "PFN".uc($_); $s =~ s/PROCPTR/PROC/; print "#define ".$_." ".$s."\n"'
--}
--
--generate_function_pointers() {
-- {
-- echo "#define GL_GLEXT_FUNCTION_POINTERS 1"
-- echo "#define GL_GLEXT_LEGACY 1"
-- generate_macros
-- echo '#include "/System/Library/Frameworks/OpenGL.framework/Headers/gl.h"'
-- } | ${CC:-gcc} -E - | grep typedef.*PFN
--}
--
--cat ${INFILE} | while IFS= read LINE ; do
-- case $LINE in
-- "@CGL_MESA_COMPAT_MACROS@")
-- generate_macros
-- ;;
-- "@CGL_MESA_FUNCTION_POINTERS@")
-- if ! grep -q GL_GLEXT_PROTOTYPES /System/Library/Frameworks/OpenGL.framework/Headers/gl.h ; then
-- generate_function_pointers
-- fi
-- ;;
-- *)
-- printf "${LINE}\n"
-- ;;
-- esac
--done > ${OUTFILE}
-diff --git Mesa-7.8.1/src/glx/apple/include/GL/gl.h.template Mesa-7.8.1/src/glx/apple/include/GL/gl.h.template
-deleted file mode 100644
-index 72169f9..0000000
---- Mesa-7.8.1/src/glx/apple/include/GL/gl.h.template
-+++ /dev/null
-@@ -1,130 +0,0 @@
--/*
-- * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
-- * Copyright (C) 2009 Apple Inc. All Rights Reserved.
-- *
-- * Permission is hereby granted, free of charge, to any person obtaining a
-- * copy of this software and associated documentation files (the "Software"),
-- * to deal in the Software without restriction, including without limitation
-- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
-- * and/or sell copies of the Software, and to permit persons to whom the
-- * Software is furnished to do so, subject to the following conditions:
-- *
-- * The above copyright notice and this permission notice shall be included
-- * in all copies or substantial portions of the Software.
-- *
-- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- */
--
--#ifndef __X_GL_H
--#define __X_GL_H
--
--/* The following macros exist to address conflicts between the names given to
-- * function pointers by the MESA API and OpenGL.framework's API.
-- */
-- at CGL_MESA_COMPAT_MACROS@
--
--/* On SL, we want to use OpelGL.framework's headers to get both prototypes and
-- * function pointers (like Mesa's API), but on Leo and before, OpenGL.framework
-- * can't give us both.
-- */
--
--#ifdef GL_GLEXT_FUNCTION_POINTERS
--#define _GL_GLEXT_FUNCTION_POINTERS GL_GLEXT_FUNCTION_POINTERS
--#undef GL_GLEXT_FUNCTION_POINTERS
--#endif
--
--#ifdef GL_GLEXT_PROTOTYPES
--#define _GL_GLEXT_PROTOTYPES GL_GLEXT_PROTOTYPES
--#else
--#define GL_GLEXT_PROTOTYPES 1
--#endif
--
--/* Our glext.h is based on a version from the registry that is newer. */
--#ifdef GL_GLEXT_LEGACY
--#define _GL_GLEXT_LEGACY GL_GLEXT_LEGACY
--#else
--#define GL_GLEXT_LEGACY 1
--#endif
--
--#include "/System/Library/Frameworks/OpenGL.framework/Headers/gl.h"
--
--/* These are not set by the system gl.h */
--#define GL_VERSION_1_2_DEPRECATED 1
--#define GL_VERSION_1_3_DEPRECATED 1
--#define GL_VERSION_1_4_DEPRECATED 1
--
--/* Restore our GLEXT-fu */
--#ifdef _GL_GLEXT_FUNCTION_POINTERS
--#define GL_GLEXT_FUNCTION_POINTERS _GL_GLEXT_FUNCTION_POINTERS
--#undef _GL_GLEXT_FUNCTION_POINTERS
--#endif
--
--#ifdef _GL_GLEXT_PROTOTYPES
--#undef _GL_GLEXT_PROTOTYPES
--#else
--#undef GL_GLEXT_PROTOTYPES
--#endif
--
--#ifdef _GL_GLEXT_LEGACY
--#undef _GL_GLEXT_LEGACY
--#else
--#undef GL_GLEXT_LEGACY
--#endif
--
-- at CGL_MESA_FUNCTION_POINTERS@
--
--#ifndef GL_GLEXT_LEGACY
--#include <GL/glext.h>
--#endif
--
--/*
-- * This is needed for building apple_glx_pbuffer.c, the latest
-- * glext.h from the registry lacks it, so it's from the Leopard glext.h:
-- */
--#ifndef GL_TEXTURE_RECTANGLE_EXT
--#define GL_TEXTURE_RECTANGLE_EXT 0x84F5
--#endif
--
--/* This is needed for building the X server: */
--/*
-- * GL_MESA_packed_depth_stencil
-- */
--#ifndef GL_MESA_packed_depth_stencil
--#define GL_MESA_packed_depth_stencil 1
--
--#define GL_DEPTH_STENCIL_MESA 0x8750
--#define GL_UNSIGNED_INT_24_8_MESA 0x8751
--#define GL_UNSIGNED_INT_8_24_REV_MESA 0x8752
--#define GL_UNSIGNED_SHORT_15_1_MESA 0x8753
--#define GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754
--
--#endif /* GL_MESA_packed_depth_stencil */
--
--/* Various other OS projects expect to get these macros from Mesa's gl.h */
--#ifndef GLAPI
--#define GLAPI extern
--#endif
--
--#ifndef GLAPIENTRY
--#define GLAPIENTRY
--#endif
--
--#ifndef APIENTRY
--#define APIENTRY GLAPIENTRY
--#endif
--
--/* "P" suffix to be used for a pointer to a function */
--#ifndef APIENTRYP
--#define APIENTRYP APIENTRY *
--#endif
--
--#ifndef GLAPIENTRYP
--#define GLAPIENTRYP GLAPIENTRY *
--#endif
--
--#endif /*__X_GL_H*/
---
-1.7.0.3
-
Deleted: trunk/dports/x11/mesa/files/0006-Use-X_LIBS-from-pkg-config-instead-of-libdir-for-loc.patch
===================================================================
--- trunk/dports/x11/mesa/files/0006-Use-X_LIBS-from-pkg-config-instead-of-libdir-for-loc.patch 2010-04-06 20:58:35 UTC (rev 66183)
+++ trunk/dports/x11/mesa/files/0006-Use-X_LIBS-from-pkg-config-instead-of-libdir-for-loc.patch 2010-04-06 21:18:27 UTC (rev 66184)
@@ -1,83 +0,0 @@
-From e34304ceb9865914c7cb5845e5c6766e1e77b288 Mon Sep 17 00:00:00 2001
-From: Jeff Smith <whydoubt at yahoo.com>
-Date: Fri, 12 Mar 2010 18:55:09 -0600
-Subject: [PATCH 6/6] Use X_LIBS from pkg-config, instead of libdir, for locating libX11
-
-Signed-off-by: Jeff Smith <whydoubt at yahoo.com>
-Signed-off-by: Dan Nicholson <dbn.lists at gmail.com>
-(cherry picked from commit 8d86d395dcf6a5f192b6987485bb7aef49f1fefc)
----
- configs/autoconf.in | 2 ++
- configure.ac | 4 +++-
- progs/egl/Makefile | 6 +++---
- progs/xdemos/Makefile | 4 ++--
- 4 files changed, 10 insertions(+), 6 deletions(-)
-
-diff --git Mesa-7.8.1/configs/autoconf.in Mesa-7.8.1/configs/autoconf.in
-index 3063787..f07035a 100644
---- Mesa-7.8.1/configs/autoconf.in
-+++ Mesa-7.8.1/configs/autoconf.in
-@@ -24,6 +24,8 @@ RADEON_CFLAGS = @RADEON_CFLAGS@
- RADEON_LDFLAGS = @RADEON_LDFLAGS@
- INTEL_LIBS = @INTEL_LIBS@
- INTEL_CFLAGS = @INTEL_CFLAGS@
-+X_LIBS = @X_LIBS@
-+X_CFLAGS = @X_CFLAGS@
-
- # Assembler
- MESA_ASM_SOURCES = @MESA_ASM_SOURCES@
-diff --git Mesa-7.8.1/configure.ac Mesa-7.8.1/configure.ac
-index 61487c3..5f3d02d 100644
---- Mesa-7.8.1/configure.ac
-+++ Mesa-7.8.1/configure.ac
-@@ -547,7 +547,9 @@ else
- x11_pkgconfig=no
- fi
- dnl Use the autoconf macro if no pkg-config files
--if test "$x11_pkgconfig" = no; then
-+if test "$x11_pkgconfig" = yes; then
-+ PKG_CHECK_MODULES([X], [x11])
-+else
- AC_PATH_XTRA
- fi
-
-diff --git Mesa-7.8.1/progs/egl/Makefile Mesa-7.8.1/progs/egl/Makefile
-index 25de6e1..5f51104 100644
---- Mesa-7.8.1/progs/egl/Makefile
-+++ Mesa-7.8.1/progs/egl/Makefile
-@@ -57,13 +57,13 @@ peglgears: peglgears.o $(HEADERS) $(LIB_DEP)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(LIBDRM_LIB) -lm
-
- xeglgears: xeglgears.o $(HEADERS) $(LIB_DEP)
-- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm -L$(libdir) -lX11
-+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm $(X_LIBS)
-
- xeglthreads: xeglthreads.o $(HEADERS) $(LIB_DEP)
-- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm -L$(libdir) -lX11
-+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm $(X_LIBS)
-
- xegl_tri: xegl_tri.o $(HEADERS) $(LIB_DEP)
-- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm -L$(libdir) -lX11
-+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm $(X_LIBS)
-
- clean:
- -rm -f *.o *~
-diff --git Mesa-7.8.1/progs/xdemos/Makefile Mesa-7.8.1/progs/xdemos/Makefile
-index d81caab..038e21c 100644
---- Mesa-7.8.1/progs/xdemos/Makefile
-+++ Mesa-7.8.1/progs/xdemos/Makefile
-@@ -9,9 +9,9 @@ INCDIR = $(TOP)/include
- LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
-
- # Add X11 and pthread libs to satisfy GNU gold.
--APP_LIB_DEPS += -lX11 -lpthread
-+APP_LIB_DEPS += $(X_LIBS) -lpthread
-
--LIBS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(libdir) $(APP_LIB_DEPS)
-+LIBS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(APP_LIB_DEPS)
-
- PROGS = \
- corender \
---
-1.7.0.3
-
Added: trunk/dports/x11/mesa/files/0006-apple-Use-mesa-gl.h-rather-than-generating-one.patch
===================================================================
--- trunk/dports/x11/mesa/files/0006-apple-Use-mesa-gl.h-rather-than-generating-one.patch (rev 0)
+++ trunk/dports/x11/mesa/files/0006-apple-Use-mesa-gl.h-rather-than-generating-one.patch 2010-04-06 21:18:27 UTC (rev 66184)
@@ -0,0 +1,344 @@
+From c8dfc4bf15c226cfee79874df7212813e709b3f8 Mon Sep 17 00:00:00 2001
+From: Jeremy Huddleston <jeremyhu at freedesktop.org>
+Date: Sat, 2 Jan 2010 00:03:53 -0500
+Subject: [PATCH 6/7] apple: Use mesa gl.h rather than generating one.
+
+Signed-off-by: Jeremy Huddleston <jeremyhu at freedesktop.org>
+---
+ src/glx/apple/GL_aliases | 4 +-
+ src/glx/apple/Makefile | 11 +--
+ src/glx/apple/apple_glx_pbuffer.c | 1 +
+ src/glx/apple/apple_xgl_api_additional.c | 37 +++++++++
+ src/glx/apple/gen_funcs.tcl | 13 +--
+ src/glx/apple/gen_gl_h.sh | 33 --------
+ src/glx/apple/include/GL/gl.h.template | 130 ------------------------------
+ 7 files changed, 48 insertions(+), 181 deletions(-)
+ create mode 100644 src/glx/apple/apple_xgl_api_additional.c
+ delete mode 100755 src/glx/apple/gen_gl_h.sh
+ delete mode 100644 src/glx/apple/include/GL/gl.h.template
+
+diff --git Mesa-7.8.1/src/glx/apple/GL_aliases Mesa-7.8.1/src/glx/apple/GL_aliases
+index a8390d2..8de2238 100644
+--- Mesa-7.8.1/src/glx/apple/GL_aliases
++++ Mesa-7.8.1/src/glx/apple/GL_aliases
+@@ -5,4 +5,6 @@ alias DeleteTexturesEXT DeleteTextures
+ alias GenTexturesEXT GenTextures
+ alias IsTextureEXT IsTexture
+ alias PrioritizeTexturesEXT PrioritizeTextures
+-alias TexImage3DEXT TexImage3D
++
++# Due to type conflicts, we handle this differently
++#alias TexImage3DEXT TexImage3D
+diff --git Mesa-7.8.1/src/glx/apple/Makefile Mesa-7.8.1/src/glx/apple/Makefile
+index 8fa5b01..279f7ad 100644
+--- Mesa-7.8.1/src/glx/apple/Makefile
++++ Mesa-7.8.1/src/glx/apple/Makefile
+@@ -31,6 +31,7 @@ SOURCES = \
+ apple_glx_surface.c \
+ apple_visual.c \
+ apple_xgl_api.c \
++ apple_xgl_api_additional.c \
+ apple_xgl_api_read.c \
+ apple_xgl_api_stereo.c \
+ apple_xgl_api_viewport.c \
+@@ -71,16 +72,13 @@ INCLUDES = -I. -Iinclude -I..\
+
+ ##### RULES #####
+
+-$(OBJECTS) : include/GL/gl.h apple_xgl_api.h
++$(OBJECTS) : apple_xgl_api.h
+
+ apple_xgl_api.c : apple_xgl_api.h
+
+ apple_xgl_api.h : gen_api_header.tcl gen_api_library.tcl gen_code.tcl gen_defs.tcl gen_exports.tcl gen_funcs.tcl gen_types.tcl
+ $(TCLSH) gen_code.tcl
+
+-include/GL/gl.h: include/GL/gl.h.template gen_gl_h.sh
+- ./gen_gl_h.sh include/GL/gl.h.template $@
+-
+ .c.o:
+ $(CC) -c $(INCLUDES) $(CFLAGS) $(EXTRA_DEFINES) $< -o $@
+
+@@ -115,10 +113,7 @@ install_headers: include/GL/gl.h
+ install_libraries: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
+ $(MAKE) -C $(TOP)/src/mesa install-libgl
+
+-install: install_headers install_libraries
+-
+-#%.c : ../%.c
+-# ln -s $<
++install: install_libraries
+
+ # Remove .o and backup files
+ clean:
+diff --git Mesa-7.8.1/src/glx/apple/apple_glx_pbuffer.c Mesa-7.8.1/src/glx/apple/apple_glx_pbuffer.c
+index 3dfdc54..fb56b75 100644
+--- Mesa-7.8.1/src/glx/apple/apple_glx_pbuffer.c
++++ Mesa-7.8.1/src/glx/apple/apple_glx_pbuffer.c
+@@ -30,6 +30,7 @@
+ #include <stdlib.h>
+ #include <pthread.h>
+ #include <assert.h>
++#include <GL/glew.h>
+ #include "apple_glx.h"
+ #include "glcontextmodes.h"
+ #include "apple_glx_context.h"
+diff --git Mesa-7.8.1/src/glx/apple/apple_xgl_api_additional.c Mesa-7.8.1/src/glx/apple/apple_xgl_api_additional.c
+new file mode 100644
+index 0000000..7d40afe
+--- /dev/null
++++ Mesa-7.8.1/src/glx/apple/apple_xgl_api_additional.c
+@@ -0,0 +1,37 @@
++/*
++ Copyright (c) 2008, 2009 Apple Inc.
++
++ Permission is hereby granted, free of charge, to any person
++ obtaining a copy of this software and associated documentation files
++ (the "Software"), to deal in the Software without restriction,
++ including without limitation the rights to use, copy, modify, merge,
++ publish, distribute, sublicense, and/or sell copies of the Software,
++ and to permit persons to whom the Software is furnished to do so,
++ subject to the following conditions:
++
++ The above copyright notice and this permission notice shall be
++ included in all copies or substantial portions of the Software.
++
++ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++ NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
++ HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
++ DEALINGS IN THE SOFTWARE.
++
++ Except as contained in this notice, the name(s) of the above
++ copyright holders shall not be used in advertising or otherwise to
++ promote the sale, use or other dealings in this Software without
++ prior written authorization.
++*/
++
++#define GL_GLEXT_PROTOTYPES
++#include <GL/gl.h>
++
++GLAPI void APIENTRY glTexImage3DEXT(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei
++ depth, GLint border, GLenum format, GLenum type, const void * pixels) {
++ glTexImage3D(target, level, (GLint)internalformat, width, height, depth, border, format, type, pixels);
++}
++
+diff --git Mesa-7.8.1/src/glx/apple/gen_funcs.tcl Mesa-7.8.1/src/glx/apple/gen_funcs.tcl
+index ff314dc..e78eb32 100644
+--- Mesa-7.8.1/src/glx/apple/gen_funcs.tcl
++++ Mesa-7.8.1/src/glx/apple/gen_funcs.tcl
+@@ -72,6 +72,8 @@ proc is-extension-supported? name {
+ }
+
+ #This is going to need to be updated for OpenGL >= 2.1 in SnowLeopard.
++# TextureComponentCount is GLenum in SL for everything
++# It is GLint in mesa, but is GLenum for glTexImage3DEXT
+ array set typemap {
+ void void
+ List GLuint
+@@ -126,7 +128,7 @@ array set typemap {
+ ShadingModel GLenum
+ TextureTarget GLenum
+ TextureParameterName GLenum
+- TextureComponentCount GLenum
++ TextureComponentCount GLint
+ PixelFormat GLenum
+ PixelType GLenum
+ TextureEnvTarget GLenum
+@@ -412,14 +414,7 @@ proc translate-parameters {func parameters} {
+
+ set type $typemap($ptype)
+
+- #In the gl.spec file is MultiDrawArrays first and count
+- #are really 'in' so we make them const.
+- #The gl.spec notes this problem.
+- if {("MultiDrawArrays" eq $func) && ("first" eq $var)} {
+- set final_type "const $type *"
+- } elseif {("MultiDrawArrays" eq $func) && ("count" eq $var)} {
+- set final_type "const $type *"
+- } elseif {"array" eq [lindex $p 3]} {
++ if {"array" eq [lindex $p 3]} {
+ if {"in" eq [lindex $p 2]} {
+ set final_type "const $type *"
+ } else {
+diff --git Mesa-7.8.1/src/glx/apple/gen_gl_h.sh Mesa-7.8.1/src/glx/apple/gen_gl_h.sh
+deleted file mode 100755
+index f10ddd0..0000000
+--- Mesa-7.8.1/src/glx/apple/gen_gl_h.sh
++++ /dev/null
+@@ -1,33 +0,0 @@
+-#!/bin/bash
+-
+-INFILE=$1
+-OUTFILE=$2
+-
+-generate_macros() {
+- grep gl.*ProcPtr /System/Library/Frameworks/OpenGL.framework/Headers/gl{,ext}.h | sed 's:^.*\(gl.*Ptr\).*$:\1:' | sort -u | perl -ne 'chomp($_); $s = "PFN".uc($_); $s =~ s/PROCPTR/PROC/; print "#define ".$_." ".$s."\n"'
+-}
+-
+-generate_function_pointers() {
+- {
+- echo "#define GL_GLEXT_FUNCTION_POINTERS 1"
+- echo "#define GL_GLEXT_LEGACY 1"
+- generate_macros
+- echo '#include "/System/Library/Frameworks/OpenGL.framework/Headers/gl.h"'
+- } | ${CC:-gcc} -E - | grep typedef.*PFN
+-}
+-
+-cat ${INFILE} | while IFS= read LINE ; do
+- case $LINE in
+- "@CGL_MESA_COMPAT_MACROS@")
+- generate_macros
+- ;;
+- "@CGL_MESA_FUNCTION_POINTERS@")
+- if ! grep -q GL_GLEXT_PROTOTYPES /System/Library/Frameworks/OpenGL.framework/Headers/gl.h ; then
+- generate_function_pointers
+- fi
+- ;;
+- *)
+- printf "${LINE}\n"
+- ;;
+- esac
+-done > ${OUTFILE}
+diff --git Mesa-7.8.1/src/glx/apple/include/GL/gl.h.template Mesa-7.8.1/src/glx/apple/include/GL/gl.h.template
+deleted file mode 100644
+index 72169f9..0000000
+--- Mesa-7.8.1/src/glx/apple/include/GL/gl.h.template
++++ /dev/null
+@@ -1,130 +0,0 @@
+-/*
+- * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
+- * Copyright (C) 2009 Apple Inc. All Rights Reserved.
+- *
+- * Permission is hereby granted, free of charge, to any person obtaining a
+- * copy of this software and associated documentation files (the "Software"),
+- * to deal in the Software without restriction, including without limitation
+- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+- * and/or sell copies of the Software, and to permit persons to whom the
+- * Software is furnished to do so, subject to the following conditions:
+- *
+- * The above copyright notice and this permission notice shall be included
+- * in all copies or substantial portions of the Software.
+- *
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+- */
+-
+-#ifndef __X_GL_H
+-#define __X_GL_H
+-
+-/* The following macros exist to address conflicts between the names given to
+- * function pointers by the MESA API and OpenGL.framework's API.
+- */
+- at CGL_MESA_COMPAT_MACROS@
+-
+-/* On SL, we want to use OpelGL.framework's headers to get both prototypes and
+- * function pointers (like Mesa's API), but on Leo and before, OpenGL.framework
+- * can't give us both.
+- */
+-
+-#ifdef GL_GLEXT_FUNCTION_POINTERS
+-#define _GL_GLEXT_FUNCTION_POINTERS GL_GLEXT_FUNCTION_POINTERS
+-#undef GL_GLEXT_FUNCTION_POINTERS
+-#endif
+-
+-#ifdef GL_GLEXT_PROTOTYPES
+-#define _GL_GLEXT_PROTOTYPES GL_GLEXT_PROTOTYPES
+-#else
+-#define GL_GLEXT_PROTOTYPES 1
+-#endif
+-
+-/* Our glext.h is based on a version from the registry that is newer. */
+-#ifdef GL_GLEXT_LEGACY
+-#define _GL_GLEXT_LEGACY GL_GLEXT_LEGACY
+-#else
+-#define GL_GLEXT_LEGACY 1
+-#endif
+-
+-#include "/System/Library/Frameworks/OpenGL.framework/Headers/gl.h"
+-
+-/* These are not set by the system gl.h */
+-#define GL_VERSION_1_2_DEPRECATED 1
+-#define GL_VERSION_1_3_DEPRECATED 1
+-#define GL_VERSION_1_4_DEPRECATED 1
+-
+-/* Restore our GLEXT-fu */
+-#ifdef _GL_GLEXT_FUNCTION_POINTERS
+-#define GL_GLEXT_FUNCTION_POINTERS _GL_GLEXT_FUNCTION_POINTERS
+-#undef _GL_GLEXT_FUNCTION_POINTERS
+-#endif
+-
+-#ifdef _GL_GLEXT_PROTOTYPES
+-#undef _GL_GLEXT_PROTOTYPES
+-#else
+-#undef GL_GLEXT_PROTOTYPES
+-#endif
+-
+-#ifdef _GL_GLEXT_LEGACY
+-#undef _GL_GLEXT_LEGACY
+-#else
+-#undef GL_GLEXT_LEGACY
+-#endif
+-
+- at CGL_MESA_FUNCTION_POINTERS@
+-
+-#ifndef GL_GLEXT_LEGACY
+-#include <GL/glext.h>
+-#endif
+-
+-/*
+- * This is needed for building apple_glx_pbuffer.c, the latest
+- * glext.h from the registry lacks it, so it's from the Leopard glext.h:
+- */
+-#ifndef GL_TEXTURE_RECTANGLE_EXT
+-#define GL_TEXTURE_RECTANGLE_EXT 0x84F5
+-#endif
+-
+-/* This is needed for building the X server: */
+-/*
+- * GL_MESA_packed_depth_stencil
+- */
+-#ifndef GL_MESA_packed_depth_stencil
+-#define GL_MESA_packed_depth_stencil 1
+-
+-#define GL_DEPTH_STENCIL_MESA 0x8750
+-#define GL_UNSIGNED_INT_24_8_MESA 0x8751
+-#define GL_UNSIGNED_INT_8_24_REV_MESA 0x8752
+-#define GL_UNSIGNED_SHORT_15_1_MESA 0x8753
+-#define GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754
+-
+-#endif /* GL_MESA_packed_depth_stencil */
+-
+-/* Various other OS projects expect to get these macros from Mesa's gl.h */
+-#ifndef GLAPI
+-#define GLAPI extern
+-#endif
+-
+-#ifndef GLAPIENTRY
+-#define GLAPIENTRY
+-#endif
+-
+-#ifndef APIENTRY
+-#define APIENTRY GLAPIENTRY
+-#endif
+-
+-/* "P" suffix to be used for a pointer to a function */
+-#ifndef APIENTRYP
+-#define APIENTRYP APIENTRY *
+-#endif
+-
+-#ifndef GLAPIENTRYP
+-#define GLAPIENTRYP GLAPIENTRY *
+-#endif
+-
+-#endif /*__X_GL_H*/
+--
+1.7.0.3
+
Added: trunk/dports/x11/mesa/files/0007-Use-X_LIBS-from-pkg-config-instead-of-libdir-for-loc.patch
===================================================================
--- trunk/dports/x11/mesa/files/0007-Use-X_LIBS-from-pkg-config-instead-of-libdir-for-loc.patch (rev 0)
+++ trunk/dports/x11/mesa/files/0007-Use-X_LIBS-from-pkg-config-instead-of-libdir-for-loc.patch 2010-04-06 21:18:27 UTC (rev 66184)
@@ -0,0 +1,83 @@
+From b24a5b46eaa1ac3a23a22cc1f097e90043d254aa Mon Sep 17 00:00:00 2001
+From: Jeff Smith <whydoubt at yahoo.com>
+Date: Fri, 12 Mar 2010 18:55:09 -0600
+Subject: [PATCH 7/7] Use X_LIBS from pkg-config, instead of libdir, for locating libX11
+
+Signed-off-by: Jeff Smith <whydoubt at yahoo.com>
+Signed-off-by: Dan Nicholson <dbn.lists at gmail.com>
+(cherry picked from commit 8d86d395dcf6a5f192b6987485bb7aef49f1fefc)
+---
+ configs/autoconf.in | 2 ++
+ configure.ac | 4 +++-
+ progs/egl/Makefile | 6 +++---
+ progs/xdemos/Makefile | 4 ++--
+ 4 files changed, 10 insertions(+), 6 deletions(-)
+
+diff --git Mesa-7.8.1/configs/autoconf.in Mesa-7.8.1/configs/autoconf.in
+index 3063787..f07035a 100644
+--- Mesa-7.8.1/configs/autoconf.in
++++ Mesa-7.8.1/configs/autoconf.in
+@@ -24,6 +24,8 @@ RADEON_CFLAGS = @RADEON_CFLAGS@
+ RADEON_LDFLAGS = @RADEON_LDFLAGS@
+ INTEL_LIBS = @INTEL_LIBS@
+ INTEL_CFLAGS = @INTEL_CFLAGS@
++X_LIBS = @X_LIBS@
++X_CFLAGS = @X_CFLAGS@
+
+ # Assembler
+ MESA_ASM_SOURCES = @MESA_ASM_SOURCES@
+diff --git Mesa-7.8.1/configure.ac Mesa-7.8.1/configure.ac
+index 61487c3..5f3d02d 100644
+--- Mesa-7.8.1/configure.ac
++++ Mesa-7.8.1/configure.ac
+@@ -547,7 +547,9 @@ else
+ x11_pkgconfig=no
+ fi
+ dnl Use the autoconf macro if no pkg-config files
+-if test "$x11_pkgconfig" = no; then
++if test "$x11_pkgconfig" = yes; then
++ PKG_CHECK_MODULES([X], [x11])
++else
+ AC_PATH_XTRA
+ fi
+
+diff --git Mesa-7.8.1/progs/egl/Makefile Mesa-7.8.1/progs/egl/Makefile
+index 25de6e1..5f51104 100644
+--- Mesa-7.8.1/progs/egl/Makefile
++++ Mesa-7.8.1/progs/egl/Makefile
+@@ -57,13 +57,13 @@ peglgears: peglgears.o $(HEADERS) $(LIB_DEP)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(LIBDRM_LIB) -lm
+
+ xeglgears: xeglgears.o $(HEADERS) $(LIB_DEP)
+- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm -L$(libdir) -lX11
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm $(X_LIBS)
+
+ xeglthreads: xeglthreads.o $(HEADERS) $(LIB_DEP)
+- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm -L$(libdir) -lX11
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm $(X_LIBS)
+
+ xegl_tri: xegl_tri.o $(HEADERS) $(LIB_DEP)
+- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm -L$(libdir) -lX11
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm $(X_LIBS)
+
+ clean:
+ -rm -f *.o *~
+diff --git Mesa-7.8.1/progs/xdemos/Makefile Mesa-7.8.1/progs/xdemos/Makefile
+index d81caab..038e21c 100644
+--- Mesa-7.8.1/progs/xdemos/Makefile
++++ Mesa-7.8.1/progs/xdemos/Makefile
+@@ -9,9 +9,9 @@ INCDIR = $(TOP)/include
+ LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
+
+ # Add X11 and pthread libs to satisfy GNU gold.
+-APP_LIB_DEPS += -lX11 -lpthread
++APP_LIB_DEPS += $(X_LIBS) -lpthread
+
+-LIBS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(libdir) $(APP_LIB_DEPS)
++LIBS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(APP_LIB_DEPS)
+
+ PROGS = \
+ corender \
+--
+1.7.0.3
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100406/7c7fa744/attachment-0001.html>
More information about the macports-changes
mailing list