From owner-svn-doc-all@freebsd.org Thu Jun 20 14:36:13 2019 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 CF33915BD92E; Thu, 20 Jun 2019 14:36:12 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 765088414E; Thu, 20 Jun 2019 14:36:12 +0000 (UTC) (envelope-from mat@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 3AAD7D579; Thu, 20 Jun 2019 14:36:12 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x5KEaCPf021583; Thu, 20 Jun 2019 14:36:12 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x5KEaBa0021580; Thu, 20 Jun 2019 14:36:11 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201906201436.x5KEaBa0021580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Thu, 20 Jun 2019 14:36:11 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r53173 - in head/en_US.ISO8859-1/books/porters-handbook: makefiles slow-porting X-SVN-Group: doc-head X-SVN-Commit-Author: mat X-SVN-Commit-Paths: in head/en_US.ISO8859-1/books/porters-handbook: makefiles slow-porting X-SVN-Commit-Revision: 53173 X-SVN-Commit-Repository: doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 765088414E X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.94 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.94)[-0.939,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.29 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, 20 Jun 2019 14:36:13 -0000 Author: mat Date: Thu Jun 20 14:36:11 2019 New Revision: 53173 URL: https://svnweb.freebsd.org/changeset/doc/53173 Log: Make it clear that using sed(1) to patch files is only to be used when replacing variable content. Reported by: swills Reviewed by: adamw Differential Revision: https://reviews.freebsd.org/D20679 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 20 11:33:28 2019 (r53172) +++ head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml Thu Jun 20 14:36:11 2019 (r53173) @@ -7581,14 +7581,11 @@ DOCS_ALL_TARGET= doc 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 @@ post-patch-OPT1-off: .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 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 20 11:33:28 2019 (r53172) +++ head/en_US.ISO8859-1/books/porters-handbook/slow-porting/chapter.xml Thu Jun 20 14:36:11 2019 (r53173) @@ -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. You + must use patch files instead of &man.sed.1; to replace + static content. + Quite often, software being ported uses the CR/LF convention in source files. This may cause problems with