aboutsummaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2012-01-15 22:13:42 +0000
committerPav Lucistnik <pav@FreeBSD.org>2012-01-15 22:13:42 +0000
commit5a084f845158482ab0c458047faa51679a1b1e1b (patch)
tree1ac086e33b99ef7d74eb65c21dd675c3251bb862 /Mk
parent0b0062c77a17ca29a77a730b82077e130785d59f (diff)
downloadports-5a084f845158482ab0c458047faa51679a1b1e1b.tar.gz
ports-5a084f845158482ab0c458047faa51679a1b1e1b.zip
Notes
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk8
1 files changed, 6 insertions, 2 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 8a4393389ee2..241cf589fa19 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -2398,6 +2398,7 @@ PKGREQ?= ${PKGDIR}/pkg-req
PKGMESSAGE?= ${PKGDIR}/pkg-message
TMPPLIST?= ${WRKDIR}/.PLIST.mktmp
+TMPPLIST_SORT?= ${WRKDIR}/.PLIST.mktmp.sorted
TMPGUCMD?= ${WRKDIR}/.PLIST.gucmd
.for _CATEGORY in ${CATEGORIES}
@@ -3952,7 +3953,7 @@ delete-package-list: delete-package-links-list
# Utility targets follow
.if !target(check-already-installed)
-check-already-installed:
+check-already-installed: ${TMPPLIST_SORT}
.if !defined(NO_PKG_REGISTER) && !defined(FORCE_PKG_REGISTER)
@${ECHO_MSG} "===> Checking if ${PKGORIGIN} already installed"; \
${MKDIR} ${PKG_DBDIR}; \
@@ -3961,7 +3962,7 @@ check-already-installed:
for p in $${already_installed}; do \
prfx=`${PKG_INFO} -q -p $${p} 2> /dev/null | ${SED} -ne '1s|^@cwd ||p'`; \
if [ "x${PREFIX}" = "x$${prfx}" ]; then \
- df=`${PKG_INFO} -q -f $${p} 2> /dev/null | ${GREP} -v "^@" | ${COMM} -12 - ${TMPPLIST}`; \
+ df=`${PKG_INFO} -q -f $${p} 2> /dev/null | ${GREP} -v "^@" | ${SORT} -u | ${COMM} -12 - ${TMPPLIST_SORT}`; \
if [ -n "$${df}" ]; then \
found_package=$${p}; \
break; \
@@ -5683,6 +5684,9 @@ generate-plist:
${TMPPLIST}:
@cd ${.CURDIR} && ${MAKE} generate-plist
+${TMPPLIST_SORT}: ${TMPPLIST}
+ @${SORT} -u ${TMPPLIST} >${TMPPLIST_SORT}
+
.if !target(add-plist-docs)
add-plist-docs:
.if defined(PORTDOCS) && !defined(NOPORTDOCS)