<pre style='margin:0'>
Rainer Müller (raimue) pushed a commit to branch master
in repository macports-guide.
</pre>
<p><a href="https://github.com/macports/macports-guide/commit/8690d0f287f8c03d51404147dac6d54503a401c2">https://github.com/macports/macports-guide/commit/8690d0f287f8c03d51404147dac6d54503a401c2</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 8690d0f Remove misleading examples for patchfile naming
</span>8690d0f is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 8690d0f287f8c03d51404147dac6d54503a401c2
</span>Author: Rainer Müller <raimue@macports.org>
AuthorDate: Sat Mar 10 19:30:32 2018 +0100
<span style='display:block; white-space:pre;color:#404040;'> Remove misleading examples for patchfile naming
</span>---
guide/xml/portfile-phase.xml | 8 ++++----
guide/xml/portfiledev.xml | 28 ++++++----------------------
2 files changed, 10 insertions(+), 26 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/guide/xml/portfile-phase.xml b/guide/xml/portfile-phase.xml
</span><span style='display:block; white-space:pre;color:#808080;'>index 1334ac6..68242b0 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/guide/xml/portfile-phase.xml
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/guide/xml/portfile-phase.xml
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1436,11 +1436,11 @@ extract.post_args "| gnutar -x"</programlisting>
</span> <listitem>
<para>Example:</para>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- <programlisting>patchfiles patch-Makefile.in \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-source.c</programlisting>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <programlisting>patchfiles patch-destdir-variable-fix.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-source.c.diff</programlisting>
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- <programlisting>patchfiles-append patch-configure
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-patchfiles-delete patch-src-Makefile.in</programlisting>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <programlisting>patchfiles-append patch-configure.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-delete patch-destdir-variable-fix.diff</programlisting>
</span> </listitem>
</itemizedlist>
</listitem>
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/guide/xml/portfiledev.xml b/guide/xml/portfiledev.xml
</span><span style='display:block; white-space:pre;color:#808080;'>index 1c880fa..441b27e 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/guide/xml/portfiledev.xml
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/guide/xml/portfiledev.xml
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -596,25 +596,9 @@ variant sqlite description {Build sqlite support} {
</span> 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>,
<span style='display:block; white-space:pre;background:#ffe0e0;'>- where the <replaceable>identifier</replaceable> is a hint of what the
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- patch does. For example, this can be the filename of the patched file as in
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- <filename>patch-</filename><replaceable>src-Makefile.in</replaceable><filename>.diff</filename>.</para>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- <para>You may use patch files that patch multiple files under these
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- conditions:</para>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- <itemizedlist>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- <listitem>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- <para>You find existing patch files that do so.</para>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- </listitem>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- <listitem>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- <para>If fixing a particular problem or bug requires changes in
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- multiple files the patch filename should reference
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- the problem or bug, for example:
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- <filename>patch-</filename><replaceable>destdir-variable-fix</replaceable><filename>.diff</filename></para>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- </listitem>
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- </itemizedlist>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ where the <replaceable>identifier</replaceable> is a reference to the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ problem or bug it is supposed to solve. An example filename would be
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <filename>patch-</filename><replaceable>destdir-variable-fix</replaceable><filename>.diff</filename>.</para>
</span>
<para>To create a patch to modify a single file, follow the steps
below.</para>
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -640,7 +624,7 @@ variant sqlite description {Build sqlite support} {
</span> to create a <quote>unified</quote> diff patch file.</para>
<programlisting><prompt>%%</prompt> <userinput>cd ~/Downloads/foo-1.34</userinput>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-<prompt>%%</prompt> <userinput>diff -u src/Makefile.in.orig src/Makefile.in > patch-src-Makefile.in.diff</userinput></programlisting>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+<prompt>%%</prompt> <userinput>diff -u src/Makefile.in.orig src/Makefile.in > patch-destdir-variable-fix.diff</userinput></programlisting>
</span>
<para>You should execute <command>diff</command> from
the top-level directory of the unpacked source code, because during
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -683,7 +667,7 @@ variant sqlite description {Build sqlite support} {
</span>
<listitem>
<para>Place the patch
<span style='display:block; white-space:pre;background:#ffe0e0;'>- <filename>patch-src-Makefile.in.diff</filename> in the directory
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <filename>patch-destdir-variable-fix.diff</filename> in the directory
</span> <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
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -691,7 +675,7 @@ variant sqlite description {Build sqlite support} {
</span> <varname>${portpath}</varname> in the global MacPorts
repository.</para>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- <programlisting>patchfiles patch-src-Makefile.in.diff</programlisting>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ <programlisting>patchfiles patch-destdir-variable-fix.diff</programlisting>
</span> </listitem>
</orderedlist>
</section>
</pre><pre style='margin:0'>
</pre>