summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorhubertf <hubertf@pkgsrc.org>2000-01-10 19:17:27 +0000
committerhubertf <hubertf@pkgsrc.org>2000-01-10 19:17:27 +0000
commit7b45a0cbffe7d9c47035a97b9abf996bdb3cab23 (patch)
treedba79dea28e2a591531b8620ff6755d7e1e7f715 /mk
parent3bbeeaa44078b997ca844bc550c40334fdaf6b8e (diff)
downloadpkgsrc-7b45a0cbffe7d9c47035a97b9abf996bdb3cab23.tar.gz
Split print-pkg-depend-sizes into two pkgs, to work make processing of
$DEPENDS with wildcards and relational depends possible. (The previous solution with :Q was not useful as this also quoted the seperator between the single depends, making the DEPENDS useless).
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk31
1 files changed, 17 insertions, 14 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 9dfa16178e4..fee1f8d9874 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.385 2000/01/10 15:42:57 hubertf Exp $
+# $NetBSD: bsd.pkg.mk,v 1.386 2000/01/10 19:17:27 hubertf Exp $
#
# This file is in the public domain.
#
@@ -2453,19 +2453,9 @@ print-pkg-size:
-e '/^\//p' \
<${PLIST} ; \
${SHCOMMENT} "Any depending pkgs' files" ; \
- if [ "${SIZEDEPENDS}" != "" ]; then \
- for p in ${DEPENDS:C/:.*//:Q} "" ; do \
- if [ "X$$p" = "X" ]; then continue; fi; \
- ${SHCOMMENT} direct depends ; \
- pkg_info -qL "$$p" ; \
- ${SHCOMMENT} "depends of depends (XXX complete!)"; \
- dps=`pkg_info -qf "$$p" | grep '@pkgdep' | awk '{ print $$2; }'` ; \
- for dp in $$dps "" ; do \
- if [ "X$$dp" = "X" ]; then continue; fi;\
- pkg_info -qL "$$dp" ; \
- done ; \
- done ; \
- fi ; \
+ if [ "${SIZEDEPENDS}" != "" ]; then \
+ ${MAKE} print-pkg-depend-sizes ; \
+ fi ; \
) \
| sort -u \
| xargs ls -ld \
@@ -2473,6 +2463,19 @@ print-pkg-size:
{ sum+=$$5; } \
END { print sum; }'
+# Find sizes of required pkgs
+print-pkg-depend-sizes:
+.for dep in ${DEPENDS}
+ @p="`${ECHO} \"${dep}\" | ${SED} -e 's/:.*//'`"; \
+ ${SHCOMMENT} direct depends ; \
+ ${PKG_INFO} -qL "$$p" ; \
+ ${SHCOMMENT} "depends of depends (XXX complete!)"; \
+ dps=`${PKG_INFO} -qf "$$p" | grep '@pkgdep' | awk '{ print $$2; }'` ; \
+ for dp in $$dps ; do \
+ ${PKG_INFO} -qL "$$dp" ; \
+ done
+.endfor
+
# Fake installation of package so that user can pkg_delete it later.
# Also, make sure that an installed package is recognized correctly in