summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorreed <reed@pkgsrc.org>2005-07-06 07:00:10 +0000
committerreed <reed@pkgsrc.org>2005-07-06 07:00:10 +0000
commitc8bfdf64e6fe9f668ac1644e3c3421ee5857b6f7 (patch)
tree80cd998536665f031157f21b2337eba532ffba98 /devel
parent08b4283fcb0fd72de19b0a440067787077b8d408 (diff)
downloadpkgsrc-c8bfdf64e6fe9f668ac1644e3c3421ee5857b6f7.tar.gz
Remove comment about FreeBSD since not entirely correct for following.
Add condition for FreeBSD >= 5 then use -lpthread. I assume the previous -Wc,-lc_r was for 4.x and I keep it there. (Sorry if I break this for others using FreeBSD. I didn't get much feedback when posted to tech-pkg in May about this.) I noticed this when building audio/arts on FreeBSD 5.3-RELEASE: Fatal error 'Spinlock called when not threaded.' at line 83 in file /usr/src/lib/libpthread/thread/thr_spinlock.c (errno = 0) Bump PKGREVISION since this changes the resulting package for FreeBSD. (Todo: pkgsrc/mk/pthread.builtin.mk or pkgsrc/mk/pthread.buildlink3.mk can be improved so this workaround can be removed.)
Diffstat (limited to 'devel')
-rw-r--r--devel/glib2/Makefile12
1 files changed, 6 insertions, 6 deletions
diff --git a/devel/glib2/Makefile b/devel/glib2/Makefile
index a39f9d01386..54bb744c3a2 100644
--- a/devel/glib2/Makefile
+++ b/devel/glib2/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.73 2005/06/26 16:57:14 jmmv Exp $
+# $NetBSD: Makefile,v 1.74 2005/07/06 07:00:10 reed Exp $
DISTNAME= glib-2.6.5
PKGNAME= ${DISTNAME:S/glib/glib2/}
+PKGREVISION= 1
CATEGORIES= devel
MASTER_SITES= ftp://ftp.gtk.org/pub/gtk/v2.6/ \
ftp://ftp.cs.umn.edu/pub/gimp/gtk/v2.6/ \
@@ -53,17 +54,16 @@ CPPFLAGS+= -DPKG_SYSCONFDIR="\"${PKG_SYSCONFDIR}\""
.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
+. if ${OS_VERSION:R} >= 5
+SUBST_SED.thr= -e "s|@G_THREAD_LIBS_FOR_GTHREAD@|-lpthread|g"
+. else
SUBST_SED.thr= -e "s|@G_THREAD_LIBS_FOR_GTHREAD@|-Wc,-lc_r|g"
+. endif
SUBST_MESSAGE.thr= "Fixing libgthread."
.endif