You my have root access to your computer.
IMPORTANT: If you are migrating to 10.12 from 10.10, you must re-install MacPorts
. Remove your /opt/casa/ports and /opt/casa/02 directories in order to avoid conflicts with previous versions. You can also skip the changes to .profile if you had those set earlier.
Install Xcode 9
Accept Apple EULA
From the terminal:
Verify that you have Java 1.5 or later installed. This is required for Casa Code to compile.
Open up a terminal and type:
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: https://www.java.com/en/download/mac_download.jsp
This link failed for me. It took me to a site that installed the Java runtime which then gave errors when I tried to run it from the command line (though it worked for browers). I had to search for "Java JDK" and then download "Java SE Development Kit 8" from oracle.com.
Download, Unpack and Install Macports
curl -o MacPorts-2.4.2.tar.gz https://distfiles.macports.org/MacPorts/MacPorts-2.4.2.tar.gz
tar zxf MacPorts-2.4.2.tar.gz
./configure --prefix=/opt/casa/02 --with-macports-user=root --with-applications-dir=/opt/casa/02/Applications
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 -
chmod 700 ~/.profile
Create file /var/root/bin/port and add the following contents.
/opt/casa/02/bin/port -N -s $*
Make the file executable
chmod 755 /var/root/bin/port
Add the following in the .profile
# Required for the latest version of Qt4 port
# Port binaries
Run the following commands.
# This should return
Fetch Port Overlay
git clone https://open-bitbucket.nrao.edu/scm/casa/casa-macports.git
ln -s /opt/casa/casa-macports/ports /opt/casa/ports
scp <username>@ssh.cv.nrao.edu:~dschieb/patch-531 /opt/casa/ports/graphics/pgplot/files
Configure MacPorts Source
echo 'file:///opt/casa/ports [nosync]' > /opt/casa/02/etc/macports/sources.conf
echo 'rsync://rsync.macports.org/release/ports [default]' >> /opt/casa/02/etc/macports/sources.conf
Verify that the sources.conf looks correct:
bash-3.2# cat /opt/casa/02/etc/macports/sources.conf
Note: All of the ports should be installed as root. The port dependencies change from time to time so you may not need to install all of the ports manually.
port install gcc5
#port install readline #Now installed as part of gcc5
#port install python27 #Now installed as part of gcc5
port select --set python python27
port select --set python2 python27
port install py27-gnureadline
#port install boost +python27 #Now installed as part of gcc5
port install dbus # Requires sudo
port install dbus-cpp # Requires sudo
port install qt4-mac
port install qwt61 +qt4
port install pgplot +gcc5
port install cfitsio
port install wcslib +gcc5
port install gsl
port install rpfits +gcc5
port install fftw-3
port install fftw-3-single
port install cairo +quartz +x11
port install xercesc
port install libxslt
port install tk +quartz
port install flex
port install py27-matplotlib +tkinter +gcc5
port install py27-ipython
port select --set ipython py27-ipython
port select --set ipython2 py27-ipython
port install dbus-python27 # Requires sudo
port install swig
port install swig-python
port install py27-scipy +gcc5
port install py27-pyfits
port install libsakura
port install py27-gdbm # for running tests with robotframework
port install gdb
port install gradle # for nightly builds
port install groovy # for nightly builds
port install wget # for documentation
port install git-lfs # for data repository
port install ccache
Configure Git LFS (as root and and as the user)
git config --global filter.lfs.required true
git config --global filter.lfs.clean "git-lfs clean -- %f"
git config --global filter.lfs.smudge "git-lfs smudge -- %f"
git config --global filter.lfs.process "git-lfs filter-process"
During the installation you will get this message:
You will need to make sure /System/Library/LaunchDaemons/com.apple.taskgated.plist has the '-p' option, e.g.
Due to kernel caching, you usually need to restart Mac OS X for this option to effect.
You will have to disable SIP to do the above steps.
As an alternative you can do the following:
Create certificate to sign ggdb
Open /Applications/Utilities/Keychain access
In the top menu, go to "Keychain Access" and select Certificate Assistant
Select "Create a certificate"
Identity Type: Self Signed root
Certificate Type: Code Signing
Select "Let me override defaults"
Click continue on the pop-up
In the personal information, select values as you wish and click continue
Click continue on the "Key Usage Extension" screen
Verify that the Extended Key Usage Extension is set to "Code Signing" and click continue
In the "Specify a Location For The Certificate" screen select System and click continue
Select System in the Keychains pane and right click on the "gdb-cert"
Click on the triangle next to "Trust" to expand the options
In the "When using this certificate select "Always trust"
Click on the red "x" on the left top corner of the window.
Provide your password
Open a terminal and enter
"codesign -f -s gdb-cert /opt/casa/02/bin/ggdb"
Restart your machine
Add ports to your path
Include the following line in the .profile file in your home directory