pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

possible fix for Mesa thread problems on NetBSD<=2



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


Attachment: pth-stublib.tar.gz
Description: pth-stublib.tar.gz

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


Home | Main Index | Thread Index | Old Index