aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.port.mk
diff options
context:
space:
mode:
authorGerald Pfeifer <gerald@FreeBSD.org>2015-04-19 18:33:37 +0000
committerGerald Pfeifer <gerald@FreeBSD.org>2015-04-19 18:33:37 +0000
commit728fb3cb3d613262ea0c21d0a591cafca956fcb8 (patch)
treee7d80196608fc0f73a62c2c74a5d869ef4c57f45 /Mk/bsd.port.mk
parent1520eb31b87c75e1e554e0a698a3e229de7bcdf7 (diff)
downloadports-728fb3cb3d613262ea0c21d0a591cafca956fcb8.tar.gz
ports-728fb3cb3d613262ea0c21d0a591cafca956fcb8.zip
Abstract ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} which appears five times
and introduce and use WRKDIR_PKGFILE instead. PR: 199526 Approved by: portmgr (bdrewery)
Notes
Notes: svn path=/head/; revision=384312
Diffstat (limited to 'Mk/bsd.port.mk')
-rw-r--r--Mk/bsd.port.mk9
1 files changed, 5 insertions, 4 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index dbcb356a8423..28a16c56e845 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -2645,6 +2645,7 @@ PKGFILE?= ${PKGREPOSITORY}/${PKGNAME}${PKG_SUFX}
.else
PKGFILE?= ${.CURDIR}/${PKGNAME}${PKG_SUFX}
.endif
+WRKDIR_PKGFILE= ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX}
# The "latest version" link -- ${PKGNAME} minus everthing after the last '-'
PKGLATESTREPOSITORY?= ${PACKAGES}/Latest
@@ -3538,8 +3539,8 @@ do-package: ${TMPPLIST}
@${MKDIR} ${WRKDIR}/pkg
@if ${SETENV} ${PKG_ENV} FORCE_POST="${_FORCE_POST_PATTERNS}" ${PKG_CREATE} ${PKG_CREATE_ARGS} -f ${PKG_SUFX:S/.//} -o ${WRKDIR}/pkg ${PKGNAME}; then \
if [ -d ${PKGREPOSITORY} -a -w ${PKGREPOSITORY} ]; then \
- ${LN} -f ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} ${PKGFILE} 2>/dev/null \
- || ${CP} -f ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} ${PKGFILE}; \
+ ${LN} -f ${WRKDIR_PKGFILE} ${PKGFILE} 2>/dev/null \
+ || ${CP} -f ${WRKDIR_PKGFILE} ${PKGFILE}; \
if [ "${PKGORIGIN}" = "ports-mgmt/pkg" -o "${PKGORIGIN}" = "ports-mgmt/pkg-devel" ]; then \
if [ ! -d ${PKGLATESTREPOSITORY} ]; then \
if ! ${MKDIR} ${PKGLATESTREPOSITORY}; then \
@@ -3561,7 +3562,7 @@ do-package: ${TMPPLIST}
delete-package:
@${ECHO_MSG} "===> Deleting package for ${PKGNAME}"
# When staging, the package may only be in the workdir if not root
- @${RM} -f ${PKGFILE} ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} 2>/dev/null || :
+ @${RM} -f ${PKGFILE} ${WRKDIR_PKGFILE} 2>/dev/null || :
.endif
.if !target(delete-package-list)
@@ -3580,7 +3581,7 @@ _INSTALL_PKG_ARGS+= -A
.endif
install-package:
@if [ -f "${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX}" ]; then \
- _pkgfile="${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX}"; \
+ _pkgfile="${WRKDIR_PKGFILE}"; \
else \
_pkgfile="${PKGFILE}"; \
fi; \