From owner-svn-doc-all@freebsd.org Thu Jun 7 07:58:23 2018 Return-Path: Delivered-To: svn-doc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99BA2FD444E; Thu, 7 Jun 2018 07:58:23 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4763883FA8; Thu, 7 Jun 2018 07:58:23 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 287CF1D609; Thu, 7 Jun 2018 07:58:23 +0000 (UTC) (envelope-from tobik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w577wNa1067064; Thu, 7 Jun 2018 07:58:23 GMT (envelope-from tobik@FreeBSD.org) Received: (from tobik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w577wMsm067062; Thu, 7 Jun 2018 07:58:22 GMT (envelope-from tobik@FreeBSD.org) Message-Id: <201806070758.w577wMsm067062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tobik set sender to tobik@FreeBSD.org using -f From: Tobias Kortkamp Date: Thu, 7 Jun 2018 07:58:22 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r51790 - in head/en_US.ISO8859-1/books/porters-handbook: makefiles slow-porting X-SVN-Group: doc-head X-SVN-Commit-Author: tobik X-SVN-Commit-Paths: in head/en_US.ISO8859-1/books/porters-handbook: makefiles slow-porting X-SVN-Commit-Revision: 51790 X-SVN-Commit-Repository: doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2018 07:58:23 -0000 Author: tobik (ports committer) Date: Thu Jun 7 07:58:22 2018 New Revision: 51790 URL: https://svnweb.freebsd.org/changeset/doc/51790 Log: Document BINARY_ALIAS in the Porter's Handbook Approved by: mat Differential Revision: https://reviews.freebsd.org/D15666 Modified: head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml head/en_US.ISO8859-1/books/porters-handbook/slow-porting/chapter.xml Modified: head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml Thu Jun 7 03:38:30 2018 (r51789) +++ head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml Thu Jun 7 07:58:22 2018 (r51790) @@ -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. + + Modified: head/en_US.ISO8859-1/books/porters-handbook/slow-porting/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/porters-handbook/slow-porting/chapter.xml Thu Jun 7 03:38:30 2018 (r51789) +++ head/en_US.ISO8859-1/books/porters-handbook/slow-porting/chapter.xml Thu Jun 7 07:58:22 2018 (r51790) @@ -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