aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.port.mk
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2007-06-16 19:07:42 +0000
committerPav Lucistnik <pav@FreeBSD.org>2007-06-16 19:07:42 +0000
commit0391f3691ad378e00af1dd0f547a5e7f6154bbd4 (patch)
tree9d6fb346a4d5662b66e934f916c84b6ce6302885 /Mk/bsd.port.mk
parent1ada4e152a95bd50e5f8f08ccf38f493058ace80 (diff)
downloadports-0391f3691ad378e00af1dd0f547a5e7f6154bbd4.tar.gz
ports-0391f3691ad378e00af1dd0f547a5e7f6154bbd4.zip
Notes
Diffstat (limited to 'Mk/bsd.port.mk')
-rw-r--r--Mk/bsd.port.mk48
1 files changed, 44 insertions, 4 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 0bbbcc5f204f..01afde5afad9 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -727,8 +727,16 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# - Show all directories which are build-dependencies
# for this port.
# package-depends-list
-# - Show all directories which are
-# package-dependencies for this port.
+# - Show all directories which are package-dependencies
+# for this port. This is based upon the dependency
+# tree as recorded in the Makefiles of the ports
+# collection, not as recorded in the currently
+# installed ports.
+# actual-package-depends-list
+# - Like package-depends-list but with the difference
+# that the dependencies of the currently installed
+# ports are used instead of the dependencies as
+# recorded in the ports collection.
# run-depends-list
# - Show all directories which are run-dependencies
# for this port.
@@ -2450,7 +2458,7 @@ PKGINSTALLVER!= ${CHROOT} ${DESTDIR} ${PKG_INFO} -P 2>/dev/null | ${SED} -e 's/.
DISABLE_CONFLICTS= YES
.endif
.if !defined(PKG_ARGS)
-PKG_ARGS= -v -c -${COMMENT:Q} -d ${DESCR} -f ${TMPPLIST} -p ${PREFIX} -P "`cd ${.CURDIR} && ${MAKE} package-depends | ${GREP} -v -E ${PKG_IGNORE_DEPENDS} | ${SORT} -u`" ${EXTRA_PKG_ARGS} $${_LATE_PKG_ARGS}
+PKG_ARGS= -v -c -${COMMENT:Q} -d ${DESCR} -f ${TMPPLIST} -p ${PREFIX} -P "`cd ${.CURDIR} && ${MAKE} actual-package-depends | ${GREP} -v -E ${PKG_IGNORE_DEPENDS} | ${SORT} -u`" ${EXTRA_PKG_ARGS} $${_LATE_PKG_ARGS}
.if !defined(NO_MTREE)
PKG_ARGS+= -m ${MTREE_FILE}
.endif
@@ -5365,16 +5373,48 @@ PACKAGE-DEPENDS-LIST?= \
shift 3; \
done; \
checked="$$dir $$childdir $$checked"; \
- else \\
+ else \
${ECHO_MSG} "${PKGNAME}: \"$$dir\" non-existent -- dependency list incomplete" >&2; \
fi; \
done
+ACTUAL-PACKAGE-DEPENDS?= \
+ if [ "${_LIB_RUN_DEPENDS}" != " " ]; then \
+ for pkgname in ${PKG_DBDIR}/*; do \
+ if [ -e $$pkgname/+CONTENTS ]; then \
+ a=$${pkgname\#\#*/}; \
+ b=`${SED} -n -e "s/@comment ORIGIN://p" $$pkgname/+CONTENTS`; \
+ if [ ! -z $$b ]; then \
+ origins="$$origins $$a $$b"; \
+ fi; \
+ fi; \
+ done; \
+ for dir in ${_LIB_RUN_DEPENDS:C,[^:]*:([^:]*):?.*,\1,}; do \
+ tmp=$${dir%/*}; \
+ dir=$${tmp\#\#*/}/$${dir\#\#*/}; \
+ set -- $$origins; \
+ while [ $$\# != 0 ]; do \
+ if [ $$dir = $$2 ]; then \
+ ${ECHO_CMD} $$1:$$dir; \
+ if [ -e ${PKG_DBDIR}/$$1/+CONTENTS ]; then \
+ packagelist="$$packagelist ${PKG_DBDIR}/$$1/+CONTENTS"; \
+ fi; \
+ break; \
+ fi; \
+ shift 2; \
+ done; \
+ done; \
+ [ -z "$$packagelist" ] || ${AWK} -F '( |:)' 'BEGIN { pkgname="broken_contents" } /@pkgdep / { pkgname=$$2 } /@comment DEPORIGIN:/ { printf "%s:%s\n", pkgname, $$3; pkgname="broken_contents" }' $$packagelist; \
+ fi
+
# Print out package names.
package-depends:
@${PACKAGE-DEPENDS-LIST} | ${AWK} '{print $$1":"$$3}'
+actual-package-depends:
+ @${ACTUAL-PACKAGE-DEPENDS}
+
# Build packages for port and dependencies
package-recursive: package