|
|||||||||
Monday the 12th of May, 2008 |
|||||||||
How to Install DarwinPorts
1. Install Xcode ToolsNotes: Xcode Tools is neither installed nor updated via the Software Update utility. 2. Install XWindows (X11)On OS X 10.4, Apple's X11 is an optional install (DarwinPorts' X11 package is not recommended at this time). If the application X11 is not present in /Applications/Utilities: Notes: 3. Set the shell environmentSetting the Unix shell environment is critical for DarwinPorts to function. Requirements for the DarwinPorts' shell environmentThe DarwinPorts binary installer places a .profile file in your home directory (view files preceded by a dot with 'ls -a'). The contents of this ~/.profile file adds the DarwinPorts paths in front of the standard Unix paths for the default BASH shell. This is done so that if you have utilities or libraries from both DarwinPorts and OS X's standard install, the DarwinPorts libraries will be run instead of the ones provided by Apple. export PATH=/opt/local/bin:/opt/local/sbin:$PATH You'll need to add this variable to your ~/.profile to run X11 applications: export DISPLAY=:0.0 So a basic ~/.profile file will look like this: export PATH=/opt/local/bin:/opt/local/sbin:$PATH export DISPLAY=:0.0 Important Notes: Verify the shell environmentTo verify that your ~/.profile has set your shell environment: Check to make sure the reported path begins with the DarwinPorts' paths as show above. Sample output of command env: TERM_PROGRAM=Apple_Terminal TERM=xterm-color SHELL=/bin/bash TERM_PROGRAM_VERSION=133 USER=mduling __CF_USER_TEXT_ENCODING=0x1F6:0:0 PATH=/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin Options for the DarwinPorts' shell and X11 environmentTo set a default editor for use with the port command (e. g. 'port ed mysql5'), add a variable EDITOR with the path of your favorite editor to the ~/.profile file. export EDITOR=/usr/bin/pico A sample ~/.profile with optional EDITOR variable set: export PATH=/opt/local/bin:/opt/local/sbin:$PATH export DISPLAY=:0.0 export EDITOR=/usr/bin/pico To launch X11 apps directly from an X11 window (instead of a terminal window), you need to have the DarwinPorts paths imported into X11 sessions when they are opened. This is a two step process. First, tell X11 about your .profile file by editing the file /etc/X11/xinit/xinitrc and add this line near the top. source ~/.profile Now finish by making any subsequent X11 sessions opened using the menubar respect your .profile. 4. Install DarwinPortsInstall DarwinPorts using the binary installer (to /opt/local/ only)Note: Install DarwinPorts from source (to any path except /usr/local/)Note: Install DarwinPorts that you downloaded
5. Update DarwinPorts via selfupdateThe 'port selfupdate' command must be run after a new DarwinPorts install, and frequently thereafter. The command updates DarwinPorts with the latest port revisions, and, if necessary, updates DarwinPorts to the latest release. sudo port selfupdate or for verbose output: sudo port -d selfupdate |
![]() |
Other Helpful SitesDarwin SourceDebian Packages Freshports - FreeBSD Fink Package List RPM for MacOSX Port Categories
aqua
archivers audio benchmarks cad comms cross databases devel editors emulators games genealogy gnome graphics irc java kde lang math multimedia net news palm perl python ruby science security shells sysutils textproc www x11 zope
Current CVS DownloadsDarwin Ports Current :nightly CVS snapshot OpenDarwin CVSWeb |
|||||||
| |
