diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2014-10-08 06:06:34 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2014-10-08 06:06:34 +0000 |
commit | a8e8df12f46901d7a8d2354c66c97108d92cea24 (patch) | |
tree | 57462e1f0172cdca3fe751854ac13f7950f095e1 /Mk | |
parent | 856027ca8aaa5192fbaf9f91fc46433376aa8cef (diff) | |
download | freebsd-ports-a8e8df12f46901d7a8d2354c66c97108d92cea24.zip |
Use absolute path for PORTDATA PORTDOCS and PORTEXAMPLES
That makes them @cwd safe
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/bsd.port.mk | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 38cadb029174..1c0ce676c991 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -5164,56 +5164,42 @@ ${TMPPLIST_SORT}: ${TMPPLIST} .if !target(add-plist-docs) .if defined(PORTDOCS) && !defined(NOPORTDOCS) add-plist-docs: - @if ${EGREP} -qe '^@cw?d' ${TMPPLIST} && \ - [ "`${SED} -En -e '/^@cw?d[ ]*/s,,,p' ${TMPPLIST} | ${TAIL} -n 1`" != "${PREFIX}" ]; then \ - ${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST}; \ - fi .for x in ${PORTDOCS} @if ${ECHO_CMD} "${x}"| ${AWK} '$$1 ~ /(\*|\||\[|\]|\?|\{|\}|\$$)/ { exit 1};'; then \ if [ ! -e ${STAGEDIR}${DOCSDIR}/${x} ]; then \ - ${ECHO_CMD} ${DOCSDIR_REL}/${x} >> ${TMPPLIST}; \ + ${ECHO_CMD} ${DOCSDIR}/${x} >> ${TMPPLIST}; \ fi;fi .endfor @${FIND} -P ${PORTDOCS:S/^/${STAGEDIR}${DOCSDIR}\//} ! -type d 2>/dev/null | \ - ${SED} -ne 's,^${STAGEDIR}${PREFIX}/,,p' >> ${TMPPLIST} + ${SED} -ne 's,^${STAGEDIR},,p' >> ${TMPPLIST} .endif .endif .if !target(add-plist-examples) .if defined(PORTEXAMPLES) && !defined(NOPORTEXAMPLES) add-plist-examples: - @if ${EGREP} -qe '^@cw?d' ${TMPPLIST} && \ - [ "`${SED} -En -e '/^@cw?d[ ]*/s,,,p' ${TMPPLIST} | ${TAIL} -n 1`" != "${PREFIX}" ]; then \ - ${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST}; \ - fi .for x in ${PORTEXAMPLES} @if ${ECHO_CMD} "${x}"| ${AWK} '$$1 ~ /(\*|\||\[|\]|\?|\{|\}|\$$)/ { exit 1};'; then \ if [ ! -e ${STAGEDIR}${EXAMPLESDIR}/${x} ]; then \ - ${ECHO_CMD} ${EXAMPLESDIR}/${x} | \ - ${SED} -e 's,^${PREFIX}/,,' >> ${TMPPLIST}; \ + ${ECHO_CMD} ${EXAMPLESDIR}/${x} >> ${TMPPLIST}; \ fi;fi .endfor @${FIND} -P ${PORTEXAMPLES:S/^/${STAGEDIR}${EXAMPLESDIR}\//} ! -type d 2>/dev/null | \ - ${SED} -ne 's,^${STAGEDIR}${PREFIX}/,,p' >> ${TMPPLIST} + ${SED} -ne 's,^${STAGEDIR},,p' >> ${TMPPLIST} .endif .endif .if !target(add-plist-data) .if defined(PORTDATA) add-plist-data: - @if ${EGREP} -qe '^@cw?d' ${TMPPLIST} && \ - [ "`${SED} -En -e '/^@cw?d[ ]*/s,,,p' ${TMPPLIST} | ${TAIL} -n 1`" != "${PREFIX}" ]; then \ - ${ECHO_CMD} "@cwd ${PREFIX}" >> ${TMPPLIST}; \ - fi .for x in ${PORTDATA} @if ${ECHO_CMD} "${x}"| ${AWK} '$$1 ~ /(\*|\||\[|\]|\?|\{|\}|\$$)/ { exit 1};'; then \ if [ ! -e ${STAGEDIR}${DATADIR}/${x} ]; then \ - ${ECHO_CMD} ${DATADIR}/${x} | \ - ${SED} -e 's,^${PREFIX}/,,' >> ${TMPPLIST}; \ + ${ECHO_CMD} ${DATADIR}/${x} >> ${TMPPLIST}; \ fi;fi .endfor @${FIND} -P ${PORTDATA:S/^/${STAGEDIR}${DATADIR}\//} ! -type d 2>/dev/null | \ - ${SED} -ne 's,^${STAGEDIR}${PREFIX}/,,p' >> ${TMPPLIST} + ${SED} -ne 's,^${STAGEDIR},,p' >> ${TMPPLIST} .endif .endif |