|
|
@@ -596,25 +596,9 @@ variant sqlite description {Build sqlite support} { |
|
|
logical change that needs to be applied. Patchfile filenames should |
|
|
uniquely distinguish the file and generally be of the form |
|
|
<filename>patch-</filename><replaceable><identifier></replaceable><filename>.diff</filename>, |
|
|
where the <replaceable>identifier</replaceable> is a hint of what the |
|
|
patch does. For example, this can be the filename of the patched file as in |
|
|
<filename>patch-</filename><replaceable>src-Makefile.in</replaceable><filename>.diff</filename>.</para> |
|
|
|
|
|
<para>You may use patch files that patch multiple files under these |
|
|
conditions:</para> |
|
|
|
|
|
<itemizedlist> |
|
|
<listitem> |
|
|
<para>You find existing patch files that do so.</para> |
|
|
</listitem> |
|
|
|
|
|
<listitem> |
|
|
<para>If fixing a particular problem or bug requires changes in |
|
|
multiple files the patch filename should reference |
|
|
the problem or bug, for example: |
|
|
<filename>patch-</filename><replaceable>destdir-variable-fix</replaceable><filename>.diff</filename></para> |
|
|
</listitem> |
|
|
</itemizedlist> |
|
|
where the <replaceable>identifier</replaceable> is a reference to the |
|
|
problem or bug it is supposed to solve. An example filename would be |
|
|
<filename>patch-</filename><replaceable>destdir-variable-fix</replaceable><filename>.diff</filename>.</para> |
|
|
|
|
|
<para>To create a patch to modify a single file, follow the steps |
|
|
below.</para> |
|
|
@@ -640,7 +624,7 @@ variant sqlite description {Build sqlite support} { |
|
|
to create a <quote>unified</quote> diff patch file.</para> |
|
|
|
|
|
<programlisting><prompt>%%</prompt> <userinput>cd ~/Downloads/foo-1.34</userinput> |
|
|
<prompt>%%</prompt> <userinput>diff -u src/Makefile.in.orig src/Makefile.in > patch-src-Makefile.in.diff</userinput></programlisting> |
|
|
<prompt>%%</prompt> <userinput>diff -u src/Makefile.in.orig src/Makefile.in > patch-destdir-variable-fix.diff</userinput></programlisting> |
|
|
|
|
|
<para>You should execute <command>diff</command> from |
|
|
the top-level directory of the unpacked source code, because during |
|
|
@@ -683,15 +667,15 @@ variant sqlite description {Build sqlite support} { |
|
|
|
|
|
<listitem> |
|
|
<para>Place the patch |
|
|
<filename>patch-src-Makefile.in.diff</filename> in the directory |
|
|
<filename>patch-destdir-variable-fix.diff</filename> in the directory |
|
|
<filename>${portpath}/files</filename> and use it in a port using |
|
|
the <code>patchfiles</code> keyword. <varname>${portpath}</varname> |
|
|
may be in a local Portfile repository during development, or |
|
|
<filename>files/</filename> may be in a port's |
|
|
<varname>${portpath}</varname> in the global MacPorts |
|
|
repository.</para> |
|
|
|
|
|
<programlisting>patchfiles patch-src-Makefile.in.diff</programlisting> |
|
|
<programlisting>patchfiles patch-destdir-variable-fix.diff</programlisting> |
|
|
</listitem> |
|
|
</orderedlist> |
|
|
</section> |
|
|
|