From cc9d267e7fbebf68d356db7ba8209520044fd72e Mon Sep 17 00:00:00 2001 From: bdrewery Date: Fri, 6 Dec 2013 18:45:13 +0000 Subject: - Fix 'make index' not working when PORTSDIR is a symlink to another directory PR: ports/183431 Submitted by: Yasuhiro KIMURA (based on) --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 82a6cb9b37da..34977ee79625 100644 --- a/Makefile +++ b/Makefile @@ -141,10 +141,13 @@ ${INDEXDIR}/${INDEXFILE}: echo; \ fi; \ exit 1); \ - cat $${tmpdir}/${INDEXFILE}.desc.* | (cd ${.CURDIR} ; ${MAKE_INDEX}) | \ + cat $${tmpdir}/${INDEXFILE}.desc.* | \ + sed -e 's|${.CURDIR}|${PORTSDIR}|g' | \ + (cd ${.CURDIR} ; ${MAKE_INDEX}) | \ sed -e 's/ */ /g' -e 's/| */|/g' -e 's/ *|/|/g' -e 's./..g' | \ sort -t '|' +1 -2 | \ sed -Ee 's../.g' -e ':a' -e 's|/[^/]+/\.\.||; ta' \ + -e 's|${PORTSDIR}|/usr/ports|g' \ -e 's|${.CURDIR}|/usr/ports|g' > ${INDEXDIR}/${INDEXFILE}.tmp; \ if [ "${INDEX_PRISTINE}" != "" ]; then \ sed -e "s,$${LOCALBASE},/usr/local," ${INDEXDIR}/${INDEXFILE}.tmp > ${INDEXDIR}/${INDEXFILE}; \ -- cgit