aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2013-12-07 02:45:13 +0800
committerbdrewery <bdrewery@FreeBSD.org>2013-12-07 02:45:13 +0800
commitcc9d267e7fbebf68d356db7ba8209520044fd72e (patch)
treee440bde10e381117ad94359229434979d05c501e
parent05622910f04998715b2997f4ac4d95a82eeb6007 (diff)
downloadfreebsd-ports-gnome-cc9d267e7fbebf68d356db7ba8209520044fd72e.tar.gz
freebsd-ports-gnome-cc9d267e7fbebf68d356db7ba8209520044fd72e.tar.zst
freebsd-ports-gnome-cc9d267e7fbebf68d356db7ba8209520044fd72e.zip
- Fix 'make index' not working when PORTSDIR is a symlink to another directory
PR: ports/183431 Submitted by: Yasuhiro KIMURA <yasu@utahime.org> (based on)
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
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}; \