aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2014-04-17 06:17:41 +0800
committerbdrewery <bdrewery@FreeBSD.org>2014-04-17 06:17:41 +0800
commit954ddce1f813292197baae6444f1eb8b78e6892e (patch)
tree738633b9576ee4d424408c22bb7b64095a761749 /Mk
parentcce0afd15db455be9abeb2a3c28fd6bde3fd5939 (diff)
downloadfreebsd-ports-graphics-954ddce1f813292197baae6444f1eb8b78e6892e.tar.gz
freebsd-ports-graphics-954ddce1f813292197baae6444f1eb8b78e6892e.tar.zst
freebsd-ports-graphics-954ddce1f813292197baae6444f1eb8b78e6892e.zip
- During 'make package' create PREFIX if not there to workaround a pkg_install
bug [1] requiring it to be even if creating from STAGEDIR. This is only done when NO_STAGE is not set and for pkg_install. This fixes the following error with 'make package' from stagedir: pkg_create: couldn't resolve path for prefix: /var/qmail: No such file or directory [1] This is due to base r231300 requiring the prefix to exist when running pkg_create (which may not be true in staging). This was fixed in r240682, but never made it to 9.1 With hat: portmgr
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 3709d7d06a0..a38f803c4e3 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -3823,13 +3823,19 @@ do-package: ${TMPPLIST}
_LATE_PKG_ARGS="$${_LATE_PKG_ARGS} -D ${PKGMESSAGE}"; \
fi; \
${MKDIR} ${WRKDIR}/pkg; \
+ if ! [ -d "${PREFIX}" ]; then \
+ made_prefix=1; \
+ ${MKDIR} ${PREFIX}; \
+ fi; \
if ${PKG_CMD} -S ${STAGEDIR} ${PKG_ARGS} ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX}; then \
+ [ -n "$${made_prefix}" ] && ${RMDIR} ${PREFIX}; \
if [ -d ${PKGREPOSITORY} -a -w ${PKGREPOSITORY} ]; then \
${LN} -f ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} ${PKGFILE} 2>/dev/null || \
${CP} -af ${WRKDIR}/pkg/${PKGNAME}${PKG_SUFX} ${PKGFILE}; \
cd ${.CURDIR} && eval ${MAKE} package-links; \
fi; \
else \
+ [ -n "$${made_prefix}" ] && ${RMDIR} ${PREFIX}; \
cd ${.CURDIR} && eval ${MAKE} delete-package; \
exit 1; \
fi