diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2013-12-07 02:45:13 +0800 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2013-12-07 02:45:13 +0800 |
commit | cc9d267e7fbebf68d356db7ba8209520044fd72e (patch) | |
tree | e440bde10e381117ad94359229434979d05c501e | |
parent | 05622910f04998715b2997f4ac4d95a82eeb6007 (diff) | |
download | freebsd-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-- | Makefile | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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}; \ |