| 14 | | === Step 1: '''Check out MacPorts trunk''' === |
| 15 | | |
| 16 | | Pick a location to store a working copy of the MacPorts code. For this HOWTO {{{/opt/mports}}} will be used (change to suit). Run: |
| 17 | | {{{ |
| 18 | | mkdir -p /opt/mports |
| 19 | | cd /opt/mports |
| 20 | | svn co http://svn.macports.org/repository/macports/trunk |
| 21 | | }}} |
| 22 | | This will create {{{/opt/mports/trunk}}} containing everything needed for MacPorts. |
| 23 | | |
| 24 | | Note: You only really need the base subdirectory, so you can avoid checking out the rest if you don't want to use a Subversion-based ports tree (see Step 3 below). |
| 25 | | |
| 26 | | === Step 2: '''Build and Install MacPorts''' === |
| 27 | | |
| 28 | | Build and install MacPorts: |
| 29 | | {{{ |
| 30 | | cd /opt/mports/trunk/base |
| 31 | | ./configure --enable-readline |
| 32 | | make |
| 33 | | sudo make install |
| 34 | | make distclean |
| 35 | | }}} |
| 36 | | This will configure, build, and install MacPorts to the standard {{{/opt/local}}} location. |
| 37 | | |
| 38 | | == Configuration == |
| 39 | | |
| 40 | | === Step 3 (Optional): '''Configure MacPorts to use port information from Subversion''' === |
| 41 | | |
| 42 | | This step is useful if you want to do port development. |
| 43 | | |
| 44 | | Open {{{/opt/local/etc/macports/sources.conf}}} in a text editor. The last line which should look like this: |
| 45 | | {{{ |
| 46 | | rsync://rsync.macports.org/release/ports/ |
| 47 | | }}} |
| 48 | | Change it to point to the working copy you checked out: |
| 49 | | {{{ |
| 50 | | file:///opt/mports/trunk/dports |
| 51 | | }}} |
| 52 | | |
| 53 | | Now MacPorts will look for portfiles in the working copy. |
| 54 | | |
| 55 | | === Step 4: '''Update PATH''' === |
| 56 | | |
| 57 | | Edit your {{{.profile}}} (or {{{.tcshrc}}}, or whatever is appropriate for you) to put {{{/opt/local/bin}}} and {{{/opt/local/sbin}}} in your PATH (and don't forget, if using bash, to {{{export $PATH}}} too). Whether you put this at the beginning or end of the PATH is your choice. |
| 58 | | |
| 59 | | More detailed instructions are in [http://guide.macports.org/#installing.shell The MacPorts Guide] |
| | 14 | See the Guide section on [http://guide.macports.org/#installing.macports.subversion installing from subversion] |