[77516] trunk/doc-new/guide/xml/portfiledev.xml

ryandesign at macports.org ryandesign at macports.org
Sat Apr 2 06:10:18 PDT 2011


Revision: 77516
          http://trac.macports.org/changeset/77516
Author:   ryandesign at macports.org
Date:     2011-04-02 06:10:15 -0700 (Sat, 02 Apr 2011)
Log Message:
-----------
portfiledev.xml: edit the Local Portfile Repositories section with some suggestions from Wolf Drechsel

Modified Paths:
--------------
    trunk/doc-new/guide/xml/portfiledev.xml

Modified: trunk/doc-new/guide/xml/portfiledev.xml
===================================================================
--- trunk/doc-new/guide/xml/portfiledev.xml	2011-04-02 12:37:32 UTC (rev 77515)
+++ trunk/doc-new/guide/xml/portfiledev.xml	2011-04-02 13:10:15 UTC (rev 77516)
@@ -720,10 +720,9 @@
     <orderedlist>
       <listitem>
         <para>Open the <filename>sources.conf</filename> file in a text
-        editor.</para>
+        editor. For example, to open it into TextEdit:</para>
 
-        <programlisting><prompt>%%</prompt> <userinput>cd ${prefix}/etc/macports/</userinput>
-<prompt>%%</prompt> <userinput>open -e sources.conf</userinput></programlisting>
+        <programlisting><prompt>%%</prompt> <userinput>open -e ${prefix}/etc/macports/sources.conf</userinput></programlisting>
       </listitem>
 
       <listitem>
@@ -746,21 +745,34 @@
         <para>Place the Portfiles you create inside a directory whose name
         matches the port, which should in turn be placed inside a directory
         that reflect the port's primary category (the first category entry in
-        the Portfile).</para>
+        the Portfile). For example, to create the directory for a hypothetical
+        port "bestevergame" and to begin editing its Portfile in TextEdit, you
+        can use these commands:</para>
 
-        <programlisting><prompt>%%</prompt> <userinput>cd /Users/julesverne</userinput>
-<prompt>%%</prompt> <userinput>mkdir -p ports/games/bestevergame</userinput>
-<prompt>%%</prompt> <userinput>cd ports/games/bestevergame</userinput>
-<prompt>%%</prompt> <userinput>touch Portfile</userinput></programlisting>
+        <programlisting><prompt>%%</prompt> <userinput>mkdir -p ~/ports/games/bestevergame</userinput>
+<prompt>%%</prompt> <userinput>cd ~/ports/games/bestevergame</userinput>
+<prompt>%%</prompt> <userinput>touch Portfile</userinput>
+<prompt>%%</prompt> <userinput>open -e Portfile</userinput></programlisting>
+
+        <para>See other sections in the Guide for help writing Portfiles. If
+        you've already written the Portfile elsewhere, you can instead copy
+        the Portfile into this directory.</para>
       </listitem>
 
       <listitem>
-        <para>After a Portfile is created (see below), use the MacPorts
+        <para>If your Portfile needs to apply any patches to the port's source
+        files, create a <filename>files</filename> and place the patchfiles in
+        it, and reference the patchfiles in your Portfile, as explained in
+        <link linkend="development.patches.source">Creating Source Code Patches</link>.</para>
+      </listitem>
+
+      <listitem>
+        <para>After you create or update your Portfile, use the MacPorts
         <command>portindex</command> command in the local repository's
-        directory to install it into the
-        <filename>Portindex</filename>.</para>
+        directory to create or update the index of the ports in your local
+        repository.</para>
 
-        <programlisting>%% <userinput>cd /Users/julesverne/ports</userinput>
+        <programlisting>%% <userinput>cd ~/ports</userinput>
 %% <userinput>portindex</userinput></programlisting>
 
         <screen>Creating software index in /Users/julesverne/ports
@@ -772,9 +784,9 @@
       </listitem>
     </orderedlist>
 
-    <para>Once the local port is added to the <filename>Portindex</filename>,
+    <para>Once the local port is added to the <filename>PortIndex</filename>,
     it becomes available for searching or installation as with any other
-    Portfile in the MacPorts tree as shown.</para>
+    Portfile in the MacPorts tree:</para>
 
     <programlisting><prompt>%%</prompt> <userinput>port search bestever</userinput></programlisting>
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110402/293a8f10/attachment.html>


More information about the macports-changes mailing list