[MacPorts] howto/PatchLocal modified

MacPorts noreply at macports.org
Fri Oct 5 23:38:31 PDT 2012


Page "howto/PatchLocal" was changed by macports.org at ch.pkts.ca
Diff URL: <https://trac.macports.org/wiki/howto/PatchLocal?action=diff&version=3>
Revision 3
Comment: Incorporated changes from Rainer Müller
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: howto/PatchLocal
=========================================================================
--- howto/PatchLocal (version: 2)
+++ howto/PatchLocal (version: 3)
@@ -11,46 +11,64 @@
 
 == Installation ==
 
-=== Step 1: '''Get your port's sourcecode''' ===
+=== Step 1: '''Set up a local repository''' ===
+
+If you want to make changes that stick and won't be overwritten by accident, you need to set up a local
+repository, described in full here: http://guide.macports.org/#development.local-repositories
+
+Do this to create a new Port (as root):
+{{{
+umask 022
+mkdir -p /usr/local/ports/
+cd /usr/local/ports
+cp -r `port dir arb` .
+mv arb arb-devel
+}}}
+
+Add this line before the 'rsync://.......' line in /opt/local/etc/macports/sources.conf, at the end of the file:
+{{{
+file:///usr/local/ports
+}}}
+
+Then run this command:
+{{{
+portindex   # Not working for me...?
+}}}
+
+=== Step 2: '''Get your port's sourcecode''' ===
 
 {{{
-port patch arb
-find /opt/local/var/macports -name 'arb*'
+port patch arb-devel
+cd `port work arb-devel`
 }}}
 
-I found:
-{{{
-/opt/local/var/macports/distfiles/arb
-/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_arb/arb/work/arbsrc_8210/
-}}}
-
-=== Step 2: '''Modify the source with your patch''' ===
+=== Step 3: '''Modify the source with your patch''' ===
 
 {{{
-cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_arb/arb/work/
 cp Makefile Makefile.orig
 vi Makefile
 * make changes, compile it, test it *
 }}}
 
-=== Step 3: '''Make a patch''' ===
+=== Step 4: '''Make a patch''' ===
+
+See http://guide.macports.org/#development.patches.source
+{{{
+diff -u Makefile.orig Makefile > /usr/local/ports/arb/files/patch-ARB-makefile2.diff
+port edit arb-devel     (add the patch-ARB-makefile2.diff file to the list of patches)
+}}}
+
+=== Step 5: '''Test the modified port''' ===
 
 {{{
-diff -u Makefile.orig Makefile > /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/science/arb/files/patch-ARB-makefile2.diff
-port edit arb     (add the patch-ARB-makefile2.diff file to the list of patches)
+port clean arb-devel
+port build arb-devel
 }}}
 
-=== Step 4: '''Test the modified port''' ===
+=== Step 6: '''Make it real''' ===
 
 {{{
-port clean arb
-port build arb
+port install arb-devel
 }}}
 
-=== Step 4: '''Make it real''' ===
-
-{{{
-port install arb
-}}}
-  
 [wiki:howto <- Back to the HOWTO section]
-------8<------8<------8<------8<------8<------8<------8<------8<--------

--
Page URL: <https://trac.macports.org/wiki/howto/PatchLocal>
MacPorts <http://www.macports.org/>
Ports system for Mac OS

This is an automated message. Someone added your email address to be
notified of changes on 'howto/PatchLocal' page.
If it was not you, please report to .


More information about the macports-changes mailing list