| 52 | ==== Creating and maintaining a local port tree for developing ports ==== |
| 53 | |
| 54 | * Create the path at which you wish the local port tree to be rooted; I will call it {{{${localportpath}}}}. |
| 55 | * Create the paths in which you wish to place your portfiles; they will need to be in the form {{{${localportpath}/<category>/<portname>}}}. Any patches will be expected to be in {{{${localportpath}/<category>/<portname>/files}}}. |
| 56 | * Run {{{portindex ${localportpath}}}} (or cd to {{{${localportpath}}}} and run {{{portindex}}}) to generate the PortIndex so that MacPorts will find the ports; {{{portindex}}} will report whether or not it has errors parsing the Portfiles, so fix them before you continue. |
| 57 | * Add {{{${localportpath}}}} to {{{${prefix}/etc/ports/sources.conf}}} ''before'' the other sources configured there; as should be documented there, you will need to write it as a URL, i.e. {{{file://${localportpath}}}}. |
| 58 | * It should now all work! |
| 59 | |