summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2014-08-06 10:25:14 +0000
committerwiz <wiz@pkgsrc.org>2014-08-06 10:25:14 +0000
commitb1b623fa92d4d992ba6abbe89588832d4cc5940c (patch)
tree5effef1a502c14a1e999f99467d2fb0846cbd8ac /graphics
parent0543eb79020a61179b382e4cd46a2e9af2a36928 (diff)
downloadpkgsrc-b1b623fa92d4d992ba6abbe89588832d4cc5940c.tar.gz
Use __attribute__((__destructor__)) instead of magic __dso_handle, and
fix another place. Patches from Taylor R Campbell (NetBSD xsrc). Bump PKGREVISION.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/MesaLib/Makefile4
-rw-r--r--graphics/MesaLib/distinfo5
-rw-r--r--graphics/MesaLib/patches/patch-src_glsl_ralloc.c15
-rw-r--r--graphics/MesaLib/patches/patch-src_mesa_main_context.c40
4 files changed, 56 insertions, 8 deletions
diff --git a/graphics/MesaLib/Makefile b/graphics/MesaLib/Makefile
index 7cbb08db6f6..4165ea2f5ca 100644
--- a/graphics/MesaLib/Makefile
+++ b/graphics/MesaLib/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.96 2014/01/24 23:00:15 ryoon Exp $
+# $NetBSD: Makefile,v 1.97 2014/08/06 10:25:14 wiz Exp $
PKGNAME= MesaLib-${MESA_PKGVERSION}
-PKGREVISION= 4
+PKGREVISION= 5
COMMENT= Graphics library similar to SGI's OpenGL
CONFLICTS+= xf86driproto<2.0.4
diff --git a/graphics/MesaLib/distinfo b/graphics/MesaLib/distinfo
index 4f43f4e35ae..4131be9e3bd 100644
--- a/graphics/MesaLib/distinfo
+++ b/graphics/MesaLib/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.87 2014/05/03 19:03:59 ryoon Exp $
+$NetBSD: distinfo,v 1.88 2014/08/06 10:25:14 wiz Exp $
SHA1 (Mesa-7.11.2/MesaGLUT-7.11.2.tar.bz2) = 2e6e730204800a0748b301a5f58b86332699788b
RMD160 (Mesa-7.11.2/MesaGLUT-7.11.2.tar.bz2) = bb2b140375aa13df79fcdb60a7ad0a63622dc531
@@ -13,7 +13,7 @@ SHA1 (patch-include_GL_gl.h) = a97ab309556c78d818d0b8bd867b5f2412c141b0
SHA1 (patch-src_gallium_auxiliary_util_u__atomic.h) = 68ba9694aca506add2aa96a6892a7227481c2c11
SHA1 (patch-src_gallium_include_pipe_p__config.h) = 34f4c2a033dd7a494dd3f51db407002a3388f84e
SHA1 (patch-src_glsl_ir__constant__expression.cpp) = 281e281f51afed244b1a29b92942d572fc095124
-SHA1 (patch-src_glsl_ralloc.c) = 94fac7a8115d85bc3ee3daeb8ea308c766dc45c1
+SHA1 (patch-src_glsl_ralloc.c) = 40885fac898058f8e83852a79ca50a74b61121ab
SHA1 (patch-src_glu_sgi_glu.exports) = 66609d2ea59b02fc46b41311b0042fe4a2da517f
SHA1 (patch-src_glx_XF86dri.c) = b69b7cf5e0d617eca129f0d7f0b06c7603d00db0
SHA1 (patch-src_mesa_drivers_dri_common_dri__util.h) = 53e63dcc6243b1872f4e4816b46e92910cf97edc
@@ -31,5 +31,6 @@ SHA1 (patch-src_mesa_drivers_dri_intel_intel__context.h) = 6d394e704636134768a6c
SHA1 (patch-src_mesa_drivers_dri_mach64_mach64__context.h) = fe95c6610de4c1482c568463aca82f53ed0df900
SHA1 (patch-src_mesa_drivers_x11_Makefile) = 17b72d2b74d89fbd8db05491cfcf253bb856b139
SHA1 (patch-src_mesa_main_compiler.h) = b164781b541cb83b64597facbb7a7e21d8bdb686
+SHA1 (patch-src_mesa_main_context.c) = 6b6f1e3ad4ea189291fcf221d4b8bfbd650f8908
SHA1 (patch-src_mesa_main_imports.c) = d0c50004c749e4c5c136ac2ed50a6989ca90065f
SHA1 (patch-src_mesa_main_imports.h) = f5a96195b3a14294ca3389c9fe17a6076c46db8a
diff --git a/graphics/MesaLib/patches/patch-src_glsl_ralloc.c b/graphics/MesaLib/patches/patch-src_glsl_ralloc.c
index 3537f16de61..f49cf7af652 100644
--- a/graphics/MesaLib/patches/patch-src_glsl_ralloc.c
+++ b/graphics/MesaLib/patches/patch-src_glsl_ralloc.c
@@ -1,16 +1,23 @@
-$NetBSD: patch-src_glsl_ralloc.c,v 1.1 2014/01/24 23:00:15 ryoon Exp $
+$NetBSD: patch-src_glsl_ralloc.c,v 1.2 2014/08/06 10:25:14 wiz Exp $
* Fix exit time segfault of qt5 application with modular xorg
--- src/glsl/ralloc.c.orig 2011-10-15 00:43:58.000000000 +0000
+++ src/glsl/ralloc.c
-@@ -283,7 +283,8 @@ ralloc_autofree_context(void)
+@@ -272,7 +272,7 @@ ralloc_parent(const void *ptr)
+
+ static void *autofree_context = NULL;
+
+-static void
++static void __attribute__((__destructor__))
+ autofree(void)
+ {
+ ralloc_free(autofree_context);
+@@ -283,7 +283,6 @@ ralloc_autofree_context(void)
{
if (unlikely(autofree_context == NULL)) {
autofree_context = ralloc_context(NULL);
- atexit(autofree);
-+ extern __attribute__((visibility("hidden"))) void *__dso_handle;
-+ __cxa_atexit(autofree, NULL, __dso_handle);
}
return autofree_context;
}
diff --git a/graphics/MesaLib/patches/patch-src_mesa_main_context.c b/graphics/MesaLib/patches/patch-src_mesa_main_context.c
new file mode 100644
index 00000000000..96de248f452
--- /dev/null
+++ b/graphics/MesaLib/patches/patch-src_mesa_main_context.c
@@ -0,0 +1,40 @@
+$NetBSD: patch-src_mesa_main_context.c,v 1.1 2014/08/06 10:25:14 wiz Exp $
+
+* Fix exit time segfault of qt5 application with modular xorg
+
+--- src/mesa/main/context.c.orig 2011-10-15 00:43:58.000000000 +0000
++++ src/mesa/main/context.c
+@@ -383,10 +383,10 @@ _glthread_DECLARE_STATIC_MUTEX(OneTimeLo
+ *
+ * \sa _math_init().
+ */
++static GLbitfield api_init_mask = 0x0;
+ static void
+ one_time_init( struct gl_context *ctx )
+ {
+- static GLbitfield api_init_mask = 0x0;
+
+ _glthread_LOCK_MUTEX(OneTimeLock);
+
+@@ -441,14 +441,16 @@ one_time_init( struct gl_context *ctx )
+
+ _glthread_UNLOCK_MUTEX(OneTimeLock);
+
+- /* Hopefully atexit() is widely available. If not, we may need some
+- * #ifdef tests here.
+- */
+- atexit(_mesa_destroy_shader_compiler);
+-
+ dummy_enum_func();
+ }
+
++static void __attribute__((__destructor__))
++one_time_fini(void)
++{
++ if (api_init_mask)
++ _mesa_destroy_shader_compiler();
++}
++
+
+ /**
+ * Initialize fields of gl_current_attrib (aka ctx->Current.*)