summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Mk/bsd.port.mk5
1 files changed, 3 insertions, 2 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 5a270b3c8922..8d9a1c949210 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -605,7 +605,7 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# for this port.
# install-missing-packages
# - Install missing dependencies from package and mark
-# them as automatically installed
+# them as automatically installed.
# extract - Unpacks ${DISTFILES} into ${WRKDIR}.
# patch - Apply any provided patches to the source.
# configure - Runs either GNU configure, one or more local configure
@@ -4332,7 +4332,8 @@ missing-packages:
# Install missing dependencies from package
install-missing-packages:
@_dirs=$$(${MISSING-DEPENDS-LIST}); \
- ${PKG_BIN} install -A $$(${ECHO} $${_dirs} | ${SED} "s%${PORTSDIR}/%%g")
+ [ -z "$${_dirs}" ] || \
+ ${SU_CMD} "${PKG_BIN} install -A $$(${ECHO} $${_dirs} | ${SED} "s%${PORTSDIR}/%%g")"
################################################################
# Everything after here are internal targets and really