Required Packages

Xcode

Starting with Mac OS X 10.7 and Xcode 4.3, the developer tools are distributed through the Mac App Store instead of an installer package.

You'll also need the command line tools, which you can install with:

xcode-select --install

CMake

CMake is a family of tools designed to build, test and package software. It is used to generate the Makefiles for compiling EMAN2. We install the homebrew version as follows:

brew install cmake

Qt4

Qt is a graphics library for cross-platform user interfaces.

brew install qt --with-developer --with-docs --HEAD

Boost

Boost is a set of useful, standardized libraries for C++. It is used to generate the Python-C++ interface in EMAN2. Homebrew comes with two 'boost' packages, and we'll need both to generate the libraries required for compiling EMAN2:

brew install boost --with-python
brew install boost-python

To install with MPI support, simply run the following commands instead:

brew install boost --with-mpi --with-python
brew install boost-python

GSL

The GNU Scientific Library provides a wide range of mathematical routines such as random number generators, special functions and least-squares fitting.

brew install gsl

A personal concern is that there is no option to '--enable-float'; however, I have not run into any problems with this yet.

FFTW3

FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data (as well as of even/odd data, i.e. the discrete cosine/sine transforms or DCT/DST). The most recent version is available from homebrew as follows:

brew install fftw

Berkeley DB (5.3.28)

The Oracle Berkeley DB family of open source, embeddable databases provides developers with fast, reliable, local persistence with zero administration. EMAN2 uses Berkeley DB as a mechanism for local storage of project metadata.

Oracle has made their most recent version very VERY proprietary. To install BDB, you need an account on the following website at which you can download BDB 5.3.28.

http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index-082944.html

Once there, download "Berkeley_DB_5.3.28.tar.gz," then enter the following commands where you placed the download (preferably your source code directory).

tar -xzf db-5.3.28
cd db-5.3.28/build_unix
../../dist/configure
make
sudo make install

If you encounter errors during this process, I suggest trying the following:

cd db-5.3.28
cd src/dbinc
curl -O https://raw.githubusercontent.com/narkoleptik/os-x-berkeleydb-patch/master/atomic.patch
patch atomic.h < atomic.patch
cd ../../build_unix
../dist/configure
make
sudo make install

Freetype and libPNG

On Mac OS X 10.8 and later, X11 and Freetype are no longer included by default. Even if you are using an earlier Mac OS X, I recommend installing your own Freetype. Homebrew offers the most recent version of freetype, but we'll need to explicitly include it in our configuration step later on.

brew install freetype

The PNG (Portal Network Graphics) format provides lossless-compressed image support. Although homebrew installs libpng as a dependency for freetype, it can be installed independently using the following command

brew install libpng

FTGL

FTGL is a free, open source library to enable developers to use arbitrary fonts in their OpenGL applications. We can install it as follows:

brew install ftgl

HDF5

HDF5 is a data model, library, and file format for storing and managing data. It supports an unlimited variety of datatypes, and is designed for flexible and efficient I/O and for high volume and complex data.

brew tap homebrew/science
brew install hdf5

SIP

Python's SIP (not to be confused with Mac OS X's SIP) is a tool that makes it very easy to create Python bindings for C and C++ libraries. It was originally developed to create PyQt, the Python bindings for the Qt toolkit, but can be used to create bindings for any C or C++ library.

brew install sip

PyQt4

PyQt4 provides Python bindings for Qt4. This software underlies every EMAN2 GUI application.

brew install pyqt