05.01.2013 Views

Mac OS X Leopard - ARCAism

Mac OS X Leopard - ARCAism

Mac OS X Leopard - ARCAism

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Forge (http://macosforge.org), which is a larger project that hosts many of the open source projects<br />

specific to <strong>OS</strong> X. Other <strong>Mac</strong> <strong>OS</strong> Forge projects include Bonjour, the Darwin Streaming<br />

Server, WebKit, xnu (Darwin’s Kernel), and Calendar Server. Apple sponsors all of these projects.<br />

From a user perspective, <strong>Mac</strong>Ports works similarly to Fink from the command line. Unlike<br />

Fink, <strong>Mac</strong>Ports does not have an option to install precompiled binaries, so to use <strong>Mac</strong>Ports, you<br />

must have the latest version of the Xcode Tools installed. Many <strong>Mac</strong>Ports applications also<br />

assume you have installed the X11 packages and the X11SDK (both included on your <strong>Leopard</strong><br />

as an option in the <strong>Leopard</strong> install).<br />

<strong>Mac</strong>Ports by default installs itself, and all the packages you install with it, in the /opt/local<br />

directory, so to effectively use <strong>Mac</strong>Ports, you’ll need to add /opt/local/bin and /opt/local/sbin<br />

to your $PATH. Additionally, if you are planning on using the X11 applications from <strong>Mac</strong>Ports,<br />

you should add the line export DISPLAY=:0.0 to your .bash_profile as well.<br />

Once all of that’s out of the way, you can download the latest <strong>Mac</strong>Ports binary installer<br />

from macports.org.<br />

Like with Fink, once the installation is complete, the first thing you should do is to make<br />

sure everything is up-to-date. To do this, run the following command in the terminal:<br />

sudo port selfupdate<br />

NOTE Why would you need to update something you just downloaded? Well, binary installer<br />

is packaged together only at certain intervals, while the updating of software is constant. By<br />

performing a self-update, you ensure that you are catching any new packages that have been<br />

added since the binary package was assembled.<br />

This will update the entire ports system. Once you start using <strong>Mac</strong>Ports, you should continue<br />

to periodically run this command to make sure you are working with a current version of<br />

<strong>Mac</strong>Ports and that you have a list of all the current applications.<br />

Once your environment is set up and you have the latest updated version of <strong>Mac</strong>Ports<br />

installed, it’s quite easy to use <strong>Mac</strong>Ports with the commands listed in Table 19-6.<br />

Table 19-6. <strong>Mac</strong>Ports Commands<br />

Command Action<br />

port list Returns a list of all available ports.<br />

port search searchstring Returns a list of available ports whose name matches searchstring.<br />

port info appname Returns information about the port named appname.<br />

port variants appname Occasionally a port will have multiple options; if so, this command<br />

will list the additional port options available for the port appname.<br />

sudo port install appname Installs the base appname port.<br />

sudo port install appname Installs the port appname with option1 and option2.<br />

+option1 +option2<br />

port installed Returns a list of installed ports.<br />

sudo port selfupdate Updates the base port package as well as list of ports.<br />

sudo port outdated Lists outdated installed ports.<br />

sudo port upgrade appname Upgrades port appname.<br />

sudo port upgrade outdated Upgrades all outdated installed ports.<br />

CHAPTER 19 EXTENDING THE POWER OF DARWIN 345<br />

Continued

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!