Changes between Version 2 and Version 3 of howto/PatchLocal


Ignore:
Timestamp:
Oct 6, 2012, 6:38:31 AM (12 years ago)
Author:
macports.org@…
Comment:

Incorporated changes from Rainer Müller

Legend:

Unmodified
Added
Removed
Modified
  • howto/PatchLocal

    v2 v3  
    1212== Installation ==
    1313
    14 === Step 1: '''Get your port's sourcecode''' ===
     14=== Step 1: '''Set up a local repository''' ===
     15
     16If you want to make changes that stick and won't be overwritten by accident, you need to set up a local
     17repository, described in full here: http://guide.macports.org/#development.local-repositories
     18
     19Do this to create a new Port (as root):
     20{{{
     21umask 022
     22mkdir -p /usr/local/ports/
     23cd /usr/local/ports
     24cp -r `port dir arb` .
     25mv arb arb-devel
     26}}}
     27
     28Add this line before the 'rsync://.......' line in /opt/local/etc/macports/sources.conf, at the end of the file:
     29{{{
     30file:///usr/local/ports
     31}}}
     32
     33Then run this command:
     34{{{
     35portindex   # Not working for me...?
     36}}}
     37
     38=== Step 2: '''Get your port's sourcecode''' ===
    1539
    1640{{{
    17 port patch arb
    18 find /opt/local/var/macports -name 'arb*'
     41port patch arb-devel
     42cd `port work arb-devel`
    1943}}}
    2044
    21 I found:
    22 {{{
    23 /opt/local/var/macports/distfiles/arb
    24 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_arb/arb/work/arbsrc_8210/
    25 }}}
    26 
    27 === Step 2: '''Modify the source with your patch''' ===
     45=== Step 3: '''Modify the source with your patch''' ===
    2846
    2947{{{
    30 cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_arb/arb/work/
    3148cp Makefile Makefile.orig
    3249vi Makefile
     
    3451}}}
    3552
    36 === Step 3: '''Make a patch''' ===
     53=== Step 4: '''Make a patch''' ===
     54
     55See http://guide.macports.org/#development.patches.source
     56{{{
     57diff -u Makefile.orig Makefile > /usr/local/ports/arb/files/patch-ARB-makefile2.diff
     58port edit arb-devel     (add the patch-ARB-makefile2.diff file to the list of patches)
     59}}}
     60
     61=== Step 5: '''Test the modified port''' ===
    3762
    3863{{{
    39 diff -u Makefile.orig Makefile > /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/science/arb/files/patch-ARB-makefile2.diff
    40 port edit arb     (add the patch-ARB-makefile2.diff file to the list of patches)
     64port clean arb-devel
     65port build arb-devel
    4166}}}
    4267
    43 === Step 4: '''Test the modified port''' ===
     68=== Step 6: '''Make it real''' ===
    4469
    4570{{{
    46 port clean arb
    47 port build arb
     71port install arb-devel
    4872}}}
    4973
    50 === Step 4: '''Make it real''' ===
    51 
    52 {{{
    53 port install arb
    54 }}}
    55  
    5674[wiki:howto <- Back to the HOWTO section]