14.1. Installing DarwinPorts

 < Day Day Up > 

Chapter 14. DarwinPorts

The DarwinPorts project (http://darwinports.opendarwin.org/), started in 2002 and led by Landon Fuller, Felix Kronlage, Jordan Hubbard, and Kevin Van Vechten, has created a package management system similar to Fink and the FreeBSD ports collection (http://www.freebsd.org). It automates the installation of open source Unix- and Aqua-based software on Mac OS X. It is written primarily in Tcl (which is bundled with Mac OS X).

The DP-COCOA project (http://www.opendarwin.org/projects/dp-cocoa/), led by Dr. Ernest Prabhakar, provides a Cocoa-based framework for manipulating DarwinPorts . At the time of this writing, there is another graphical user interface called DarwinPorts Manager, which is under active development by the DarwinPorts team.

DarwinPorts provides a way to both install and remove packages from its collection, as well as track package dependencies. This means that if you attempt to install package A, and that package depends on package B, DarwinPorts finds and installs package B first and then goes back to install package A. Similarly, if you attempt to uninstall package B while you have installed another package that depends on package B, DarwinPorts warns you about this dependency and gives you the option to remove other packages that depend on the one you're attempting to remove.

DarwinPorts installs Unix-based packages in /opt/local by default, ensuring that your Mac OS X-installed system files in /usr won't be affected. DarwinPorts also allows you to build several Aqua-based applications from source, which are installed in /Applications/DarwinPorts. Additionally, required libraries are installed in /Library/Tcl/darwinports1.0 (assuming Mac OS X Tiger), and the DarwinPorts infrastructure and descriptions of ported applications reside in a selected user's home directory (for example, ~/darwinports). If problems occur with DarwinPorts-installed packages, you can delete the entire /opt/local directory tree without affecting your system. In this case you should also delete the /private/etc/ports and /Library/Tcl/darwinports1.0 directories to completely remove DarwinPorts.

As you'll see later, you can install either a stable point release of DarwinPorts or a bleeding-edge development version from CVS repository. When you build and install a package with DarwinPorts, it builds the package(s) from source in a special workspace directory called work, which you'll find either within the /opt/local/var/db/ports directory if you've installed a stable point release of DarwinPorts, or in ~/darwinports/dports directory, if you've installed DarwinPorts from the CVS repository. For example, if you install the bvi editor using a point release of DarwinPorts, it is first built in /opt/local/var/db/ports/sources/rsync.rsync.opendarwin.org.dpupdate_dports/editors/bvi/work. If, on the other hand, you're working with a CVS-development version of DarwinPorts, bvi will be built in ~/darwinports/dports/editors/bvi/work. When you install bvi, it is installed in both the destroot subdirectory of the work directory and in /opt/local (or whatever you may have defined for $prefix) via /usr/bin/install. A receipt is made for the installation and placed in the /opt/local/var/db/dports/receipts directory.

As an alternative to installation via /usr/bin/install, DarwinPorts can produce a .pkg (or .mpkg to include dependencies) package that can be subsequently installed via the Mac OS X Installer. It can also create an Internet-enabled disk image (.dmg) containing a package installer; as well as create packages in the Red Hat Package Manager (RPM) format.

According to the DarwinPorts web site, a GUI-based Uninstaller application is under development. Design of this UnInstaller application will reportedly include the ability to uninstall packages installed by DarwinPorts.


     < Day Day Up > 


    Mac OS X Tiger for Unix Geeks
    Mac OS X Tiger for Unix Geeks
    ISBN: 0596009127
    EAN: 2147483647
    Year: 2006
    Pages: 176

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net