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 @@ -8104,4 +8104,54 @@ files. + + + Use <varname>BINARY_ALIAS</varname> to Rename Commands + Instead of Patching the Build + + When BINARY_ALIAS is defined it will + create symlinks of the given commands in a directory which + will be prepended to PATH. + + Use it to substitute hardcoded commands the build phase + relies on without having to patch any build files. + + + Using <varname>BINARY_ALIAS</varname> to Make + <command>gsed</command> Available as + <command>sed</command> + + Some ports expect sed to behave like + GNU sed and use features that + &man.sed.1; does not provide. + GNU sed is available from + textproc/gsed on &os;. + + Use BINARY_ALIAS to substitute + sed with gsed + for the duration of the build: + + BUILD_DEPENDS= gsed:textproc/gsed +... +BINARY_ALIAS= sed=gsed + + + + Using <varname>BINARY_ALIAS</varname> to Provide Aliases + for Hardcoded <command>python3</command> Commands + + A port that has a hardcoded reference to + python3 in its build scripts will need + to have it available in PATH at build + time. Use BINARY_ALIAS to create an alias + that points to the right Python 3 binary: + + USES= python:3.4+,build +... +BINARY_ALIAS= python3=${PYTHON_CMD} + + See for more information + about USES=python. + + 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 @@ -270,6 +270,13 @@ generate updated patch files in the files directory. + + Use BINARY_ALIAS to substitute + hardcoded commands during the build and avoid patching + build files. See for + more information. + + General Rules for Patching