summaryrefslogtreecommitdiff
path: root/mk/pthread.buildlink3.mk
diff options
context:
space:
mode:
authorjlam <jlam>2004-03-18 09:12:08 +0000
committerjlam <jlam>2004-03-18 09:12:08 +0000
commit847385cb2d9851c0ea2e94e51e8cb05abfdd6dbf (patch)
tree98bc5d9451729f031998fd23ac3319a5618c75b0 /mk/pthread.buildlink3.mk
parent9ce3dfa85685c9ad4f3353d669cfc8be15f762f7 (diff)
downloadpkgsrc-847385cb2d9851c0ea2e94e51e8cb05abfdd6dbf.tar.gz
Fix serious bug where BUILDLINK_PACKAGES wasn't being ordered properly
by moving the inclusion of buildlink3.mk files outside of the protected region. This bug would be seen by users that have set PREFER_PKGSRC or PREFER_NATIVE to non-default values. BUILDLINK_PACKAGES should be ordered so that for any package in the list, that package doesn't depend on any packages to the left of it in the list. This ordering property is used to check for builtin packages in the correct order. The problem was that including a buildlink3.mk file for <pkg> correctly ensured that <pkg> was removed from BUILDLINK_PACKAGES and appended to the end. However, since the inclusion of any other buildlink3.mk files within that buildlink3.mk was in a region that was protected against multiple inclusion, those dependencies weren't also moved to the end of BUILDLINK_PACKAGES.
Diffstat (limited to 'mk/pthread.buildlink3.mk')
-rw-r--r--mk/pthread.buildlink3.mk10
1 files changed, 5 insertions, 5 deletions
diff --git a/mk/pthread.buildlink3.mk b/mk/pthread.buildlink3.mk
index 83b08f4be55..449e8ae9c75 100644
--- a/mk/pthread.buildlink3.mk
+++ b/mk/pthread.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: pthread.buildlink3.mk,v 1.2 2004/01/25 16:17:37 jlam Exp $
+# $NetBSD: pthread.buildlink3.mk,v 1.3 2004/03/18 09:12:13 jlam Exp $
#
# The pthreads strategy for pkgsrc is to "bless" a particular pthread
# package as the Official Pthread Replacement (OPR). A package that uses
@@ -101,6 +101,8 @@
# Makefile for ${_PKG_PTHREAD}. It's used to see if ${_PKG_PTHREADS}
# can actually be used to replace a native pthreads.
#
+PTHREAD_BUILDLINK3_MK:= ${PTHREAD_BUILDLINK3_MK}+
+
_PKG_PTHREAD?= pth
_PKG_PTHREAD_DEPENDS?= pth>=2.0.0
_PKG_PTHREAD_PKGSRCDIR?= ../../devel/${_PKG_PTHREAD}
@@ -138,9 +140,6 @@ PKG_SKIP_REASON= "${PKGNAME} requires a working pthreads implementation."
. endif
.endif
-.if !defined(PTHREAD_BUILDLINK3_MK)
-PTHREAD_BUILDLINK3_MK= # defined
-
.if ${PTHREAD_TYPE} == "native"
#
# Link the native pthread libraries and headers into ${BUILDLINK_DIR}.
@@ -175,6 +174,8 @@ PKG_SKIP_REASON= "${PKGNAME} needs pthreads, but ${_PKG_PTHREAD_BUILDLINK3_MK} i
. endif
.endif
+.if !empty(PTHREAD_BUILDLINK3_MK:M+)
+#
# Define user-visible PTHREAD_CFLAGS and PTHREAD_LDFLAGS as compiler
# options used to compile/link pthreaded code.
#
@@ -184,5 +185,4 @@ PTHREAD_LDFLAGS= ${BUILDLINK_LDFLAGS.pthread} ${BUILDLINK_LDADD.pthread}
PTHREADBASE= ${BUILDLINK_PREFIX.pthread}
CONFIGURE_ENV+= PTHREADBASE=${PTHREADBASE}
MAKE_ENV+= PTHREADBASE=${PTHREADBASE}
-
.endif # PTHREAD_BUILDLINK3_MK