diff options
author | jlam <jlam> | 2004-03-18 09:12:08 +0000 |
---|---|---|
committer | jlam <jlam> | 2004-03-18 09:12:08 +0000 |
commit | 847385cb2d9851c0ea2e94e51e8cb05abfdd6dbf (patch) | |
tree | 98bc5d9451729f031998fd23ac3319a5618c75b0 /mk | |
parent | 9ce3dfa85685c9ad4f3353d669cfc8be15f762f7 (diff) | |
download | pkgsrc-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')
-rw-r--r-- | mk/bdb.buildlink3.mk | 42 | ||||
-rw-r--r-- | mk/buildlink3/bsd.buildlink3.mk | 112 | ||||
-rw-r--r-- | mk/curses.buildlink3.mk | 14 | ||||
-rw-r--r-- | mk/krb5.buildlink3.mk | 36 | ||||
-rw-r--r-- | mk/ossaudio.buildlink3.mk | 53 | ||||
-rw-r--r-- | mk/pthread.buildlink3.mk | 10 |
6 files changed, 183 insertions, 84 deletions
diff --git a/mk/bdb.buildlink3.mk b/mk/bdb.buildlink3.mk index 066cf9dd064..24d3a9a4936 100644 --- a/mk/bdb.buildlink3.mk +++ b/mk/bdb.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: bdb.buildlink3.mk,v 1.2 2004/03/11 08:33:52 jlam Exp $ +# $NetBSD: bdb.buildlink3.mk,v 1.3 2004/03/18 09:12:13 jlam Exp $ # # This Makefile fragment is meant to be included by packages that # require a Berkeley DB implementation. db.buildlink3.mk will: @@ -19,7 +19,7 @@ BDB_BUILDLINK3_MK:= ${BDB_BUILDLINK3_MK}+ .include "../../mk/bsd.prefs.mk" -.if !empty(BDB_BUILDLINK3_MK) +.if !empty(BDB_BUILDLINK3_MK:M+) BDB_DEFAULT?= # empty BDB_ACCEPTED?= ${_BDB_PKGS} @@ -68,21 +68,21 @@ _BDB_TRANSFORM= l:db:db1 . endif . endif -. if !defined(_BDB) +. if !defined(_BDB_TYPE) # # Prefer the default one if it's accepted,... # . if !empty(_BDB_DEFAULT) && \ defined(_BDB_OK.${_BDB_DEFAULT}) && \ !empty(_BDB_OK.${_BDB_DEFAULT}:M[yY][eE][sS]) -_BDB= ${_BDB_DEFAULT} +_BDB_TYPE= ${_BDB_DEFAULT} . endif # # ...otherwise, use one of the installed Berkeley DB packages,... # . for _bdb_ in ${_BDB_ACCEPTED} . if !empty(_BDB_INSTALLED.${_bdb_}:M[yY][eE][sS]) -_BDB?= ${_bdb_} +_BDB_TYPE?= ${_bdb_} . else _BDB_FIRSTACCEPTED?= ${_bdb_} . endif @@ -91,19 +91,21 @@ _BDB_FIRSTACCEPTED?= ${_bdb_} # ...otherwise, just use the first accepted Berkeley DB package. # . if defined(_BDB_FIRSTACCEPTED) -_BDB?= ${_BDB_FIRSTACCEPTED} +_BDB_TYPE?= ${_BDB_FIRSTACCEPTED} . endif -_BDB?= none -MAKEFLAGS+= _BDB=${_BDB} +_BDB_TYPE?= none +MAKEFLAGS+= _BDB_TYPE=${_BDB_TYPE} . endif -BDB_TYPE= ${_BDB} +BDB_TYPE= ${_BDB_TYPE} BUILD_DEFS+= BDB_TYPE -. if ${BDB_TYPE} == "none" +.endif # BDB_BUILDLINK3_MK + +.if ${BDB_TYPE} == "none" PKG_FAIL_REASON= "No acceptable Berkeley DB implementation found." -. else -. if ${BDB_TYPE} == "native" +.else +. if ${BDB_TYPE} == "native" IS_BUILTIN.db-native= yes USE_BUILTIN.db-native= yes BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ndb-native} @@ -111,17 +113,15 @@ BUILDLINK_PACKAGES+= db-native BUILDLINK_INCDIRS.db-native?= ${_BDB_INCDIRS} BUILDLINK_TRANSFORM?= ${_BDB_TRANSFORM} BDBBASE= ${BUILDLINK_PREFIX.db-native} -. elif ${BDB_TYPE} == "db4" +. elif ${BDB_TYPE} == "db4" BDBBASE= ${BUILDLINK_PREFIX.db4} -. include "../../databases/db4/buildlink3.mk" -. elif ${BDB_TYPE} == "db3" +. include "../../databases/db4/buildlink3.mk" +. elif ${BDB_TYPE} == "db3" BDBBASE= ${BUILDLINK_PREFIX.db3} -. include "../../databases/db3/buildlink3.mk" -. elif ${BDB_TYPE} == "db" +. include "../../databases/db3/buildlink3.mk" +. elif ${BDB_TYPE} == "db" BDBBASE= ${BUILDLINK_PREFIX.db2} -. include "../../databases/db/buildlink3.mk" -. endif +. include "../../databases/db/buildlink3.mk" . endif +.endif BUILD_DEFS+= BDBBASE - -.endif # BDB_BUILDLINK3_MK diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk index cb8ed37c396..4ed01da8cb3 100644 --- a/mk/buildlink3/bsd.buildlink3.mk +++ b/mk/buildlink3/bsd.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink3.mk,v 1.123 2004/03/16 18:23:26 jlam Exp $ +# $NetBSD: bsd.buildlink3.mk,v 1.124 2004/03/18 09:12:13 jlam Exp $ # # An example package buildlink3.mk file: # @@ -21,11 +21,10 @@ # # # We want "-lbar" to eventually resolve to "-lfoo". # BUILDLINK_TRANSFORM+= l:bar:foo +# .endif # FOO_BUILDLINK3_MK # # .include "../../category/baz/buildlink3.mk" # -# .endif # FOO_BUILDLINK3_MK -# # BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} # -------------8<-------------8<-------------8<-------------8<------------- # @@ -79,6 +78,103 @@ PKG_FAIL_REASON+= \ . endif .endif +.for _pkg_ in ${BUILDLINK_PACKAGES} +BUILDLINK_PKGBASE.${_pkg_}?= ${_pkg_} +.endfor + +_BLNK_PKGVAR?= ${PKGBASE:S/++$/xx/:S/+$//} + +# Try to include buildlink3.mk files for any dependencies that are already +# installed on the system. This tries to handle the situation where the +# installed package and the package as it exists in pkgsrc have differing +# lists of dependencies. If the package directory has moved or been +# removed from pkgsrc, then set BUILDLINK_INSTALLED_PKGSRCDIR.<pkg> to the +# correct PKGPATH for that package or to the empty value if it has been +# removed. +# +.if !defined(_BLNK_INSTALLED_DEPDIRS.${_BLNK_PKGVAR}) +_BLNK_INSTALLED_DEPS= # empty +. for _pkg_ in ${BUILDLINK_PACKAGES} +BUILDLINK_DEPMETHOD.${_pkg_}?= full +. if !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mfull) +BUILDLINK_PKGBASE.${_pkg_}?= ${_pkg_} +# +# XXX This should really recursively walk through the dependency list. +# +_BLNK_TMP!= \ + pkg="${BUILDLINK_PKGBASE.${_pkg_}}-[0-9]*"; \ + found=`${PKG_BEST_EXISTS} "$$pkg"`; \ + pkgdep=; \ + if [ -n "$$found" ]; then \ + pkgdep=`${PKG_INFO} -qf "$$found" | ${SED} -n "s/^@pkgdep[ ]*//p"`; \ + fi; \ + ${ECHO} "$$pkgdep" +_BLNK_INSTALLED_DEPS:= ${_BLNK_INSTALLED_DEPS} ${_BLNK_TMP} +. undef _BLNK_TMP +. endif +. endfor +_BLNK_INSTALLED_DEPPKGS= # empty +. for _dep_ in ${_BLNK_INSTALLED_DEPS} +_BLNK_TMP!= found=`${PKG_BEST_EXISTS} "${_dep_}"`; ${ECHO} "$$found" +_BLNK_TMP_PKGBASE:= ${_BLNK_TMP:C/-[^-]*$//} +_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGBASE} +# +# Map package names into buildlink package variable equivalents when it +# differs from the PKGBASE for that package. +# +_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/++$/xx/:S/+$//} +_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/^PAM$/pam/} +_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/^freetype-lib$/freetype/} +_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/^gettext-lib$/gettext/} +_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/^libaudiofile$/audiofile/} +_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/^libgetopt$/getopt/} +_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/^libiconv$/iconv/} +_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:S/^libtool-base$/libtool/} +_BLNK_TMP_PKGVAR:= ${_BLNK_TMP_PKGVAR:C/^py[0-9][0-9][^-]*-/py-/} +_BLNK_INSTALLED_PKGBASE.${_BLNK_TMP_PKGVAR}:= ${_BLNK_TMP_PKGBASE} +_BLNK_INSTALLED_DEPPKGS:= \ + ${_BLNK_INSTALLED_DEPPKGS:N${_BLNK_TMP_PKGVAR}} \ + ${_BLNK_TMP_PKGVAR} +. undef _BLNK_TMP +. undef _BLNK_TMP_PKGVAR +. undef _BLNK_TMP_PKGBASE +. endfor +_BLNK_INSTALLED_DEPDIRS= # empty +. for _pkg_ in ${_BLNK_INSTALLED_DEPPKGS} +# +# We are using the pkgsrc-installed dependency, so clearly we must not be +# using any built-in version of the same software. +# +USE_BUILTIN.${_pkg_}= no +# +# If BUILDLINK_PKGSRCDIR.<pkg> is already defined (by a previous inclusion +# of <pkg>'s buildlink2.mk file), then make that the default value for +# BUILDLINK_INSTALLED_PKGSRCDIR.<pkg>. Otherwise, try to dig it out of +# the +BUILD_INFO file of the installed package. +# +. if defined(BUILDLINK_PKGSRCDIR.${_pkg_}) +BUILDLINK_INSTALLED_PKGSRCDIR.${_pkg_}?= ${BUILDLINK_PKGSRCDIR.${_pkg_}} +. endif +. if !defined(BUILDLINK_INSTALLED_PKGSRCDIR.${_pkg_}) +BUILDLINK_INSTALLED_PKGSRCDIR.${_pkg_}!= \ + dir=`${PKG_INFO} -qB "${_BLNK_INSTALLED_PKGBASE.${_pkg_}}" | ${SED} -n "s/^PKGPATH=//p"`; ${ECHO} "../../$$dir" +. endif +. if exists(${BUILDLINK_INSTALLED_PKGSRCDIR.${_pkg_}}/buildlink3.mk) +_BLNK_INSTALLED_DEPDIRS:= \ + ${_BLNK_INSTALLED_DEPDIRS} \ + ${BUILDLINK_INSTALLED_PKGSRCDIR.${_pkg_}} +. endif +. endfor +_BLNK_INSTALLED_DEPDIRS.${_BLNK_PKGVAR}:= ${_BLNK_INSTALLED_DEPDIRS} +. undef _BLNK_INSTALLED_DEPDIRS +MAKEFLAGS+= _BLNK_INSTALLED_DEPDIRS.${_BLNK_PKGVAR}=${_BLNK_INSTALLED_DEPDIRS.${_BLNK_PKGVAR}:Q} +.endif +.for _dir_ in ${_BLNK_INSTALLED_DEPDIRS.${_BLNK_PKGVAR}} +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+ +. include "${_dir_}/buildlink3.mk" +BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//} +.endfor + # For each package we use, check whether we are using the built-in # version of the package or if we are using the pkgsrc version. The # necessary logic is encapsulated in a package's builtin.mk file, which @@ -110,7 +206,7 @@ USE_BUILTIN.${_pkg_}?= no # . if defined(BUILDLINK_PKGSRCDIR.${_pkg_}) . if exists(${BUILDLINK_PKGSRCDIR.${_pkg_}}/builtin.mk) -. include "${BUILDLINK_PKGSRCDIR.${_pkg_}}/builtin.mk" +. include "${BUILDLINK_PKGSRCDIR.${_pkg_}}/builtin.mk" . endif . endif .endfor @@ -120,6 +216,14 @@ USE_BUILTIN.${_pkg_}?= no USE_BUILTIN.${_pkg_}?= no .endfor +# Default value for BUILDLINK_PKGBASE.<pkg>. This is here to set the +# default for any package added to BUILDLINK_PACKAGES by any of the +# above code. +# +.for _pkg_ in ${BUILDLINK_PACKAGES} +BUILDLINK_PKGBASE.${_pkg_}?= ${_pkg_} +.endfor + # Set IGNORE_PKG.<pkg> if <pkg> is the current package we're building. # We can then check for this value to avoid build loops. # diff --git a/mk/curses.buildlink3.mk b/mk/curses.buildlink3.mk index 2924bfdf74e..fcd4cd91f6c 100644 --- a/mk/curses.buildlink3.mk +++ b/mk/curses.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: curses.buildlink3.mk,v 1.1 2004/02/13 01:02:06 jlam Exp $ +# $NetBSD: curses.buildlink3.mk,v 1.2 2004/03/18 09:12:13 jlam Exp $ # # This file should be included by Makefiles for packages that use curses. # If a system curses isn't available, then add a dependency on ncurses. @@ -6,11 +6,7 @@ # If a package genuinely requires ncurses, then it should directly include # ncurses/buildlink3.mk instead of this file in the package Makefile. -.if !defined(CURSES_BUILDLINK3_MK) -CURSES_BUILDLINK3_MK= # defined - -. if !exists(/usr/include/curses.h) && \ - !exists(/usr/include/ncurses.h) -. include "../../devel/ncurses/buildlink3.mk" -. endif -.endif # CURSES_BUILDLINK3_MK +.if !exists(/usr/include/curses.h) && \ + !exists(/usr/include/ncurses.h) +. include "../../devel/ncurses/buildlink3.mk" +.endif diff --git a/mk/krb5.buildlink3.mk b/mk/krb5.buildlink3.mk index 993fa87ea26..4f2ed7cc0d1 100644 --- a/mk/krb5.buildlink3.mk +++ b/mk/krb5.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: krb5.buildlink3.mk,v 1.5 2004/02/06 18:45:03 jlam Exp $ +# $NetBSD: krb5.buildlink3.mk,v 1.6 2004/03/18 09:12:13 jlam Exp $ # # This Makefile fragment is meant to be included by packages that # require a Kerberos 5 implementation. krb5.buildlink3.mk will: @@ -19,7 +19,7 @@ KRB5_BUILDLINK3_MK:= ${KRB5_BUILDLINK3_MK}+ .include "../../mk/bsd.prefs.mk" -.if !empty(KRB5_BUILDLINK3_MK) +.if !empty(KRB5_BUILDLINK3_MK:M+) KRB5_DEFAULT?= # empty KRB5_ACCEPTED?= ${_KRB5_PKGS} @@ -47,21 +47,21 @@ MAKEFLAGS+= _KRB5_INSTALLED.${_krb5_}=${_KRB5_INSTALLED.${_krb5_}} . endif . endfor -. if !defined(_KRB5) +. if !defined(_KRB5_TYPE) # # Prefer the default one if it's accepted,... # . if !empty(_KRB5_DEFAULT) && \ defined(_KRB5_OK.${_KRB5_DEFAULT}) && \ !empty(_KRB5_OK.${_KRB5_DEFAULT}:M[yY][eE][sS]) -_KRB5= ${_KRB5_DEFAULT} +_KRB5_TYPE= ${_KRB5_DEFAULT} . endif # # ...otherwise, use one of the installed Kerberos 5 packages,... # . for _krb5_ in ${_KRB5_ACCEPTED} . if !empty(_KRB5_INSTALLED.${_krb5_}:M[yY][eE][sS]) -_KRB5?= ${_krb5_} +_KRB5_TYPE?= ${_krb5_} . else _KRB5_FIRSTACCEPTED?= ${_krb5_} . endif @@ -70,31 +70,31 @@ _KRB5_FIRSTACCEPTED?= ${_krb5_} # ...otherwise, just use the first accepted Kerberos 5 package. # . if defined(_KRB5_FIRSTACCEPTED) -_KRB5?= ${_KRB5_FIRSTACCEPTED} +_KRB5_TYPE?= ${_KRB5_FIRSTACCEPTED} . endif -_KRB5?= none -MAKEFLAGS+= _KRB5=${_KRB5} +_KRB5_TYPE?= none +MAKEFLAGS+= _KRB5_TYPE=${_KRB5_TYPE} . endif -KRB5_TYPE= ${_KRB5} +KRB5_TYPE= ${_KRB5_TYPE} BUILD_DEFS+= KRB5_TYPE -. if ${KRB5_TYPE} == "none" +.endif # KRB5_BUILDLINK3_MK + +.if ${KRB5_TYPE} == "none" PKG_FAIL_REASON= "No acceptable Kerberos 5 implementation found." -. else +.else # # Packages that use Kerberos are automatically categorized as restricted # packages. # CRYPTO+= uses Kerberos encryption code -. if ${KRB5_TYPE} == "heimdal" +. if ${KRB5_TYPE} == "heimdal" KRB5BASE= ${BUILDLINK_PREFIX.heimdal} -. include "../../security/heimdal/buildlink3.mk" -. elif ${KRB5_TYPE} == "mit-krb5" +. include "../../security/heimdal/buildlink3.mk" +. elif ${KRB5_TYPE} == "mit-krb5" KRB5BASE= ${BUILDLINK_PREFIX.mit-krb5} -. include "../../security/mit-krb5/buildlink3.mk" -. endif +. include "../../security/mit-krb5/buildlink3.mk" . endif +.endif BUILD_DEFS+= KRB5BASE - -.endif # KRB5_BUILDLINK3_MK diff --git a/mk/ossaudio.buildlink3.mk b/mk/ossaudio.buildlink3.mk index 48985b1dae9..02237fe540b 100644 --- a/mk/ossaudio.buildlink3.mk +++ b/mk/ossaudio.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: ossaudio.buildlink3.mk,v 1.1 2004/01/03 23:06:44 jlam Exp $ +# $NetBSD: ossaudio.buildlink3.mk,v 1.2 2004/03/18 09:12:13 jlam Exp $ # # This file should be included by Makefiles for packages that use OSS. # By checking the value of HAVE_OSS after including this file, it's possible @@ -11,50 +11,50 @@ # CONFIGURE_ENV+= ac_cv_libossaudio__oss_ioctl=no # .endif # -.if !defined(OSSAUDIO_BUILDLINK3_MK) -OSSAUDIO_BUILDLINK3_MK= # defined +OSSAUDIO_BUILDLINK3_MK:= ${OSSAUDIO_BUILDLINK3_MK}+ .include "../../mk/bsd.prefs.mk" -.if defined(USE_OSS) +.if !empty(OSSAUDIO_BUILDLINK3_MK:M+) +. if defined(USE_OSS) BUILD_DEFS+= USE_OSS -.endif - -.if !defined(_HAVE_OSS) +. endif +. if !defined(_HAVE_OSS) _HAVE_OSS!= if ${PKG_INFO} -qe oss; then ${ECHO} YES; else ${ECHO} NO; fi MAKEFLAGS+= _HAVE_OSS=${_HAVE_OSS} -.endif - +. endif HAVE_OSS?= ${_HAVE_OSS} +.endif # OSSAUDIO_BUILDLINK3_MK .if defined(HAVE_OSS) && (${HAVE_OSS} == "YES") . include "../../audio/oss/buildlink3.mk" .else -BUILDLINK_PREFIX.oss= /usr +BUILDLINK_PREFIX.oss= /usr . if ${OPSYS} == "NetBSD" -LIBOSSAUDIO?= -lossaudio -DEVOSSAUDIO?= /dev/audio -DEVOSSSOUND?= /dev/sound +LIBOSSAUDIO?= -lossaudio +DEVOSSAUDIO?= /dev/audio +DEVOSSSOUND?= /dev/sound . elif ${OPSYS} == "Linux" -LIBOSSAUDIO?= # empty -DEVOSSAUDIO?= /dev/dsp -DEVOSSSOUND?= /dev/dsp +LIBOSSAUDIO?= # empty +DEVOSSAUDIO?= /dev/dsp +DEVOSSSOUND?= /dev/dsp . else -LIBOSSAUDIO?= # empty -DEVOSSAUDIO?= /dev/audio -DEVOSSSOUND?= /dev/sound +LIBOSSAUDIO?= # empty +DEVOSSAUDIO?= /dev/audio +DEVOSSSOUND?= /dev/sound . endif .endif -CONFIGURE_ENV+= LIBOSSAUDIO="${LIBOSSAUDIO}" -CONFIGURE_ENV+= DEVOSSAUDIO="${DEVOSSAUDIO}" -CONFIGURE_ENV+= DEVOSSSOUND="${DEVOSSSOUND}" +.if !empty(OSSAUDIO_BUILDLINK3_MK:M+) +CONFIGURE_ENV+= LIBOSSAUDIO="${LIBOSSAUDIO}" +CONFIGURE_ENV+= DEVOSSAUDIO="${DEVOSSAUDIO}" +CONFIGURE_ENV+= DEVOSSSOUND="${DEVOSSSOUND}" -MAKE_ENV+= LIBOSSAUDIO="${LIBOSSAUDIO}" -MAKE_ENV+= DEVOSSAUDIO="${DEVOSSAUDIO}" -MAKE_ENV+= DEVOSSSOUND="${DEVOSSSOUND}" +MAKE_ENV+= LIBOSSAUDIO="${LIBOSSAUDIO}" +MAKE_ENV+= DEVOSSAUDIO="${DEVOSSAUDIO}" +MAKE_ENV+= DEVOSSSOUND="${DEVOSSSOUND}" -BUILDLINK_TARGETS+= buildlink-ossaudio-soundcard-h +BUILDLINK_TARGETS+= buildlink-ossaudio-soundcard-h # Many programs expect <soundcard.h> to be found as <sys/soundcard.h>. # Also include <sys/ioctl.h> prior to include <soundcard.h> since we need @@ -81,5 +81,4 @@ buildlink-ossaudio-soundcard-h: ${MKDIR} `${DIRNAME} $${mach_soundcard_h}`; \ ${LN} -s $${sys_soundcard_h} $${mach_soundcard_h}; \ fi - .endif # OSSAUDIO_BUILDLINK3_MK 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 |