Subject: possible fix for Mesa thread problems on NetBSD<=2
To: None <pkgsrc-users@netbsd.org>
From: Matthias Drochner <M.Drochner@fz-juelich.de>
List: pkgsrc-users
Date: 03/14/2006 14:10:31
This is a multipart MIME message.
--==_Exmh_9820730308760
Content-Type: text/plain; charset=us-ascii
Could someone running NetBSD<=2 please give the following
changes a try.
This should hopefully fix the "Mesa not detected by autoconf"
or "can't link against Mesa" symptoms.
The changes consist of a stub library implementing noop
versions of the pthread_mutex* functions, and a patch
to Mesa which pulls in that library if GNU pth is used.
thanks & best regards
Matthias
--==_Exmh_9820730308760
Content-Type: application/x-gzip ; name="pth-stublib.tar.gz"
Content-Description: pth-stublib.tar.gz
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="pth-stublib.tar.gz"
H4sIAMy+FkQAA+1Y6W/iOBTvV/xXeFs+9BhyAAlSd5kphbRFnCJU25VWikJiSkSIUeK0gyr+
93kOAXEus7OUrtT8RJPUfpf9jvjFJi/EFcdskAlY2HOd3snhIUl5qaAocJeycr7A7xzze/Qs
A42i5NRCls/LeSmrnijvYMsGwoCZPsYntk+tgUf8XXSvA0LcYxh0XNjr/hf7jkuCg+r4ef9n
s0qWj8uKLGcT/x8BO/wvNswh4U+H0CHJkqTm8zv9n4ex2P9KXlW5/1WV0x1C+T58cv+f4XST
sFu9kkbIdN1rDCEA0cCDQXBNhFb+vcY8UEYhI9/5SCC4FKXSb/XqbbfVqk9xJjOiNim6jjfE
6bdyGUYoTt/g9Dec8ccmG8Bou6PdVZ+mIghGaEPchgZrmwKLjsYQm3Md1kINQo4H/oR1bGOL
54AN1mtUm3q3VK8bQDVdXTX+G6VSq5Z+tJveDbvyf90N/0XHvvxXZWWe/2pOzcJ4VsqpUpL/
R4B4uSgA+FJE6MzxLDe0Cf4jmASiZZN+IAy+8rxi2DDiHDGiyDA8SsfnL9SxL35HyDBeiTk0
TNcxg3Og84lpx3SO57Av25gv/onLpdbw33Mxf/JrjKH3a3w2CZhPJzsY+b6hrft2gd4QS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th.txt
Content-Disposition: attachment; filename="mesapth.txt"
diff -r e9d549fa5f75 graphics/MesaLib/Makefile
--- a/graphics/MesaLib/Makefile Tue Mar 14 10:10:04 2006 +0100
+++ b/graphics/MesaLib/Makefile Tue Mar 14 14:01:07 2006 +0100
@@ -16,6 +16,13 @@ CONFIGURE_ARGS+= --disable-sparc
.endif
.include "../../mk/pthread.buildlink3.mk"
+.if defined(PTHREAD_TYPE) && ${PTHREAD_TYPE} == "pth"
+.include "../../devel/pth-stublib/buildlink3.mk"
+PTHREAD_STUBLIB= "-L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib -lpthstub"
+.else
+PTHREAD_STUBLIB= # provided by libc
+.endif
+BUILD_ENV+= PTHREAD_STUBLIB=${PTHREAD_STUBLIB}
pre-build:
cd ${WRKSRC} && ${RM} -fr src/glu src/glut progs
diff -r e9d549fa5f75 graphics/MesaLib/distinfo
--- a/graphics/MesaLib/distinfo Tue Mar 14 10:10:04 2006 +0100
+++ b/graphics/MesaLib/distinfo Tue Mar 14 14:01:07 2006 +0100
@@ -16,7 +16,7 @@ SHA1 (patch-ae) = c7dd8f4b9db5241acdd0f8
SHA1 (patch-ae) = c7dd8f4b9db5241acdd0f850162b8b4116cd93bd
SHA1 (patch-af) = 323ceab5653127cf233e66311a947c6718edb14c
SHA1 (patch-ag) = 722234c02093e0d3b10659fa83bb14c7f2e7a8ac
-SHA1 (patch-ah) = f7939e25c786128ded9b804276b7ade22f0edaac
+SHA1 (patch-ah) = 94faa48a6945aa6e7a0fc8806129a463d99d4338
SHA1 (patch-ai) = 3c5e4cc1e054514111d50c1d01257f4647b14558
SHA1 (patch-aj) = a805947e1aaf73a798fd3a8c6e39bf1bd62afc3a
SHA1 (patch-al) = 8ccbc370bc52882ee72ba76b72a99f163f7b89a7
diff -r e9d549fa5f75 graphics/MesaLib/patches/patch-ah
--- a/graphics/MesaLib/patches/patch-ah Tue Mar 14 10:10:04 2006 +0100
+++ b/graphics/MesaLib/patches/patch-ah Tue Mar 14 14:01:07 2006 +0100
@@ -27,7 +27,7 @@
# Library/program dependencies
EXTRA_LIB_PATH ?=
-GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm -lpthread
-+GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm
++GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lm ${PTHREAD_STUBLIB}
OSMESA_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB)
GLU_LIB_DEPS = -L$(LIB_DIR) -l$(GL_LIB) -lm
GLUT_LIB_DEPS = -L$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lm
--==_Exmh_9820730308760--