** On OSX There are two options: using homebrew, or using macports. The homebrew path is simpler, but doesn't allow to build universal binaries. * Using Homebrew brew tap homebrew/python brew tap homebrew/science brew install qt expat cairo glew brew install swig ilmbase openexr jasper little-cms2 glew freetype fontconfig ffmpeg imagemagick libcaca aces_container ctl jpeg-turbo libraw seexpr openjpeg opencolorio openimageio export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig:/usr/local/opt/cairo/lib/pkgconfig export CMAKE_PREFIX_PATH=$(echo /usr/local/Cellar/*/* | sed 's/ /;/g') * Setting up MacPorts Download and install Xcode tools (latest versions are 3.1.4 for Leopard, 3.2.6 for Snow Leopard, and 4.3.2 for Lion). 3.1.4 and 3.2.6 are available from the Mac Dev Center at developer.apple.com, whereas version 4 is available from the App Store. Don't forget to also install the UNIX command-line utilities (this is an install option in Xcode 3, and must be installed from the "Downloads" pane of the Xcode Preferences in Xcode 4.3 and later) Download and install the MacPorts installer that corresponds to your Mac OS X version. Download the local portfiles archive Uncompress the portfiles in a directory of your choice. In the following, we suppose you uncompressed it in /Users/USER_NAME/Development/dports-dev, but it can be anywhere except in the Documents directory, which has special permissions. Give read/execute permissions to the local repository: "chmod 755 /Users/USER_NAME/Development/dports-dev" Check that the user "nobody" can read this directory by typing the following command in a Terminal: "sudo -u nobody ls /Users/USER_NAME/Development/dports-dev". If it fails, then try again after having given execution permissions on your home directory using the following command: "chmod o+x /Users/USER_NAME". If this still fails, then something is really wrong. Edit the sources.conf file for MacPorts, for example using the nano editor: "sudo nano /opt/local/etc/macports/sources.conf", insert at the beginning of the file the configuration for a local repository (read the comments in the file), by inserting the line "file:///Users/USER_NAME/Development/dports-dev" (without quotes, and yes there are 3 slashes). Save and exit (if you're using nano, this means typing ctrl-X, Y and return). Update MacPorts: "sudo port selfupdate" Recreate the index in the local repository: "cd /Users/USER_NAME/Development/dports-dev; portindex" (no need to be root for this) Add the following line to /opt/local/etc/macports/variants.conf: -x11 +no_x11 +bash_completion +no_gnome +quartz (add +universal on OSX 10.5 and 10.6) * special portfiles: - graphics/openimageio - graphics/opencolorio - graphics/ctl - graphics/seexpr - aqua/qt4-quick-controls (for ButtleOFX) * external libraries (from https://sites.google.com/site/tuttleofx/development/build/libraries/macos ) sudo port -v install \ git \ boost +python27 \ jpeg \ openexr \ ffmpeg \ openjpeg15 \ libcaca \ freetype \ glew \ lcms \ swig \ REMOVED: freeglut * missing ports (with respect to the wiki): sudo port -v install \ ImageMagick +no_x11 \ lcms2 \ libraw \ nasm \ opencolorio \ openimageio \ swig-python \ py27-numpy \ flex \ bison \ seexpr \ ctl * for the OpenFX plugins and Natron: sudo port -v install \ openexr \ opencv \ qt4-mac \ python34 * if the command "pkg-config --cflags glew" gives the following error: $ pkg-config --libs glew Package glu was not found in the pkg-config search path. Perhaps you should add the directory containing `glu.pc' to the PKG_CONFIG_PATH environment variable Package 'glu', required by 'glew', not found execute the following: sudo -s cat > /opt/local/lib/pkgconfig/glew.pc << EOF prefix=/opt/local exec_prefix=/opt/local/bin libdir=/opt/local/lib includedir=/opt/local/include/GL Name: glew Description: The OpenGL Extension Wrangler library Version: 1.10.0 Cflags: -I\${includedir} Libs: -L\${libdir} -lGLEW -framework OpenGL Requires: EOF * on OSX 10.7 and below: sudo port -v install clang-3.4 sudo port select clang mp-clang-3.4 sudo port select python python27 * on OSX 10.8 and above sudo port select clang none sudo port select gcc none sudo port select python python27 * compiling/installing libjpeg-turbo (don't install it in MacPorts, because it can't coexist with libjpeg): - download and install from the dmg file found at from http://sourceforge.net/projects/libjpeg-turbo/files/ - if you prefer to compile from sources : ./configure --prefix=/opt/libjpeg-turbo --host x86_64-apple-darwin NASM=/opt/local/bin/nasm && make && sudo make install - checkout sources git clone https://github.com/devernay/openfx.git git clone https://github.com/devernay/openfx-yadif.git git clone https://github.com/devernay/openfx-opencv.git git clone https://github.com/MrKepzie/openfx-io.git #git clone https://github.com/tuttleofx/CTL.git #git clone https://github.com/wdas/SeExpr #git clone https://github.com/devernay/sconsProject.git git clone https://github.com/tuttleofx/TuttleOFX.git git clone https://github.com/MrKepzie/Natron.git # grab the latest openfx source for i in openfx* Natron TuttleOFX; do (echo $i;cd $i; git submodule foreach git pull origin master); done - compile OpenFX plugins bits=64 if [ `uname -s` = "Darwin" ]; then macosx=`uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'` case "$macosx" in [1-8]) bits=32 ;; 9|10) bits=Universal ;; esac; echo "Building for architecture $bits" fi ofx=/Library/OFX cd openfx git pull cd Examples rm -rf */*-${bits}-release */*-${bits}-debug rm */*.o make BITS=$bits rm -rf $ofx/Plugins/Examples.debug mkdir -p $ofx/Plugins/Examples.debug mv */*-${bits}-debug/*.ofx.bundle $ofx/Plugins/Examples.debug rm */*.o make BITS=$bits DEBUGFLAG=-O3 rm -rf $ofx/Plugins.disabled/Examples mkdir -p $ofx/Plugins.disabled/Examples mv */*-${bits}-release/*.ofx.bundle $ofx/Plugins.disabled/Examples rm -rf */*-${bits}-release */*-${bits}-debug cd ../Support/Plugins rm -rf */*-${bits}-release */*-${bits}-debug rm */*.o make BITS=$bits rm -rf $ofx/Plugins/Support.debug mkdir -p $ofx/Plugins/Support.debug mv */*-${bits}-debug/*.ofx.bundle $ofx/Plugins/Support.debug rm */*.o make BITS=$bits DEBUGFLAG=-O3 rm -rf $ofx/Plugins.disabled/Support mkdir -p $ofx/Plugins.disabled/Support mv */*-${bits}-release/*.ofx.bundle $ofx/Plugins.disabled/Support rm -rf */*-${bits}-release */*-${bits}-debug cd ../PropTester rm -rf *-${bits}-release *-${bits}-debug rm *.o make BITS=$bits rm -rf $ofx/Plugins/PropTester.debug mkdir -p $ofx/Plugins/PropTester.debug mv *-${bits}-debug/*.ofx.bundle $ofx/Plugins/PropTester.debug rm *.o make BITS=$bits DEBUGFLAG=-O3 rm -rf $ofx/Plugins.disabled/PropTester mkdir -p $ofx/Plugins.disabled/PropTester mv *-${bits}-release/*.ofx.bundle $ofx/Plugins.disabled/PropTester rm -rf *-${bits}-release *-${bits}-debug cd ../../.. cd openfx-yadif git pull git submodule update -i;git submodule foreach git pull origin master rm -rf *-${bits}-release *-${bits}-debug rm *.o make BITS=$bits rm -rf $ofx/Plugins/yadif.debug mkdir -p $ofx/Plugins/yadif.debug mv *-${bits}-debug/*.ofx.bundle $ofx/Plugins/yadif.debug rm *.o make BITS=$bits DEBUGFLAG=-O3 rm -rf $ofx/Plugins.disabled/yadif mkdir -p $ofx/Plugins.disabled/yadif mv *-${bits}-release/*.ofx.bundle $ofx/Plugins.disabled/yadif rm -rf *-${bits}-release *-${bits}-debug cd .. cd openfx-opencv git pull git submodule update -i;git submodule foreach git pull origin master cd opencv2fx rm -rf */*-${bits}-release */*-${bits}-debug rm */*.o make BITS=$bits rm -rf $ofx/Plugins/opencv2fx.debug mkdir -p $ofx/Plugins/opencv2fx.debug mv */*-${bits}-debug/*.ofx.bundle $ofx/Plugins/opencv2fx.debug rm */*.o make BITS=$bits DEBUGFLAG=-O3 rm -rf $ofx/Plugins.disabled/opencv2fx mkdir -p $ofx/Plugins.disabled/opencv2fx mv */*-${bits}-release/*.ofx.bundle $ofx/Plugins.disabled/opencv2fx rm -rf */*-${bits}-release */*-${bits}-debug cd ../.. cd openfx-io git pull git submodule update -i;git submodule foreach git pull origin master rm *.o */*.o make BITS=$bits rm -rf $ofx/Plugins/io.debug mkdir -p $ofx/Plugins/io.debug mv */*-${bits}-debug/*.ofx.bundle $ofx/Plugins/io.debug rm *.o */*.o make BITS=$bits DEBUGFLAG=-O3 rm -rf $ofx/Plugins.disabled/io mkdir -p $ofx/Plugins.disabled/io mv */*-${bits}-release/*.ofx.bundle $ofx/Plugins.disabled/io rm -rf */*-${bits}-release */*-${bits}-debug cd .. - compile TuttleOFX #(cd TuttleOFX;git checkout develop;git remote add upstream https://github.com/tuttleofx/TuttleOFX.git;git fetch upstream;git submodule update -i) (cd TuttleOFX;git checkout develop;git pull;git submodule update -i) cd TuttleOFX; mkdir build cd build on MacPorts: export LIBRARY_PATH=/opt/local/lib cmake -DPYTHON_INCLUDE_DIR=/opt/local/Library/Frameworks/Python.framework/Headers -DOPENIMAGEIO_INCLUDE_DIR=/opt/local/include/OpenImageIO -DCMAKE_INSTALL_PREFIX=/tmp/tuttleofx-install -DCMAKE_PREFIX_PATH="/opt/local;/opt/libjpeg-turbo" $CMAKE_PREFIX_PATH -DCMAKE_OSX_ARCHITECTURES="i386;x86_64" .. on HomeBrew: CMAKE_PREFIX_PATH=$(echo /usr/local/Cellar/*/* | sed 's/ /;/g') cmake -DOPENIMAGEIO_INCLUDE_DIR=/usr/local/include/OpenImageIO -DCMAKE_INSTALL_PREFIX=/tmp/tuttleofx-install -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH .. then: make make install cd .. - Compile Natron #You'll need to edit the file $HOME/.launchd.conf and add this line: #setenv PATH /opt/local/bin:/usr/bin:/bin:/usr/sbin:/sbin #And restart your session so it takes it into account. # see http://www.emacswiki.org/emacs/EmacsApp launchctl setenv PATH /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin (cd Natron;git checkout workshop;git submodule update -i; git submodule foreach git pull origin master) cd Natron cat > config.pri << EOF boost{ INCLUDEPATH += /opt/local/include LIBS += -L/opt/local/lib -lboost_serialization-mt -lboost_thread-mt -lboost_system-mt } EOF # using Xcode (cd Natron; qmake ../Natron/Natron.pro -spec macx-xcode; rm -rf Natron.xcodeproj) mkdir Natron-qt4-xcode cd Natron-qt4-xcode qmake ../Natron/Natron.pro -spec macx-xcode DEFINES+=NDEBUG ln -s ../Natron/Info.plist xcodebuild cd .. mkdir Natron-qt4-xcode-debug cd Natron-qt4-xcode-debug qmake ../Natron/Natron.pro -spec macx-xcode CONFIG+=debug ln -s ../Natron/Info.plist xcodebuild -configuration Debug cd .. #or using make mkdir Natron-qt4 cd Natron-qt4 qmake ../Natron/Natron.pro -spec unsupported/macx-clang DEFINES+=NDEBUG make cd .. #or using make to build a Universal Natron (all the libraries have to be Universal too, and this is only meaningful on OSX<=10.6) mkdir Natron-qt4-universal cd Natron-qt4-universal qmake ../Natron/Natron.pro -spec unsupported/macx-clang CONFIG+=universal DEFINES+=NDEBUG make cd .. mkdir Natron-qt4-universal-debug cd Natron-qt4-universal-debug qmake ../Natron/Natron.pro -spec unsupported/macx-clang CONFIG+=universal CONFIG+=debug make cd ..