Differential D29450 Diff 86869 documentation/content/en/books/porters-handbook/slow-porting/_index.adoc
Changeset View
Changeset View
Standalone View
Standalone View
documentation/content/en/books/porters-handbook/slow-porting/_index.adoc
Show First 20 Lines • Show All 141 Lines • ▼ Show 20 Lines | |||||
When generating patches for new, added files, `-N` is used to tell man:diff[1] to treat the non-existent original file as if it existed but was empty: | When generating patches for new, added files, `-N` is used to tell man:diff[1] to treat the non-existent original file as if it existed but was empty: | ||||
[source,shell] | [source,shell] | ||||
.... | .... | ||||
% diff -u -N newfile.orig newfile > patch-pathname-newfile | % diff -u -N newfile.orig newfile > patch-pathname-newfile | ||||
.... | .... | ||||
Do not add `$FreeBSD$` RCS strings in patches. When patches are added to the Subversion repository with `svn add`, the `fbsd:nokeywords` property is set to `yes` automatically so keywords in the patch are not modified when committed. The property can be added manually with `svn propset fbsd:nokeywords yes _files..._`. | |||||
Using the recurse (`-r`) option to man:diff[1] to generate patches is fine, but please look at the resulting patches to make sure there is no unnecessary junk in there. In particular, diffs between two backup files, [.filename]##Makefile##s when the port uses `Imake` or GNU `configure`, etc., are unnecessary and have to be deleted. If it was necessary to edit [.filename]#configure.in# and run `autoconf` to regenerate `configure`, do not take the diffs of `configure` (it often grows to a few thousand lines!). Instead, define `USES=autoreconf` and take the diffs of [.filename]#configure.in#. | Using the recurse (`-r`) option to man:diff[1] to generate patches is fine, but please look at the resulting patches to make sure there is no unnecessary junk in there. In particular, diffs between two backup files, [.filename]##Makefile##s when the port uses `Imake` or GNU `configure`, etc., are unnecessary and have to be deleted. If it was necessary to edit [.filename]#configure.in# and run `autoconf` to regenerate `configure`, do not take the diffs of `configure` (it often grows to a few thousand lines!). Instead, define `USES=autoreconf` and take the diffs of [.filename]#configure.in#. | ||||
[[slow-patch-automatic-replacements]] | [[slow-patch-automatic-replacements]] | ||||
=== Simple Automatic Replacements | === Simple Automatic Replacements | ||||
Simple replacements can be performed directly from the port [.filename]#Makefile# using the in-place mode of man:sed[1]. This is useful when changes use the value of a variable: | Simple replacements can be performed directly from the port [.filename]#Makefile# using the in-place mode of man:sed[1]. This is useful when changes use the value of a variable: | ||||
[.programlisting] | [.programlisting] | ||||
▲ Show 20 Lines • Show All 125 Lines • Show Last 20 Lines |