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 @@ -3058,7 +3058,7 @@ For example, RUN_DEPENDS= ${LOCALBASE}/news/bin/innd:${PORTSDIR}/news/inn \ -xmlcatmgr:${PORTSDIR}/textproc/xmlcatmgr + xmlcatmgr:${PORTSDIR}/textproc/xmlcatmgr will check if the file or directory /usr/local/news/bin/innd exists, and @@ -3414,9 +3414,9 @@ .include <bsd.port.pre.mk> - .if exists(${LOCALBASE}/bin/foo) - LIB_DEPENDS= libbar.so:${PORTSDIR}/foo/bar - .endif +.if exists(${LOCALBASE}/bin/foo) +LIB_DEPENDS= libbar.so:${PORTSDIR}/foo/bar +.endif The problem with trying to automatically add dependencies @@ -3513,10 +3513,11 @@ # default RESOLUTION?= 300 .if ${RESOLUTION} != 118 && ${RESOLUTION} != 240 && \ -${RESOLUTION} != 300 && ${RESOLUTION} != 400 -@${ECHO_MSG} "Error: invalid value for RESOLUTION: \"${RESOLUTION}\"" -@${ECHO_MSG} "Possible values are: 118, 240, 300 (default) and 400." -@${FALSE} + ${RESOLUTION} != 300 && ${RESOLUTION} != 400 +pre-everything:: + @${ECHO_MSG} "Error: invalid value for RESOLUTION: \"${RESOLUTION}\"" + @${ECHO_MSG} "Possible values are: 118, 240, 300 (default) and 400." + @${FALSE} .endif japanese/xdvi300 also has all @@ -3884,9 +3885,11 @@ Malformed conditional, an alternative syntax can be used. - .if !empty(VARIABLE:MVALUE) -# as an alternative to -.if ${VARIABLE:MVALUE} + .if !empty(VARIABLE:MVALUE) + + as an alternative to + + .if ${VARIABLE:MVALUE} @@ -4687,14 +4690,14 @@ example: post-install: - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/xdl + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/xdl When multiple files need to be stripped: post-install: - .for l in geometry media body track world - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}-${l}.so.0 - .endfor +.for l in geometry media body track world + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/lib${PORTNAME}-${l}.so.0 +.endfor Use &man.file.1; on a file to determine if it has been stripped. Binaries are reported by &man.file.1; as 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 @@ -408,7 +408,7 @@ variable: post-patch: - @${REINPLACE_CMD} -e 's|for Linux|for FreeBSD|g' ${WRKSRC}/README + @${REINPLACE_CMD} -e 's|for Linux|for FreeBSD|g' ${WRKSRC}/README Quite often, software being ported uses the CR/LF convention in source files. This may cause problems with Index: en_US.ISO8859-1/books/porters-handbook/special/chapter.xml =================================================================== --- en_US.ISO8859-1/books/porters-handbook/special/chapter.xml +++ en_US.ISO8859-1/books/porters-handbook/special/chapter.xml @@ -1772,11 +1772,11 @@ This snippet demonstrates the use of qmake for a Qt 4 port: - USES= qmake:outsource + USES= qmake:outsource USE_QT4= moc_build For a Qt 5 port: - USES= qmake:outsource + USES= qmake:outsource USE_QT5= buildtools_build @@ -1795,8 +1795,8 @@ include and library search paths via the command line, use: - QMAKE_ARGS+= INCLUDEPATH+=${LOCALBASE}/include \ - LIBS+=-L${LOCALBASE}/lib + QMAKE_ARGS+= INCLUDEPATH+=${LOCALBASE}/include \ + LIBS+=-L${LOCALBASE}/lib