From 721ccf08e310392ea6f77538a6ce3aef76a57719 Mon Sep 17 00:00:00 2001 From: Tobias Kortkamp Date: Thu, 7 Jun 2018 07:58:22 +0000 Subject: [PATCH] Document BINARY_ALIAS in the Porter's Handbook Approved by: mat Differential Revision: https://reviews.freebsd.org/D15666 --- .../porters-handbook/makefiles/chapter.xml | 50 +++++++++++++++++++ .../porters-handbook/slow-porting/chapter.xml | 7 +++ 2 files changed, 57 insertions(+) diff --git a/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml b/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml index 41692bcaea..c9c32dc4e7 100644 --- a/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml +++ b/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml @@ -8104,4 +8104,54 @@ bind910 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. + + diff --git a/en_US.ISO8859-1/books/porters-handbook/slow-porting/chapter.xml b/en_US.ISO8859-1/books/porters-handbook/slow-porting/chapter.xml index 16101f0cc7..f63044e460 100644 --- a/en_US.ISO8859-1/books/porters-handbook/slow-porting/chapter.xml +++ b/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