pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk -lpthread is a no-op on Darwin, but it messes up bu...
details: https://anonhg.NetBSD.org/pkgsrc/rev/ca3a319c8e47
branches: trunk
changeset: 461335:ca3a319c8e47
user: danw <danw%pkgsrc.org@localhost>
date: Sun Sep 14 16:30:34 2003 +0000
description:
-lpthread is a no-op on Darwin, but it messes up buildlink. So add a new
flag _OPSYS_PTHREAD_AUTO ("yes" for Darwin, "no" for everyone else) and
make pthread.buildlink2.mk do basically nothing in that case.
diffstat:
mk/defs.Darwin.mk | 3 ++-
mk/defs.FreeBSD.mk | 3 ++-
mk/defs.IRIX.mk | 3 ++-
mk/defs.Linux.mk | 3 ++-
mk/defs.NetBSD.mk | 3 ++-
mk/defs.OpenBSD.mk | 3 ++-
mk/defs.SunOS.mk | 3 ++-
mk/pthread.buildlink2.mk | 10 ++++++++--
8 files changed, 22 insertions(+), 9 deletions(-)
diffs (150 lines):
diff -r d0f5a95fce4d -r ca3a319c8e47 mk/defs.Darwin.mk
--- a/mk/defs.Darwin.mk Sun Sep 14 15:55:46 2003 +0000
+++ b/mk/defs.Darwin.mk Sun Sep 14 16:30:34 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: defs.Darwin.mk,v 1.54 2003/09/05 13:54:13 martti Exp $
+# $NetBSD: defs.Darwin.mk,v 1.55 2003/09/14 16:30:34 danw Exp $
#
# Variable definitions for the Darwin operating system.
@@ -112,6 +112,7 @@
_OPSYS_HAS_OSSAUDIO= no # libossaudio is available
_OPSYS_LIBTOOL_REQD= 1.4.20010614nb12 # base version of libtool required
_OPSYS_PERL_REQD= 5.8.0 # base version of perl required
+_OPSYS_PTHREAD_AUTO= yes # -lpthread not needed for pthreads
_OPSYS_RPATH_NAME= darwin_has_no_rpath
_PATCH_CAN_BACKUP= yes # native patch(1) can make backups
_PATCH_BACKUP_ARG= -V simple -b -z # switch to patch(1) for backup suffix
diff -r d0f5a95fce4d -r ca3a319c8e47 mk/defs.FreeBSD.mk
--- a/mk/defs.FreeBSD.mk Sun Sep 14 15:55:46 2003 +0000
+++ b/mk/defs.FreeBSD.mk Sun Sep 14 16:30:34 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: defs.FreeBSD.mk,v 1.23 2003/09/02 06:59:45 jlam Exp $
+# $NetBSD: defs.FreeBSD.mk,v 1.24 2003/09/14 16:30:34 danw Exp $
#
# Variable definitions for the FreeBSD operating system.
@@ -127,6 +127,7 @@
_OPSYS_HAS_MANZ= yes # MANZ controls gzipping of man pages
_OPSYS_HAS_OSSAUDIO= yes # libossaudio is available
_OPSYS_PERL_REQD= # no base version of perl required
+_OPSYS_PTHREAD_AUTO= no # -lpthread needed for pthreads
_OPSYS_RPATH_NAME= -R # name of symbol in rpath directive to linker
_PATCH_CAN_BACKUP= yes # native patch(1) can make backups
_PATCH_BACKUP_ARG= -V simple -b # switch to patch(1) for backup suffix
diff -r d0f5a95fce4d -r ca3a319c8e47 mk/defs.IRIX.mk
--- a/mk/defs.IRIX.mk Sun Sep 14 15:55:46 2003 +0000
+++ b/mk/defs.IRIX.mk Sun Sep 14 16:30:34 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: defs.IRIX.mk,v 1.32 2003/09/02 06:59:45 jlam Exp $
+# $NetBSD: defs.IRIX.mk,v 1.33 2003/09/14 16:30:34 danw Exp $
#
# Variable definitions for the IRIX operating system.
@@ -118,6 +118,7 @@
_OPSYS_LIBTOOL_REQD= 1.4.20010614nb14 # base version of libtool required
_OPSYS_NEEDS_XPKGWEDGE= yes # xpkgwedge is required for X11
_OPSYS_PERL_REQD= # no base version of perl required
+_OPSYS_PTHREAD_AUTO= no # -lpthread needed for pthreads
_OPSYS_RPATH_NAME= -rpath, # name of symbol in rpath directive to linker
_PATCH_CAN_BACKUP= no # native patch(1) can make backups
_PREFORMATTED_MAN_DIR= man # directory where catman pages are
diff -r d0f5a95fce4d -r ca3a319c8e47 mk/defs.Linux.mk
--- a/mk/defs.Linux.mk Sun Sep 14 15:55:46 2003 +0000
+++ b/mk/defs.Linux.mk Sun Sep 14 16:30:34 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: defs.Linux.mk,v 1.58 2003/09/05 13:54:14 martti Exp $
+# $NetBSD: defs.Linux.mk,v 1.59 2003/09/14 16:30:34 danw Exp $
#
# Variable definitions for the Linux operating system.
@@ -161,6 +161,7 @@
_OPSYS_HAS_MANZ= no # no MANZ for gzipping of man pages
_OPSYS_HAS_OSSAUDIO= no # libossaudio is available
_OPSYS_PERL_REQD= # no base version of perl required
+_OPSYS_PTHREAD_AUTO= no # -lpthread needed for pthreads
_OPSYS_RPATH_NAME= -R # name of symbol in rpath directive to linker
_PATCH_CAN_BACKUP= yes # native patch(1) can make backups
_PATCH_BACKUP_ARG= -b -V simple -z # switch to patch(1) for backup suffix
diff -r d0f5a95fce4d -r ca3a319c8e47 mk/defs.NetBSD.mk
--- a/mk/defs.NetBSD.mk Sun Sep 14 15:55:46 2003 +0000
+++ b/mk/defs.NetBSD.mk Sun Sep 14 16:30:34 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: defs.NetBSD.mk,v 1.52 2003/09/02 06:59:45 jlam Exp $
+# $NetBSD: defs.NetBSD.mk,v 1.53 2003/09/14 16:30:34 danw Exp $
#
# Variable definitions for the NetBSD operating system.
@@ -123,6 +123,7 @@
_OPSYS_HAS_MANZ= yes # MANZ controls gzipping of man pages
_OPSYS_HAS_OSSAUDIO= yes # libossaudio is available
_OPSYS_PERL_REQD= # no base version of perl required
+_OPSYS_PTHREAD_AUTO= no # -lpthread needed for pthreads
_OPSYS_RPATH_NAME= -R # name of symbol in rpath directive to linker
_PATCH_CAN_BACKUP= yes # native patch(1) can make backups
_PATCH_BACKUP_ARG= -V simple -b # switch to patch(1) for backup suffix
diff -r d0f5a95fce4d -r ca3a319c8e47 mk/defs.OpenBSD.mk
--- a/mk/defs.OpenBSD.mk Sun Sep 14 15:55:46 2003 +0000
+++ b/mk/defs.OpenBSD.mk Sun Sep 14 16:30:34 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: defs.OpenBSD.mk,v 1.19 2003/09/02 06:59:46 jlam Exp $
+# $NetBSD: defs.OpenBSD.mk,v 1.20 2003/09/14 16:30:34 danw Exp $
#
# Variable definitions for the OpenBSD operating system.
@@ -119,6 +119,7 @@
_OPSYS_HAS_MANZ= yes # MANZ controls gzipping of man pages
_OPSYS_HAS_OSSAUDIO= yes # libossaudio is available
_OPSYS_PERL_REQD= # no base version of perl required
+_OPSYS_PTHREAD_AUTO= no # -lpthread needed for pthreads
_OPSYS_RPATH_NAME= -R # name of symbol in rpath directive to linker
_PATCH_CAN_BACKUP= yes # native patch(1) can make backups
_PATCH_BACKUP_ARG= -V simple -b # switch to patch(1) for backup suffix
diff -r d0f5a95fce4d -r ca3a319c8e47 mk/defs.SunOS.mk
--- a/mk/defs.SunOS.mk Sun Sep 14 15:55:46 2003 +0000
+++ b/mk/defs.SunOS.mk Sun Sep 14 16:30:34 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: defs.SunOS.mk,v 1.65 2003/09/02 06:59:46 jlam Exp $
+# $NetBSD: defs.SunOS.mk,v 1.66 2003/09/14 16:30:34 danw Exp $
#
# Variable definitions for the SunOS/Solaris operating system.
@@ -127,6 +127,7 @@
_OPSYS_HAS_MANZ= no # no MANZ for gzipping of man pages
_OPSYS_HAS_OSSAUDIO= no # libossaudio is available
_OPSYS_PERL_REQD= # no base version of perl required
+_OPSYS_PTHREAD_AUTO= no # -lpthread needed for pthreads
_OPSYS_RPATH_NAME= -R # name of symbol in rpath directive to linker
_PATCH_CAN_BACKUP= yes # native patch(1) can make backups
_PATCH_BACKUP_ARG= -V simple -z # switch to patch(1) for backup suffix
diff -r d0f5a95fce4d -r ca3a319c8e47 mk/pthread.buildlink2.mk
--- a/mk/pthread.buildlink2.mk Sun Sep 14 15:55:46 2003 +0000
+++ b/mk/pthread.buildlink2.mk Sun Sep 14 16:30:34 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: pthread.buildlink2.mk,v 1.15 2003/09/02 06:59:47 jlam Exp $
+# $NetBSD: pthread.buildlink2.mk,v 1.16 2003/09/14 16:30:34 danw Exp $
#
# The pthreads strategy for pkgsrc is to "bless" a particular pthread
# package as the Official Pthread Replacement (OPR). A package that uses
@@ -116,7 +116,9 @@
#
.undef PTHREAD_TYPE
PREFER_NATIVE_PTHREADS?= YES
-.if exists(/usr/include/pthread.h) && ${PREFER_NATIVE_PTHREADS} == "YES"
+.if ${_OPSYS_PTHREAD_AUTO} == "yes"
+PTHREAD_TYPE= automatic
+.elif exists(/usr/include/pthread.h) && ${PREFER_NATIVE_PTHREADS} == "YES"
PTHREAD_TYPE= native
.else
. if !empty(PTHREAD_OPTS:Mnative)
@@ -196,6 +198,10 @@
. else
PKG_SKIP_REASON= "${PKGNAME} needs pthreads, but ${_PKG_PTHREAD_BUILDLINK2_MK} is missing."
. endif
+
+.elif ${PTHREAD_TYPE} == "automatic"
+BUILDLINK_PREFIX.pthread= /usr
+
.endif
# Define user-visible PTHREAD_CFLAGS and PTHREAD_LDFLAGS as compiler
Home |
Main Index |
Thread Index |
Old Index