summaryrefslogtreecommitdiff
path: root/devel/glib2
diff options
context:
space:
mode:
authorxtraeme <xtraeme@pkgsrc.org>2004-04-15 01:49:41 +0000
committerxtraeme <xtraeme@pkgsrc.org>2004-04-15 01:49:41 +0000
commita69a67359bb2b91ddb67bea8c55a7fbb71facdd6 (patch)
tree8ce578095e0271b0dddaef81040f039aa2ffac54 /devel/glib2
parent8ac1ffe6674ef02d11c3eadc28341c3d9fd2e146 (diff)
downloadpkgsrc-a69a67359bb2b91ddb67bea8c55a7fbb71facdd6.tar.gz
Be sure libgthread is linked to libc_r, because -pthread does not work
with libraries, fixes problems seen when building net/ORBit2 in FreeBSD (doesn't affect others systems).
Diffstat (limited to 'devel/glib2')
-rw-r--r--devel/glib2/Makefile19
1 files changed, 18 insertions, 1 deletions
diff --git a/devel/glib2/Makefile b/devel/glib2/Makefile
index a803f29a051..6c6a89848b6 100644
--- a/devel/glib2/Makefile
+++ b/devel/glib2/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.46 2004/04/06 07:15:53 jmmv Exp $
+# $NetBSD: Makefile,v 1.47 2004/04/15 01:49:41 xtraeme Exp $
DISTNAME= glib-2.4.0
PKGNAME= ${DISTNAME:S/glib/glib2/}
@@ -39,6 +39,23 @@ CONFIGURE_ARGS.gnu-iconv= --with-libiconv=gnu
# Avoid an ICE in gcc2 on sparc64
CONFIGURE_ENV+= F77=${FALSE}
+.include "../../mk/bsd.prefs.mk"
+
+# FreeBSD fix for libgthread:
+# Be sure libgthread is linked to the threaded library (libc_r), otherwise
+# -pthread is added and this won't work with libraries, only executable
+# binaries.
+
+.if ${OPSYS} == "FreeBSD"
+
+SUBST_CLASSES= thr
+SUBST_STAGE.thr= post-patch
+SUBST_FILES.thr= gthread/Makefile.in
+SUBST_SED.thr= -e "s|@G_THREAD_LIBS_FOR_GTHREAD@|-Wc,-lc_r|g"
+SUBST_MESSAGE.thr= "Fixing libgthread."
+
+.endif
+
.include "../../converters/libiconv/buildlink3.mk"
.include "../../devel/gettext-lib/buildlink3.mk"
.include "../../devel/pkgconfig/buildlink3.mk"