[MacPorts] InstallingMacPorts modified

MacPorts noreply at macports.org
Sun Jul 21 14:19:35 PDT 2013


Page "InstallingMacPorts" was changed by egall at gwmail.gwu.edu
Diff URL: <https://trac.macports.org/wiki/InstallingMacPorts?action=diff&version=61>
Revision 61
Comment: improve information about configuring to build from source for a non-root user
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: InstallingMacPorts
=========================================================================
--- InstallingMacPorts (version: 60)
+++ InstallingMacPorts (version: 61)
@@ -34,7 +34,7 @@
 
 Do not set `DISPLAY` on Mac OS X 10.5 (Leopard) or later, as it is set automatically and needs to be a different value.
 
-So a basic ''~/.profile'' file will look something like this:
+So a basic ''`~/.profile`'' file will look something like this:
 
 {{{
 export PATH=/opt/local/bin:/opt/local/sbin:$PATH
@@ -46,8 +46,8 @@
  * To understand why MacPorts libraries are often installed when Apple has provided one, see [wiki:FAQ#ownlibs].
  * Changes to ~/.profile do not take effect on the current shell session — they take effect on new sessions so open a new shell session and type 'env' to see the path and variable changes.
  * Other profile files may take precedence over ~/.profile.  If you are using one of the following profile files in your home directory, you will need to merge the contents of it into ~./profile, or vice versa because the shell will ignore one of them:
-    * ''~/.bash_login''
-    * ''~/.bash_profile''
+    * ''`~/.bash_login`''
+    * ''`~/.bash_profile`''
 
 == Verify the shell environment ==
 
@@ -110,48 +110,70 @@
  1. Download and unzip the latest MacPorts tarball from the [http://www.macports.org/install.php MacPorts download area].
  2. Perform these commands in a terminal window.
 {{{
-cd ~/MacPorts-2.0.4/
+cd ~/MacPorts-2.1.3/
 ./configure --enable-readline
 make
 sudo make install
 }}}
+(Warning: the `--enable-readline` flag might not work if you have a custom readline installation)
 
 '''Note:'''
  * To see why /usr/local is not a viable install location for MacPorts, see [wiki:FAQ#defaultprefix]
 
 == Install MacPorts from source as an unprivileged (non-root) user ==
 
-If you don't have root on your machine, or if you just prefer to install packages without becoming root, the following steps will install MacPorts into ~/macports (tested on Leopard and Tiger).
-
-
-  * Download the source as bzip2 tarball from [http://www.macports.org/install.php MacPorts download area]
-  * Run the following
+If you don't have root access on your machine, or if you just prefer to install packages without becoming root, the following steps will install MacPorts into `~/macports` (tested on Leopard and Tiger).
+
+
+  * Download the source as a bzip2 tarball from [http://www.macports.org/install.php MacPorts download area].
+  * Run the following:
  
 {{{
-  tar -jxf MacPorts-2.0.4.tar.bz2 && cd MacPorts-2.0.4
-}}}
-  * Then:
-
-{{{
-  PATH=/usr/bin:/usr/sbin:/bin:/sbin ./configure \
+  tar -jxf MacPorts-2.1.3.tar.bz2 && cd MacPorts-2.1.3
+}}}
+  * Then make sure your path is the following:
+
+{{{
+  PATH=/usr/bin:/usr/sbin:/bin:/sbin 
+}}}
+ * Then you can run `./configure` with at least the following flags:
+{{{
   --prefix=$HOME/macports \
-  --enable-readline \
   --with-install-user=`id -un` \
   --with-install-group=`id -gn` \
+  --with-tclpackage=$HOME/macports/share/macports/Tcl \
+}}}
+ You can also consider using the `--enable-readline` flag if you want the [wiki:SummerOfCode#interactive "interactive" `port(1)` command] to have readline support; however, if you have a custom version of readline installed, you might have to use the `--disable-readline` flag instead. You will also have to tell the configure script where your X11 is. On older versions of OS X, this can be done with the following flags:
+{{{
   --x-includes=/usr/X11R6/include \
   --x-libraries=/usr/X11R6/lib \
-  --with-tclpackage=$HOME/macports/share/macports/Tcl
-
+}}}
+ On newer versions of OS X, the flags are:
+{{{
+  --x-includes=/usr/X11/include \
+  --x-libraries=/usr/X11/lib \
+}}}
+ On versions of OS X where only XQuartz is available (i.e. Mountain Lion and later), the flags are:
+{{{
+  --x-includes=/opt/X11/include \
+  --x-libraries=/opt/X11/lib \
+}}}
+ Sometimes the check for a working Objective-C Foundation can fail; if that is the case, try passing the following flag to the configure script:
+{{{
+--without-objc-foundation \
+}}}
+ For more information about other useful flags, run `./configure --help`. After you have successfully configured MacPorts for your local install, you can install it simply with the commands:
+{{{
   make
   make install
 }}}
 
-  * Add something like the following to your Mac's ".bashrc":
+  * After you have successfully installed MacPorts to your local directory, add something like the following to your Mac's "`.bashrc`":
 
 {{{
   export PATH=$HOME/macports/bin:$HOME/macports/sbin:$PATH
   export MANPATH=$HOME/macports/share/man:$MANPATH
-  export PERL5LIB=$HOME/macports/lib/perl5/5.8.8:$HOME/macports/lib/perl5/vendor_perl/5.8.8:$PERL5LIB
+  export PERL5LIB=$HOME/macports/lib/perl5/5.12.4:$HOME/macports/lib/perl5/vendor_perl/5.12.4:$PERL5LIB
 }}}
 
 Note: ''do not'' set MANPATH here unless you have already set it elsewhere (or are running Leopard, which does so). If you have not set MANPATH in another place, and are running Tiger or earlier, omit the MANPATH line. For more information about setting up the shell environment variables correctly, please see [http://guide.macports.org/#installing.shell the Guide].
@@ -159,12 +181,12 @@
 Most ports install just fine unless they try to add themselves to the LaunchD (e.g. most services, but you'd need root for most of them anyhow).  If you do run into a required port that tries to add itself as a startup item, you can edit the Portfile (e.g.  {{{port edit <portname>}}}) and change {{{startupitem.create  yes}}} to {{{startupitem.create  no}}}
 
 == Install MacPorts from a developer release ==
-Under construction.
-
-'''Note:''' Developer releases contain untested code and may have bugs.  Use at your own risk.
+Under construction...
+
+'''Note:''' Developer releases are primarily for developers who are working on base, and as such, they may contain untested code and may have bugs.  Use at your own risk.
 
 = 5. Update MacPorts via selfupdate =
-The 'port selfupdate' command must be run after a new MacPorts install, and frequently thereafter.  The command updates MacPorts with the latest port revisions, and, if necessary, updates MacPorts to the latest release.
+The '`port selfupdate`' command must be run after a new MacPorts install, and frequently thereafter.  The command updates MacPorts with the latest port revisions, and, if necessary, updates MacPorts to the latest release.
 
  1. Open a terminal window.
  2. Execute the MacPorts {{{selfupdate}}} command.
-------8<------8<------8<------8<------8<------8<------8<------8<--------

--
Page URL: <https://trac.macports.org/wiki/InstallingMacPorts>
MacPorts <http://www.macports.org/>
Ports system for OS X

This is an automated message. Someone added your email address to be
notified of changes on 'InstallingMacPorts' page.
If it was not you, please report to .


More information about the macports-changes mailing list