summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam>2004-02-05 06:58:02 +0000
committerjlam <jlam>2004-02-05 06:58:02 +0000
commitad185523f430ecfb1f9cda5ecad38a4a4683beef (patch)
tree435c664e6b88ad088b762f222d98f5c10bace96c /mk
parentc4fe63520c69f883783438f145675ea1c389c5e8 (diff)
downloadpkgsrc-ad185523f430ecfb1f9cda5ecad38a4a4683beef.tar.gz
Support a new global variable:
BUILDLINK_PREFER_PKGSRC This variable determines whether or not to prefer the pkgsrc versions of software that is also present in the base system. This variable is multi-state: defined, or "yes" always prefer the pkgsrc versions not defined, or "no" only use the pkgsrc versions if needed by dependency requirements This can also take a list of packages for which to prefer the pkgsrc-installed software. The package names may be found by consulting the value added to BUILDLINK_PACKAGES in the buildlink[23].mk files for that package.
Diffstat (limited to 'mk')
-rw-r--r--mk/buildlink3/bsd.buildlink3.mk12
1 files changed, 11 insertions, 1 deletions
diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk
index 7934eb34b38..d305874a427 100644
--- a/mk/buildlink3/bsd.buildlink3.mk
+++ b/mk/buildlink3/bsd.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink3.mk,v 1.72 2004/02/05 00:00:05 jlam Exp $
+# $NetBSD: bsd.buildlink3.mk,v 1.73 2004/02/05 06:58:03 jlam Exp $
#
# An example package buildlink3.mk file:
#
@@ -202,6 +202,16 @@ BUILDLINK_USE_BUILTIN.${_pkg_}?= yes
BUILDLINK_USE_BUILTIN.${_pkg_}?= no
. endif
#
+# If we prefer the pkgsrc version, then don't user the built-in package.
+#
+.if defined(BUILDLINK_PREFER_PKGSRC)
+. if empty(BUILDLINK_PREFER_PKGSRC) || \
+ !empty(BUILDLINK_PREFER_PKGSRC:M[yY][eE][sS]) || \
+ !empty(BUILDLINK_PREFER_PKGSRC:M${_pkg_})
+BUILDLINK_USE_BUILTIN.${_pkg_}?= no
+. endif
+.endif
+#
# If we're using the built-in package, then provide sensible defaults.
#
. if !empty(BUILDLINK_USE_BUILTIN.${_pkg_}:M[yY][eE][sS])