diff options
author | mat <mat@FreeBSD.org> | 2016-08-17 16:54:43 +0800 |
---|---|---|
committer | mat <mat@FreeBSD.org> | 2016-08-17 16:54:43 +0800 |
commit | 94b99c2a6c4ddaf29467df2adfb83f86ca60629e (patch) | |
tree | 90c0fdc1dcd45b974066460eff4c656da09b5a06 /Mk | |
parent | d26f8aa3a4dc8d8709e54694655fe38982854e77 (diff) | |
download | freebsd-ports-gnome-94b99c2a6c4ddaf29467df2adfb83f86ca60629e.tar.gz freebsd-ports-gnome-94b99c2a6c4ddaf29467df2adfb83f86ca60629e.tar.zst freebsd-ports-gnome-94b99c2a6c4ddaf29467df2adfb83f86ca60629e.zip |
Unbreak make missing.
Sponsored by: Absolight
Differential Revision: https://reviews.freebsd.org/D7504
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/Scripts/depends-list.sh | 18 | ||||
-rw-r--r-- | Mk/bsd.port.mk | 10 |
2 files changed, 21 insertions, 7 deletions
diff --git a/Mk/Scripts/depends-list.sh b/Mk/Scripts/depends-list.sh index d2f26f1583e0..ebda54c674e1 100644 --- a/Mk/Scripts/depends-list.sh +++ b/Mk/Scripts/depends-list.sh @@ -7,9 +7,14 @@ set -e . ${dp_SCRIPTSDIR}/functions.sh recursive=0 +missing=0 requires_wrkdir=0 -while getopts "rw" FLAG; do +while getopts "mrw" FLAG; do case "${FLAG}" in + m) + missing=1 + recursive=1 + ;; r) recursive=1 ;; @@ -38,6 +43,10 @@ fi set -u +if [ ${missing} -eq 1 ]; then + existing=$(${dp_PKG_INFO} -aoq|paste -d ' ' -s -) +fi + check_dep() { local _dep wrkdir show_dep @@ -62,6 +71,13 @@ check_dep() { continue fi + # If only looking for missign, show if missing + if [ ${missing} -eq 1 ]; then + case " ${existing} " in + *\ ${d#${PORTSDIR}/}\ *) continue ;; # We have it, nothing to see + esac + fi + # Grab any needed vars from the port. if [ ${requires_wrkdir} -eq 1 -a ${recursive} -eq 1 ]; then diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index f3c43dc4a6c9..57a555e395d0 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -4007,10 +4007,12 @@ DEPENDS-LIST= \ PORTSDIR="${PORTSDIR}" \ dp_MAKE="${MAKE}" \ dp_PKGNAME="${PKGNAME}" \ + dp_PKG_INFO="${PKG_INFO}" \ dp_SCRIPTSDIR="${SCRIPTSDIR}" \ ${SH} ${SCRIPTSDIR}/depends-list.sh ALL-DEPENDS-LIST= ${DEPENDS-LIST} -r ${_UNIFIED_DEPENDS:Q} +MISSING-DEPENDS-LIST= ${DEPENDS-LIST} -m ${_UNIFIED_DEPENDS:Q} TEST-DEPENDS-LIST= ${DEPENDS-LIST} ${TEST_DEPENDS:Q} CLEAN-DEPENDS-LIST= ${DEPENDS-LIST} -wr ${_UNIFIED_DEPENDS:Q} CLEAN-DEPENDS-LIMITED-LIST= ${DEPENDS-LIST} -w ${_UNIFIED_DEPENDS:Q} @@ -4290,12 +4292,8 @@ package-recursive: package # Show missing dependencies missing: - @_origins=$$(${PKG_INFO} -aoq); \ - for dir in $$(${ALL-DEPENDS-LIST}); do \ - _origin=$${dir##${PORTSDIR}/}; \ - if ! $$(${ECHO_CMD} $${_origins} | ${GREP} -q $${_origin}); then \ - ${ECHO_CMD} $${_origin}; \ - fi; \ + @for dir in $$(${MISSING-DEPENDS-LIST}); do \ + echo $${dir#${PORTSDIR}/}; \ done # Show missing dependencies by name |