Skip to content
jgoppert edited this page May 1, 2012 · 13 revisions

Install macports

http://www.macports.org/

Edit macports config

vi /opt/local/etc/macports/macports.conf

Set universal architectures and the binary path for builds. The universal architectures lets us compile universal binaries supporting all mac platforms. The binpath tells macports to use the tools like gcc built by macports in preference to the ones found in /usr/bin :

universal_arches = i386 ppc x86_64
binpath = /opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin

Edit macports variants file

This will modify your variants so by default they are universal and use frameworks.

vi /opt/local/etc/macports/variants.conf

Set +universal and +framework as default variants.

+universal +framework

Install dependencies

Using macports (download the latest if you don't have it):

If you didn't set your variants for macports above, be sure to add +universal and +framework on the end of the port install command.

sudo port install tcl tk qt4-mac-devel OpenSceneGraph-devel +univeral +framework

The OpenSceneGraph-devel build will fail due to some corrupt dependencies, but it gets what is needed for the source build, so now download the latest OpenSceneGraph source and build it. Make sure to set the flags to build statically.