summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk')
-rw-r--r--mk/bdb.buildlink3.mk6
-rw-r--r--mk/bsd.pkg.mk7
-rw-r--r--mk/buildlink3/bsd.buildlink3.mk67
-rw-r--r--mk/buildlink3/bsd.builtin.mk6
-rw-r--r--mk/buildlink3/show-buildlink3.sh24
-rw-r--r--mk/curses.buildlink3.mk6
-rw-r--r--mk/defaults/mk.conf4
-rw-r--r--mk/dlopen.buildlink3.mk6
-rw-r--r--mk/dlopen.builtin.mk4
-rw-r--r--mk/oss.buildlink3.mk6
-rw-r--r--mk/pam.buildlink3.mk6
-rw-r--r--mk/pkg-build-options.mk25
-rw-r--r--mk/pthread.buildlink3.mk6
-rw-r--r--mk/resolv.buildlink3.mk6
-rw-r--r--mk/termcap.buildlink3.mk6
-rw-r--r--mk/termcap.builtin.mk4
16 files changed, 101 insertions, 88 deletions
diff --git a/mk/bdb.buildlink3.mk b/mk/bdb.buildlink3.mk
index f357f7bdf7a..fed6138940d 100644
--- a/mk/bdb.buildlink3.mk
+++ b/mk/bdb.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bdb.buildlink3.mk,v 1.22 2008/11/26 09:10:30 rillig Exp $
+# $NetBSD: bdb.buildlink3.mk,v 1.23 2009/03/20 19:25:01 joerg Exp $
#
# This Makefile fragment is meant to be included by packages that
# require a Berkeley DB (BDB) implementation and that are not restricted
@@ -134,9 +134,7 @@ BUILD_DEFS_EFFECTS+= BDBBASE BDB_LIBS BDB_TYPE
PKG_FAIL_REASON= \
"[bdb.buildlink3.mk] ${_BDB_TYPE} is not an acceptable Berkeley DB type for ${PKGNAME}."
.elif ${BDB_TYPE} == "db1"
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ndb1}
-BUILDLINK_PACKAGES+= db1
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}db1
+BUILDLINK_TREE+= db1 -db1
BUILDLINK_BUILTIN_MK.db1= ../../mk/db1.builtin.mk
.else
. include "${_BDB_PKGSRCDIR.${BDB_TYPE}}/buildlink3.mk"
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 536323f4ee9..8cff26eed8b 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1953 2009/02/06 15:27:00 joerg Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1954 2009/03/20 19:25:01 joerg Exp $
#
# This file is in the public domain.
#
@@ -125,6 +125,11 @@ _INSTALL_UNSTRIPPED= # set (flag used by platform/*.mk)
# Sanity checks
############################################################################
+.if defined(BUILDLINK_DEPTH) || defined(BUILDLINK_PACKAGES) || \
+ defined(BUILDLINK_DEPENDS) || defined(BUILDLINK_ORDER)
+PKG_FAIL_REASON+= "Out-dated buildlink3.mk detected, please update"
+.endif
+
# PKG_INSTALLATION_TYPE can only be one of two values: "pkgviews" or
# "overwrite".
.if (${PKG_INSTALLATION_TYPE} != "pkgviews") && \
diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk
index 6336939ab02..b8b1da459c3 100644
--- a/mk/buildlink3/bsd.buildlink3.mk
+++ b/mk/buildlink3/bsd.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink3.mk,v 1.204 2009/03/16 18:37:07 joerg Exp $
+# $NetBSD: bsd.buildlink3.mk,v 1.205 2009/03/20 19:25:01 joerg Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -37,33 +37,26 @@
# An example package buildlink3.mk file:
#
# -------------8<-------------8<-------------8<-------------8<-------------
-# BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
-# FOO_BUILDLINK3_MK:= ${FOO_BUILDLINK3_MK}+
+# BUILDLINK_TREE+= foo
#
-# .if !empty(BUILDLINK_DEPTH:M+)
-# BUILDLINK_DEPENDS+= foo
-# .endif
+# .if !defined(FOO_BUILDLINK3_MK)
+# FOO_BUILDLINK3_MK:=
#
-# BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nfoo}
-# BUILDLINK_PACKAGES+= foo
-#
-# .if !empty(FOO_BUILDLINK3_MK:M+)
# BUILDLINK_API_DEPENDS.foo+= foo-lib>=1.0
# BUILDLINK_ABI_DEPENDS.foo?= foo-lib>=1.0nb1
# BUILDLINK_PKGSRCDIR.foo?= ../../category/foo-lib
#
# # 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/+$//}
+# BUILDLINK_TREE+= -foo
# -------------8<-------------8<-------------8<-------------8<-------------
#
# Most of the buildlink3.mk file is protected against multiple inclusion,
-# except for the parts related to manipulating BUILDLINK_DEPTH and adding
-# to BUILDLINK_DEPENDS.
+# except for the parts related to manipulating BUILDLINK_TREE.
#
# Note that if a buildlink3.mk file is included, then the package Makefile
# has the expectation that it can use the value of BUILDLINK_PREFIX.<pkg>.
@@ -100,23 +93,42 @@ BUILDLINK_X11_DIR= ${BUILDLINK_DIR:H}/.x11-buildlink
# Prepend ${BUILDLINK_BINDIR} to the PATH.
PREPEND_PATH+= ${BUILDLINK_BINDIR}
-# BUILDLINK_DEPENDS contains the list of packages for which we add
-# dependencies.
+# _BUILDLINK_DEPENDS contains the list of packages for which we add
+# dependencies. This is only done for direct dependencies.
#
-BUILDLINK_DEPENDS?= # empty
+_BUILDLINK_DEPENDS:=
+_BUILDLINK_DEPTH:=
+.for _pkg_ in ${BUILDLINK_TREE}
+_BUILDLINK_pkg:= ${_pkg_:N-*}
+. if empty(_BUILDLINK_pkg)
+_BUILDLINK_DEPTH:= ${_BUILDLINK_DEPTH:S/+$//}
+. else
+. if empty(_BUILDLINK_DEPTH)
+_BUILDLINK_DEPENDS+= ${_pkg_}
+. endif
+_BUILDLINK_DEPTH:= ${_BUILDLINK_DEPTH}+
+. endif
+.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.
#
-.for _pkg_ in ${BUILDLINK_PACKAGES}
+.for _pkg_ in ${BUILDLINK_TREE:N-*}
+.if !defined(_BUILDLINK_BUILTIN_MK_INCLUDED.${_pkg_})
+_BUILDLINK_BUILTIN_MK_INCLUDED.${_pkg_}=
BUILDLINK_BUILTIN_MK.${_pkg_}?= ${BUILDLINK_PKGSRCDIR.${_pkg_}}/builtin.mk
. sinclude "${BUILDLINK_BUILTIN_MK.${_pkg_}}"
+.endif
.endfor
+# Sorted and unified version of BUILDLINK_TREE without recursion
+# data.
+_BUILDLINK_TREE:= ${BUILDLINK_TREE:N-*:O:u}
+
# Set IGNORE_PKG.<pkg> if <pkg> is the current package we're building.
# We can then check for this value to avoid build loops.
#
-.for _pkg_ in ${BUILDLINK_PACKAGES}
+.for _pkg_ in ${_BUILDLINK_TREE}
. if defined(BUILDLINK_PKGSRCDIR.${_pkg_})
. if !defined(IGNORE_PKG.${_pkg_}) && \
(${BUILDLINK_PKGSRCDIR.${_pkg_}:C|.*/([^/]*/[^/]*)$|\1|} == ${PKGPATH})
@@ -126,12 +138,15 @@ MAKEFLAGS+= IGNORE_PKG.${_pkg_}=${IGNORE_PKG.${_pkg_}}
. endif
.endfor
-# _BLNK_PACKAGES contains all of the unique elements of BUILDLINK_PACKAGES
+# _BLNK_PACKAGES contains all of the unique elements of BUILDLINK_TREE
# that shouldn't be skipped.
#
+# This does not use _BUILDLINK_TREE as the order matters. x11-links is
+# sorted first to allow other packages to override the content.
+#
_BLNK_PACKAGES= # empty
-.for _pkg_ in ${BUILDLINK_PACKAGES}
-. if empty(_BLNK_PACKAGES:M${_pkg_}) && !defined(IGNORE_PKG.${_pkg_})
+.for _pkg_ in ${BUILDLINK_TREE:N-*:Mx11-links} ${BUILDLINK_TREE:N-*:Nx11-links}
+. if !defined(IGNORE_PKG.${_pkg_})
_BLNK_PACKAGES+= ${_pkg_}
. endif
.endfor
@@ -140,7 +155,7 @@ _VARGROUPS+= bl3
.for v in BINDIR CFLAGS CPPFLAGS DEPENDS LDFLAGS LIBS
_SYS_VARS.bl3+= BUILDLINK_${v}
.endfor
-.for p in ${BUILDLINK_PACKAGES}
+.for p in ${_BUILDLINK_TREE}
. for v in AUTO_VARS BUILTIN_MK CONTENTS_FILTER CPPFLAGS DEPMETHOD FILES_CMD INCDIRS IS_DEPOT LDFLAGS LIBDIRS PKGNAME PREFIX RPATHDIRS
_SYS_VARS.bl3+= BUILDLINK_${v}.${p}
. endfor
@@ -157,7 +172,7 @@ BUILDLINK_DEPMETHOD.${_pkg_}?= full
# _BLNK_DEPENDS contains all of the elements of _BLNK_PACKAGES for which
# we must add a dependency. We add a dependency if we aren't using the
# built-in version of the package, and the package was either explicitly
-# requested as a dependency (BUILDLINK_DEPENDS) or is a build dependency
+# requested as a dependency (_BUILDLINK_DEPENDS) or is a build dependency
# somewhere in the chain.
#
_BLNK_DEPENDS= # empty
@@ -165,7 +180,7 @@ _BLNK_DEPENDS= # empty
USE_BUILTIN.${_pkg_}?= no
. if empty(_BLNK_DEPENDS:M${_pkg_}) && !defined(IGNORE_PKG.${_pkg_}) && \
!empty(USE_BUILTIN.${_pkg_}:M[nN][oO]) && \
- (!empty(BUILDLINK_DEPENDS:M${_pkg_}) || \
+ (!empty(_BUILDLINK_DEPENDS:M${_pkg_}) || \
!empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mbuild))
_BLNK_DEPENDS+= ${_pkg_}
. endif
@@ -1120,4 +1135,4 @@ do-buildlink:
.PHONY: show-buildlink3
show-buildlink3:
- @${SH} ${PKGSRCDIR}/mk/buildlink3/show-buildlink3.sh ${BUILDLINK_ORDER}
+ @${SH} ${PKGSRCDIR}/mk/buildlink3/show-buildlink3.sh ${BUILDLINK_TREE}
diff --git a/mk/buildlink3/bsd.builtin.mk b/mk/buildlink3/bsd.builtin.mk
index a614ac13920..578c84b81f4 100644
--- a/mk/buildlink3/bsd.builtin.mk
+++ b/mk/buildlink3/bsd.builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.builtin.mk,v 1.9 2008/01/23 17:35:20 tnn Exp $
+# $NetBSD: bsd.builtin.mk,v 1.10 2009/03/20 19:25:01 joerg Exp $
#
# Copyright (c) 2004-2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -35,8 +35,8 @@
# POSSIBILITY OF SUCH DAMAGE.
# Include this file to set the value of USE_BUILTIN.<pkg> for each
-# package listed in BUILDLINK_PACKAGES. Note that this file may
-# indirectly add additional values to BUILDLINK_PACKAGES.
+# package listed in BUILDLINK_TREE. Note that this file may
+# indirectly add additional values to BUILDLINK_TREE.
#
# For each package which may duplicate built-in software on the system,
# a builtin.mk file should be created. The only requirements of a
diff --git a/mk/buildlink3/show-buildlink3.sh b/mk/buildlink3/show-buildlink3.sh
index 1d2255158d2..1fa109ffdea 100644
--- a/mk/buildlink3/show-buildlink3.sh
+++ b/mk/buildlink3/show-buildlink3.sh
@@ -1,23 +1,21 @@
#!/bin/sh
#
-# $NetBSD: show-buildlink3.sh,v 1.1 2006/07/08 23:11:17 jlam Exp $
+# $NetBSD: show-buildlink3.sh,v 1.2 2009/03/20 19:25:01 joerg Exp $
#
# This script is a helper for the show-buildlink3 target and outputs
-# the arguments, each on a new line with any leading "+" signs replaced
-# with four spaces.
+# the arguments as tree.
#
while test $# -gt 0; do
pkg="$1"
- pkg="${pkg#+}"
- prefix=
- stripped=no
- while test $stripped = no; do
- case $pkg in
- +*) prefix=" $prefix"; pkg="${pkg#+}"; stripped=no ;;
- *) stripped=yes ;;
- esac
- done
- echo "$prefix$pkg"
+ case $pkg in
+ -*)
+ indentation=${indendation# }
+ ;;
+ *)
+ echo "${indentation}${pkg}"
+ indentation="${indentation} "
+ ;;
+ esac
shift
done
diff --git a/mk/curses.buildlink3.mk b/mk/curses.buildlink3.mk
index 405834ef4ef..349b948ebb0 100644
--- a/mk/curses.buildlink3.mk
+++ b/mk/curses.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: curses.buildlink3.mk,v 1.13 2008/09/16 04:38:49 minskim Exp $
+# $NetBSD: curses.buildlink3.mk,v 1.14 2009/03/20 19:25:01 joerg Exp $
#
# This Makefile fragment is meant to be included by packages that require
# any curses implementation instead of one particular one. The available
@@ -77,9 +77,7 @@ _PKG_USE_CURSES= yes
PKG_FAIL_REASON= \
"${_CURSES_TYPE} is not an acceptable curses type for ${PKGNAME}."
.elif ${CURSES_TYPE} == "curses"
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ncurses}
-BUILDLINK_PACKAGES+= curses
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}curses
+BUILDLINK_TREE+= curses -curses
BUILDLINK_LDADD.curses?= ${BUILDLINK_LIBNAME.curses:S/^/-l/:S/^-l$//}
BUILDLINK_BUILTIN_MK.curses= ../../mk/curses.builtin.mk
.elif ${CURSES_TYPE} == "ncurses"
diff --git a/mk/defaults/mk.conf b/mk/defaults/mk.conf
index 25684949d42..dce0b36a14a 100644
--- a/mk/defaults/mk.conf
+++ b/mk/defaults/mk.conf
@@ -1,4 +1,4 @@
-# $NetBSD: mk.conf,v 1.183 2009/03/08 15:27:59 tron Exp $
+# $NetBSD: mk.conf,v 1.184 2009/03/20 19:25:01 joerg Exp $
#
# This file provides default values for variables that may be overridden
@@ -218,7 +218,7 @@ PREFER_NATIVE?= yes
# When building packages, whether to prefer the pkgsrc or native
# versions of software that's also part of the base system. Its value
# can be either yes/no, or a list of packages as named in the
-# BUILDLINK_PACKAGES line in a package's buildlink3.mk file.
+# BUILDLINK_TREE line in a package's buildlink3.mk file.
# Preferences are determined by the most specific instance of the
# package in either PREFER_PKGSRC or PREFER_NATIVE. If a package is
# specified in neither or in both variables, then PREFER_PKGSRC has
diff --git a/mk/dlopen.buildlink3.mk b/mk/dlopen.buildlink3.mk
index 1c2542dd3d5..4856abf9716 100644
--- a/mk/dlopen.buildlink3.mk
+++ b/mk/dlopen.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: dlopen.buildlink3.mk,v 1.16 2007/10/17 10:43:38 rillig Exp $
+# $NetBSD: dlopen.buildlink3.mk,v 1.17 2009/03/20 19:25:01 joerg Exp $
#
# This Makefile fragment is included by package Makefiles and
# buildlink3.mk files for the packages that use dlopen().
@@ -30,9 +30,7 @@ CHECK_BUILTIN.dl:= no
DL_AUTO_VARS?= no
.if !empty(USE_BUILTIN.dl:M[yY][eE][sS])
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ndl}
-BUILDLINK_PACKAGES+= dl
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}dl
+BUILDLINK_TREE+= dl -dl
BUILDLINK_BUILTIN_MK.dl= ../../mk/dlopen.builtin.mk
BUILDLINK_AUTO_VARS.dl= ${DL_AUTO_VARS}
.elif !empty(MACHINE_PLATFORM:MDarwin-[56].*)
diff --git a/mk/dlopen.builtin.mk b/mk/dlopen.builtin.mk
index 2d8c510341f..f8062ad2d8c 100644
--- a/mk/dlopen.builtin.mk
+++ b/mk/dlopen.builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: dlopen.builtin.mk,v 1.19 2009/01/23 14:21:38 obache Exp $
+# $NetBSD: dlopen.builtin.mk,v 1.20 2009/03/20 19:25:01 joerg Exp $
BUILTIN_PKG:= dl
@@ -93,9 +93,7 @@ BUILDLINK_PREFIX.dl= /usr
BUILDLINK_LDADD.dl= -ldl
. endif
. if !empty(_BLNK_DLOPEN_REQUIRE_PTHREADS:M[yY][eE][sS])
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
. include "../../mk/pthread.buildlink3.mk"
-BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
. include "../../mk/pthread.builtin.mk"
BUILDLINK_CFLAGS.dl+= ${PTHREAD_CFLAGS}
BUILDLINK_LDFLAGS.dl+= ${PTHREAD_LDFLAGS}
diff --git a/mk/oss.buildlink3.mk b/mk/oss.buildlink3.mk
index 5499233c9e1..f24d6575dc4 100644
--- a/mk/oss.buildlink3.mk
+++ b/mk/oss.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: oss.buildlink3.mk,v 1.9 2009/03/19 20:12:00 sno Exp $
+# $NetBSD: oss.buildlink3.mk,v 1.10 2009/03/20 19:25:01 joerg Exp $
#
# This Makefile fragment is included by packages that require an Open Sound
# System (OSS) implementation. After inclusion of this file, the following
@@ -28,9 +28,7 @@ OSS_TYPE= ${_OSS_TYPE}
.if ${OSS_TYPE} != "none"
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Noss}
-BUILDLINK_PACKAGES+= oss
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}oss
+BUILDLINK_TREE+= oss -oss
BUILDLINK_BUILTIN_MK.oss= ../../mk/oss.builtin.mk
.if !empty(OSS_BUILDLINK3_MK:M+)
diff --git a/mk/pam.buildlink3.mk b/mk/pam.buildlink3.mk
index 9441b303eb9..eb838df2b77 100644
--- a/mk/pam.buildlink3.mk
+++ b/mk/pam.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: pam.buildlink3.mk,v 1.10 2007/10/13 11:04:16 dsl Exp $
+# $NetBSD: pam.buildlink3.mk,v 1.11 2009/03/20 19:25:01 joerg Exp $
#
# This Makefile fragment is meant to be included by packages that
# require a PAM implementation.
@@ -96,7 +96,5 @@ PKG_FAIL_REASON= \
.elif ${PAM_TYPE} == "openpam"
. include "../../security/openpam/buildlink3.mk"
.elif ${PAM_TYPE} == "solaris-pam"
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nsolaris-pam}
-BUILDLINK_PACKAGES+= solaris-pam
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}solaris-pam
+BUILDLINK_TREE+= solaris-pam -solaris-pam
.endif
diff --git a/mk/pkg-build-options.mk b/mk/pkg-build-options.mk
index f4ebf9cefd6..4f72ffa1f2e 100644
--- a/mk/pkg-build-options.mk
+++ b/mk/pkg-build-options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: pkg-build-options.mk,v 1.7 2007/10/13 11:04:17 dsl Exp $
+# $NetBSD: pkg-build-options.mk,v 1.8 2009/03/20 19:25:01 joerg Exp $
#
# This procedure determines the PKG_OPTIONS that have been in effect
# when the package ${pkgbase} has been built. When the package is not
@@ -21,7 +21,24 @@
.include "bsd.fast.prefs.mk"
-.if defined(BUILDLINK_DEPTH) && !empty(BUILDLINK_DEPTH)
+# For the check for inclusion from non-buildlink3.mk, it is irrelevant
+# whether BUILDLINK_TREE was empty or undefined, so defining it here
+# avoids dealing one case.
+BUILDLINK_TREE?=
+
+# Counting words doesn't work as expected for empty strings, they
+# still have one word. Older make doesn't like the code without
+# variable assignment for unknown reasons.
+_BUILDLINK_TREE_WITH:= ${BUILDLINK_TREE:M-*:[\#]}
+_BUILDLINK_TREE_WITHOUT:= ${BUILDLINK_TREE:N-*:[\#]}
+.if (empty(BUILDLINK_TREE:M-*) && empty(BUILDLINK_TREE:N-*)) || \
+ (!empty(BUILDLINK_TREE:M-*) && !empty(BUILDLINK_TREE:N-*) && \
+ ${_BUILDLINK_TREE_WITH} == ${_BUILDLINK_TREE_WITHOUT})
+. for b in ${pkgbase}
+PKG_BUILD_OPTIONS.${b}=
+PKG_FAIL_REASON+= "[pkg-build-options.mk] This file may only be included from a buildlink3.mk file (pkgbase=${b})."
+. endfor
+.else
. for b in ${pkgbase}
. if !defined(PKG_BUILD_OPTIONS.${b})
PKG_BUILD_OPTIONS.${b} != \
@@ -35,8 +52,4 @@ MAKEFLAGS+= PKG_BUILD_OPTIONS.${b}=${PKG_BUILD_OPTIONS.${b}:Q}
MAKEVARS+= PKG_BUILD_OPTIONS.${b}
. endfor
-.else
-. for b in ${pkgbase}
-PKG_FAIL_REASON+= "[pkg-build-options.mk] This file may only be included from a buildlink3.mk file (pkgbase=${b})."
-. endfor
.endif
diff --git a/mk/pthread.buildlink3.mk b/mk/pthread.buildlink3.mk
index 56c4dec0e4f..918f8b38e70 100644
--- a/mk/pthread.buildlink3.mk
+++ b/mk/pthread.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: pthread.buildlink3.mk,v 1.27 2008/01/23 17:35:20 tnn Exp $
+# $NetBSD: pthread.buildlink3.mk,v 1.28 2009/03/20 19:25:01 joerg Exp $
#
# The pthreads strategy for pkgsrc is to "bless" a particular pthread
# package as the Official Pthread Replacement (OPR). The following
@@ -113,9 +113,7 @@ PKG_FAIL_REASON= "${PKGNAME} requires a working pthreads implementation."
PTHREAD_AUTO_VARS?= no
.if ${PTHREAD_TYPE} == "native"
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Npthread}
-BUILDLINK_PACKAGES+= pthread
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}pthread
+BUILDLINK_TREE+= pthread -pthread
BUILDLINK_BUILTIN_MK.pthread= ../../mk/pthread.builtin.mk
BUILDLINK_AUTO_VARS.pthread?= ${PTHREAD_AUTO_VARS}
.elif ${PTHREAD_TYPE} == "${_PKG_PTHREAD}"
diff --git a/mk/resolv.buildlink3.mk b/mk/resolv.buildlink3.mk
index bb3db94ee8c..a8d9ff5d3f6 100644
--- a/mk/resolv.buildlink3.mk
+++ b/mk/resolv.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: resolv.buildlink3.mk,v 1.2 2009/01/20 21:30:41 adrianp Exp $
+# $NetBSD: resolv.buildlink3.mk,v 1.3 2009/03/20 19:25:01 joerg Exp $
#
# This Makefile fragment is included by package Makefiles and
# buildlink3.mk files for the packages that need a thread-safe
@@ -40,9 +40,7 @@ USE_BUILTIN.resolv?= no
.endif
.if !empty(USE_BUILTIN.resolv:M[yY][eE][sS])
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nresolv}
-BUILDLINK_PACKAGES+= resolv
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}resolv
+BUILDLINK_TREE+= resolv -resolv
BUILDLINK_AUTO_VARS.resolv= ${RESOLV_AUTO_VARS}
.else
. include "../../net/bind9/buildlink3.mk"
diff --git a/mk/termcap.buildlink3.mk b/mk/termcap.buildlink3.mk
index d0c9a34f3aa..e601704a0cd 100644
--- a/mk/termcap.buildlink3.mk
+++ b/mk/termcap.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: termcap.buildlink3.mk,v 1.6 2008/03/05 17:38:58 jlam Exp $
+# $NetBSD: termcap.buildlink3.mk,v 1.7 2009/03/20 19:25:01 joerg Exp $
#
# This Makefile fragment is meant to be included by packages that require
# a termcap implementation that supports the basic termcap functions:
@@ -56,9 +56,7 @@ PKG_FAIL_REASON= "No usable termcap library found on the system."
.elif (${TERMCAP_TYPE} == "termlib") || \
(${TERMCAP_TYPE} == "termcap") || \
(${TERMCAP_TYPE} == "tinfo")
-BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Ntermcap}
-BUILDLINK_PACKAGES+= termcap
-BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}termcap
+BUILDLINK_TREE+= termcap -termcap
BUILDLINK_LIBNAME.termcap?= ${BUILTIN_LIBNAME.termcap}
BUILDLINK_LDADD.termcap?= ${BUILDLINK_LIBNAME.termcap:S/^/-l/:S/^-l$//}
BUILDLINK_BUILTIN_MK.termcap= ../../mk/termcap.builtin.mk
diff --git a/mk/termcap.builtin.mk b/mk/termcap.builtin.mk
index 712afb00934..42c99c8bfaf 100644
--- a/mk/termcap.builtin.mk
+++ b/mk/termcap.builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: termcap.builtin.mk,v 1.5 2008/03/11 15:39:16 jlam Exp $
+# $NetBSD: termcap.builtin.mk,v 1.6 2009/03/20 19:25:01 joerg Exp $
BUILTIN_PKG:= termcap
@@ -95,7 +95,7 @@ BUILDLINK_LIBNAME.termcap= ${BUILTIN_LIBNAME.termcap}
# remove them as GNU configure scripts commonly check for one or both
# of those library options.
#
-. if empty(BUILDLINK_PACKAGES:Mcurses) && empty(BUILDLINK_PACKAGES:Mncurses)
+. if empty(BUILDLINK_TREE:Mcurses) && empty(BUILDLINK_TREE:Mncurses)
BUILDLINK_TRANSFORM+= rm:-lcurses
BUILDLINK_TRANSFORM+= rm:-lncurses
. endif