Install Xcode and command line tools

Accept Apple EULA

xcodebuild -license

Install Java

Verify that you have Java 1.5 or later installed. This is required for Casa Code to compile. Open up a terminal and type:
java -version
You should get a response like:
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
If you don't, download and install Java from here:

Download, Unpack and Install Macports

tar zxf MacPorts-2.3.3.tar.gz
./configure --prefix=/opt/casa/01 --with-macports-user=root --with-applications-dir=/opt/casa/01/Applications
make install

Configure Environment

Run the following commands as sudoed root. This will make the port command run with the -s flag, which will compile all of the ports from the source.

sudo su -
mkdir /var/root/bin
touch ~/.profile
chmod 700 ~/.profile
Create file /var/root/bin/port and add the following contents.
/opt/casa/01/bin/port -s $*
Add the following in the .profile
export PATH=/var/root/bin/:$PATH
Run the following commands.
. ~/.profile
# type port
port is /Users/<username>/bin/port
bash-3.2# cat /Users/<username>/bin/port
## This is in root's bin directory to force source builds with macports.
## For it to work, however, ~/.profile must be sourced...
## Fri Jun 29 23:49:32 EDT 2012
#/opt/local/bin/port -s $* configure.compiler=llvm-gcc-4.2
/opt/casa/01/bin/port -s $*

Configure MacPorts Source

echo 'file:///opt/casa/ports [nosync]' > /opt/casa/01/etc/macports/sources.conf
echo 'rsync:// [default]' >> /opt/casa/01/etc/macports/sources.conf

Verify that the sources.conf looks correct:

bash-3.2# cat /opt/casa/01/etc/macports/sources.conf
file:///opt/casa/ports [nosync]
rsync:// [default]

Update MacPorts

port selfupdate

Install Ports

port install gcc49
port install readline
port install python27
port select --set python python27
port install boost +python27
port install dbus
port install dbus-cpp
port install qt4-mac
port install qwt52 +qt4
port install pgplot +gcc49
port install wcslib +gcc49
port install gsl
port install aatm
port install rpfits +gcc49
port install fftw-3
port install fftw-3-single
port install cairo +quartz +x11
port install xercesc
port install libxslt
port install cmake
port install tk +quartz
port install py27-matplotlib +tkinter +gcc49
port install py27-ipython +parallel
port select --set ipython ipython27
port install dbus-python27
port install swig
port install swig-python
port install py27-scipy +gcc49
port install flex
port install libsakura
port install py27-gdbm    ### for running tests with robotframework
port install gdb # for debugging

-- VilleSuoranta - 2015-04-21
Topic revision: r7 - 2015-12-07, VilleSuoranta
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback