diff options
author | dsainty <dsainty@pkgsrc.org> | 2008-07-30 00:27:55 +0000 |
---|---|---|
committer | dsainty <dsainty@pkgsrc.org> | 2008-07-30 00:27:55 +0000 |
commit | fc9e05c6f4d5f64dbcaf4331342b4893724f0a08 (patch) | |
tree | 80f25c80ab280fe51f7c42c8b039f6cc4428ab9e /graphics/MesaLib | |
parent | e300c8c396b8218ccd5c672b8e359fb130a91852 (diff) | |
download | pkgsrc-fc9e05c6f4d5f64dbcaf4331342b4893724f0a08.tar.gz |
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 (limited to 'graphics/MesaLib')
-rw-r--r-- | graphics/MesaLib/Makefile | 25 | ||||
-rw-r--r-- | graphics/MesaLib/files/configs/pkgsrc-dri | 4 |
2 files changed, 22 insertions, 7 deletions
diff --git a/graphics/MesaLib/Makefile b/graphics/MesaLib/Makefile index b008a793535..325f8c83203 100644 --- a/graphics/MesaLib/Makefile +++ b/graphics/MesaLib/Makefile @@ -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 @@ PLIST_VARS= dri nodri .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 --git a/graphics/MesaLib/files/configs/pkgsrc-dri b/graphics/MesaLib/files/configs/pkgsrc-dri index 10009924822..65da408de1a 100644 --- a/graphics/MesaLib/files/configs/pkgsrc-dri +++ b/graphics/MesaLib/files/configs/pkgsrc-dri @@ -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 @@ LIBDRM_LIB= `$(PKG_CONFIG) --libs libdrm` 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 |