Macports
Why use Macports
Macports has useful applications such as grace, gnuplot, octave etc... For scientific computing it is useful.
Requirements before using Macports in college
Unfortunately the TCD's firewall blocks rsync and requires the user to setup their HTTP_PROXY, HTTPS_PROXY and FTP_PROXY variables to contain their passwords as the college web proxies require authentication. TCHPC maintains a macports mirror which can be found at http://thammuz.tchpc.tcd.ie/mirrors/macports/ this mirror is updated once every 24hrs.
To use macports in TCD you will need a few pieces of information
- Your college username and password (for authenticating against the web proxies)
- The address of the TCHPC macports mirror (rsync://thammuz.tchpc.tcd.ie/mirrors/macports/release/ports/)
- Some command line skills
- Administrator access on your mac
The following instructions assume that you have already installed the appropriate version of macports from the dmg file which can be found here http://www.macports.org/install.php
Configuring Macports
First set some configuration options in your .profile (or .cshrc, .bash_profile, .bashrc etc...) this is to allow macports to use the proxy to download source code etc...export p=http://USERNAME:PASSWORD@proxyA.tcd.ie:8080 export http_proxy=$p export https_proxy=$p export ftp_proxy=$p export all_proxy=$p unset p export PATH=/opt/local/bin:$PATHWhere in the above USERNAME is your college username and PASSWORD is the password you use for the web proxies. Once the above is done, open up a new shell to pick up the settings. Now we must tell macports about the mirror located in TCHPC. To do this you must edit the sources.conf file.
sudo vi /opt/local/etc/macports/sources.confAt the end of the file replace this line
rsync://rsync.macports.org/release/ports/ [default]with this one
rsync://thammuz.tchpc.tcd.ie/mirrors/macports/release/ports/ [default]Next you will also need to configure sudo to pass on some environment variables. Run this command.
sudo visudoAt the end of the configuration file make sure you have something similar to this.
Defaults env_keep += "http_proxy HTTP_PROXY HTTPS_PROXY ftp_proxy FTP_PROXY RSYNC_PROXY" Defaults env_keep += "ALL_PROXY NO_PROXY all_proxy"
Running Macports
Macports should function as it would normally would, the only things to watch out for if you have carried the above steps on a laptop, you may need to unset the proxy variables and revert the change in the sources.conf file when you are not in the college and wish to do an update. To update macports,sudo port sync sudo port selfupdate sudo port install perl5 +perl5_12To install emacs-app
sudo port install emacs-appThe above steps have been carried out on a desktop machine and has been known to work. It works less well on laptops.