diff options
author | danw <danw> | 2003-09-14 16:30:34 +0000 |
---|---|---|
committer | danw <danw> | 2003-09-14 16:30:34 +0000 |
commit | 3c52e64d2ff22cecb46ff20f4440597e987df2bd (patch) | |
tree | 1ae0bfd5f753d54ef2d2d360ec9e9de813edeced | |
parent | 6a641af838335dd1223aae9b0e7396b9470064f2 (diff) | |
download | pkgsrc-3c52e64d2ff22cecb46ff20f4440597e987df2bd.tar.gz |
-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.
-rw-r--r-- | mk/defs.Darwin.mk | 3 | ||||
-rw-r--r-- | mk/defs.FreeBSD.mk | 3 | ||||
-rw-r--r-- | mk/defs.IRIX.mk | 3 | ||||
-rw-r--r-- | mk/defs.Linux.mk | 3 | ||||
-rw-r--r-- | mk/defs.NetBSD.mk | 3 | ||||
-rw-r--r-- | mk/defs.OpenBSD.mk | 3 | ||||
-rw-r--r-- | mk/defs.SunOS.mk | 3 | ||||
-rw-r--r-- | mk/pthread.buildlink2.mk | 10 |
8 files changed, 22 insertions, 9 deletions
diff --git a/mk/defs.Darwin.mk b/mk/defs.Darwin.mk index 0426729e7d3..128dc338714 100644 --- a/mk/defs.Darwin.mk +++ b/mk/defs.Darwin.mk @@ -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_MANZ= yes # MANZ controls gzipping of man pages _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 --git a/mk/defs.FreeBSD.mk b/mk/defs.FreeBSD.mk index 397c37898ff..ab50ec7097c 100644 --- a/mk/defs.FreeBSD.mk +++ b/mk/defs.FreeBSD.mk @@ -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_JAVA= no # Java is not standard _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 --git a/mk/defs.IRIX.mk b/mk/defs.IRIX.mk index b1ebc0d60b5..9055c310cc8 100644 --- a/mk/defs.IRIX.mk +++ b/mk/defs.IRIX.mk @@ -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_HAS_OSSAUDIO= no # libossaudio is available _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 --git a/mk/defs.Linux.mk b/mk/defs.Linux.mk index 4bcdd49c90b..47b5b29f158 100644 --- a/mk/defs.Linux.mk +++ b/mk/defs.Linux.mk @@ -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_JAVA= no # Java is not standard _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 --git a/mk/defs.NetBSD.mk b/mk/defs.NetBSD.mk index 6f91c65c975..a0c3bf935e4 100644 --- a/mk/defs.NetBSD.mk +++ b/mk/defs.NetBSD.mk @@ -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_JAVA= no # Java is not standard _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 --git a/mk/defs.OpenBSD.mk b/mk/defs.OpenBSD.mk index e701d9bd80d..79992388343 100644 --- a/mk/defs.OpenBSD.mk +++ b/mk/defs.OpenBSD.mk @@ -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_JAVA= no # Java is not standard _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 --git a/mk/defs.SunOS.mk b/mk/defs.SunOS.mk index 067be3ad277..0da9ff08d09 100644 --- a/mk/defs.SunOS.mk +++ b/mk/defs.SunOS.mk @@ -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_JAVA= no # Java is not standard _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 --git a/mk/pthread.buildlink2.mk b/mk/pthread.buildlink2.mk index e515c20dfca..aa91dc6480f 100644 --- a/mk/pthread.buildlink2.mk +++ b/mk/pthread.buildlink2.mk @@ -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 @@ PTHREAD_OPTS?= # empty # .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 @@ BUILDLINK_LDFLAGS.pthread= -lpthread . 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 |