summaryrefslogtreecommitdiff
path: root/mk/buildlink3
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-10-05 15:28:50 +0000
committerjlam <jlam@pkgsrc.org>2004-10-05 15:28:50 +0000
commit9fd8b786cac3400ed9bfa4c73efcd273bc1ff90c (patch)
tree9fea6f31815eb90e2a42982641326268dac7a7a3 /mk/buildlink3
parentfa2c8e20e825cb437911704b6008867d28d57f25 (diff)
downloadpkgsrc-9fd8b786cac3400ed9bfa4c73efcd273bc1ff90c.tar.gz
Move the "dependency reduction" code from buildlink3 to bsd.pkg.mk so
that all of pkgsrc can benefit from removing redundant dependencies. The code is encapsulated in a new file reduce-depends.mk which is included by bsd.pkg.mk after all dependencies have been specified.
Diffstat (limited to 'mk/buildlink3')
-rw-r--r--mk/buildlink3/bsd.buildlink3.mk57
1 files changed, 2 insertions, 55 deletions
diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk
index 48f01b5ab63..a4804e2c1e1 100644
--- a/mk/buildlink3/bsd.buildlink3.mk
+++ b/mk/buildlink3/bsd.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink3.mk,v 1.158 2004/10/04 17:57:08 jlam Exp $
+# $NetBSD: bsd.buildlink3.mk,v 1.159 2004/10/05 15:28:50 jlam Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -212,60 +212,7 @@ _BLNK_RECMETHOD.${_pkg_}= _BLNK_ADD_TO.BUILD_DEPENDS
. endif
. if defined(BUILDLINK_DEPENDS.${_pkg_}) && \
defined(BUILDLINK_PKGSRCDIR.${_pkg_})
-#
-# BEGIN dependency reduction
-#
-# This next block of code sets _BLNK_DEPENDS.<pkg> to the strictest set of
-# dependencies it can derive from ${BUILDLINK_DEPENDS.<pkg>}. It only
-# understands dependencies of the form foo>=1.0, and leaves the other
-# dependencies undisturbed.
-#
-# The algorithm takes dependencies of the form foo>=1.0 and converts them
-# to foo-1.0. It then compares this pkg name against each dependency to
-# see if it satisfies them all. The key fact is the the strictest
-# dependency, when converted to a pkg name, will satisfy every dependency.
-#
-_BLNK_DEPENDS.${_pkg_}= # empty
-_BLNK_GE_DEPENDS.${_pkg_}= ${BUILDLINK_DEPENDS.${_pkg_}:N*\{*:M*>=[0-9]*}
-_BLNK_STRICTEST_DEPENDS.${_pkg_}?= none
-. for _depend_ in ${_BLNK_GE_DEPENDS.${_pkg_}}
-. for _dep2pkg_ in ${_depend_:S/>=/-/}
-. if ${_BLNK_STRICTEST_DEPENDS.${_pkg_}} == "none"
-_BLNK_PKG_SATISFIES_DEP.${_pkg_}= YES
-. for _dep_ in ${_BLNK_GE_DEPENDS.${_pkg_}}
-. if !empty(_BLNK_PKG_SATISFIES_DEP.${_pkg_}:M[yY][eE][sS])
-_BLNK_PKG_SATISFIES_DEP.${_pkg_}!= \
- if ${PKG_ADMIN} pmatch '${_dep_}' ${_dep2pkg_}; then \
- ${ECHO} "YES"; \
- else \
- ${ECHO} "NO"; \
- fi
-. endif
-. endfor
-. if !empty(_BLNK_PKG_SATISFIES_DEP.${_pkg_}:M[yY][eE][sS])
-_BLNK_STRICTEST_DEPENDS.${_pkg_}= ${_depend_}
-. endif
-. endif
-. endfor
-. endfor
-. if ${_BLNK_STRICTEST_DEPENDS.${_pkg_}} == "none"
-#
-# If the dependencies simply conflict, then pass them on through to the
-# normal dependency handling code.
-#
-_BLNK_DEPENDS.${_pkg_}+= ${BUILDLINK_DEPENDS.${_pkg_}}
-. else
-. for _depend_ in ${BUILDLINK_DEPENDS.${_pkg_}}
-. if empty(_BLNK_GE_DEPENDS.${_pkg_}:M${_depend_})
-_BLNK_DEPENDS.${_pkg_}+= ${_depend_}
-. endif
-. endfor
-_BLNK_DEPENDS.${_pkg_}+= ${_BLNK_STRICTEST_DEPENDS.${_pkg_}}
-. endif
-#
-# END dependency reduction
-#
-. for _depend_ in ${_BLNK_DEPENDS.${_pkg_}}
+. for _depend_ in ${BUILDLINK_DEPENDS.${_pkg_}}
. if empty(${_BLNK_DEPMETHOD.${_pkg_}}:M${_depend_}\:*)
${_BLNK_DEPMETHOD.${_pkg_}}+= ${_depend_}:${BUILDLINK_PKGSRCDIR.${_pkg_}}
. endif