Index: en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml =================================================================== --- en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml +++ en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml @@ -7581,14 +7581,11 @@ OPTIONS_DEFINE= OPT1 -post-patch: - @${REINPLACE_CMD} -e 's/echo/true/' ${WRKSRC}/Makefile - post-patch-OPT1-on: - @${REINPLACE_CMD} -e '/opt1/d' ${WRKSRC}/Makefile + @${REINPLACE_CMD} -e '/opt1/s|/usr/bin/|${EXAMPLESDIR}/|' ${WRKSRC}/Makefile post-patch-OPT1-off: - @${REINPLACE_CMD} -e '/opt1/s|/usr/bin/|${LOCALBASE}/bin/|' ${WRKSRC}/Makefile + @${REINPLACE_CMD} -e '/opt1/s|/usr/bin/|${PREFIX}/bin/|' ${WRKSRC}/Makefile is equivalent to: @@ -7597,11 +7594,10 @@ .include <bsd.port.options.mk> post-patch: - @${REINPLACE_CMD} -e 's/echo/true/' ${WRKSRC}/Makefile .if ${PORT_OPTIONS:MOPT1} - @${REINPLACE_CMD} -e '/opt1/d' ${WRKSRC}/Makefile + @${REINPLACE_CMD} -e '/opt1/s|/usr/bin/|${EXAMPLESDIR}/|' ${WRKSRC}/Makefile .else - @${REINPLACE_CMD} -e '/opt1/s|/usr/bin/|${LOCALBASE}/bin/|' ${WRKSRC}/Makefile + @${REINPLACE_CMD} -e '/opt1/s|/usr/bin/|${PREFIX}/bin/|' ${WRKSRC}/Makefile .endif Index: en_US.ISO8859-1/books/porters-handbook/slow-porting/chapter.xml =================================================================== --- en_US.ISO8859-1/books/porters-handbook/slow-porting/chapter.xml +++ en_US.ISO8859-1/books/porters-handbook/slow-porting/chapter.xml @@ -415,7 +415,13 @@ variable: post-patch: - @${REINPLACE_CMD} -e 's|for Linux|for FreeBSD|g' ${WRKSRC}/README + @${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' ${WRKSRC}/Makefile + + + Only use &man.sed.1; to replace variable content. Do + not use it to replace static content, use patch files for + that. + Quite often, software being ported uses the CR/LF convention in source files. This may cause problems with