WHAT IS THE DARWIN PORTS SYSTEM DarwinPorts is a software build, install, and packaging infrastructure designed to meet the same functionality requirements as the FreeBSD ports architecture while maintaining extensibility for future enhancement. DarwinPorts currently builds and runs on MacOS X 10.2 (Darwin 6.0). The system is portable, written in TCL with a limited set of TCL extensions in C. For in-depth documentation on the internals of the ports system architecture, refer to base/docs/INTERNALS. Please note that DarwinPorts is split into two parts. The "darwin ports infrastructure", which lives in the base/ subdirectory and is the only mandatory component of the system, and the "dports" directory which contains the actual ported software descriptions. The latter is optional and can be either fetched on demand over the net or a local copy can be used. See documentation on /etc/ports/sources.conf below. INSTALLATION Installation Steps: 1. make Run 'make' to compile all necessary software. In order to install DarwinPorts on FreeBSD the default group-ownership must be passed: 'make DSTGRP=wheel' 2. sudo make install Run 'sudo make install' to install DarwinPorts on your system. Again, installing on FreeBSD require the group-ownership to be passed: 'sudo make install DSTGRP=wheel' 3. [optional] edit /etc/ports/ports.conf The /etc/ports/ports.conf configuration file defines several configuration options for the DarwinPorts infrastructure. If you wish to change installation paths or the location at which various port system specific data is stored, change the following settings: portdbpath - Specifies path to store ports system specific data. prefix - Specifies directory in which to install ports 4. edit /etc/ports/sources.conf The /etc/ports/sources.conf file lists the location of both local and remote port software hierarchies. Be sure to add an entry for your local ports tree (usually the darwinports/dports directory) All necessary code and TCL will be compiled and installed as follows: [Mac OS X] /System/Library/Tcl/8.3/darwinports1.0 [FreeBSD] /usr/local/lib/tcl8.3/darwinports1.0 - TCL library for interfacing with the DarwinPorts System PREFIX is set to /opt/local but can be overridden on the make command line and affects the installation of the following components: $PREFIX/bin/port - Command line port building utility $PREFIX/share/darwinports/ - TCL libraries internal to the ports system The following files are provided for customization of the system: /etc/defaults/ports.conf - System-wide port default settings /etc/ports/ports.conf - User customizable port settings /etc/ports/sources.conf - List of port sources (places to get ports data from) USING THE PORT COMMAND If you haven't already, add /opt/local/bin to your path (or $PREFIX/bin if you've elected to install DarwinPorts somewhere else). If you're unsure how, add the following line to your ~/.cshrc file. set path=($path /opt/local/bin) Your changes to ~/.cshrc will not take effect until you have opened a new shell. The following command will build and install a port: port install To find a specific port, try using "port search". port search vi Please refer to the port man page for complete documentation on the port command. It is also possible to do operations, like building or fetching, for all ports on the system using the portall command. It takes essentially the same arguments as the port command but operates iteratively on every port in dports/. When you do a "make clean" from this directory, for example, a "portall clean" is also invoked to completely clean things up. CREATING NEW PORTS Ports consist of directory containing both a Portfile and associated files. Currently the only bundled files are patch files, and these are likely to be kept to a minimum. A Portfile consists of valid TCL, evaluated by a TCL interpreter instantiated by the DarwinPorts System. Portfiles use extremely straight- forward key/value pair syntax, while allowing the author to use the full extent of TCL's functionality where necessary. To get started, refer to base/doc/exampleport and the portfile(7) man page.