pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/graphics/MesaLib Use new-fangled :Q technology instead...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7556720c4cdb
branches:  trunk
changeset: 545276:7556720c4cdb
user:      dsainty <dsainty%pkgsrc.org@localhost>
date:      Wed Jul 30 00:27:55 2008 +0000

description:
Use new-fangled :Q technology instead of yesteryear's quote characters.

Use the PTHREAD_XXX variables to set up the linking, otherwise libGL.so isn't
linked with libpthread.so under Linux, and so things that link with libGL.so
but don't themselves use threads are likely to not link themselves, failing to
resolve pthread_getspecific, pthread_once, pthread_key_create and
pthread_setspecific.

There should be no change on NetBSD platforms, but there is change on other
platforms, notably Linux.  Bump PKGREVISION to communicate that.

Should fix PR36207, does fix Linux build of glx-utils, and allows mission
critical software like "bzflag" to build under Linux.

diffstat:

 graphics/MesaLib/Makefile                 |  25 ++++++++++++++++++++-----
 graphics/MesaLib/files/configs/pkgsrc-dri |   4 ++--
 2 files changed, 22 insertions(+), 7 deletions(-)

diffs (63 lines):

diff -r 6a21b523ef2b -r 7556720c4cdb graphics/MesaLib/Makefile
--- a/graphics/MesaLib/Makefile Tue Jul 29 22:05:43 2008 +0000
+++ b/graphics/MesaLib/Makefile Wed Jul 30 00:27:55 2008 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.66 2008/07/28 02:12:57 bjs Exp $
+# $NetBSD: Makefile,v 1.67 2008/07/30 00:27:55 dsainty Exp $
 
 PKGNAME=       MesaLib-${MESA_PKGVERSION}
 COMMENT=       Graphics library similar to SGI's OpenGL
-PKGREVISION=   1
+PKGREVISION=   2
 
 MESA_HEADERS=  gl.h gl_mangle.h glext.h glx.h glxext.h \
                glx_mangle.h osmesa.h xmesa.h xmesa_x.h \
@@ -61,12 +61,27 @@
 .include "../../mk/pthread.buildlink3.mk"
 
 .if !empty(MACHINE_PLATFORM:MNetBSD-[12].*)
+##
+## NetBSD 2.x and earlier require pthread stubs
+##
 .  include "../../devel/pthread-stublib/buildlink3.mk"
-PTHREAD_STUBLIB= "-L${PREFIX}/lib -Wl,-R${PREFIX}/lib -lpthstub"
+PTHREAD_STUBLIB= -L${PREFIX}/lib -Wl,-R${PREFIX}/lib -lpthstub
+.elif !empty(MACHINE_PLATFORM:MNetBSD-*)
+##
+## NetBSD 3.x and later have pthread stubs in libc
+##
+PTHREAD_STUBLIB=
 .else
-PTHREAD_STUBLIB= # provided by libc
+##
+## Other platforms may or may not have stubs provided by libc, but pulling in
+## threading support via the pthread.buildlink3.mk definitions will provide
+## all the necessary interfaces.  This matches the standard configuration for
+## most platforms as they appear in "${WRKSRC}/configs", and is necessary
+## for successful linking with libGL under many platforms.
+##
+PTHREAD_STUBLIB= ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}
 .endif
-PKGSRC_MAKE_ENV+=      PTHREAD_STUBLIB=${PTHREAD_STUBLIB}
+PKGSRC_MAKE_ENV+=      PTHREAD_STUBLIB=${PTHREAD_STUBLIB:Q}
 
 .if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
 MAKE_ENV+=     CROSS_COMPILING=yes
diff -r 6a21b523ef2b -r 7556720c4cdb graphics/MesaLib/files/configs/pkgsrc-dri
--- a/graphics/MesaLib/files/configs/pkgsrc-dri Tue Jul 29 22:05:43 2008 +0000
+++ b/graphics/MesaLib/files/configs/pkgsrc-dri Wed Jul 30 00:27:55 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: pkgsrc-dri,v 1.2 2008/07/16 06:34:00 bjs Exp $
+# $NetBSD: pkgsrc-dri,v 1.3 2008/07/30 00:27:55 dsainty Exp $
 
 include $(TOP)/configs/pkgsrc
 
@@ -28,7 +28,7 @@
 DRI_LIB_DEPS?= -lm -lexpat $(LIBDRM_LIB)
 GL_LIB_DEPS=\
        -lX11 -lXext -lXxf86vm -lXdamage \
-       -lXfixes -lm $(LIBDRM_LIB) \
+       -lXfixes -lm $(LIBDRM_LIB) $(PTHREAD_STUBLIB) \
        $(XCB_GL_LIB_DEPS)
 
 SRC_DIRS=      glx/x11 mesa glw



Home | Main Index | Thread Index | Old Index