Changes between Version 2 and Version 3 of howto/PatchLocal
- Timestamp:
- Oct 6, 2012, 6:38:31 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
howto/PatchLocal
v2 v3 12 12 == Installation == 13 13 14 === Step 1: '''Get your port's sourcecode''' === 14 === Step 1: '''Set up a local repository''' === 15 16 If you want to make changes that stick and won't be overwritten by accident, you need to set up a local 17 repository, described in full here: http://guide.macports.org/#development.local-repositories 18 19 Do this to create a new Port (as root): 20 {{{ 21 umask 022 22 mkdir -p /usr/local/ports/ 23 cd /usr/local/ports 24 cp -r `port dir arb` . 25 mv arb arb-devel 26 }}} 27 28 Add this line before the 'rsync://.......' line in /opt/local/etc/macports/sources.conf, at the end of the file: 29 {{{ 30 file:///usr/local/ports 31 }}} 32 33 Then run this command: 34 {{{ 35 portindex # Not working for me...? 36 }}} 37 38 === Step 2: '''Get your port's sourcecode''' === 15 39 16 40 {{{ 17 port patch arb 18 find /opt/local/var/macports -name 'arb*' 41 port patch arb-devel 42 cd `port work arb-devel` 19 43 }}} 20 44 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''' === 28 46 29 47 {{{ 30 cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_arb/arb/work/31 48 cp Makefile Makefile.orig 32 49 vi Makefile … … 34 51 }}} 35 52 36 === Step 3: '''Make a patch''' === 53 === Step 4: '''Make a patch''' === 54 55 See http://guide.macports.org/#development.patches.source 56 {{{ 57 diff -u Makefile.orig Makefile > /usr/local/ports/arb/files/patch-ARB-makefile2.diff 58 port edit arb-devel (add the patch-ARB-makefile2.diff file to the list of patches) 59 }}} 60 61 === Step 5: '''Test the modified port''' === 37 62 38 63 {{{ 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)64 port clean arb-devel 65 port build arb-devel 41 66 }}} 42 67 43 === Step 4: '''Test the modified port''' ===68 === Step 6: '''Make it real''' === 44 69 45 70 {{{ 46 port clean arb 47 port build arb 71 port install arb-devel 48 72 }}} 49 73 50 === Step 4: '''Make it real''' ===51 52 {{{53 port install arb54 }}}55 56 74 [wiki:howto <- Back to the HOWTO section]