< Day Day Up > |
14.1. Installing DarwinPortsYou'll find detailed documentation, written by Michael A. Maibaum, on the installation and use of DarwinPorts on the DarwinPorts web site. Although the DarwinPorts site should be checked for the most up-to-date information, a brief description of its installation and usage is provided here. Before installing DarwinPorts, you must install the Xcode Tools, which as noted in Chapter 7, can be installed from the Mac OS X Install DVD, or downloaded from the Apple Developer Connection web site at http://developer.apple.com. Alternatively, on a new Mac, the Xcode Tools installer can be installed from /Applications/Installers/Developer Tools/. You also need to install X11, which is an optional installation when you install Mac OS X, and the X11 SDK, which is included with Xcode. Installation of DarwinPorts is built around the Concurrent Versioning System (CVS), which is installed with Xcode.
To install DarwinPorts, you should be logged in as an administrative user. In the following discussion, assume you're logged in as the administrative user ernestrothman. You can install the latest point-release of DarwinPorts either from source or using a binary installer. To install DarwinPorts using the binary installer, download the .dmg file from the DarwinPorts web site to your Desktop, double-click this file to mount the disk image, and double-click the .mpkg installer in the disk image to install DarwinPorts. To install DarwinPorts from source, log into Mac OS X as an administrative user and download either the source tarball from the DarwinPorts web site into your home directory. For example, to install DarwinPorts-1.0, enter the following commands: cd curl http://darwinports.opendarwin.org/downloads/DarwinPorts-1.0.tar.gz 14.1.1. Installing DarwinPorts from CVSTo download DarwinPorts and establish its infrastructure on your system, perform the following steps:
As an alternative to downloading the DarwinPorts files via the CVS commands above, you can download a nightly tarball (http://darwinports.opendarwin.org/darwinports-nightly-cvs-snapshot.tar.gz). To install DarwinPorts from the tarball, download and unpack it in your home directory. This creates the ~/darwinports directory. You can then proceed as outlined below. After downloading DarwinPorts, you're now ready to build and install it on your system:
No matter how you installed DarwinPorts, /opt/local/etc/ports/ports/conf is created with a line pointing to a dports directory. If you've installed the latest point release of DarwinPorts, the dports directory is specified by /rsync://rsync.opendarwin.org/dpupdate/dports. If you've installed a CVS-development version of DarwinPorts, a local dports directory will be specified as /opt/local/var/db/dports. The local dports directory contains the ported software descriptions and related Portfiles, which are Tcl scripts needed to build and install the ported software. According to documentation on the DarwinPorts site, the sources.conf file is used to list the locations of both local and remote port software hierarchies. Since DarwinPorts software is installed in /opt/local, you should add /opt/local/bin to your path. Once you have performed these steps, you'll have a working installation of DarwinPorts. If you want DarwinPorts software to install software in a directory other than /opt/local, you can edit the file /opt/local/etc/ports/ports.conf and change the value of prefix from /opt/local to the directory in which you want packages installed. As an alternative, you could run the configure command used in the build of DarwinPorts with the prefix option. |
< Day Day Up > |