Changeset 37419 for trunk/doc-new


Ignore:
Timestamp:
Jun 6, 2008, 11:10:52 PM (11 years ago)
Author:
markd@…
Message:

Add patchfile details from portstyle.7.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc-new/guide/xml/portfiledev.xml

    r37418 r37419  
    520520      <title>Creating Source Code Patches</title>
    521521
    522       <para>Necessary or useful patches to application source code should be
    523       sent to the application developer (not the port author) so the
    524       modifications may be included in the next version; then the port patch
    525       may be removed after an updated tarball is released.</para>
     522      <para>Necessary or useful patches to application source code should
     523      generally be sent to the application developer rather than the port
     524      author so the modifications may be included in the next version of the
     525      application.</para>
     526
     527      <para>You should create one patch file for each file to be patched,
     528      though it is permissible to use existing patches you find that patch
     529      multiple files. Patchfile filenames should uniquely distinguish the file
     530      and generally be of the form
     531      <filename>patch-</filename><replaceable>&lt;directory&gt;</replaceable>-<replaceable>&lt;filename&gt;.diff</replaceable>,
     532      as shown in this example:
     533      <filename>patch-src-Makefile.in.diff</filename>. Patch files should
     534      apply with "patch -p0'' from the working source directory of the
     535      port.</para>
    526536
    527537      <orderedlist>
     
    545555
    546556          <programlisting><prompt>%%</prompt> <userinput>cd foo-1.34</userinput>
    547 <prompt>%%</prompt> <userinput>diff -u Makefile.in.orig Makefile.in &gt; patch-Makefile.in</userinput></programlisting>
     557<prompt>%%</prompt> <userinput>diff -u Makefile.in.orig Makefile.in &gt; patch-Makefile.in.diff</userinput></programlisting>
    548558
    549559          <note>
     
    551561            top-level of the unpacked source code. Otherwise the
    552562            <command>patch</command> command will look for the file to be
    553             patched in the wrong place and fail.</para>
     563            patched in the wrong path and fail.</para>
    554564          </note>
    555565        </listitem>
     
    575585
    576586        <listitem>
    577           <para>Now you may place the patch
    578           <filename>patch-Makefile.in</filename> in the directory
    579           <varname>${portpath}</varname>/files (either a local repository or
    580           after committing to the MacPorts Subversion port repository) and use
    581           it in a port using the <code>patchfiles</code> keyword.</para>
     587          <para>Place the patch <filename>patch-Makefile.in.diff</filename> in
     588          the directory <filename>${portpath}/files</filename> and use it in a
     589          port using the <code>patchfiles</code> keyword.
     590          <varname>${portpath}</varname> may be in a local Portfile repository
     591          for development purposes, or the patch may be committed to the
     592          global MacPorts repository for distribution.</para>
    582593
    583594          <programlisting>patchfiles          patch-Makefile.in</programlisting>
    584 
    585           <note>
    586             <para>You should create one patch file for each file to be
    587             patched, though it is permissible to use existing patches you find
    588             that patch multiple files. Patchfile filenames should generally be
    589             of the form
    590             <filename>patch-</filename><replaceable>&lt;directory&gt;</replaceable>-<replaceable>&lt;filename&gt;</replaceable>,
    591             as shown in this example:
    592             <filename>patch-src-Makefile.in</filename>.</para>
    593           </note>
    594595        </listitem>
    595596      </orderedlist>
Note: See TracChangeset for help on using the changeset viewer.