Porters Handbook section 4.4
Stefan Esser
se at freebsd.org
Wed Sep 27 07:11:29 UTC 2017
Am 26.09.17 um 08:21 schrieb Kubilay Kocak:
> In section:
>
> 4.4. Patching
>
> - Add new section (at/numbered 4.4.2)
> - Name: Automatic Patch Generation
> - Renumber sections (4.4.2 -> 4.4.3)
>
> Text:
>
> The ports framework provides a {{{makepatch}} target, which when run,
> automatically creates correctly named and formatted patch files in the
> correct location. The general process is as follows:
>
> % cd <port directory>
> % make patch
>
> Note: In the general case, {{{make patch}} is used (not just {{{make
> extract}}} to extract the DISTFILES), because ports that contain
> existing patches need to have the patches applied so that they are also
> generated (regenerated) in the last step.
>
> ```
> % cd work/<directory> (WRKSRC)
> ```
>
> At this point, make the source changes in WRKSRC:
>
> ```
> % cp <file> <file>.orig
Do not perform this copy operation, IF the .orig file does already exist
(from the earlier "make patch" step).
I'd also use "cp -p" to preserve the original modification time, which
will be included in the patch ...
Else, your change will be against a patched file, without the patch that
lead to this state being conserved.
Regards, STefan
More information about the freebsd-doc
mailing list