162
edits
Changes
From Gramps
Add some Lion info, change python2.6 to python2.7
This is a command-line process. It's not too difficult, but you'll be using Terminal.app, not XCode. Unfortunately, Gtk has so far resisted efforts to get it to successfully cross-compile PPC on Intel or vice-versa, so the whole process must be repeated on machines of each architecture. '''''WebKit will not build on 10.4 (Tiger) or earlier systems, nor will it build against a 10.4 SDK. You must be running 10.5 (Leopard) or newer for this procedure to succeed!'''''
You'll need XCode, Apple's development environment. There's a copy on your OS X distribution DVD, or you can download the latest version from [http://developer.apple.com/technologies/xcode.html Apple], though you must register as a Mac developer. For Lion users, XCode is available for free from the App Store.
Next, read [https://sourceforge.net/apps/trac/gtk-osx/wiki/Build the build instructions for Gtk-OSX], '''''especially the Prerequisites'''''. Download and run the [http://downloads.sourceforge.net/sourceforge/gtk-osx/gtk-osx-build-setup.sh gtk-osx-build-install.sh] script, which will set up jhbuild for you.
If you are building for distribution, especially if you are running Snow Leopard on a 64-bit capable machine (Core2Duo, Core i5 or i7, or any Xeon) you should edit the file ~/.jhbuildrc-custom so that the call to <tt>sdk_setup</tt> looks like
setup_sdk(target="10.5", sdk_version="10.5", architectures=["i386"])
Lion doesn't support SDKs older than 10.6, so in that case the line should be:
setup_sdk(target="10.5", sdk_version="10.6", architectures=["i386"])
(If you're building on a PPC, you don't need to worry about this.)
export CXXFLAGS="$CXXFLAGS -I$PREFIX/include"
export CFLAGS="$CFLAGS -I$PREFIX/include"
export LDFLAGS="$LDFLAGS -lpython2.67"
scons
scons install
ln $PREFIX/lib/python2.67/site-packages/libexiv2python.dylib $PREFIX/lib/python2.67/site-packages/libexiv2python.so install_name_tool -id python2.67/site-packages/libexiv2python.dylib $PREFIX/lib/python2.67/site-packages/libexiv2python.dylib
Quit the shell and pick "2" a few more times to move on to the next module.