[93502] trunk/dports/x11/mesa

jeremyhu at macports.org jeremyhu at macports.org
Thu May 24 10:22:14 PDT 2012


Revision: 93502
          https://trac.macports.org/changeset/93502
Author:   jeremyhu at macports.org
Date:     2012-05-24 10:22:14 -0700 (Thu, 24 May 2012)
Log Message:
-----------
mesa: Bump to 8.0.3 and drop a ton of patches that were included

Modified Paths:
--------------
    trunk/dports/x11/mesa/Portfile

Removed Paths:
-------------
    trunk/dports/x11/mesa/files/0001-glapi-Correct-size-of-allocated-_glapi_table-struct.patch
    trunk/dports/x11/mesa/files/0002-apple-Fix-a-use-after-free.patch
    trunk/dports/x11/mesa/files/0003-darwin-Eliminate-a-pthread-mutex-leak.patch
    trunk/dports/x11/mesa/files/0012-darwin-Fix-an-error-message.patch
    trunk/dports/x11/mesa/files/0013-darwin-Make-reported-errors-more-user-friendly.patch
    trunk/dports/x11/mesa/files/0014-darwin-Use-ASL-for-logging.patch
    trunk/dports/x11/mesa/files/0023-darwin-Unlock-our-mutex-before-destroying-it.patch
    trunk/dports/x11/mesa/files/0024-darwin-Eliminate-a-possible-race-condition-while-des.patch
    trunk/dports/x11/mesa/files/1001-darwin-Address-a-build-failure-on-Leopard-and-earlie.patch

Modified: trunk/dports/x11/mesa/Portfile
===================================================================
--- trunk/dports/x11/mesa/Portfile	2012-05-24 16:30:32 UTC (rev 93501)
+++ trunk/dports/x11/mesa/Portfile	2012-05-24 17:22:14 UTC (rev 93502)
@@ -5,8 +5,7 @@
 
 name                mesa
 epoch               1
-version             8.0.2
-revision            4
+version             8.0.3
 categories          x11 graphics
 maintainers         jeremyhu openmaintainer
 license             MIT
@@ -19,9 +18,9 @@
 platforms           macosx darwin
 use_bzip2           yes
 master_sites        ftp://ftp.freedesktop.org/pub/mesa/${version}/
-checksums           sha1    bbb55d81294425137ee66c7389fbb474a43c9ab9 \
-                    rmd160  a7c4e396d82c890eed462fd45b433812f3fad045 \
-                    sha256  8f4d1e70e058a65143e618a9daaf45f00fac04ae9464b35a8d9eeeef3fa5e2a5
+checksums           sha1    768bdb2fe133bbcccd3323b79484d0d17bc0d05d \
+                    rmd160  3d9d6dfbe42bc3ce1d3df491ca4e353108abec4b \
+                    sha256  96812c59b0923314914185a2b064eb5245f1228a319c4db94835ce1c84da407f
 
 depends_build       bin:makedepend:makedepend \
                     bin:tclsh8.5:tcl
@@ -33,16 +32,6 @@
                     port:xorg-libXmu
 
 patch.pre_args -p1
-patchfiles \
-    0001-glapi-Correct-size-of-allocated-_glapi_table-struct.patch \
-    0002-apple-Fix-a-use-after-free.patch \
-    0003-darwin-Eliminate-a-pthread-mutex-leak.patch \
-    0012-darwin-Fix-an-error-message.patch \
-    0013-darwin-Make-reported-errors-more-user-friendly.patch \
-    0014-darwin-Use-ASL-for-logging.patch \
-    0023-darwin-Unlock-our-mutex-before-destroying-it.patch \
-    0024-darwin-Eliminate-a-possible-race-condition-while-des.patch \
-    1001-darwin-Address-a-build-failure-on-Leopard-and-earlie.patch
 
 use_configure  no
 use_parallel_build yes

Deleted: trunk/dports/x11/mesa/files/0001-glapi-Correct-size-of-allocated-_glapi_table-struct.patch
===================================================================
--- trunk/dports/x11/mesa/files/0001-glapi-Correct-size-of-allocated-_glapi_table-struct.patch	2012-05-24 16:30:32 UTC (rev 93501)
+++ trunk/dports/x11/mesa/files/0001-glapi-Correct-size-of-allocated-_glapi_table-struct.patch	2012-05-24 17:22:14 UTC (rev 93502)
@@ -1,32 +0,0 @@
-From bb30e76328e9dd80b0c7a7688828e3cf8e662b1b Mon Sep 17 00:00:00 2001
-From: Jonas Maebe <jonas.maebe at elis.ugent.be>
-Date: Sun, 22 Apr 2012 20:39:32 -0700
-Subject: [PATCH 01/24] glapi: Correct size of allocated _glapi_table struct
-
-The __glapi_gentable_set_remaining_noop() routine treats the _glapi_struct
-as an array of _glapi_get_dispatch_table_size() pointers, so we have to
-allocate _glapi_get_dispatch_table_size()*sizeof(void*) bytes rather
-than sizeof(struct _glapi_struct) bytes.
-
-Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
-(cherry picked from commit 8d09f4d0cc8d2ac5398c8b26638d5659429a4280)
----
- src/mapi/glapi/glapi_gentable.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/mapi/glapi/glapi_gentable.c b/src/mapi/glapi/glapi_gentable.c
-index 5c04801..640c495 100644
---- a/src/mapi/glapi/glapi_gentable.c
-+++ b/src/mapi/glapi/glapi_gentable.c
-@@ -105,7 +105,7 @@ __glapi_gentable_set_remaining_noop(struct _glapi_table *disp) {
- 
- struct _glapi_table *
- _glapi_create_table_from_handle(void *handle, const char *symbol_prefix) {
--    struct _glapi_table *disp = calloc(1, sizeof(struct _glapi_table));
-+    struct _glapi_table *disp = calloc(_glapi_get_dispatch_table_size(), sizeof(void *));
-     char symboln[512];
- 
-     if(!disp)
--- 
-1.7.10.1
-

Deleted: trunk/dports/x11/mesa/files/0002-apple-Fix-a-use-after-free.patch
===================================================================
--- trunk/dports/x11/mesa/files/0002-apple-Fix-a-use-after-free.patch	2012-05-24 16:30:32 UTC (rev 93501)
+++ trunk/dports/x11/mesa/files/0002-apple-Fix-a-use-after-free.patch	2012-05-24 17:22:14 UTC (rev 93502)
@@ -1,37 +0,0 @@
-From 6095a17534c2694760300701fee59a320950f271 Mon Sep 17 00:00:00 2001
-From: Jonas Maebe <jonas.maebe at elis.ugent.be>
-Date: Mon, 23 Apr 2012 16:02:16 -0700
-Subject: [PATCH 02/24] apple: Fix a use after free
-
-Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
-(cherry picked from commit c60ffd2840036af1ea6f2b6c6e1e9014bb8e2c34)
----
- src/glx/apple/apple_glx_surface.c |    6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/src/glx/apple/apple_glx_surface.c b/src/glx/apple/apple_glx_surface.c
-index 39f5130..d42fa3b 100644
---- a/src/glx/apple/apple_glx_surface.c
-+++ b/src/glx/apple/apple_glx_surface.c
-@@ -206,6 +206,10 @@ apple_glx_surface_destroy(unsigned int uid)
-    if (d) {
-       d->types.surface.pending_destroy = true;
-       d->release(d);
-+
-+      /* apple_glx_drawable_find_by_uid returns a locked drawable */
-+      d->unlock(d);
-+
-       /* 
-        * We release 2 references to the surface.  One was acquired by
-        * the find, and the other was leftover from a context, or 
-@@ -217,7 +221,5 @@ apple_glx_surface_destroy(unsigned int uid)
-        * by a glViewport callback (see apple_glx_context_update()).
-        */
-       d->destroy(d);
--
--      d->unlock(d);
-    }
- }
--- 
-1.7.10.1
-

Deleted: trunk/dports/x11/mesa/files/0003-darwin-Eliminate-a-pthread-mutex-leak.patch
===================================================================
--- trunk/dports/x11/mesa/files/0003-darwin-Eliminate-a-pthread-mutex-leak.patch	2012-05-24 16:30:32 UTC (rev 93501)
+++ trunk/dports/x11/mesa/files/0003-darwin-Eliminate-a-pthread-mutex-leak.patch	2012-05-24 17:22:14 UTC (rev 93502)
@@ -1,40 +0,0 @@
-From 69d8a25d429bccf960e98e5c126e1ef2ae4ffe9d Mon Sep 17 00:00:00 2001
-From: Jeremy Huddleston <jeremyhu at apple.com>
-Date: Mon, 23 Apr 2012 16:43:22 -0700
-Subject: [PATCH 03/24] darwin: Eliminate a pthread mutex leak
-
-Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
-Tested-by: Charles Davis <cdavis at mines.edu>
-(cherry picked from commit 1a33c1b2b895566299ec76643659adacc239a3dc)
----
- src/glx/apple/apple_glx_drawable.c |    7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/src/glx/apple/apple_glx_drawable.c b/src/glx/apple/apple_glx_drawable.c
-index 5530224..db28302 100644
---- a/src/glx/apple/apple_glx_drawable.c
-+++ b/src/glx/apple/apple_glx_drawable.c
-@@ -135,6 +135,7 @@ release_drawable(struct apple_glx_drawable *d)
- static bool
- destroy_drawable(struct apple_glx_drawable *d)
- {
-+   int err;
- 
-    d->lock(d);
- 
-@@ -172,6 +173,12 @@ destroy_drawable(struct apple_glx_drawable *d)
- 
-    apple_glx_diagnostic("%s: freeing %p\n", __func__, (void *) d);
- 
-+   err = pthread_mutex_destroy(&d->mutex);
-+   if (err) {
-+      fprintf(stderr, "pthread_mutex_destroy error: %s\n", strerror(err));
-+      abort();
-+   }
-+   
-    free(d);
- 
-    /* So that the locks are balanced and the caller correctly unlocks. */
--- 
-1.7.10.1
-

Deleted: trunk/dports/x11/mesa/files/0012-darwin-Fix-an-error-message.patch
===================================================================
--- trunk/dports/x11/mesa/files/0012-darwin-Fix-an-error-message.patch	2012-05-24 16:30:32 UTC (rev 93501)
+++ trunk/dports/x11/mesa/files/0012-darwin-Fix-an-error-message.patch	2012-05-24 17:22:14 UTC (rev 93502)
@@ -1,27 +0,0 @@
-From 8010ff17ae931e17dd9d5eead91b144dce146147 Mon Sep 17 00:00:00 2001
-From: Jeremy Huddleston <jeremyhu at apple.com>
-Date: Sun, 29 Apr 2012 00:27:03 -0700
-Subject: [PATCH 12/24] darwin: Fix an error message
-
-Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
-(cherry picked from commit 244dc0521439379a0a44f81ba432aa04ca6c1a91)
----
- src/glx/apple/apple_glx_context.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/glx/apple/apple_glx_context.c b/src/glx/apple/apple_glx_context.c
-index c58d05a..0bb25b4 100644
---- a/src/glx/apple/apple_glx_context.c
-+++ b/src/glx/apple/apple_glx_context.c
-@@ -421,7 +421,7 @@ apple_glx_make_current_context(Display * dpy, void *oldptr, void *ptr,
-     */
- 
-    if (same_drawable && ac->is_current) {
--      apple_glx_diagnostic("%s: same_drawable and ac->is_current\n");
-+      apple_glx_diagnostic("same_drawable and ac->is_current\n");
-       return false;
-    }
- 
--- 
-1.7.10.1
-

Deleted: trunk/dports/x11/mesa/files/0013-darwin-Make-reported-errors-more-user-friendly.patch
===================================================================
--- trunk/dports/x11/mesa/files/0013-darwin-Make-reported-errors-more-user-friendly.patch	2012-05-24 16:30:32 UTC (rev 93501)
+++ trunk/dports/x11/mesa/files/0013-darwin-Make-reported-errors-more-user-friendly.patch	2012-05-24 17:22:14 UTC (rev 93502)
@@ -1,92 +0,0 @@
-From f818673acbff14cbf6dc57bd420ef6a0db164df3 Mon Sep 17 00:00:00 2001
-From: Jeremy Huddleston <jeremyhu at apple.com>
-Date: Sat, 28 Apr 2012 16:50:00 -0700
-Subject: [PATCH 13/24] darwin: Make reported errors more user-friendly
-
-Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
-(cherry picked from commit cf5db0a418b63d71385b43897a7ea9be7bb785d1)
----
- src/glx/apple/apple_glx_drawable.c |   19 ++++++++++---------
- 1 file changed, 10 insertions(+), 9 deletions(-)
-
-diff --git a/src/glx/apple/apple_glx_drawable.c b/src/glx/apple/apple_glx_drawable.c
-index db28302..3f84d56 100644
---- a/src/glx/apple/apple_glx_drawable.c
-+++ b/src/glx/apple/apple_glx_drawable.c
-@@ -32,6 +32,7 @@
- #include <stdlib.h>
- #include <assert.h>
- #include <pthread.h>
-+#include <string.h>
- #include "apple_glx.h"
- #include "apple_glx_context.h"
- #include "apple_glx_drawable.h"
-@@ -48,8 +49,8 @@ lock_drawables_list(void)
-    err = pthread_mutex_lock(&drawables_lock);
- 
-    if (err) {
--      fprintf(stderr, "pthread_mutex_lock failure in %s: %d\n",
--              __func__, err);
-+      fprintf(stderr, "pthread_mutex_lock failure in %s: %s\n",
-+              __func__, strerror(err));
-       abort();
-    }
- }
-@@ -62,8 +63,8 @@ unlock_drawables_list(void)
-    err = pthread_mutex_unlock(&drawables_lock);
- 
-    if (err) {
--      fprintf(stderr, "pthread_mutex_unlock failure in %s: %d\n",
--              __func__, err);
-+      fprintf(stderr, "pthread_mutex_unlock failure in %s: %s\n",
-+              __func__, strerror(err));
-       abort();
-    }
- }
-@@ -95,7 +96,7 @@ drawable_lock(struct apple_glx_drawable *agd)
-    err = pthread_mutex_lock(&agd->mutex);
- 
-    if (err) {
--      fprintf(stderr, "pthread_mutex_lock error: %d\n", err);
-+      fprintf(stderr, "pthread_mutex_lock error: %s\n", strerror(err));
-       abort();
-    }
- }
-@@ -108,7 +109,7 @@ drawable_unlock(struct apple_glx_drawable *d)
-    err = pthread_mutex_unlock(&d->mutex);
- 
-    if (err) {
--      fprintf(stderr, "pthread_mutex_unlock error: %d\n", err);
-+      fprintf(stderr, "pthread_mutex_unlock error: %s\n", strerror(err));
-       abort();
-    }
- }
-@@ -245,7 +246,7 @@ common_init(Display * dpy, GLXDrawable drawable, struct apple_glx_drawable *d)
-    err = pthread_mutexattr_init(&attr);
- 
-    if (err) {
--      fprintf(stderr, "pthread_mutexattr_init error: %d\n", err);
-+      fprintf(stderr, "pthread_mutexattr_init error: %s\n", strerror(err));
-       abort();
-    }
- 
-@@ -257,14 +258,14 @@ common_init(Display * dpy, GLXDrawable drawable, struct apple_glx_drawable *d)
-    err = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
- 
-    if (err) {
--      fprintf(stderr, "error: setting pthread mutex type: %d\n", err);
-+      fprintf(stderr, "error: setting pthread mutex type: %s\n", strerror(err));
-       abort();
-    }
- 
-    err = pthread_mutex_init(&d->mutex, &attr);
- 
-    if (err) {
--      fprintf(stderr, "pthread_mutex_init error: %d\n", err);
-+      fprintf(stderr, "pthread_mutex_init error: %s\n", strerror(err));
-       abort();
-    }
- 
--- 
-1.7.10.1
-

Deleted: trunk/dports/x11/mesa/files/0014-darwin-Use-ASL-for-logging.patch
===================================================================
--- trunk/dports/x11/mesa/files/0014-darwin-Use-ASL-for-logging.patch	2012-05-24 16:30:32 UTC (rev 93501)
+++ trunk/dports/x11/mesa/files/0014-darwin-Use-ASL-for-logging.patch	2012-05-24 17:22:14 UTC (rev 93502)
@@ -1,283 +0,0 @@
-From f36e638c761c0b11a053cc2b21c9fda2402119ca Mon Sep 17 00:00:00 2001
-From: Jeremy Huddleston <jeremyhu at apple.com>
-Date: Sat, 28 Apr 2012 23:19:42 -0700
-Subject: [PATCH 14/24] darwin: Use ASL for logging
-
-Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
-(cherry picked from commit 51691f0767f6a75a1f549cd979a878a0ad12a228)
----
- src/glx/apple/Makefile        |    1 +
- src/glx/apple/apple_glx.c     |   25 ++-------
- src/glx/apple/apple_glx.h     |    3 +-
- src/glx/apple/apple_glx_log.c |  118 +++++++++++++++++++++++++++++++++++++++++
- src/glx/apple/apple_glx_log.h |   57 ++++++++++++++++++++
- 5 files changed, 183 insertions(+), 21 deletions(-)
- create mode 100644 src/glx/apple/apple_glx_log.c
- create mode 100644 src/glx/apple/apple_glx_log.h
-
-diff --git a/src/glx/apple/Makefile b/src/glx/apple/Makefile
-index dc64295..68fe6ad 100644
---- a/src/glx/apple/Makefile
-+++ b/src/glx/apple/Makefile
-@@ -26,6 +26,7 @@ SOURCES = \
- 	apple_glx.c \
- 	apple_glx_context.c \
- 	apple_glx_drawable.c \
-+	apple_glx_log.c \
- 	apple_glx_pbuffer.c \
- 	apple_glx_pixmap.c \
- 	apple_glx_surface.c \
-diff --git a/src/glx/apple/apple_glx.c b/src/glx/apple/apple_glx.c
-index d94c1e0..56cff64 100644
---- a/src/glx/apple/apple_glx.c
-+++ b/src/glx/apple/apple_glx.c
-@@ -33,6 +33,8 @@
- #include <assert.h>
- #include <stdarg.h>
- #include <dlfcn.h>
-+#include <pthread.h>
-+#include <inttypes.h>
- #include "appledri.h"
- #include "apple_glx.h"
- #include "apple_glx_context.h"
-@@ -43,22 +45,6 @@ static int dri_event_base = 0;
- 
- const GLuint __glXDefaultPixelStore[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 1 };
- 
--static bool diagnostic = false;
--
--void
--apple_glx_diagnostic(const char *fmt, ...)
--{
--   va_list vl;
--
--   if (diagnostic) {
--      fprintf(stderr, "DIAG: ");
--
--      va_start(vl, fmt);
--      vfprintf(stderr, fmt, vl);
--      va_end(vl);
--   }
--}
--
- int
- apple_get_dri_event_base(void)
- {
-@@ -125,10 +111,9 @@ apple_init_glx(Display * dpy)
-    if (initialized)
-       return false;
- 
--   if (getenv("LIBGL_DIAGNOSTIC")) {
--      printf("initializing libGL in %s\n", __func__);
--      diagnostic = true;
--   }
-+   apple_glx_log_init();
-+
-+   apple_glx_log(ASL_LEVEL_INFO, "Initializing libGL.");
- 
-    apple_cgl_init();
-    (void) apple_glx_get_client_id();
-diff --git a/src/glx/apple/apple_glx.h b/src/glx/apple/apple_glx.h
-index ce8c488..0967f18 100644
---- a/src/glx/apple/apple_glx.h
-+++ b/src/glx/apple/apple_glx.h
-@@ -38,7 +38,8 @@
- #define XP_NO_X_HEADERS
- #include <Xplugin.h>
- 
--void apple_glx_diagnostic(const char *fmt, ...);
-+#include "apple_glx_log.h"
-+
- xp_client_id apple_glx_get_client_id(void);
- bool apple_init_glx(Display * dpy);
- void apple_glx_swap_buffers(void *ptr);
-diff --git a/src/glx/apple/apple_glx_log.c b/src/glx/apple/apple_glx_log.c
-new file mode 100644
-index 0000000..9ebf666
---- /dev/null
-+++ b/src/glx/apple/apple_glx_log.c
-@@ -0,0 +1,118 @@
-+/*
-+ * Copyright (c) 2012 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.
-+ */
-+
-+#include <sys/cdefs.h>
-+#include <asl.h>
-+#include <stdio.h>
-+#include <stdbool.h>
-+#include <stdint.h>
-+#include <stdlib.h>
-+#include <inttypes.h>
-+#include <pthread.h>
-+#include "apple_glx_log.h"
-+
-+static bool diagnostic = false;
-+static aslclient aslc;
-+
-+void apple_glx_log_init(void) {
-+    if (getenv("LIBGL_DIAGNOSTIC")) {
-+        diagnostic = true;
-+    }
-+
-+    aslc = asl_open(NULL, NULL, 0);
-+}
-+
-+void _apple_glx_log(int level, const char *file, const char *function,
-+                    int line, const char *fmt, ...) {
-+    va_list v;
-+    va_start(v, fmt);
-+    _apple_glx_vlog(level, file, function, line, fmt, v);
-+    va_end(v);
-+}
-+
-+static const char *
-+_asl_level_string(int level)
-+{
-+        if (level == ASL_LEVEL_EMERG) return ASL_STRING_EMERG;
-+        if (level == ASL_LEVEL_ALERT) return ASL_STRING_ALERT;
-+        if (level == ASL_LEVEL_CRIT) return ASL_STRING_CRIT;
-+        if (level == ASL_LEVEL_ERR) return ASL_STRING_ERR;
-+        if (level == ASL_LEVEL_WARNING) return ASL_STRING_WARNING;
-+        if (level == ASL_LEVEL_NOTICE) return ASL_STRING_NOTICE;
-+        if (level == ASL_LEVEL_INFO) return ASL_STRING_INFO;
-+        if (level == ASL_LEVEL_DEBUG) return ASL_STRING_DEBUG;
-+        return "unknown";
-+}
-+
-+void _apple_glx_vlog(int level, const char *file, const char *function,
-+                     int line, const char *fmt, va_list args) {
-+    aslmsg msg;
-+    uint64_t thread = 0;
-+
-+    if (pthread_is_threaded_np()) {
-+        pthread_threadid_np(NULL, &thread);
-+    }
-+
-+    if (diagnostic) {
-+        va_list args2;
-+        va_copy(args2, args);
-+
-+        fprintf(stderr, "%-9s %24s:%-4d %s(%"PRIu64"): ",
-+                _asl_level_string(level), file, line, function, thread);
-+        vfprintf(stderr, fmt, args2);
-+    }
-+
-+    msg = asl_new(ASL_TYPE_MSG);
-+    if (msg) {
-+        if (file)
-+            asl_set(msg, "File", file);
-+        if (function)
-+            asl_set(msg, "Function", function);
-+        if (line) {
-+            char *_line;
-+            asprintf(&_line, "%d", line);
-+            if (_line) {
-+                asl_set(msg, "Line", _line);
-+                free(_line);
-+            }
-+        }
-+        if (pthread_is_threaded_np()) {
-+            char *_thread;
-+            asprintf(&_thread, "%"PRIu64, thread);
-+            if (_thread) {
-+                asl_set(msg, "Thread", _thread);
-+                free(_thread);
-+            }
-+        }
-+    }
-+
-+    asl_vlog(aslc, msg, level, fmt, args);
-+    if (msg)
-+        asl_free(msg);
-+}
-diff --git a/src/glx/apple/apple_glx_log.h b/src/glx/apple/apple_glx_log.h
-new file mode 100644
-index 0000000..4b1c531
---- /dev/null
-+++ b/src/glx/apple/apple_glx_log.h
-@@ -0,0 +1,57 @@
-+/*
-+ * Copyright (c) 2012 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.
-+ */
-+
-+#ifndef APPLE_GLX_LOG_H
-+#define APPLE_GLX_LOG_H
-+
-+#include <sys/cdefs.h>
-+#include <asl.h>
-+
-+void apple_glx_log_init(void);
-+
-+__printflike(5, 6)
-+void _apple_glx_log(int level, const char *file, const char *function,
-+                    int line, const char *fmt, ...);
-+#define apple_glx_log(l, f, args ...) \
-+    _apple_glx_log(l, __FILE__, __FUNCTION__, __LINE__, f, ## args)
-+
-+
-+__printflike(5, 0)
-+void _apple_glx_vlog(int level, const char *file, const char *function,
-+                     int line, const char *fmt, va_list v);
-+#define apple_glx_vlog(l, f, v) \
-+    _apple_glx_vlog(l, __FILE__, __FUNCTION__, __LINE__, f, v)
-+
-+/* This is just here to help the transition.
-+ * TODO: Replace calls to apple_glx_diagnostic
-+ */
-+#define apple_glx_diagnostic(f, args ...) \
-+    apple_glx_log(ASL_LEVEL_DEBUG, f, ## args)
-+
-+#endif
--- 
-1.7.10.1
-

Deleted: trunk/dports/x11/mesa/files/0023-darwin-Unlock-our-mutex-before-destroying-it.patch
===================================================================
--- trunk/dports/x11/mesa/files/0023-darwin-Unlock-our-mutex-before-destroying-it.patch	2012-05-24 16:30:32 UTC (rev 93501)
+++ trunk/dports/x11/mesa/files/0023-darwin-Unlock-our-mutex-before-destroying-it.patch	2012-05-24 17:22:14 UTC (rev 93502)
@@ -1,30 +0,0 @@
-From 7e624edba4c9f0fb2bcc322ef0b1b6401aa0a075 Mon Sep 17 00:00:00 2001
-From: Jeremy Huddleston <jeremyhu at apple.com>
-Date: Thu, 10 May 2012 18:56:50 -0700
-Subject: [PATCH 23/24] darwin: Unlock our mutex before destroying it
-
-http://xquartz.macosforge.org/trac/ticket/575
-
-Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
-(cherry picked from commit a73a800b3200d21c32fac9f28e2f86919bc0a2ba)
----
- src/glx/apple/apple_glx_drawable.c |    3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/src/glx/apple/apple_glx_drawable.c b/src/glx/apple/apple_glx_drawable.c
-index 3f84d56..b261a55 100644
---- a/src/glx/apple/apple_glx_drawable.c
-+++ b/src/glx/apple/apple_glx_drawable.c
-@@ -174,6 +174,9 @@ destroy_drawable(struct apple_glx_drawable *d)
- 
-    apple_glx_diagnostic("%s: freeing %p\n", __func__, (void *) d);
- 
-+   /* Stupid recursive locks */
-+   while (pthread_mutex_unlock(&d->mutex) == 0);
-+
-    err = pthread_mutex_destroy(&d->mutex);
-    if (err) {
-       fprintf(stderr, "pthread_mutex_destroy error: %s\n", strerror(err));
--- 
-1.7.10.1
-

Deleted: trunk/dports/x11/mesa/files/0024-darwin-Eliminate-a-possible-race-condition-while-des.patch
===================================================================
--- trunk/dports/x11/mesa/files/0024-darwin-Eliminate-a-possible-race-condition-while-des.patch	2012-05-24 16:30:32 UTC (rev 93501)
+++ trunk/dports/x11/mesa/files/0024-darwin-Eliminate-a-possible-race-condition-while-des.patch	2012-05-24 17:22:14 UTC (rev 93502)
@@ -1,41 +0,0 @@
-From 9724c8d13c09773dcf9674f15accd8f2f4d148ff Mon Sep 17 00:00:00 2001
-From: Jeremy Huddleston <jeremyhu at apple.com>
-Date: Fri, 27 Apr 2012 18:36:33 -0700
-Subject: [PATCH 24/24] darwin: Eliminate a possible race condition while
- destroying a surface
-
-Introduced by: c60ffd2840036af1ea6f2b6c6e1e9014bb8e2c34
-Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
-(cherry picked from commit d65bd195ecbd6623b962a3c98725a484ef2791a8)
----
- src/glx/apple/apple_glx_surface.c |    8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/glx/apple/apple_glx_surface.c b/src/glx/apple/apple_glx_surface.c
-index d42fa3b..9155202 100644
---- a/src/glx/apple/apple_glx_surface.c
-+++ b/src/glx/apple/apple_glx_surface.c
-@@ -207,9 +207,6 @@ apple_glx_surface_destroy(unsigned int uid)
-       d->types.surface.pending_destroy = true;
-       d->release(d);
- 
--      /* apple_glx_drawable_find_by_uid returns a locked drawable */
--      d->unlock(d);
--
-       /* 
-        * We release 2 references to the surface.  One was acquired by
-        * the find, and the other was leftover from a context, or 
-@@ -220,6 +217,9 @@ apple_glx_surface_destroy(unsigned int uid)
-        * to actually destroy it when the pending_destroy is processed
-        * by a glViewport callback (see apple_glx_context_update()).
-        */
--      d->destroy(d);
-+      if (!d->destroy(d)) {
-+          /* apple_glx_drawable_find_by_uid returns a locked drawable */
-+          d->unlock(d);
-+      }
-    }
- }
--- 
-1.7.10.1
-

Deleted: trunk/dports/x11/mesa/files/1001-darwin-Address-a-build-failure-on-Leopard-and-earlie.patch
===================================================================
--- trunk/dports/x11/mesa/files/1001-darwin-Address-a-build-failure-on-Leopard-and-earlie.patch	2012-05-24 16:30:32 UTC (rev 93501)
+++ trunk/dports/x11/mesa/files/1001-darwin-Address-a-build-failure-on-Leopard-and-earlie.patch	2012-05-24 17:22:14 UTC (rev 93502)
@@ -1,40 +0,0 @@
-From e69758260b0403d47ec61692e1fc18bcbb14865e Mon Sep 17 00:00:00 2001
-From: Jeremy Huddleston <jeremyhu at apple.com>
-Date: Fri, 18 May 2012 11:31:24 -0700
-Subject: [PATCH] darwin: Address a build failure on Leopard and earlier OS
- versions
-
-<https://trac.macports.org/ticket/34499>
-
-Regression-from: 51691f0767f6a75a1f549cd979a878a0ad12a228
-Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
-(cherry picked from commit 27b821bc95ea01cc4292ada9c7c65211580d1f98)
----
- src/glx/apple/apple_glx_log.c |   10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/src/glx/apple/apple_glx_log.c b/src/glx/apple/apple_glx_log.c
-index 9ebf666..5b9a865 100644
---- a/src/glx/apple/apple_glx_log.c
-+++ b/src/glx/apple/apple_glx_log.c
-@@ -76,7 +76,17 @@ void _apple_glx_vlog(int level, const char *file, const char *function,
-     uint64_t thread = 0;
- 
-     if (pthread_is_threaded_np()) {
-+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
-+        thread = (uint64_t)(uintptr_t)pthread_self();
-+#elif MAC_OS_X_VERSION_MIN_REQUIRED < 1060
-+        if (&pthread_threadid_np) {
-+            pthread_threadid_np(NULL, &thread);
-+        } else {
-+            thread = (uint64_t)(uintptr_t)pthread_self();
-+        }
-+#else
-         pthread_threadid_np(NULL, &thread);
-+#endif
-     }
- 
-     if (diagnostic) {
--- 
-1.7.10.1
-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120524/cbdefa5a/attachment-0001.html>


More information about the macports-changes mailing list