<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.inkscape.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Herrdeh</id>
	<title>Inkscape Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.inkscape.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Herrdeh"/>
	<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/Special:Contributions/Herrdeh"/>
	<updated>2026-04-30T00:14:38Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=80270</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=80270"/>
		<updated>2012-03-23T12:11:39Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gsl gnome-vfs libgnomeprintui automake autoconf bzr&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bzr branch lp:inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*Xcode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoid documentation and example software for example). You need at least: gcc, Xcode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code] &amp;lt;!--, a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot]--&amp;gt; or create a local branch of the current state of the [http://inkscape.org/bzr.php?lang=en BZR repository] using [http://bazaar.canonical.com/ bazaar]. &amp;lt;!-- Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package] --&amp;gt; Bazaar is not pre-installed on Leopard - it is recommended to install a current version with MacPorts (&amp;lt;tt&amp;gt;sudo port install bzr&amp;lt;/tt&amp;gt;).&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
* Working version of the &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_set&amp;amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_map&amp;amp;gt;&amp;lt;/tt&amp;gt; headers. &lt;br /&gt;
&lt;br /&gt;
Configure or build can fail on OS X Tiger and Leopard due to broken &amp;lt;tr1/unordered_set&amp;gt; header files because Apple's default compiler ([http://gcc.gnu.org/gcc-4.0/ GNU Compiler Collection 4.0.1]) and libstdc++ library ([http://gcc.gnu.org/libstdc++/ GNU Standard C++ Library v3]) installed by Xcode have never been fully updated to the last released version of the [http://gcc.gnu.org/gcc-4.0/changes.html#4.0.1 GCC 4_0 release series].&lt;br /&gt;
&lt;br /&gt;
If Inkscape 0.47+devel fails to configure with &amp;quot;error: You have a broken version of the &amp;lt;tr1/unordered_set&amp;gt; header. …&amp;quot; or fails to build with an [[build failure in tr1/hashtable|error]] in &amp;lt;tt&amp;gt;/usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/tt&amp;gt; it is necessary to either &lt;br /&gt;
&lt;br /&gt;
a) install a [http://trac.macports.org/wiki/UsingTheRightCompiler newer version of GCC] via MacPorts and make it the default compiler with MacPorts 'gcc_select' or&lt;br /&gt;
&lt;br /&gt;
b) patch the installed &amp;lt;tt&amp;gt;tr1/hashtable&amp;lt;/tt&amp;gt; header file of libstdc++-v3 as described in [[HashtableFixOSX]]&lt;br /&gt;
&lt;br /&gt;
; gcc/g++ versions by Apple known to fail to compile Inkscape 0.47+devel bzr revno &amp;gt;= 8976 are&lt;br /&gt;
: powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5370)&lt;br /&gt;
: i686-apple-darwin9-g++-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)&lt;br /&gt;
: i686-apple-darwin9-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577)&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from a [http://inkscape.org/bzr.php?lang=en bzr branch] or checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new MacPorts installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed MacPorts, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause MacPorts to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the MacPorts libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
addition in Nov-2009 by Wolf:&lt;br /&gt;
Meanwhile building a native inkscape aqua version is quite easy - dont be afraid! I do ask every Mac OS X user to try it and to file or to support bug reports. The more bug report come in, the quicker we'll have a really working inkscape aqua.  I'll try to provide binaries, but making them seem to be a bit more tricky. Here is a set of instructions - should be quite comprehensive: [[#Building Aqua November 2009]]&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second MacPorts tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let's say I want to install a new tree for native versions in /opt/local-native. I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can omit the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You should also set alternate applications_dir and frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks installed by this MacPorts (for example by python) don't clash with your standard MacPorts tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the PATH at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the native version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here. Omit them when editing your shell configuration file and put everything on one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua from scratch, 2010 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what was to do on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD.&lt;br /&gt;
Make sure you checked the optional install of MacOSX10.4u.sdk - this especially applies for Snow Leopard 10.6.&lt;br /&gt;
&lt;br /&gt;
Install [http://www.macports.org macports], retrieve the inkscape sources. &lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372]. (Maybe this is obsolete by Feb, 2010).&lt;br /&gt;
&lt;br /&gt;
If you want to use bazaar in order to keep your sources up to date, install it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo port install bzr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
How to use bazaar, have a look here: [[Working with Bazaar]].&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
# older versionsof gtk2 than 2.18.8 need to be patched according to these instructions:&lt;br /&gt;
# http://trac.macports.org/ticket/22451&lt;br /&gt;
&lt;br /&gt;
# so rather make sure you installed the latest gtk2  &amp;gt;=2.18.8:&lt;br /&gt;
&lt;br /&gt;
sudo port install gtk2 +quartz+no_x11&lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk-engines2&lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# Edit the file osx-build.sh to uncomment (enable) the configure option --enable-osxapp&lt;br /&gt;
# (line 24), if neccessary. I used TextWrangler for this, pico or another command line editor will do the same.&lt;br /&gt;
&lt;br /&gt;
# Back to the terminal:&lt;br /&gt;
&lt;br /&gt;
# autogen&lt;br /&gt;
sudo ./osx-build.sh a&lt;br /&gt;
&lt;br /&gt;
# configure it:&lt;br /&gt;
sudo ./osx-build.sh c&lt;br /&gt;
&lt;br /&gt;
# build it: &lt;br /&gt;
sudo ./osx-build.sh b&lt;br /&gt;
&lt;br /&gt;
# install it: &lt;br /&gt;
sudo ./osx-build.sh i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&lt;br /&gt;
# or double click the inkscape image in path-to-inkscape-sources/Build/bin&lt;br /&gt;
&lt;br /&gt;
# (This may not work - not reason to fall into despair so far, just go ahead an pack it…)&lt;br /&gt;
&lt;br /&gt;
# Build a Mac OS X package:&lt;br /&gt;
&lt;br /&gt;
# download python packages at http://inkscape.modevia.com/macosx-snap/Python-packages.dmg&lt;br /&gt;
# put the contents in a folder named &amp;quot;python&amp;quot; and put it somewhere - the following command&lt;br /&gt;
# expects it in the folder in which the inkscape sources folder lives&lt;br /&gt;
&lt;br /&gt;
# edit &amp;lt;path-to-inkscape-sources&amp;gt;/packaging/macosx/Resources/bin/inkscape and &lt;br /&gt;
# uncomment line 33: &lt;br /&gt;
&lt;br /&gt;
# export DYLD_LIBRARY_PATH=&amp;quot;$TOP/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;path-to-inkscape-sources&amp;gt;/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# and pack:&lt;br /&gt;
&lt;br /&gt;
./osx-build.sh p -py ../../../python/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# If your building runs through smoothly, you can automate the build process for the next version by doing all at once:&lt;br /&gt;
&lt;br /&gt;
sudo ./osx-build.sh a c b i -py ../../../python/ p d&lt;br /&gt;
&lt;br /&gt;
# To avoid X11 from launching simultaneously), edit&lt;br /&gt;
inkscape.app/Contents/Resources/script and add at line 45&lt;br /&gt;
&lt;br /&gt;
killall X11&lt;br /&gt;
&lt;br /&gt;
# Hopefully more skilled people than me will find a nicer solution than this very brutal hack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the end this procedure works pretty straightforward, delivering a native inkscape which works fairly well.&lt;br /&gt;
&lt;br /&gt;
As the author of this lines knows very little about compiling etc., I do recommend to send requests for support to the devel mailing list (mailto: inkscape-devel@lists.sourceforge.net). I'm reading there and may occasionally have the chance to answer some questions.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
* Mac OS X native (aqua), PPC-only, Tiger-only build of 0.47, can be retrieved here: [http://verkehrsplanung.com/Inkscape_aqua_PPC_047.zip]. NOT FOR PRODUCTIVE USE - JUST TESTING! - (Nevertheless I'm doing quite a bit productive work on it… (-;)&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=See also=&lt;br /&gt;
*[[Compiling Inkscape]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=60337</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=60337"/>
		<updated>2010-03-24T09:18:32Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gsl gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*Xcode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, Xcode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
* Working version of the &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_set&amp;amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_map&amp;amp;gt;&amp;lt;/tt&amp;gt; headers. &lt;br /&gt;
&lt;br /&gt;
Configure or build can fail on OS X Tiger and Leopard due to broken &amp;lt;tr1/unordered_set&amp;gt; header files because Apple's default compiler ([http://gcc.gnu.org/gcc-4.0/ GNU Compiler Collection 4.0.1]) and libstdc++ library ([http://gcc.gnu.org/libstdc++/ GNU Standard C++ Library v3]) installed by Xcode have never been fully updated to the last released version of the [http://gcc.gnu.org/gcc-4.0/changes.html#4.0.1 GCC 4_0 release series].&lt;br /&gt;
&lt;br /&gt;
If Inkscape 0.47+devel fails to configure with &amp;quot;error: You have a broken version of the &amp;lt;tr1/unordered_set&amp;gt; header. …&amp;quot; or fails to build with an [[build failure in tr1/hashtable|error]] in &amp;lt;tt&amp;gt;/usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/tt&amp;gt; it is necessary to either &lt;br /&gt;
&lt;br /&gt;
a) install a [http://trac.macports.org/wiki/UsingTheRightCompiler newer version of GCC] via MacPorts and make it the default compiler with MacPorts 'gcc_select' or&lt;br /&gt;
&lt;br /&gt;
b) patch the installed &amp;lt;tt&amp;gt;tr1/hashtable&amp;lt;/tt&amp;gt; header file of libstdc++-v3 as described in [[HashtableFixOSX]]&lt;br /&gt;
&lt;br /&gt;
; gcc/g++ versions by Apple known to fail to compile Inkscape 0.47+devel bzr revno &amp;gt;= 8976 are&lt;br /&gt;
: powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5370)&lt;br /&gt;
: i686-apple-darwin9-g++-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)&lt;br /&gt;
: i686-apple-darwin9-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577)&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new MacPorts installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed MacPorts, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause MacPorts to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the MacPorts libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
addition in Nov-2009 by Wolf:&lt;br /&gt;
Meanwhile building a native inkscape aqua version is quite easy - dont be afraid! I do ask every Mac OS X user to try it and to file or to support bug reports. The more bug report come in, the quicker we'll have a really working inkscape aqua.  I'll try to provide binaries, but making them seem to be a bit more tricky. Here is a set of instructions - should be quite comprehensive: [[#Building Aqua November 2009]]&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second MacPorts tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let's say I want to install a new tree for native versions in /opt/local-native. I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can omit the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You should also set alternate applications_dir and frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks installed by this MacPorts (for example by python) don't clash with your standard MacPorts tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the PATH at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the native version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here. Omit them when editing your shell configuration file and put everything on one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua from scratch, 2010 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what was to do on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD.&lt;br /&gt;
Make sure you checked the optional install of MacOSX10.4u.sdk - this especially applies for Snow Leopard 10.6.&lt;br /&gt;
&lt;br /&gt;
Install [http://www.macports.org macports], retrieve the inkscape sources. &lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372]. (Maybe this is obsolete by Feb, 2010).&lt;br /&gt;
&lt;br /&gt;
If you want to use bazaar in order to keep your sources up to date, install it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo port install bzr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
How to use bazaar, have a look here: [[Working with Bazaar]].&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
# older versionsof gtk2 than 2.18.8 need to be patched according to these instructions:&lt;br /&gt;
# http://trac.macports.org/ticket/22451&lt;br /&gt;
&lt;br /&gt;
# so rather make sure you installed the latest gtk2  &amp;gt;=2.18.8:&lt;br /&gt;
&lt;br /&gt;
sudo port install gtk2 +quartz+no_x11&lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk-engines2&lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# Edit the file osx-build.sh to uncomment (enable) the configure option --enable-osxapp&lt;br /&gt;
# (line 24), if neccessary. I used TextWrangler for this, pico or another command line editor will do the same.&lt;br /&gt;
&lt;br /&gt;
# Back to the terminal:&lt;br /&gt;
&lt;br /&gt;
# configure it:&lt;br /&gt;
sudo ./osx-build.sh c&lt;br /&gt;
&lt;br /&gt;
# build it: &lt;br /&gt;
sudo ./osx-build.sh b&lt;br /&gt;
&lt;br /&gt;
# install it: &lt;br /&gt;
sudo ./osx-build.sh i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&lt;br /&gt;
# or double click the inkscape image in path-to-inkscape-sources/Build/bin&lt;br /&gt;
&lt;br /&gt;
# (This may not work - not reason to fall into despair so far, just go ahead an pack it…)&lt;br /&gt;
&lt;br /&gt;
# Build a Mac OS X package:&lt;br /&gt;
&lt;br /&gt;
# download python packages at http://inkscape.modevia.com/macosx-snap/Python-packages.dmg&lt;br /&gt;
# put the contents in a folder named &amp;quot;python&amp;quot; and put it somewhere - the following command&lt;br /&gt;
# expects it in the folder in which the inkscape sources folder lives&lt;br /&gt;
&lt;br /&gt;
# edit &amp;lt;path-to-inkscape-sources&amp;gt;/packaging/macosx/Resources/bin/inkscape and &lt;br /&gt;
# uncomment line 33: &lt;br /&gt;
&lt;br /&gt;
# export DYLD_LIBRARY_PATH=&amp;quot;$TOP/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;path-to-inkscape-sources&amp;gt;/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# and pack:&lt;br /&gt;
&lt;br /&gt;
./osx-build.sh p -py ../../../python/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# If your building runs through smoothly, you can automate the build process for the next version by doing all at once:&lt;br /&gt;
&lt;br /&gt;
sudo ./osx-build.sh a c b i -py ../../../python/ p d&lt;br /&gt;
&lt;br /&gt;
# To avoid X11 from launching simultaneously), edit&lt;br /&gt;
inkscape.app/Contents/Resources/script and add at line 45&lt;br /&gt;
&lt;br /&gt;
killall X11&lt;br /&gt;
&lt;br /&gt;
# Hopefully more skilled people than me will find a nicer solution than this very brutal hack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the end this procedure works pretty straightforward, delivering a native inkscape which works fairly well.&lt;br /&gt;
&lt;br /&gt;
As the author of this lines knows very little about compiling etc., I do recommend to send requests for support to the devel mailing list (mailto: inkscape-devel@lists.sourceforge.net). I'm reading there and may occasionally have the chance to answer some questions.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
* Mac OS X native (aqua), PPC-only, Tiger-only build of 0.47, can be retrieved here: [http://verkehrsplanung.com/Inkscape_aqua_PPC_047.zip]. NOT FOR PRODUCTIVE USE - JUST TESTING! - (Nevertheless I'm doing quite a bit productive work on it… (-;)&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=60331</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=60331"/>
		<updated>2010-03-24T08:45:07Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* Building Aqua from scratch, 2010 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gsl gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*Xcode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, Xcode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
* Working version of the &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_set&amp;amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_map&amp;amp;gt;&amp;lt;/tt&amp;gt; headers. &lt;br /&gt;
&lt;br /&gt;
Configure or build can fail on OS X Tiger and Leopard due to broken &amp;lt;tr1/unordered_set&amp;gt; header files because Apple's default compiler ([http://gcc.gnu.org/gcc-4.0/ GNU Compiler Collection 4.0.1]) and libstdc++ library ([http://gcc.gnu.org/libstdc++/ GNU Standard C++ Library v3]) installed by Xcode have never been fully updated to the last released version of the [http://gcc.gnu.org/gcc-4.0/changes.html#4.0.1 GCC 4_0 release series].&lt;br /&gt;
&lt;br /&gt;
If Inkscape 0.47+devel fails to configure with &amp;quot;error: You have a broken version of the &amp;lt;tr1/unordered_set&amp;gt; header. …&amp;quot; or fails to build with an [[build failure in tr1/hashtable|error]] in &amp;lt;tt&amp;gt;/usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/tt&amp;gt; it is necessary to either &lt;br /&gt;
&lt;br /&gt;
a) install a [http://trac.macports.org/wiki/UsingTheRightCompiler newer version of GCC] via MacPorts and make it the default compiler with MacPorts 'gcc_select' or&lt;br /&gt;
&lt;br /&gt;
b) patch the installed &amp;lt;tt&amp;gt;tr1/hashtable&amp;lt;/tt&amp;gt; header file of libstdc++-v3 as described in [[HashtableFixOSX]]&lt;br /&gt;
&lt;br /&gt;
; gcc/g++ versions by Apple known to fail to compile Inkscape 0.47+devel bzr revno &amp;gt;= 8976 are&lt;br /&gt;
: powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5370)&lt;br /&gt;
: i686-apple-darwin9-g++-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)&lt;br /&gt;
: i686-apple-darwin9-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577)&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new MacPorts installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed MacPorts, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause MacPorts to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the MacPorts libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
addition in Nov-2009 by Wolf:&lt;br /&gt;
Meanwhile building a native inkscape aqua version is quite easy - dont be afraid! I do ask every Mac OS X user to try it and to file or to support bug reports. The more bug report come in, the quicker we'll have a really working inkscape aqua.  I'll try to provide binaries, but making them seem to be a bit more tricky. Here is a set of instructions - should be quite comprehensive: [[#Building Aqua November 2009]]&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second MacPorts tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let's say I want to install a new tree for native versions in /opt/local-native. I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can omit the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You should also set alternate applications_dir and frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks installed by this MacPorts (for example by python) don't clash with your standard MacPorts tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the PATH at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the native version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here. Omit them when editing your shell configuration file and put everything on one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua from scratch, 2010 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what was to do on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD.&lt;br /&gt;
Make sure you checked the optional install of MacOSX10.4u.sdk - this especially applies for Snow Leopard 10.6.&lt;br /&gt;
&lt;br /&gt;
Install [http://www.macports.org macports], retrieve the inkscape sources. &lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372]. (Maybe this is obsolete by Feb, 2010).&lt;br /&gt;
&lt;br /&gt;
If you want to use bazaar in order to keep your sources up to date, install it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo port install bzr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
How to use bazaar, have a look here: [[Working with Bazaar]].&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
# older versionsof gtk2 than 2.18.8 need to be patched according to these instructions:&lt;br /&gt;
# http://trac.macports.org/ticket/22451&lt;br /&gt;
&lt;br /&gt;
# so rather make sure you installed the latest gtk2  &amp;gt;=2.18.8:&lt;br /&gt;
&lt;br /&gt;
sudo port install gtk2 +quartz+no_x11&lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk-engines2&lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# Edit the file osx-build.sh to uncomment (enable) the configure option --enable-osxapp&lt;br /&gt;
# (line 24), if neccessary. I used TextWrangler for this, pico or another command line editor will do the same.&lt;br /&gt;
&lt;br /&gt;
# Back to the terminal:&lt;br /&gt;
&lt;br /&gt;
# configure it:&lt;br /&gt;
sudo ./osx-build.sh c&lt;br /&gt;
&lt;br /&gt;
# build it: &lt;br /&gt;
sudo ./osx-build.sh b&lt;br /&gt;
&lt;br /&gt;
# install it: &lt;br /&gt;
sudo ./osx-build.sh i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&lt;br /&gt;
# or double click the inkscape image in path-to-inkscape-sources/Build/bin&lt;br /&gt;
&lt;br /&gt;
# (This may not work - not reason to fall into despair so far, just go ahead an pack it…)&lt;br /&gt;
&lt;br /&gt;
# Build a Mac OS X package:&lt;br /&gt;
&lt;br /&gt;
# download python packages at http://inkscape.modevia.com/macosx-snap/Python-packages.dmg&lt;br /&gt;
# put the contents in a folder named &amp;quot;python&amp;quot; and put it somewhere - the following command&lt;br /&gt;
# expects it in the folder in which the inkscape sources folder lives&lt;br /&gt;
&lt;br /&gt;
# edit &amp;lt;path-to-inkscape-sources&amp;gt;/packaging/macosx/Resources/bin/inkscape and &lt;br /&gt;
# uncomment line 33: &lt;br /&gt;
&lt;br /&gt;
# export DYLD_LIBRARY_PATH=&amp;quot;$TOP/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;path-to-inkscape-sources&amp;gt;/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# and pack:&lt;br /&gt;
&lt;br /&gt;
./osx-build.sh p -py ../../../python/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# If your building runs through smoothly, you can automate the build process for the next version by doing all at once:&lt;br /&gt;
&lt;br /&gt;
sudo ./osx-build.sh a c b i -py ../../../python/ p d&lt;br /&gt;
&lt;br /&gt;
# To avoid X11 from launching simultaneously), edit&lt;br /&gt;
inkscape.app/Contents/Resources/script and add at line 45&lt;br /&gt;
&lt;br /&gt;
killall X11&lt;br /&gt;
&lt;br /&gt;
# Hopefully more skilled people than me will find a nicer solution than this very brutal hack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the end this procedure works pretty straightforward, delivering a native inkscape which works fairly well.&lt;br /&gt;
&lt;br /&gt;
As the author of this lines knows very little about compiling etc., I do recommend to send requests for support to the devel mailing list (mailto: inkscape-devel@lists.sourceforge.net). I'm reading there and may occasionally have the chance to answer some questions.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
* A PPC-only build of 0.47, made on Tiger, can be retrieved here: [http://verkehrsplanung.com/Inkscape_aqua_PPC_047.zip]. NOT FOR PRODUCTIVE USE - JUST TESTING! - (Nevertheless I'm doing quite a bit productive work on it… (-;)&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=60325</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=60325"/>
		<updated>2010-03-24T08:35:48Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* User Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gsl gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*Xcode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, Xcode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
* Working version of the &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_set&amp;amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_map&amp;amp;gt;&amp;lt;/tt&amp;gt; headers. &lt;br /&gt;
&lt;br /&gt;
Configure or build can fail on OS X Tiger and Leopard due to broken &amp;lt;tr1/unordered_set&amp;gt; header files because Apple's default compiler ([http://gcc.gnu.org/gcc-4.0/ GNU Compiler Collection 4.0.1]) and libstdc++ library ([http://gcc.gnu.org/libstdc++/ GNU Standard C++ Library v3]) installed by Xcode have never been fully updated to the last released version of the [http://gcc.gnu.org/gcc-4.0/changes.html#4.0.1 GCC 4_0 release series].&lt;br /&gt;
&lt;br /&gt;
If Inkscape 0.47+devel fails to configure with &amp;quot;error: You have a broken version of the &amp;lt;tr1/unordered_set&amp;gt; header. …&amp;quot; or fails to build with an [[build failure in tr1/hashtable|error]] in &amp;lt;tt&amp;gt;/usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/tt&amp;gt; it is necessary to either &lt;br /&gt;
&lt;br /&gt;
a) install a [http://trac.macports.org/wiki/UsingTheRightCompiler newer version of GCC] via MacPorts and make it the default compiler with MacPorts 'gcc_select' or&lt;br /&gt;
&lt;br /&gt;
b) patch the installed &amp;lt;tt&amp;gt;tr1/hashtable&amp;lt;/tt&amp;gt; header file of libstdc++-v3 as described in [[HashtableFixOSX]]&lt;br /&gt;
&lt;br /&gt;
; gcc/g++ versions by Apple known to fail to compile Inkscape 0.47+devel bzr revno &amp;gt;= 8976 are&lt;br /&gt;
: powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5370)&lt;br /&gt;
: i686-apple-darwin9-g++-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)&lt;br /&gt;
: i686-apple-darwin9-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577)&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new MacPorts installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed MacPorts, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause MacPorts to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the MacPorts libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
addition in Nov-2009 by Wolf:&lt;br /&gt;
Meanwhile building a native inkscape aqua version is quite easy - dont be afraid! I do ask every Mac OS X user to try it and to file or to support bug reports. The more bug report come in, the quicker we'll have a really working inkscape aqua.  I'll try to provide binaries, but making them seem to be a bit more tricky. Here is a set of instructions - should be quite comprehensive: [[#Building Aqua November 2009]]&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second MacPorts tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let's say I want to install a new tree for native versions in /opt/local-native. I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can omit the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You should also set alternate applications_dir and frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks installed by this MacPorts (for example by python) don't clash with your standard MacPorts tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the PATH at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the native version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here. Omit them when editing your shell configuration file and put everything on one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua from scratch, 2010 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what was to do on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD.&lt;br /&gt;
Make sure you checked the optional install of MacOSX10.4u.sdk - this especially applies for Snow Leopard 10.6.&lt;br /&gt;
&lt;br /&gt;
Install [http://www.macports.org macports], retrieve the inkscape sources. &lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372]. (Maybe this is obsolete by Feb, 2010).&lt;br /&gt;
&lt;br /&gt;
If you want to use bazaar in order to keep your sources up to date, install it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo port install bzr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
How to use bazaar, have a look here: [[Working with Bazaar]].&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
# older versionsof gtk2 than 2.18.8 need to be patched according to these instructions:&lt;br /&gt;
# http://trac.macports.org/ticket/22451&lt;br /&gt;
&lt;br /&gt;
# so rather make sure you installed the latest gtk2  &amp;gt;=2.18.8:&lt;br /&gt;
&lt;br /&gt;
sudo port install gtk2 +quartz+no_x11&lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk-engines2&lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# Edit the file osx-build.sh to uncomment (enable) the configure option --enable-osxapp&lt;br /&gt;
# (line 24), if neccessary. I used TextWrangler for this, pico or another command line editor will do the same.&lt;br /&gt;
&lt;br /&gt;
# Back to the terminal:&lt;br /&gt;
&lt;br /&gt;
# configure it:&lt;br /&gt;
sudo ./osx-build.sh c&lt;br /&gt;
&lt;br /&gt;
# build it: &lt;br /&gt;
sudo ./osx-build.sh b&lt;br /&gt;
&lt;br /&gt;
# install it: &lt;br /&gt;
sudo ./osx-build.sh i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&lt;br /&gt;
# or double click the inkscape image in path-to-inkscape-sources/Build/bin&lt;br /&gt;
&lt;br /&gt;
# (This may not work - not reason to fall into despair so far, just go ahead an pack it…)&lt;br /&gt;
&lt;br /&gt;
# Build a Mac OS X package:&lt;br /&gt;
&lt;br /&gt;
# download python packages at http://inkscape.modevia.com/macosx-snap/Python-packages.dmg&lt;br /&gt;
# put the contents in a folder named &amp;quot;python&amp;quot; and put it somewhere - the following command&lt;br /&gt;
# expects it in the folder in which the inkscape sources folder lives&lt;br /&gt;
&lt;br /&gt;
# edit &amp;lt;path-to-inkscape-sources&amp;gt;/packaging/macosx/Resources/bin/inkscape and &lt;br /&gt;
# uncomment line 33: &lt;br /&gt;
&lt;br /&gt;
# export DYLD_LIBRARY_PATH=&amp;quot;$TOP/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;path-to-inkscape-sources&amp;gt;/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# and pack:&lt;br /&gt;
&lt;br /&gt;
./osx-build.sh p -py ../../../python/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# If your building runs through smoothly, you can automate the build process for the next version by doing all at once:&lt;br /&gt;
&lt;br /&gt;
#  or all at once:&lt;br /&gt;
&lt;br /&gt;
sudo ./osx-build.sh a c b i -py ../../../python/ p d&lt;br /&gt;
&lt;br /&gt;
# To avoid X11 from launching simultaneously), edit&lt;br /&gt;
inkscape.app/Contents/Resources/script and add at line 45&lt;br /&gt;
&lt;br /&gt;
killall X11&lt;br /&gt;
&lt;br /&gt;
# Hopefully more skilled people than me will find a nicer solution than this very brutal hack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the end this procedure works pretty straightforward, delivering a native inkscape which works fairly well.&lt;br /&gt;
&lt;br /&gt;
As the author of this lines knows very little about compiling etc., I do recommend to send requests for support to the devel mailing list (mailto: inkscape-devel@lists.sourceforge.net). I'm reading there and may occasionally have the chance to answer some questions.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
* A PPC-only build of 0.47, made on Tiger, can be retrieved here: [http://verkehrsplanung.com/Inkscape_aqua_PPC_047.zip]. NOT FOR PRODUCTIVE USE - JUST TESTING! - (Nevertheless I'm doing quite a bit productive work on it… (-;)&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=60319</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=60319"/>
		<updated>2010-03-24T08:31:45Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* Building Aqua February 2010 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gsl gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*Xcode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, Xcode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
* Working version of the &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_set&amp;amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_map&amp;amp;gt;&amp;lt;/tt&amp;gt; headers. &lt;br /&gt;
&lt;br /&gt;
Configure or build can fail on OS X Tiger and Leopard due to broken &amp;lt;tr1/unordered_set&amp;gt; header files because Apple's default compiler ([http://gcc.gnu.org/gcc-4.0/ GNU Compiler Collection 4.0.1]) and libstdc++ library ([http://gcc.gnu.org/libstdc++/ GNU Standard C++ Library v3]) installed by Xcode have never been fully updated to the last released version of the [http://gcc.gnu.org/gcc-4.0/changes.html#4.0.1 GCC 4_0 release series].&lt;br /&gt;
&lt;br /&gt;
If Inkscape 0.47+devel fails to configure with &amp;quot;error: You have a broken version of the &amp;lt;tr1/unordered_set&amp;gt; header. …&amp;quot; or fails to build with an [[build failure in tr1/hashtable|error]] in &amp;lt;tt&amp;gt;/usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/tt&amp;gt; it is necessary to either &lt;br /&gt;
&lt;br /&gt;
a) install a [http://trac.macports.org/wiki/UsingTheRightCompiler newer version of GCC] via MacPorts and make it the default compiler with MacPorts 'gcc_select' or&lt;br /&gt;
&lt;br /&gt;
b) patch the installed &amp;lt;tt&amp;gt;tr1/hashtable&amp;lt;/tt&amp;gt; header file of libstdc++-v3 as described in [[HashtableFixOSX]]&lt;br /&gt;
&lt;br /&gt;
; gcc/g++ versions by Apple known to fail to compile Inkscape 0.47+devel bzr revno &amp;gt;= 8976 are&lt;br /&gt;
: powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5370)&lt;br /&gt;
: i686-apple-darwin9-g++-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)&lt;br /&gt;
: i686-apple-darwin9-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577)&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new MacPorts installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed MacPorts, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause MacPorts to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the MacPorts libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
addition in Nov-2009 by Wolf:&lt;br /&gt;
Meanwhile building a native inkscape aqua version is quite easy - dont be afraid! I do ask every Mac OS X user to try it and to file or to support bug reports. The more bug report come in, the quicker we'll have a really working inkscape aqua.  I'll try to provide binaries, but making them seem to be a bit more tricky. Here is a set of instructions - should be quite comprehensive: [[#Building Aqua November 2009]]&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second MacPorts tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let's say I want to install a new tree for native versions in /opt/local-native. I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can omit the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You should also set alternate applications_dir and frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks installed by this MacPorts (for example by python) don't clash with your standard MacPorts tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the PATH at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the native version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here. Omit them when editing your shell configuration file and put everything on one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua from scratch, 2010 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what was to do on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD.&lt;br /&gt;
Make sure you checked the optional install of MacOSX10.4u.sdk - this especially applies for Snow Leopard 10.6.&lt;br /&gt;
&lt;br /&gt;
Install [http://www.macports.org macports], retrieve the inkscape sources. &lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372]. (Maybe this is obsolete by Feb, 2010).&lt;br /&gt;
&lt;br /&gt;
If you want to use bazaar in order to keep your sources up to date, install it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo port install bzr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
How to use bazaar, have a look here: [[Working with Bazaar]].&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
# older versionsof gtk2 than 2.18.8 need to be patched according to these instructions:&lt;br /&gt;
# http://trac.macports.org/ticket/22451&lt;br /&gt;
&lt;br /&gt;
# so rather make sure you installed the latest gtk2  &amp;gt;=2.18.8:&lt;br /&gt;
&lt;br /&gt;
sudo port install gtk2 +quartz+no_x11&lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk-engines2&lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# Edit the file osx-build.sh to uncomment (enable) the configure option --enable-osxapp&lt;br /&gt;
# (line 24), if neccessary. I used TextWrangler for this, pico or another command line editor will do the same.&lt;br /&gt;
&lt;br /&gt;
# Back to the terminal:&lt;br /&gt;
&lt;br /&gt;
# configure it:&lt;br /&gt;
sudo ./osx-build.sh c&lt;br /&gt;
&lt;br /&gt;
# build it: &lt;br /&gt;
sudo ./osx-build.sh b&lt;br /&gt;
&lt;br /&gt;
# install it: &lt;br /&gt;
sudo ./osx-build.sh i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&lt;br /&gt;
# or double click the inkscape image in path-to-inkscape-sources/Build/bin&lt;br /&gt;
&lt;br /&gt;
# (This may not work - not reason to fall into despair so far, just go ahead an pack it…)&lt;br /&gt;
&lt;br /&gt;
# Build a Mac OS X package:&lt;br /&gt;
&lt;br /&gt;
# download python packages at http://inkscape.modevia.com/macosx-snap/Python-packages.dmg&lt;br /&gt;
# put the contents in a folder named &amp;quot;python&amp;quot; and put it somewhere - the following command&lt;br /&gt;
# expects it in the folder in which the inkscape sources folder lives&lt;br /&gt;
&lt;br /&gt;
# edit &amp;lt;path-to-inkscape-sources&amp;gt;/packaging/macosx/Resources/bin/inkscape and &lt;br /&gt;
# uncomment line 33: &lt;br /&gt;
&lt;br /&gt;
# export DYLD_LIBRARY_PATH=&amp;quot;$TOP/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;path-to-inkscape-sources&amp;gt;/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# and pack:&lt;br /&gt;
&lt;br /&gt;
./osx-build.sh p -py ../../../python/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# If your building runs through smoothly, you can automate the build process for the next version by doing all at once:&lt;br /&gt;
&lt;br /&gt;
#  or all at once:&lt;br /&gt;
&lt;br /&gt;
sudo ./osx-build.sh a c b i -py ../../../python/ p d&lt;br /&gt;
&lt;br /&gt;
# To avoid X11 from launching simultaneously), edit&lt;br /&gt;
inkscape.app/Contents/Resources/script and add at line 45&lt;br /&gt;
&lt;br /&gt;
killall X11&lt;br /&gt;
&lt;br /&gt;
# Hopefully more skilled people than me will find a nicer solution than this very brutal hack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the end this procedure works pretty straightforward, delivering a native inkscape which works fairly well.&lt;br /&gt;
&lt;br /&gt;
As the author of this lines knows very little about compiling etc., I do recommend to send requests for support to the devel mailing list (mailto: inkscape-devel@lists.sourceforge.net). I'm reading there and may occasionally have the chance to answer some questions.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=Working_with_Bazaar&amp;diff=60313</id>
		<title>Working with Bazaar</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=Working_with_Bazaar&amp;diff=60313"/>
		<updated>2010-03-24T07:22:45Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* First steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Bazaar concepts==&lt;br /&gt;
&lt;br /&gt;
It is assumed that you are familiar with the basic concepts of version control, like working copy, committing, updating, conflicts. There will be a section that explains the basic functionality soon.&lt;br /&gt;
&lt;br /&gt;
; '''Branch'''&lt;br /&gt;
: is a working copy of the project's code. Typically you use one branch per set of related changes, for example a new output extension. Once your work is finished, you ''merge'' your branch into a larger project. Initially, there is only one branch, the trunk; all other branches are its (probably indirect) descendants. To create a new branch, you have to copy an existing one.&lt;br /&gt;
; '''Checkout'''&lt;br /&gt;
: is a copy of code contained in a branch that is not stored on your computer (a remote branch). Committing to a checkout will immediately apply the changes to the remote branch. Commits will not succeed if somebody else modified the branch while you were working - you need to have an up-to-date working copy - or when you're offline.&lt;br /&gt;
:When branches A and B have a common ancestor branch but each contain changes not present in the other, they have '''diverged'''. For example, when you work on an improved rectangle tool in your own branch and at the same time somebody else applies a PDF export bugfix to the trunk, your rectangle tool branch becomes diverged from the trunk.&lt;br /&gt;
; '''Trunk'''&lt;br /&gt;
: is the main branch, which represents cutting-edge working code. You should start from it when doing any new development.&lt;br /&gt;
; '''Merge'''&lt;br /&gt;
: is the process of reconciling changes made between two branches since they diverged. This operation is asymmetric. When you merge A into B, all changes made to A since it was branched from B are applied to B. A is not changed. When you work on some feature, you typically work in a branch, periodically merging the trunk into your branch (to sync up with the latest changes), then you merge your work into the trunk. Merging is similar to applying a patch - it only changes your working copy. To apply a merge, you need to commit the changes it introduced. Merging un-diverges branches.&lt;br /&gt;
; '''Repository'''&lt;br /&gt;
: is a place where branches of a project are stored. Having a shared repository reduces the storage requirements of multiple branches of one project. Instead of O(number of branches) space, the Bazaar data takes up O(total size of changes in all branches) space.&lt;br /&gt;
; '''Bind'''&lt;br /&gt;
: is the process of converting a non-diverged local branch into a checkout of the remote branch.&lt;br /&gt;
; '''Push'''&lt;br /&gt;
: is the process of publishing an exact copy (a mirror) of your branch in some other location. The difference between pushing and checkouts is that a checked out remote branch is updated every time you commit, while a pushed remote branch is updated only when you push to it - you can commit any amount of changes between pushes. You can only push to a branch if the mirror has not diverged from your local copy. This can happen if more than 1 person can push to the same location.&lt;br /&gt;
; '''Pull'''&lt;br /&gt;
: is the process of creating a local exact copy (mirror) of a branch, in principle a reverse of pushing.&lt;br /&gt;
&lt;br /&gt;
==First steps==&lt;br /&gt;
&lt;br /&gt;
First you need to tell Bazaar your name. This will appear on all your commits. You should use your real e-mail, but you can obfuscate it if you are afraid of spam.&lt;br /&gt;
&lt;br /&gt;
Obfuscated e-mail examples:&lt;br /&gt;
 $ bzr whoami &amp;quot;John Q. Public &amp;lt;john dot q dot public at-sign bigmail dot com&amp;gt;&amp;quot;&lt;br /&gt;
 $ bzr whoami &amp;quot;John Q. Public &amp;lt;removethis.john.q.public@bigmail.com&amp;gt;&amp;quot;&lt;br /&gt;
Unobfuscated e-mail example: &lt;br /&gt;
 $ bzr whoami &amp;quot;John Q. Public &amp;lt;john.q.public@bigmail.com&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you have an account on launchpad and want to commit changes there, you need to specify your launchpad login:&lt;br /&gt;
 $ bzr launchpad-login johnq&lt;br /&gt;
&lt;br /&gt;
Then fetch Inkscape's trunk&lt;br /&gt;
 $ bzr branch lp:inkscape&lt;br /&gt;
&lt;br /&gt;
To carry out a later update of Inkscape's trunk&lt;br /&gt;
 $ bzr pull lp:inkscape&lt;br /&gt;
&lt;br /&gt;
==Using a centralized (SVN-like) workflow==&lt;br /&gt;
&lt;br /&gt;
In this case, every commit that you make is immediately sent to the central repository. There are two ways of achieving this:&lt;br /&gt;
&lt;br /&gt;
===SVN-style checkout===&lt;br /&gt;
&lt;br /&gt;
Get the latest Inkscape code as a checkout, rather than a branch:&lt;br /&gt;
 $ bzr checkout lp:inkscape&lt;br /&gt;
&lt;br /&gt;
Now work as in SVN:&lt;br /&gt;
  &amp;lt;do work&amp;gt;&lt;br /&gt;
 $ bzr commit&lt;br /&gt;
  &amp;lt;error, someone else has changed things&amp;gt;&lt;br /&gt;
 $ bzr update&lt;br /&gt;
  &amp;lt;check all is okay&amp;gt;&lt;br /&gt;
 $ bzr commit&lt;br /&gt;
&lt;br /&gt;
If you add new files, add them to version control with &amp;lt;tt&amp;gt;bzr add ''file''&amp;lt;/tt&amp;gt;. You can recursively add all new files by writing simply &amp;lt;tt&amp;gt;bzr add&amp;lt;/tt&amp;gt; in the top level directory.&lt;br /&gt;
&lt;br /&gt;
===Binding a BZR branch===&lt;br /&gt;
&lt;br /&gt;
Get Inkscape's code the regular bzr way:&lt;br /&gt;
 $ bzr branch lp:inkscape&lt;br /&gt;
&lt;br /&gt;
Then transform your banch into a checkout:&lt;br /&gt;
 $ cd inkscape&lt;br /&gt;
 $ bzr bind lp:inkscape&lt;br /&gt;
&lt;br /&gt;
Now work as in SVN:&lt;br /&gt;
  &amp;lt;do work&amp;gt;&lt;br /&gt;
 $ bzr commit&lt;br /&gt;
  &amp;lt;error, someone else has changed things&amp;gt;&lt;br /&gt;
 $ bzr update&lt;br /&gt;
  &amp;lt;check all is okay&amp;gt;&lt;br /&gt;
 $ bzr commit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Differences from SVN===&lt;br /&gt;
&lt;br /&gt;
* Commits will fail if your checkout is not up to date, even if there would be no conflicts.&lt;br /&gt;
* The revision number is an attribute of the working tree, not of individual files. It is not possible to have different portions of the working tree at different revisions.&lt;br /&gt;
* &amp;lt;tt&amp;gt;bzr commit ''file''&amp;lt;/tt&amp;gt; works like &amp;lt;tt&amp;gt; svn commit ''file'' &amp;amp;&amp;amp; svn update ''project-root''&amp;lt;/tt&amp;gt;. After a successful partial commit, the entire tree's revision is increased by 1.&lt;br /&gt;
* No special server is needed to publish a branch. You can push branches to anywhere, including simple FTP shares. In our scenario, Launchpad works like a central repository, but it's not required to publish everything there.&lt;br /&gt;
* You create branches locally. To simulate creating a SVN-style branch on Launchpad, you need to create a local branch, push it, then bind it to the pushed location.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
* In some cases it is possible to create subrevisions. When two branches with a common parent are merged, all commits to one of them since the time they diverged will be grouped into one revision. To avoid this, when committing your work to trunk, you should merge from your branch into trunk and push the trunk, rather than merging trunk into your work and pushing your branch as the new trunk.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Using a decentralized workflow==&lt;br /&gt;
&lt;br /&gt;
In this case you will be working locally until you are ready to publish your changes. The basic idea is to perform the work in a ''branch'' of the Inkscape repository, since committing to a branch stores the changes locally in the branch itself. Then, to share the work with the rest of the Inkscape community, the changes in the branch are merged across to a ''checkout'' of the Inkscape repository. As the previous centralized workflow section describes, committing to a checkout sends the changes directly to the remote repository, making them part of the official Inkscape codebase.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' this workflow has been updated to avoid the &amp;quot;other people's commits become subrevisions of your commit&amp;quot; problem.&lt;br /&gt;
&lt;br /&gt;
This will assume this directory layout:&lt;br /&gt;
 inkscape&lt;br /&gt;
  +-trunk&lt;br /&gt;
  |  +-doc&lt;br /&gt;
  |  +-share&lt;br /&gt;
  |  +-src&lt;br /&gt;
  |  +-po&lt;br /&gt;
  |  +-...&lt;br /&gt;
  +-myproject&lt;br /&gt;
  +-some-other-branch&lt;br /&gt;
&lt;br /&gt;
In this layout, &amp;quot;trunk&amp;quot; is the checkout used for uploading changes to the central Inkscape repository, while &amp;quot;myproject&amp;quot; and &amp;quot;some-other-branch&amp;quot; are local branches used for working on specific features.&lt;br /&gt;
&lt;br /&gt;
===Repository setup===&lt;br /&gt;
&lt;br /&gt;
To speed things up, it's good to create a local shared repository. This way revision histories will only be stored in one place, instead of in every branch, so local branching will be faster and the branches will take up less space.&lt;br /&gt;
&lt;br /&gt;
Create a shared repository and enter it:&lt;br /&gt;
 $ bzr init-repo --rich-root inkscape&lt;br /&gt;
 $ cd inkscape&lt;br /&gt;
&lt;br /&gt;
===Working locally===&lt;br /&gt;
&lt;br /&gt;
Get Inkscape's code&lt;br /&gt;
 $ bzr branch lp:inkscape myproject&lt;br /&gt;
&lt;br /&gt;
Now work:&lt;br /&gt;
 $ cd myproject&lt;br /&gt;
   ... work work work ...&lt;br /&gt;
 $ bzr commit -m &amp;quot;Some changes&amp;quot;&lt;br /&gt;
   ... more work work work ...&lt;br /&gt;
 $ bzr commit -m &amp;quot;More changes&amp;quot;&lt;br /&gt;
   ... create new file ...&lt;br /&gt;
 $ bzr add new-file.c&lt;br /&gt;
 $ bzr commit -m &amp;quot;Added new file with kittens&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===Advanced local features===&lt;br /&gt;
&lt;br /&gt;
To undo a commit:&lt;br /&gt;
 $ bzr uncommit&lt;br /&gt;
This will leave your working tree in the state it was just before you wrote &amp;quot;bzr commit&amp;quot;. This is useful for example if you forgot to add a file, and want to keep a clean revision history. This will NOT work on a trunk checkout.&lt;br /&gt;
&lt;br /&gt;
Let's say you started from r770 200 local commits, but you decided that what you did since r954 is completely wrong. You want to go back to revision 825 and do it differently. Here's one way to do this. First branch locally to preserve your work (maybe later you'll find out there's some way to save it). Then uncommit everything up to r954 and revert.&lt;br /&gt;
 $ bzr branch myproject myproject-dead-end&lt;br /&gt;
 $ cd myproject&lt;br /&gt;
 $ bzr uncommit -r 954&lt;br /&gt;
 $ bzr revert&lt;br /&gt;
&lt;br /&gt;
A different scenario: let's say that commit 1524 introduced a bug, but there were 50 other commits since then and you only want to revert the changes introduced by 1524.&lt;br /&gt;
 $ bzr merge -r1524..1523&lt;br /&gt;
&lt;br /&gt;
Sometimes a big change gets committed while you are working on a feature. If you want to check whether your code still works after the big change, merge from trunk.&lt;br /&gt;
 $ bzr merge&lt;br /&gt;
&lt;br /&gt;
In this case, you can omit where you are merging from, because the default is to merge from the branch you started from (the parent).&lt;br /&gt;
&lt;br /&gt;
===Publishing your work on Launchpad===&lt;br /&gt;
&lt;br /&gt;
To publish branches on Launchpad, you have to add an SSH key to your account. If you don't have one yet, generate it:&lt;br /&gt;
 $ ssh-keygen&lt;br /&gt;
   ... follow instructions ...&lt;br /&gt;
&lt;br /&gt;
Once you created the key, go to your Launchpad profile page, edit SSH keys and paste the contents of the key file (by default it's in &amp;lt;tt&amp;gt;~/.ssh/id_rsa&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;~/.ssh/id_dsa&amp;lt;/tt&amp;gt;) into the window. You can now use the Launchpad integration features.&lt;br /&gt;
&lt;br /&gt;
Login to Launchpad, if you didn't do it yet. You only need to do this once on each computer. You need to use your login name, not the display name.&lt;br /&gt;
 $ bzr launchpad-login johnq&lt;br /&gt;
&lt;br /&gt;
Publish your branch on Launchpad.&lt;br /&gt;
 $ bzr push lp:~johnq/inkscape/myproject&lt;br /&gt;
&lt;br /&gt;
The push location will be saved. After more commits, you can simply write&lt;br /&gt;
 $ bzr push&lt;br /&gt;
&lt;br /&gt;
It's sometimes convenient to update the Launchpad copy after each commit. To save on typing, you can bind your working tree to the remote branch. This way every commit will be immediately published on the remote branch. Note that you won't be able to commit while offline.&lt;br /&gt;
 $ bzr bind :push&lt;br /&gt;
&lt;br /&gt;
===Putting your work in the trunk===&lt;br /&gt;
&lt;br /&gt;
Once your new killer feature is ready, you need to merge your changes into a checkout of the trunk.  If you don't have one, do (in the directory ''containing'' myproject):&lt;br /&gt;
  $ bzr checkout lp:inkscape trunk&lt;br /&gt;
  $ cd trunk&lt;br /&gt;
&lt;br /&gt;
If you already have one on hand, make sure it's up to date:&lt;br /&gt;
  $ cd trunk&lt;br /&gt;
  $ bzr update&lt;br /&gt;
&lt;br /&gt;
Now that you have a local checkout of the current trunk:&lt;br /&gt;
  $ bzr merge ../myproject&lt;br /&gt;
  $ bzr commit -m'added my feature'&lt;br /&gt;
&lt;br /&gt;
WARNING: There is an alternative method that consists of merging trunk into your local branch, then pushing the result as trunk. Do not do this! It obfuscates the revision history.&lt;br /&gt;
&lt;br /&gt;
===Working with patch files===&lt;br /&gt;
&lt;br /&gt;
If you don't have permission to commit to the trunk, you can bundle your branch's changes into a patch instead:&lt;br /&gt;
  $ bzr send -o mychanges.patch&lt;br /&gt;
&lt;br /&gt;
To apply patches produced by the above command, just do this:&lt;br /&gt;
  $ bzr merge somechanges.patch&lt;br /&gt;
&lt;br /&gt;
===Local branching===&lt;br /&gt;
&lt;br /&gt;
Naturally, all this also works locally. For example, when you're in the &amp;lt;tt&amp;gt;inkscape&amp;lt;/tt&amp;gt; directory, you can write &amp;lt;tt&amp;gt;bzr branch trunk export-dialog&amp;lt;/tt&amp;gt; to create a new branch of the trunk called &amp;lt;tt&amp;gt;export-dialog&amp;lt;/tt&amp;gt;, where you'll work only on improving the export dialog. Similarly, you can merge between local branches.&lt;br /&gt;
&lt;br /&gt;
==Best Practices for Inkscape Project==&lt;br /&gt;
&lt;br /&gt;
===Registering Bugfixes===&lt;br /&gt;
&lt;br /&gt;
Launchpad will automatically mark a bug &amp;quot;Fix Available&amp;quot; (rather than &amp;quot;Fix Committed&amp;quot;) once somebody commits using the flag --fixes, e.g. (if you fix those two bugs in one commit):&lt;br /&gt;
 bzr commit --fixes lp:123456 --fixes lp:123457 -m 'patch description'&lt;br /&gt;
Then, bugs can be changed automatically from &amp;quot;Fix Available&amp;quot; to &amp;quot;Fix Released&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[http://doc.bazaar-vcs.org/bzr.dev/en/tutorials/using_bazaar_with_launchpad.html#changing-the-state-in-launchpad-while-committing-in-bazaar Read more: &amp;quot;Changing the state in Launchpad while committing in Bazaar&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
===Proper way of merging===&lt;br /&gt;
&lt;br /&gt;
To repeat, NEVER do something like:&lt;br /&gt;
 $ bzr branch lp:inkscape myproject&lt;br /&gt;
 ... work ...&lt;br /&gt;
 $ bzr commit&lt;br /&gt;
 $ bzr merge               # NOOOO!!! We are doomed!&lt;br /&gt;
 $ bzr push lp:inkscape&lt;br /&gt;
&lt;br /&gt;
It will obfuscate the revision history: trunk commits that happened between the time you branched and the time you pushed will get grouped into one. Do the merge the other way around:&lt;br /&gt;
 $ bzr branch lp:inkscape myproject&lt;br /&gt;
 $ cd myproject&lt;br /&gt;
 ... work ...&lt;br /&gt;
 $ bzr commit&lt;br /&gt;
 $ cd ../trunk&lt;br /&gt;
 $ bzr merge ../myproject  # correct!&lt;br /&gt;
 $ bzr commit&lt;br /&gt;
&lt;br /&gt;
You'll need a trunk checkout, but the revision history will be much less confusing, and it's useful to have a trunk checkout anyway.&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* [http://doc.bazaar-vcs.org/latest/en/ Bazaar manual]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=60307</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=60307"/>
		<updated>2010-03-24T07:20:18Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* Building Aqua February 2010 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gsl gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*Xcode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, Xcode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
* Working version of the &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_set&amp;amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_map&amp;amp;gt;&amp;lt;/tt&amp;gt; headers. &lt;br /&gt;
&lt;br /&gt;
Configure or build can fail on OS X Tiger and Leopard due to broken &amp;lt;tr1/unordered_set&amp;gt; header files because Apple's default compiler ([http://gcc.gnu.org/gcc-4.0/ GNU Compiler Collection 4.0.1]) and libstdc++ library ([http://gcc.gnu.org/libstdc++/ GNU Standard C++ Library v3]) installed by Xcode have never been fully updated to the last released version of the [http://gcc.gnu.org/gcc-4.0/changes.html#4.0.1 GCC 4_0 release series].&lt;br /&gt;
&lt;br /&gt;
If Inkscape 0.47+devel fails to configure with &amp;quot;error: You have a broken version of the &amp;lt;tr1/unordered_set&amp;gt; header. …&amp;quot; or fails to build with an [[build failure in tr1/hashtable|error]] in &amp;lt;tt&amp;gt;/usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/tt&amp;gt; it is necessary to either &lt;br /&gt;
&lt;br /&gt;
a) install a [http://trac.macports.org/wiki/UsingTheRightCompiler newer version of GCC] via MacPorts and make it the default compiler with MacPorts 'gcc_select' or&lt;br /&gt;
&lt;br /&gt;
b) patch the installed &amp;lt;tt&amp;gt;tr1/hashtable&amp;lt;/tt&amp;gt; header file of libstdc++-v3 as described in [[HashtableFixOSX]]&lt;br /&gt;
&lt;br /&gt;
; gcc/g++ versions by Apple known to fail to compile Inkscape 0.47+devel bzr revno &amp;gt;= 8976 are&lt;br /&gt;
: powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5370)&lt;br /&gt;
: i686-apple-darwin9-g++-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)&lt;br /&gt;
: i686-apple-darwin9-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577)&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new MacPorts installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed MacPorts, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause MacPorts to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the MacPorts libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
addition in Nov-2009 by Wolf:&lt;br /&gt;
Meanwhile building a native inkscape aqua version is quite easy - dont be afraid! I do ask every Mac OS X user to try it and to file or to support bug reports. The more bug report come in, the quicker we'll have a really working inkscape aqua.  I'll try to provide binaries, but making them seem to be a bit more tricky. Here is a set of instructions - should be quite comprehensive: [[#Building Aqua November 2009]]&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second MacPorts tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let's say I want to install a new tree for native versions in /opt/local-native. I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can omit the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You should also set alternate applications_dir and frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks installed by this MacPorts (for example by python) don't clash with your standard MacPorts tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the PATH at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the native version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here. Omit them when editing your shell configuration file and put everything on one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua February 2010 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what was to do on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD.&lt;br /&gt;
Make sure you checked the optional install of MacOSX10.4u.sdk - this especially applies for Snow Leopard 10.6.&lt;br /&gt;
&lt;br /&gt;
Install [http://www.macports.org macports], retrieve the inkscape sources. &lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372]. (Maybe this is obsolete by Feb, 2010).&lt;br /&gt;
&lt;br /&gt;
If you want to use bazaar in order to keep your sources up to date, install it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo port install bzr&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
How to use bazaar, have a look here: [[Working with Bazaar]].&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
# older versionsof gtk2 than 2.18.8 need to be patched according to these instructions:&lt;br /&gt;
# http://trac.macports.org/ticket/22451&lt;br /&gt;
&lt;br /&gt;
# so rather make sure you installed the latest gtk2  &amp;gt;=2.18.8:&lt;br /&gt;
&lt;br /&gt;
sudo port install gtk2 +quartz+no_x11&lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk-engines2&lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# Edit the file osx-build.sh to uncomment (enable) the configure option --enable-osxapp&lt;br /&gt;
# (line 24), if neccessary. I used TextWrangler for this, pico or another command line editor will do the same.&lt;br /&gt;
&lt;br /&gt;
# Back to the terminal:&lt;br /&gt;
&lt;br /&gt;
# configure it:&lt;br /&gt;
sudo ./osx-build.sh c&lt;br /&gt;
&lt;br /&gt;
# build it: &lt;br /&gt;
sudo ./osx-build.sh b&lt;br /&gt;
&lt;br /&gt;
# install it: &lt;br /&gt;
sudo ./osx-build.sh i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&lt;br /&gt;
# or double click the inkscape image in path-to-inkscape-sources/Build/bin&lt;br /&gt;
&lt;br /&gt;
# (This may not work - not reason to fall into despair so far, just go ahead an pack it…)&lt;br /&gt;
&lt;br /&gt;
# Build a Mac OS X package:&lt;br /&gt;
&lt;br /&gt;
# download python packages at http://inkscape.modevia.com/macosx-snap/Python-packages.dmg&lt;br /&gt;
# put the contents in a folder named &amp;quot;python&amp;quot; and put it somewhere - the following command&lt;br /&gt;
# expects it in the folder in which the inkscape sources folder lives&lt;br /&gt;
&lt;br /&gt;
# edit &amp;lt;path-to-inkscape-sources&amp;gt;/packaging/macosx/Resources/bin/inkscape and &lt;br /&gt;
# uncomment line 33: &lt;br /&gt;
&lt;br /&gt;
# export DYLD_LIBRARY_PATH=&amp;quot;$TOP/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;path-to-inkscape-sources&amp;gt;/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# and pack:&lt;br /&gt;
&lt;br /&gt;
./osx-build.sh p -py ../../../python/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# If your building runs through smoothly, you can automate the build process for the next version by doing all at once:&lt;br /&gt;
&lt;br /&gt;
#  or all at once:&lt;br /&gt;
&lt;br /&gt;
sudo ./osx-build.sh a c b i -py ../../../python/ p d&lt;br /&gt;
&lt;br /&gt;
# To avoid X11 from launching simultaneously), edit&lt;br /&gt;
inkscape.app/Contents/Resources/script and add at line 45&lt;br /&gt;
&lt;br /&gt;
killall X11&lt;br /&gt;
&lt;br /&gt;
# Hopefully more skilled people than me will find a nicer solution than this very brutal hack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the end this procedure works pretty straightforward, delivering a native inkscape which works fairly well.&lt;br /&gt;
&lt;br /&gt;
As the author of this lines knows very little about compiling etc., I do recommend to send requests for support to the devel mailing list (mailto: inkscape-devel@lists.sourceforge.net). I'm reading there and may occasionally have the chance to answer some questions.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=60301</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=60301"/>
		<updated>2010-03-24T07:17:27Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* Building Aqua February 2010 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gsl gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*Xcode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, Xcode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
* Working version of the &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_set&amp;amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_map&amp;amp;gt;&amp;lt;/tt&amp;gt; headers. &lt;br /&gt;
&lt;br /&gt;
Configure or build can fail on OS X Tiger and Leopard due to broken &amp;lt;tr1/unordered_set&amp;gt; header files because Apple's default compiler ([http://gcc.gnu.org/gcc-4.0/ GNU Compiler Collection 4.0.1]) and libstdc++ library ([http://gcc.gnu.org/libstdc++/ GNU Standard C++ Library v3]) installed by Xcode have never been fully updated to the last released version of the [http://gcc.gnu.org/gcc-4.0/changes.html#4.0.1 GCC 4_0 release series].&lt;br /&gt;
&lt;br /&gt;
If Inkscape 0.47+devel fails to configure with &amp;quot;error: You have a broken version of the &amp;lt;tr1/unordered_set&amp;gt; header. …&amp;quot; or fails to build with an [[build failure in tr1/hashtable|error]] in &amp;lt;tt&amp;gt;/usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/tt&amp;gt; it is necessary to either &lt;br /&gt;
&lt;br /&gt;
a) install a [http://trac.macports.org/wiki/UsingTheRightCompiler newer version of GCC] via MacPorts and make it the default compiler with MacPorts 'gcc_select' or&lt;br /&gt;
&lt;br /&gt;
b) patch the installed &amp;lt;tt&amp;gt;tr1/hashtable&amp;lt;/tt&amp;gt; header file of libstdc++-v3 as described in [[HashtableFixOSX]]&lt;br /&gt;
&lt;br /&gt;
; gcc/g++ versions by Apple known to fail to compile Inkscape 0.47+devel bzr revno &amp;gt;= 8976 are&lt;br /&gt;
: powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5370)&lt;br /&gt;
: i686-apple-darwin9-g++-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)&lt;br /&gt;
: i686-apple-darwin9-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577)&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new MacPorts installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed MacPorts, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause MacPorts to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the MacPorts libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
addition in Nov-2009 by Wolf:&lt;br /&gt;
Meanwhile building a native inkscape aqua version is quite easy - dont be afraid! I do ask every Mac OS X user to try it and to file or to support bug reports. The more bug report come in, the quicker we'll have a really working inkscape aqua.  I'll try to provide binaries, but making them seem to be a bit more tricky. Here is a set of instructions - should be quite comprehensive: [[#Building Aqua November 2009]]&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second MacPorts tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let's say I want to install a new tree for native versions in /opt/local-native. I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can omit the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You should also set alternate applications_dir and frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks installed by this MacPorts (for example by python) don't clash with your standard MacPorts tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the PATH at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the native version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here. Omit them when editing your shell configuration file and put everything on one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua February 2010 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what was to do on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD.&lt;br /&gt;
Make sure you checked the optional install of MacOSX10.4u.sdk - this especially applies for Snow Leopard 10.6.&lt;br /&gt;
&lt;br /&gt;
Install [http://www.macports.org macports], retrieve the inkscape sources. &lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372]. (Maybe this is obsolete by Feb, 2010).&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
# If you want to use bazaar in order to keep your sources up to date:&lt;br /&gt;
# How to use bazaar, have a look here: [[Working with Bazaar]].&lt;br /&gt;
&lt;br /&gt;
sudo port install bzr&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
# older versionsof gtk2 than 2.18.8 need to be patched according to these instructions:&lt;br /&gt;
# http://trac.macports.org/ticket/22451&lt;br /&gt;
&lt;br /&gt;
# so rather make sure you installed the latest gtk2  &amp;gt;=2.18.8:&lt;br /&gt;
&lt;br /&gt;
sudo port install gtk2 +quartz+no_x11&lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk-engines2&lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# Edit the file osx-build.sh to uncomment (enable) the configure option --enable-osxapp&lt;br /&gt;
# (line 24), if neccessary. I used TextWrangler for this, pico or another command line editor will do the same.&lt;br /&gt;
&lt;br /&gt;
# Back to the terminal:&lt;br /&gt;
&lt;br /&gt;
# configure it:&lt;br /&gt;
sudo ./osx-build.sh c&lt;br /&gt;
&lt;br /&gt;
# build it: &lt;br /&gt;
sudo ./osx-build.sh b&lt;br /&gt;
&lt;br /&gt;
# install it: &lt;br /&gt;
sudo ./osx-build.sh i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&lt;br /&gt;
# or double click the inkscape image in path-to-inkscape-sources/Build/bin&lt;br /&gt;
&lt;br /&gt;
# (This may not work - not reason to fall into despair so far, just go ahead an pack it…)&lt;br /&gt;
&lt;br /&gt;
# Build a Mac OS X package:&lt;br /&gt;
&lt;br /&gt;
# download python packages at http://inkscape.modevia.com/macosx-snap/Python-packages.dmg&lt;br /&gt;
# put the contents in a folder named &amp;quot;python&amp;quot; and put it somewhere - the following command&lt;br /&gt;
# expects it in the folder in which the inkscape sources folder lives&lt;br /&gt;
&lt;br /&gt;
# edit &amp;lt;path-to-inkscape-sources&amp;gt;/packaging/macosx/Resources/bin/inkscape and &lt;br /&gt;
# uncomment line 33: &lt;br /&gt;
&lt;br /&gt;
# export DYLD_LIBRARY_PATH=&amp;quot;$TOP/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;path-to-inkscape-sources&amp;gt;/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# and pack:&lt;br /&gt;
&lt;br /&gt;
./osx-build.sh p -py ../../../python/ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# If your building runs through smoothly, you can automate the build process for the next version by doing all at once:&lt;br /&gt;
&lt;br /&gt;
#  or all at once:&lt;br /&gt;
&lt;br /&gt;
sudo ./osx-build.sh a c b i -py ../../../python/ p d&lt;br /&gt;
&lt;br /&gt;
# To avoid X11 from launching simultaneously), edit&lt;br /&gt;
inkscape.app/Contents/Resources/script and add at line 45&lt;br /&gt;
&lt;br /&gt;
killall X11&lt;br /&gt;
&lt;br /&gt;
# Hopefully more skilled people than me will find a nicer solution than this very brutal hack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the end this procedure works pretty straightforward, delivering a native inkscape which works fairly well.&lt;br /&gt;
&lt;br /&gt;
As the author of this lines knows very little about compiling etc., I do recommend to send requests for support to the devel mailing list (mailto: inkscape-devel@lists.sourceforge.net). I'm reading there and may occasionally have the chance to answer some questions.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=60163</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=60163"/>
		<updated>2010-03-19T21:32:46Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* Building Aqua February 2010 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gsl gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*Xcode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, Xcode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
* Working version of the &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_set&amp;amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_map&amp;amp;gt;&amp;lt;/tt&amp;gt; headers. &lt;br /&gt;
&lt;br /&gt;
Configure or build can fail on OS X Tiger and Leopard due to broken &amp;lt;tr1/unordered_set&amp;gt; header files because Apple's default compiler ([http://gcc.gnu.org/gcc-4.0/ GNU Compiler Collection 4.0.1]) and libstdc++ library ([http://gcc.gnu.org/libstdc++/ GNU Standard C++ Library v3]) installed by Xcode have never been fully updated to the last released version of the [http://gcc.gnu.org/gcc-4.0/changes.html#4.0.1 GCC 4_0 release series].&lt;br /&gt;
&lt;br /&gt;
If Inkscape 0.47+devel fails to configure with &amp;quot;error: You have a broken version of the &amp;lt;tr1/unordered_set&amp;gt; header. …&amp;quot; or fails to build with an [[build failure in tr1/hashtable|error]] in &amp;lt;tt&amp;gt;/usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/tt&amp;gt; it is necessary to either &lt;br /&gt;
&lt;br /&gt;
a) install a [http://trac.macports.org/wiki/UsingTheRightCompiler newer version of GCC] via MacPorts and make it the default compiler with MacPorts 'gcc_select' or&lt;br /&gt;
&lt;br /&gt;
b) patch the installed &amp;lt;tt&amp;gt;tr1/hashtable&amp;lt;/tt&amp;gt; header file of libstdc++-v3 as described in [[HashtableFixOSX]]&lt;br /&gt;
&lt;br /&gt;
; gcc/g++ versions by Apple known to fail to compile Inkscape 0.47+devel bzr revno &amp;gt;= 8976 are&lt;br /&gt;
: powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5370)&lt;br /&gt;
: i686-apple-darwin9-g++-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)&lt;br /&gt;
: i686-apple-darwin9-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577)&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new MacPorts installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed MacPorts, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause MacPorts to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the MacPorts libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
addition in Nov-2009 by Wolf:&lt;br /&gt;
Meanwhile building a native inkscape aqua version is quite easy - dont be afraid! I do ask every Mac OS X user to try it and to file or to support bug reports. The more bug report come in, the quicker we'll have a really working inkscape aqua.  I'll try to provide binaries, but making them seem to be a bit more tricky. Here is a set of instructions - should be quite comprehensive: [[#Building Aqua November 2009]]&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second MacPorts tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let's say I want to install a new tree for native versions in /opt/local-native. I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can omit the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You should also set alternate applications_dir and frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks installed by this MacPorts (for example by python) don't clash with your standard MacPorts tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the PATH at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the native version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here. Omit them when editing your shell configuration file and put everything on one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua February 2010 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what was to do on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD.&lt;br /&gt;
&lt;br /&gt;
Install [http://www.macports.org macports], retrieve the inkscape sources. &lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372]. (Maybe this is obsolete by Feb, 2010).&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++ &lt;br /&gt;
&lt;br /&gt;
# At the moment (11-Feb-2010) gtk2 needs to be patched, according to &lt;br /&gt;
# http://trac.macports.org/ticket/22451&lt;br /&gt;
&lt;br /&gt;
# 1. Create a folder in your home directory e.g. /Users/&amp;lt;Username&amp;gt;/ports to act as the local&lt;br /&gt;
#  repository&lt;br /&gt;
&lt;br /&gt;
# 2. download &lt;br /&gt;
# http://trac.macports.org/attachment/ticket/22451/modified-gtk2-port.tar.bz&lt;br /&gt;
# unpack it and put the occuring folder called &amp;quot;x11&amp;quot; into the &amp;quot;ports&amp;quot; folder you created&lt;br /&gt;
&lt;br /&gt;
# 3. Edit the file /opt/local/etc/macports/sources.conf and add a line&lt;br /&gt;
# file:///Users/mark/ports before the  rsync://... line (this means Macports will use locally modified&lt;br /&gt;
# ports in preference to ports of the same name in the global repository, in our case port 'gtk2')&lt;br /&gt;
&lt;br /&gt;
# 4. cd to /Users/&amp;lt;Username&amp;gt;mark/ports and type &lt;br /&gt;
&lt;br /&gt;
portindex&lt;br /&gt;
&lt;br /&gt;
# to get Macports to index this local version of gtk2&lt;br /&gt;
&lt;br /&gt;
# 5. If necessary, uninstall a former version of gtk2 with &lt;br /&gt;
&lt;br /&gt;
sudo port -f uninstall gtk2 , &lt;br /&gt;
&lt;br /&gt;
cd ~/ports/x11/gtk2/ and&lt;br /&gt;
&lt;br /&gt;
# (re)install (from the local repository) using &lt;br /&gt;
&lt;br /&gt;
sudo port install -f gtk2 +quartz+no_x11&lt;br /&gt;
&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++ &lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk-engines2&lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install subversion&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# Edit the file osx-build.sh to uncomment (enable) the configure option --enable-osxapp&lt;br /&gt;
# (line 24), if neccessary. I used TextWrangler for this, pico or another command line editor will do the same.&lt;br /&gt;
&lt;br /&gt;
# Back to the terminal:&lt;br /&gt;
&lt;br /&gt;
# configure it:&lt;br /&gt;
sudo ./osx-build.sh c&lt;br /&gt;
&lt;br /&gt;
# build it: &lt;br /&gt;
sudo ./osx-build.sh b&lt;br /&gt;
&lt;br /&gt;
# install it: &lt;br /&gt;
sudo ./osx-build.sh i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&lt;br /&gt;
# or double click the inkscape image in path-to-inkscape-sources/Build/bin&lt;br /&gt;
&lt;br /&gt;
# (This may not work - not reason to fall into despair so far, just go ahead an pack it…)&lt;br /&gt;
&lt;br /&gt;
# Build a Mac OS X package:&lt;br /&gt;
&lt;br /&gt;
# download python packages at http://inkscape.modevia.com/macosx-snap/Python-packages.dmg&lt;br /&gt;
# put the contents in a folder named &amp;quot;python&amp;quot; and put it somewhere - the following command&lt;br /&gt;
# expects it in the folder in which the inkscape sources folder lives&lt;br /&gt;
&lt;br /&gt;
# edit &amp;lt;path-to-inkscape-sources&amp;gt;/packaging/macosx/Resources/bin/inkscape and &lt;br /&gt;
# uncomment line 33: &lt;br /&gt;
&lt;br /&gt;
# export DYLD_LIBRARY_PATH=&amp;quot;$TOP/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;path-to-inkscape-sources&amp;gt;/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# and pack:&lt;br /&gt;
&lt;br /&gt;
./osx-build.sh p -py ../../../python/ &lt;br /&gt;
&lt;br /&gt;
# To avoid X11 from launching simultaneously), edit&lt;br /&gt;
inkscape.app/Contents/Resources/script and add at line 45&lt;br /&gt;
&lt;br /&gt;
killall X11&lt;br /&gt;
&lt;br /&gt;
# Hopefully more skilled people than me will find a nicer solution than this very brutal hack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the end this procedure works pretty straightforward, delivering a native inkscape which works fairly well.&lt;br /&gt;
&lt;br /&gt;
As the author of this lines knows very little about compiling etc., I do recommend to send requests for support to the devel mailing list (mailto: inkscape-devel@lists.sourceforge.net). I'm reading there and may occasionally have the chance to answer some questions.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=59293</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=59293"/>
		<updated>2010-02-23T11:21:47Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* Building Aqua February 2010 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gsl gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*Xcode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, Xcode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
* Working version of the &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_set&amp;amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_map&amp;amp;gt;&amp;lt;/tt&amp;gt; headers. &lt;br /&gt;
&lt;br /&gt;
Known workarounds if configure or build fails due to broken &amp;lt;tr1/unordered_set&amp;gt; header files:&lt;br /&gt;
&lt;br /&gt;
'''Mac OS X 10.4 Tiger''': &lt;br /&gt;
TODO&lt;br /&gt;
&lt;br /&gt;
'''Mac OS X 10.5.8 Leopard''' with Xcode 3.1.4: &lt;br /&gt;
If Inkscape 0.47+devel fails to configure with &amp;quot;error: You have a broken version of the &amp;lt;tr1/unordered_set&amp;gt; header. …&amp;quot; or fails to build with the [[build failure in tr1/hashtable|error]] in &amp;lt;tt&amp;gt;/usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/tt&amp;gt; it is necessary to either patch the installed &amp;lt;tt&amp;gt;tr1/hashtable&amp;lt;/tt&amp;gt; header file of libstdc++-v3 or install a [http://trac.macports.org/wiki/UsingTheRightCompiler newer version of GCC] via MacPorts. The build failure occurs because Apple's default compiler ([http://gcc.gnu.org/gcc-4.0/ GNU Compiler Collection 4.0.1]) and libstdc++ library ([http://gcc.gnu.org/libstdc++/ GNU Standard C++ Library v3]) installed by Xcode 3.1.x have never been fully updated to the last released version of the [http://gcc.gnu.org/gcc-4.0/changes.html#4.0.1 GCC 4_0 release series].&lt;br /&gt;
&lt;br /&gt;
; gcc/g++ versions by Apple known to fail to compile (bzr revno &amp;gt;= 8976)&lt;br /&gt;
: i686-apple-darwin9-g++-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)&lt;br /&gt;
: i686-apple-darwin9-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577)&lt;br /&gt;
&lt;br /&gt;
Steps to replace the faulty header file on OS X 10.5.8 with Xcode 3.1.4 installed:&lt;br /&gt;
&lt;br /&gt;
#Download [http://gcc.gnu.org/viewcvs/branches/gcc-4_0-branch/libstdc%2B%2B-v3/include/tr1/hashtable?revision=104939&amp;amp;view=co SVN revision 104939] of &amp;lt;tt&amp;gt;tr1/hashtable&amp;lt;/tt&amp;gt; from the [http://gcc.gnu.org/viewcvs/branches/gcc-4_0-branch/libstdc++-v3/include/tr1/hashtable?view=log gcc-4_0-branch SVN repository]&lt;br /&gt;
#Replace Apple's version with the downloaded file from SVN revision 104939 and restore file permissions and ownership:&lt;br /&gt;
:*Replace file (assuming the new file is located in ~/Downloads): &lt;br /&gt;
&amp;lt;pre&amp;gt;$ sudo mv /usr/include/c++/4.0.0/tr1/hashtable /usr/include/c++/4.0.0/tr1/hashtable-orig&lt;br /&gt;
$ sudo cp ~/Downloads/hashtable /usr/include/c++/4.0.0/tr1&amp;lt;/pre&amp;gt;&lt;br /&gt;
:*Check new file:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls -l /usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/pre&amp;gt;&lt;br /&gt;
:*Change permissions/ownership if needed:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sudo chmod 644 /usr/include/c++/4.0.0/tr1/hashtable&lt;br /&gt;
$ sudo chown root:wheel /usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new MacPorts installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed MacPorts, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause MacPorts to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the MacPorts libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
addition in Nov-2009 by Wolf:&lt;br /&gt;
Meanwhile building a native inkscape aqua version is quite easy - dont be afraid! I do ask every Mac OS X user to try it and to file or to support bug reports. The more bug report come in, the quicker we'll have a really working inkscape aqua.  I'll try to provide binaries, but making them seem to be a bit more tricky. Here is a set of instructions - should be quite comprehensive: [[#Building Aqua November 2009]]&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second MacPorts tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let's say I want to install a new tree for native versions in /opt/local-native. I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can omit the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You should also set alternate applications_dir and frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks installed by this MacPorts (for example by python) don't clash with your standard MacPorts tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the PATH at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the native version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here. Omit them when editing your shell configuration file and put everything on one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua February 2010 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what was to do on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD.&lt;br /&gt;
&lt;br /&gt;
Install [http://www.macports.org macports], retrieve the inkscape sources. &lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372]. (Maybe this is obsolete by Feb, 2010).&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++ &lt;br /&gt;
&lt;br /&gt;
# At the moment (11-Feb-2010) gtk2 needs to be patched, according to &lt;br /&gt;
# http://trac.macports.org/ticket/22451&lt;br /&gt;
&lt;br /&gt;
# 1. Create a folder in your home directory e.g. /Users/&amp;lt;Username&amp;gt;/ports to act as the local&lt;br /&gt;
#  repository&lt;br /&gt;
&lt;br /&gt;
# 2. download &lt;br /&gt;
# http://trac.macports.org/attachment/ticket/22451/modified-gtk2-port.tar.bz&lt;br /&gt;
# unpack it and put the occuring folder called &amp;quot;x11&amp;quot; into the &amp;quot;ports&amp;quot; folder you created&lt;br /&gt;
&lt;br /&gt;
# 3. Edit the file /opt/local/etc/macports/sources.conf and add a line&lt;br /&gt;
# file:///Users/mark/ports before the  rsync://... line (this means Macports will use locally modified&lt;br /&gt;
# ports in preference to ports of the same name in the global repository, in our case port 'gtk2')&lt;br /&gt;
&lt;br /&gt;
# 4. cd to /Users/&amp;lt;Username&amp;gt;mark/ports and type &lt;br /&gt;
&lt;br /&gt;
portindex&lt;br /&gt;
&lt;br /&gt;
# to get Macports to index this local version of gtk2&lt;br /&gt;
&lt;br /&gt;
# 5. If necessary, uninstall a former version of gtk2 with &lt;br /&gt;
&lt;br /&gt;
sudo port -f uninstall gtk2 , &lt;br /&gt;
&lt;br /&gt;
cd ~/ports/x11/gtk2/ and&lt;br /&gt;
&lt;br /&gt;
# (re)install (from the local repository) using &lt;br /&gt;
&lt;br /&gt;
sudo port install -f gtk2 +quartz+no_x11&lt;br /&gt;
&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++ &lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk2-clearlooks&lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install subversion&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# Edit the file osx-build.sh to uncomment (enable) the configure option --enable-osxapp&lt;br /&gt;
# (line 24), if neccessary. I used TextWrangler for this, pico or another command line editor will do the same.&lt;br /&gt;
&lt;br /&gt;
# Back to the terminal:&lt;br /&gt;
&lt;br /&gt;
# configure it:&lt;br /&gt;
sudo ./osx-build.sh c&lt;br /&gt;
&lt;br /&gt;
# build it: &lt;br /&gt;
sudo ./osx-build.sh b&lt;br /&gt;
&lt;br /&gt;
# install it: &lt;br /&gt;
sudo ./osx-build.sh i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&lt;br /&gt;
# or double click the inkscape image in path-to-inkscape-sources/Build/bin&lt;br /&gt;
&lt;br /&gt;
# (This may not work - not reason to fall into despair so far, just go ahead an pack it…)&lt;br /&gt;
&lt;br /&gt;
# Build a Mac OS X package:&lt;br /&gt;
&lt;br /&gt;
# download python packages at http://inkscape.modevia.com/macosx-snap/Python-packages.dmg&lt;br /&gt;
# put the contents in a folder named &amp;quot;python&amp;quot; and put it somewhere - the following command&lt;br /&gt;
# expects it in the folder in which the inkscape sources folder lives&lt;br /&gt;
&lt;br /&gt;
# edit &amp;lt;path-to-inkscape-sources&amp;gt;/packaging/macosx/Resources/bin/inkscape and &lt;br /&gt;
# uncomment line 33: &lt;br /&gt;
&lt;br /&gt;
# export DYLD_LIBRARY_PATH=&amp;quot;$TOP/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;path-to-inkscape-sources&amp;gt;/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# and pack:&lt;br /&gt;
&lt;br /&gt;
./osx-build.sh p -py ../../../python/ &lt;br /&gt;
&lt;br /&gt;
# To avoid X11 from launching simultaneously), edit&lt;br /&gt;
inkscape.app/Contents/Resources/script and add at line 45&lt;br /&gt;
&lt;br /&gt;
killall X11&lt;br /&gt;
&lt;br /&gt;
# Hopefully more skilled people than me will find a nicer solution than this very brutal hack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the end this procedure works pretty straightforward, delivering a native inkscape which works fairly well - it still has the disadvantage not to be portable to another machine, because some libraries are not compiled into the app bundle. Work is in progress…&lt;br /&gt;
&lt;br /&gt;
As the author of this lines knows very little about compiling etc., I do recommend to send requests for support to the devel mailing list (mailto: inkscape-devel@lists.sourceforge.net). I'm reading there and may occasionally have the chance to answer some questions.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=58525</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=58525"/>
		<updated>2010-02-15T17:53:39Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* Building Aqua February 2010 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gsl gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*Xcode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, Xcode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
* Working version of the &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_set&amp;amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_map&amp;amp;gt;&amp;lt;/tt&amp;gt; headers. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' If Inkscape 0.47+devel fails to build on Mac OS X 10.5.8 Leopard (Xcode 3.1.4) with an [[build failure in tr1/hashtable|error]] in &amp;lt;tt&amp;gt;/usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/tt&amp;gt; it is necessary to either patch the installed &amp;lt;tt&amp;gt;tr1/hashtable&amp;lt;/tt&amp;gt; header file of libstdc++-v3 or install a [http://trac.macports.org/wiki/UsingTheRightCompiler newer version of GCC] via MacPorts. The build failure occurs because Apple's default compiler ([http://gcc.gnu.org/gcc-4.0/ GNU Compiler Collection 4.0.1]) and libstdc++ library ([http://gcc.gnu.org/libstdc++/ GNU Standard C++ Library v3]) installed by Xcode 3.1.x have never been fully updated to the last released version of the [http://gcc.gnu.org/gcc-4.0/changes.html#4.0.1 GCC 4_0 release series].&lt;br /&gt;
&lt;br /&gt;
; gcc/g++ versions by Apple known to fail to compile (bzr revno &amp;gt;= 8976)&lt;br /&gt;
: i686-apple-darwin9-g++-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)&lt;br /&gt;
: i686-apple-darwin9-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577)&lt;br /&gt;
&lt;br /&gt;
Steps to replace the faulty header file on OS X 10.5.8 with Xcode 3.1.4 installed:&lt;br /&gt;
&lt;br /&gt;
#Download [http://gcc.gnu.org/viewcvs/branches/gcc-4_0-branch/libstdc%2B%2B-v3/include/tr1/hashtable?revision=104939&amp;amp;view=co SVN revision 104939] of &amp;lt;tt&amp;gt;tr1/hashtable&amp;lt;/tt&amp;gt; from the [http://gcc.gnu.org/viewcvs/branches/gcc-4_0-branch/libstdc++-v3/include/tr1/hashtable?view=log gcc-4_0-branch SVN repository]&lt;br /&gt;
#Replace Apple's version with the downloaded file from SVN revision 104939 and restore file permissions and ownership:&lt;br /&gt;
:*Replace file (assuming the new file is located in ~/Downloads): &lt;br /&gt;
&amp;lt;pre&amp;gt;$ sudo mv /usr/include/c++/4.0.0/tr1/hashtable /usr/include/c++/4.0.0/tr1/hashtable-orig&lt;br /&gt;
$ sudo cp ~/Downloads/hashtable /usr/include/c++/4.0.0/tr1&amp;lt;/pre&amp;gt;&lt;br /&gt;
:*Check new file:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls -l /usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/pre&amp;gt;&lt;br /&gt;
:*Change permissions/ownership if needed:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sudo chmod 644 /usr/include/c++/4.0.0/tr1/hashtable&lt;br /&gt;
$ sudo chown root:wheel /usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new MacPorts installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed MacPorts, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause MacPorts to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the MacPorts libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
addition in Nov-2009 by Wolf:&lt;br /&gt;
Meanwhile building a native inkscape aqua version is quite easy - dont be afraid! I do ask every Mac OS X user to try it and to file or to support bug reports. The more bug report come in, the quicker we'll have a really working inkscape aqua.  I'll try to provide binaries, but making them seem to be a bit more tricky. Here is a set of instructions - should be quite comprehensive: [[#Building Aqua November 2009]]&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second MacPorts tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let's say I want to install a new tree for native versions in /opt/local-native. I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can omit the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You should also set alternate applications_dir and frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks installed by this MacPorts (for example by python) don't clash with your standard MacPorts tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the PATH at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the native version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here. Omit them when editing your shell configuration file and put everything on one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua February 2010 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what was to do on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD.&lt;br /&gt;
&lt;br /&gt;
Install [http://www.macports.org macports], retrieve the inkscape sources. &lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372]. (Maybe this is obsolete by Feb, 2010).&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++ &lt;br /&gt;
&lt;br /&gt;
# At the moment (11-Feb-2010) gtk2 needs to be patched, according to &lt;br /&gt;
# http://trac.macports.org/ticket/22451&lt;br /&gt;
&lt;br /&gt;
# 1. Create a folder in your home directory e.g. /Users/&amp;lt;Username&amp;gt;/ports to act as the local&lt;br /&gt;
#  repository&lt;br /&gt;
&lt;br /&gt;
# 2. download &lt;br /&gt;
# http://trac.macports.org/attachment/ticket/22451/modified-gtk2-port.tar.bz&lt;br /&gt;
# unpack it and put the occuring folder called &amp;quot;x11&amp;quot; into the &amp;quot;ports&amp;quot; folder you created&lt;br /&gt;
&lt;br /&gt;
# 3. Edit the file /opt/local/etc/macports/sources.conf and add a line&lt;br /&gt;
# file:///Users/mark/ports before the  rsync://... line (this means Macports will use locally modified&lt;br /&gt;
# ports in preference to ports of the same name in the global repository, in our case port 'gtk2')&lt;br /&gt;
&lt;br /&gt;
# 4. cd to /Users/&amp;lt;Username&amp;gt;mark/ports and type &lt;br /&gt;
&lt;br /&gt;
portindex&lt;br /&gt;
&lt;br /&gt;
# to get Macports to index this local version of gtk2&lt;br /&gt;
&lt;br /&gt;
# 5. If necessary, uninstall a former version of gtk2 with &lt;br /&gt;
&lt;br /&gt;
sudo port -f uninstall gtk2 , &lt;br /&gt;
&lt;br /&gt;
cd ~/ports/x11/gtk2/ and&lt;br /&gt;
&lt;br /&gt;
# (re)install (from the local repository) using &lt;br /&gt;
&lt;br /&gt;
sudo port install -f gtk2 +quartz+no_x11&lt;br /&gt;
&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++ &lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk2-clearlooks&lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install subversion&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# Edit the file osx-build.sh to remove the configure option --enable-osxapp&lt;br /&gt;
# (line 24). I used TextWrangler for this, pico or another command line editor will do the same.&lt;br /&gt;
&lt;br /&gt;
# Back to the terminal:&lt;br /&gt;
&lt;br /&gt;
# configure it:&lt;br /&gt;
sudo ./osx-build.sh c&lt;br /&gt;
&lt;br /&gt;
# build it: &lt;br /&gt;
sudo ./osx-build.sh b&lt;br /&gt;
&lt;br /&gt;
# install it: &lt;br /&gt;
sudo ./osx-build.sh i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&lt;br /&gt;
# or double click the inkscape image in path-to-inkscape-sources/Build/bin&lt;br /&gt;
&lt;br /&gt;
# (This may not work - not reason to fall into despair so far, just go ahead an pack it…)&lt;br /&gt;
&lt;br /&gt;
# Build a Mac OS X package:&lt;br /&gt;
&lt;br /&gt;
# download python packages at http://inkscape.modevia.com/macosx-snap/Python-packages.dmg&lt;br /&gt;
# put the contents in a folder named &amp;quot;python&amp;quot; and put it somewhere - the following command&lt;br /&gt;
# expects it in the folder in which the inkscape sources folder lives&lt;br /&gt;
&lt;br /&gt;
# edit &amp;lt;path-to-inkscape-sources&amp;gt;/packaging/macosx/Resources/bin/inkscape and &lt;br /&gt;
# uncomment line 33: &lt;br /&gt;
&lt;br /&gt;
# export DYLD_LIBRARY_PATH=&amp;quot;$TOP/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;path-to-inkscape-sources&amp;gt;/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# and pack:&lt;br /&gt;
&lt;br /&gt;
./osx-build.sh p -py ../../../python/ &lt;br /&gt;
&lt;br /&gt;
# To avoid X11 from launching simultaneously), edit&lt;br /&gt;
inkscape.app/Contents/Resources/script and add at line 45&lt;br /&gt;
&lt;br /&gt;
killall X11&lt;br /&gt;
&lt;br /&gt;
# Hopefully more skilled people than me will find a nicer solution than this very brutal hack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the end this procedure works pretty straightforward, delivering a native inkscape which works fairly well - it still has the disadvantage not to be portable to another machine, because some libraries are not compiled into the app bundle. Work is in progress…&lt;br /&gt;
&lt;br /&gt;
As the author of this lines knows very little about compiling etc., I do recommend to send requests for support to the devel mailing list (mailto: inkscape-devel@lists.sourceforge.net). I'm reading there and may occasionally have the chance to answer some questions.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=58423</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=58423"/>
		<updated>2010-02-13T13:30:11Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* Building Aqua February 2010 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gsl gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*Xcode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, Xcode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
* Working version of the &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_set&amp;amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_map&amp;amp;gt;&amp;lt;/tt&amp;gt; headers. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' If Inkscape 0.47+devel fails to build on Mac OS X 10.5.8 Leopard (Xcode 3.1.4) with an [[build failure in tr1/hashtable|error]] in &amp;lt;tt&amp;gt;/usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/tt&amp;gt; it is necessary to either patch the installed &amp;lt;tt&amp;gt;tr1/hashtable&amp;lt;/tt&amp;gt; header file of libstdc++-v3 or install a [http://trac.macports.org/wiki/UsingTheRightCompiler newer version of GCC] via MacPorts. The build failure occurs because Apple's default compiler ([http://gcc.gnu.org/gcc-4.0/ GNU Compiler Collection 4.0.1]) and libstdc++ library ([http://gcc.gnu.org/libstdc++/ GNU Standard C++ Library v3]) installed by Xcode 3.1.x have never been fully updated to the last released version of the [http://gcc.gnu.org/gcc-4.0/changes.html#4.0.1 GCC 4_0 release series].&lt;br /&gt;
&lt;br /&gt;
; gcc/g++ versions by Apple known to fail to compile (bzr revno &amp;gt;= 8976)&lt;br /&gt;
: i686-apple-darwin9-g++-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)&lt;br /&gt;
: i686-apple-darwin9-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577)&lt;br /&gt;
&lt;br /&gt;
Steps to replace the faulty header file on OS X 10.5.8 with Xcode 3.1.4 installed:&lt;br /&gt;
&lt;br /&gt;
#Download [http://gcc.gnu.org/viewcvs/branches/gcc-4_0-branch/libstdc%2B%2B-v3/include/tr1/hashtable?revision=104939&amp;amp;view=co SVN revision 104939] of &amp;lt;tt&amp;gt;tr1/hashtable&amp;lt;/tt&amp;gt; from the [http://gcc.gnu.org/viewcvs/branches/gcc-4_0-branch/libstdc++-v3/include/tr1/hashtable?view=log gcc-4_0-branch SVN repository]&lt;br /&gt;
#Replace Apple's version with the downloaded file from SVN revision 104939 and restore file permissions and ownership:&lt;br /&gt;
:*Replace file (assuming the new file is located in ~/Downloads): &lt;br /&gt;
&amp;lt;pre&amp;gt;$ sudo mv /usr/include/c++/4.0.0/tr1/hashtable /usr/include/c++/4.0.0/tr1/hashtable-orig&lt;br /&gt;
$ sudo cp ~/Downloads/hashtable /usr/include/c++/4.0.0/tr1&amp;lt;/pre&amp;gt;&lt;br /&gt;
:*Check new file:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls -l /usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/pre&amp;gt;&lt;br /&gt;
:*Change permissions/ownership if needed:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sudo chmod 644 /usr/include/c++/4.0.0/tr1/hashtable&lt;br /&gt;
$ sudo chown root:wheel /usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new MacPorts installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed MacPorts, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause MacPorts to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the MacPorts libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
addition in Nov-2009 by Wolf:&lt;br /&gt;
Meanwhile building a native inkscape aqua version is quite easy - dont be afraid! I do ask every Mac OS X user to try it and to file or to support bug reports. The more bug report come in, the quicker we'll have a really working inkscape aqua.  I'll try to provide binaries, but making them seem to be a bit more tricky. Here is a set of instructions - should be quite comprehensive: [[#Building Aqua November 2009]]&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second MacPorts tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let's say I want to install a new tree for native versions in /opt/local-native. I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can omit the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You should also set alternate applications_dir and frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks installed by this MacPorts (for example by python) don't clash with your standard MacPorts tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the PATH at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the native version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here. Omit them when editing your shell configuration file and put everything on one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua February 2010 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what was to do on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD.&lt;br /&gt;
&lt;br /&gt;
Install [http://www.macports.org macports], retrieve the inkscape sources. &lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372]. (Maybe this is obsolete by Feb, 2010).&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk2-clearlooks&lt;br /&gt;
&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++ &lt;br /&gt;
&lt;br /&gt;
# At the moment (11-Feb-2010) gtk2 needs to be patched, according to &lt;br /&gt;
# http://trac.macports.org/ticket/22451&lt;br /&gt;
&lt;br /&gt;
# 1. Create a folder in your home directory e.g. /Users/&amp;lt;Username&amp;gt;/ports to act as the local&lt;br /&gt;
#  repository&lt;br /&gt;
&lt;br /&gt;
# 2. download &lt;br /&gt;
# http://trac.macports.org/attachment/ticket/22451/modified-gtk2-port.tar.bz&lt;br /&gt;
# unpack it and put the occuring folder called &amp;quot;x11&amp;quot; into the &amp;quot;ports&amp;quot; folder you created&lt;br /&gt;
&lt;br /&gt;
# 3. Edit the file /opt/local/etc/macports/sources.conf and add a line&lt;br /&gt;
# file:///Users/mark/ports before the  rsync://... line (this means Macports will use locally modified&lt;br /&gt;
# ports in preference to ports of the same name in the global repository, in our case port 'gtk2')&lt;br /&gt;
&lt;br /&gt;
# 4. cd to /Users/&amp;lt;Username&amp;gt;mark/ports and type &lt;br /&gt;
&lt;br /&gt;
portindex&lt;br /&gt;
&lt;br /&gt;
# to get Macports to index this local version of gtk2&lt;br /&gt;
&lt;br /&gt;
# 5. Then uninstall gtk2 with sudo port -f uninstall gtk2 (if necessary), &lt;br /&gt;
&lt;br /&gt;
cd ~/ports/x11/gtk2/ and&lt;br /&gt;
&lt;br /&gt;
# reinstall (from the local repository) using &lt;br /&gt;
&lt;br /&gt;
sudo port install -f gtk2 +quartz+no_x11&lt;br /&gt;
&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++ &lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install subversion&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# Edit the file osx-build.sh to remove the configure option --enable-osxapp&lt;br /&gt;
# (line 24). I used TextWrangler for this, pico or another command line editor will do the same.&lt;br /&gt;
&lt;br /&gt;
# Back to the terminal:&lt;br /&gt;
&lt;br /&gt;
# configure it:&lt;br /&gt;
sudo ./osx-build.sh c&lt;br /&gt;
&lt;br /&gt;
# build it: &lt;br /&gt;
sudo ./osx-build.sh b&lt;br /&gt;
&lt;br /&gt;
# install it: &lt;br /&gt;
sudo ./osx-build.sh i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&lt;br /&gt;
# or double click the inkscape image in path-to-inkscape-sources/Build/bin&lt;br /&gt;
&lt;br /&gt;
# (This may not work - not reason to fall into despair so far, just go ahead an pack it…)&lt;br /&gt;
&lt;br /&gt;
# Build a Mac OS X package:&lt;br /&gt;
&lt;br /&gt;
# download python packages at http://inkscape.modevia.com/macosx-snap/Python-packages.dmg&lt;br /&gt;
# put the contents in a folder named &amp;quot;python&amp;quot; and put it somewhere - the following command&lt;br /&gt;
# expects it in the folder in which the inkscape sources folder lives&lt;br /&gt;
&lt;br /&gt;
# edit &amp;lt;path-to-inkscape-sources&amp;gt;/packaging/macosx/Resources/bin/inkscape and &lt;br /&gt;
# uncomment line 33: &lt;br /&gt;
&lt;br /&gt;
# export DYLD_LIBRARY_PATH=&amp;quot;$TOP/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;path-to-inkscape-sources&amp;gt;/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# and pack:&lt;br /&gt;
&lt;br /&gt;
./osx-build.sh p -py ../../../python/ &lt;br /&gt;
&lt;br /&gt;
# To avoid X11 from launching simultaneously), edit&lt;br /&gt;
inkscape.app/Contents/Resources/script and add at line 45&lt;br /&gt;
&lt;br /&gt;
killall X11&lt;br /&gt;
&lt;br /&gt;
# Hopefully more skilled people than me will find a nicer solution than this very brutal hack.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the end this procedure works pretty straightforward, delivering a native inkscape which works fairly well - it still has the disadvantage not to be portable to another machine, because some libraries are not compiled into the app bundle. Work is in progress…&lt;br /&gt;
&lt;br /&gt;
As the author of this lines knows very little about compiling etc., I do recommend to send requests for support to the devel mailing list (mailto: inkscape-devel@lists.sourceforge.net). I'm reading there and may occasionally have the chance to answer some questions.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=58411</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=58411"/>
		<updated>2010-02-12T14:53:50Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* Building Aqua February 2010 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gsl gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*Xcode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, Xcode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
* Working version of the &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_set&amp;amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_map&amp;amp;gt;&amp;lt;/tt&amp;gt; headers. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' If Inkscape 0.47+devel fails to build on Mac OS X 10.5.8 Leopard (Xcode 3.1.4) with an [[build failure in tr1/hashtable|error]] in &amp;lt;tt&amp;gt;/usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/tt&amp;gt; it is necessary to either patch the installed &amp;lt;tt&amp;gt;tr1/hashtable&amp;lt;/tt&amp;gt; header file of libstdc++-v3 or install a [http://trac.macports.org/wiki/UsingTheRightCompiler newer version of GCC] via MacPorts. The build failure occurs because Apple's default compiler ([http://gcc.gnu.org/gcc-4.0/ GNU Compiler Collection 4.0.1]) and libstdc++ library ([http://gcc.gnu.org/libstdc++/ GNU Standard C++ Library v3]) installed by Xcode 3.1.x have never been fully updated to the last released version of the [http://gcc.gnu.org/gcc-4.0/changes.html#4.0.1 GCC 4_0 release series].&lt;br /&gt;
&lt;br /&gt;
; gcc/g++ versions by Apple known to fail to compile (bzr revno &amp;gt;= 8976)&lt;br /&gt;
: i686-apple-darwin9-g++-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)&lt;br /&gt;
: i686-apple-darwin9-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577)&lt;br /&gt;
&lt;br /&gt;
Steps to replace the faulty header file on OS X 10.5.8 with Xcode 3.1.4 installed:&lt;br /&gt;
&lt;br /&gt;
#Download [http://gcc.gnu.org/viewcvs/branches/gcc-4_0-branch/libstdc%2B%2B-v3/include/tr1/hashtable?revision=104939&amp;amp;view=co SVN revision 104939] of &amp;lt;tt&amp;gt;tr1/hashtable&amp;lt;/tt&amp;gt; from the [http://gcc.gnu.org/viewcvs/branches/gcc-4_0-branch/libstdc++-v3/include/tr1/hashtable?view=log gcc-4_0-branch SVN repository]&lt;br /&gt;
#Replace Apple's version with the downloaded file from SVN revision 104939 and restore file permissions and ownership:&lt;br /&gt;
:*Replace file (assuming the new file is located in ~/Downloads): &lt;br /&gt;
&amp;lt;pre&amp;gt;$ sudo mv /usr/include/c++/4.0.0/tr1/hashtable /usr/include/c++/4.0.0/tr1/hashtable-orig&lt;br /&gt;
$ sudo cp ~/Downloads/hashtable /usr/include/c++/4.0.0/tr1&amp;lt;/pre&amp;gt;&lt;br /&gt;
:*Check new file:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls -l /usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/pre&amp;gt;&lt;br /&gt;
:*Change permissions/ownership if needed:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sudo chmod 644 /usr/include/c++/4.0.0/tr1/hashtable&lt;br /&gt;
$ sudo chown root:wheel /usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new MacPorts installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed MacPorts, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause MacPorts to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the MacPorts libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
addition in Nov-2009 by Wolf:&lt;br /&gt;
Meanwhile building a native inkscape aqua version is quite easy - dont be afraid! I do ask every Mac OS X user to try it and to file or to support bug reports. The more bug report come in, the quicker we'll have a really working inkscape aqua.  I'll try to provide binaries, but making them seem to be a bit more tricky. Here is a set of instructions - should be quite comprehensive: [[#Building Aqua November 2009]]&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second MacPorts tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let's say I want to install a new tree for native versions in /opt/local-native. I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can omit the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You should also set alternate applications_dir and frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks installed by this MacPorts (for example by python) don't clash with your standard MacPorts tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the PATH at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the native version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here. Omit them when editing your shell configuration file and put everything on one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua February 2010 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what was to do on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD.&lt;br /&gt;
&lt;br /&gt;
Install [http://www.macports.org macports], retrieve the inkscape sources. &lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372]. (Maybe this is obsolete by Feb, 2010).&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk2-clearlooks&lt;br /&gt;
&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++ &lt;br /&gt;
&lt;br /&gt;
# At the moment (11-Feb-2010) gtk2 needs to be patched, according to &lt;br /&gt;
# http://trac.macports.org/ticket/22451&lt;br /&gt;
&lt;br /&gt;
# 1. Create a folder in your home directory e.g. /Users/&amp;lt;Username&amp;gt;/ports to act as the local&lt;br /&gt;
#  repository&lt;br /&gt;
&lt;br /&gt;
# 2. download &lt;br /&gt;
# http://trac.macports.org/attachment/ticket/22451/modified-gtk2-port.tar.bz&lt;br /&gt;
# unpack it and put the occuring folder called &amp;quot;x11&amp;quot; into the &amp;quot;ports&amp;quot; folder you created&lt;br /&gt;
&lt;br /&gt;
# 3. Edit the file /opt/local/etc/macports/sources.conf and add a line&lt;br /&gt;
# file:///Users/mark/ports before the  rsync://... line (this means Macports will use locally modified&lt;br /&gt;
# ports in preference to ports of the same name in the global repository, in our case port 'gtk2')&lt;br /&gt;
&lt;br /&gt;
# 4. cd to /Users/&amp;lt;Username&amp;gt;mark/ports and type &lt;br /&gt;
&lt;br /&gt;
portindex&lt;br /&gt;
&lt;br /&gt;
# to get Macports to index this local version of gtk2&lt;br /&gt;
&lt;br /&gt;
# 5. Then uninstall gtk2 with sudo port -f uninstall gtk2 (if necessary), &lt;br /&gt;
&lt;br /&gt;
cd ~/ports/x11/gtk2/ and&lt;br /&gt;
&lt;br /&gt;
# reinstall (from the local repository) using &lt;br /&gt;
&lt;br /&gt;
sudo port install -f gtk2 +quartz+no_x11&lt;br /&gt;
&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++ &lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install subversion&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# Edit the file osx-build.sh to remove the configure option --enable-osxapp&lt;br /&gt;
# (line 24). I used TextWrangler for this, pico or another command line editor will do the same.&lt;br /&gt;
&lt;br /&gt;
# Back to the terminal:&lt;br /&gt;
&lt;br /&gt;
# configure it:&lt;br /&gt;
sudo ./osx-build.sh c&lt;br /&gt;
&lt;br /&gt;
# build it: &lt;br /&gt;
sudo ./osx-build.sh b&lt;br /&gt;
&lt;br /&gt;
# install it: &lt;br /&gt;
sudo ./osx-build.sh i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&lt;br /&gt;
# or double click the inkscape image in path-to-inkscape-sources/Build/bin&lt;br /&gt;
&lt;br /&gt;
# (This may not work - not reason to fall into despair so far, just go ahead an pack it…)&lt;br /&gt;
&lt;br /&gt;
# Build a Mac OS X package:&lt;br /&gt;
&lt;br /&gt;
# download python packages at http://inkscape.modevia.com/macosx-snap/Python-packages.dmg&lt;br /&gt;
# put the contents in a folder named &amp;quot;python&amp;quot; and put it somewhere - the following command&lt;br /&gt;
# expects it in the folder in which the inkscape sources folder lives&lt;br /&gt;
&lt;br /&gt;
# edit &amp;lt;path-to-inkscape-sources&amp;gt;/packaging/macosx/Resources/bin/inkscape and &lt;br /&gt;
# uncomment line 33: &lt;br /&gt;
&lt;br /&gt;
# export DYLD_LIBRARY_PATH=&amp;quot;$TOP/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
cd &amp;lt;path-to-inkscape-sources&amp;gt;/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# and pack:&lt;br /&gt;
&lt;br /&gt;
./osx-build.sh p -py ../../../python/ &lt;br /&gt;
&lt;br /&gt;
# To avoid X11 from launching simultaneously), edit&lt;br /&gt;
inkscape.app/Contents/Resources/script and add at line 45&lt;br /&gt;
&lt;br /&gt;
killall X11&lt;br /&gt;
&lt;br /&gt;
# Hopefully more skilled people than me will find a nicer solution.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the end this procedure works pretty straightforward, delivering a native inkscape which works fairly well - it still has the disadvantage not to be portable to another machine, because some libraries are not compiled into the app bundle. Work is in progress…&lt;br /&gt;
&lt;br /&gt;
As the author of this lines knows very little about compiling etc., I do recommend to send requests for support to the devel mailing list (mailto: inkscape-devel@lists.sourceforge.net). I'm reading there and may occasionally have the chance to answer some questions.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=58405</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=58405"/>
		<updated>2010-02-11T18:14:50Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* Building Aqua February 2010 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gsl gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*Xcode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, Xcode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
* Working version of the &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_set&amp;amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_map&amp;amp;gt;&amp;lt;/tt&amp;gt; headers. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' If Inkscape 0.47+devel fails to build on Mac OS X 10.5.8 Leopard (Xcode 3.1.4) with an [[build failure in tr1/hashtable|error]] in &amp;lt;tt&amp;gt;/usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/tt&amp;gt; it is necessary to either patch the installed &amp;lt;tt&amp;gt;tr1/hashtable&amp;lt;/tt&amp;gt; header file of libstdc++-v3 or install a [http://trac.macports.org/wiki/UsingTheRightCompiler newer version of GCC] via MacPorts. The build failure occurs because Apple's default compiler ([http://gcc.gnu.org/gcc-4.0/ GNU Compiler Collection 4.0.1]) and libstdc++ library ([http://gcc.gnu.org/libstdc++/ GNU Standard C++ Library v3]) installed by Xcode 3.1.x have never been fully updated to the last released version of the [http://gcc.gnu.org/gcc-4.0/changes.html#4.0.1 GCC 4_0 release series].&lt;br /&gt;
&lt;br /&gt;
; gcc/g++ versions by Apple known to fail to compile (bzr revno &amp;gt;= 8976)&lt;br /&gt;
: i686-apple-darwin9-g++-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)&lt;br /&gt;
: i686-apple-darwin9-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577)&lt;br /&gt;
&lt;br /&gt;
Steps to replace the faulty header file on OS X 10.5.8 with Xcode 3.1.4 installed:&lt;br /&gt;
&lt;br /&gt;
#Download [http://gcc.gnu.org/viewcvs/branches/gcc-4_0-branch/libstdc%2B%2B-v3/include/tr1/hashtable?revision=104939&amp;amp;view=co SVN revision 104939] of &amp;lt;tt&amp;gt;tr1/hashtable&amp;lt;/tt&amp;gt; from the [http://gcc.gnu.org/viewcvs/branches/gcc-4_0-branch/libstdc++-v3/include/tr1/hashtable?view=log gcc-4_0-branch SVN repository]&lt;br /&gt;
#Replace Apple's version with the downloaded file from SVN revision 104939 and restore file permissions and ownership:&lt;br /&gt;
:*Replace file (assuming the new file is located in ~/Downloads): &lt;br /&gt;
&amp;lt;pre&amp;gt;$ sudo mv /usr/include/c++/4.0.0/tr1/hashtable /usr/include/c++/4.0.0/tr1/hashtable-orig&lt;br /&gt;
$ sudo cp ~/Downloads/hashtable /usr/include/c++/4.0.0/tr1&amp;lt;/pre&amp;gt;&lt;br /&gt;
:*Check new file:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls -l /usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/pre&amp;gt;&lt;br /&gt;
:*Change permissions/ownership if needed:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sudo chmod 644 /usr/include/c++/4.0.0/tr1/hashtable&lt;br /&gt;
$ sudo chown root:wheel /usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new MacPorts installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed MacPorts, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause MacPorts to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the MacPorts libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
addition in Nov-2009 by Wolf:&lt;br /&gt;
Meanwhile building a native inkscape aqua version is quite easy - dont be afraid! I do ask every Mac OS X user to try it and to file or to support bug reports. The more bug report come in, the quicker we'll have a really working inkscape aqua.  I'll try to provide binaries, but making them seem to be a bit more tricky. Here is a set of instructions - should be quite comprehensive: [[#Building Aqua November 2009]]&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second MacPorts tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let's say I want to install a new tree for native versions in /opt/local-native. I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can omit the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You should also set alternate applications_dir and frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks installed by this MacPorts (for example by python) don't clash with your standard MacPorts tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the PATH at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the native version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here. Omit them when editing your shell configuration file and put everything on one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua February 2010 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what was to do on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD.&lt;br /&gt;
&lt;br /&gt;
Install [http://www.macports.org macports], retrieve the inkscape sources. &lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372]. (Maybe this is obsolete by Feb, 2010).&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk2-clearlooks&lt;br /&gt;
&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++ &lt;br /&gt;
&lt;br /&gt;
# At the moment (11-Feb-2010) gtk2 needs to be patched, according to &lt;br /&gt;
# http://trac.macports.org/ticket/22451&lt;br /&gt;
&lt;br /&gt;
# 1. Create a folder in your home directory e.g. /Users/&amp;lt;Username&amp;gt;/ports to act as the local&lt;br /&gt;
#  repository&lt;br /&gt;
&lt;br /&gt;
# 2. download &lt;br /&gt;
# http://trac.macports.org/attachment/ticket/22451/modified-gtk2-port.tar.bz&lt;br /&gt;
# unpack it and put the occuring folder called &amp;quot;x11&amp;quot; into the &amp;quot;ports&amp;quot; folder you created&lt;br /&gt;
&lt;br /&gt;
# 3. Edit the file /opt/local/etc/macports/sources.conf and add a line&lt;br /&gt;
# file:///Users/mark/ports before the  rsync://... line (this means Macports will use locally modified&lt;br /&gt;
# ports in preference to ports of the same name in the global repository, in our case port 'gtk2')&lt;br /&gt;
&lt;br /&gt;
# 4. cd to /Users/&amp;lt;Username&amp;gt;mark/ports and type &lt;br /&gt;
&lt;br /&gt;
portindex&lt;br /&gt;
&lt;br /&gt;
# to get Macports to index this local version of gtk2&lt;br /&gt;
&lt;br /&gt;
# 5. Then uninstall gtk2 with sudo port -f uninstall gtk2 (if necessary), &lt;br /&gt;
&lt;br /&gt;
cd ~/ports/x11/gtk2/ and&lt;br /&gt;
&lt;br /&gt;
# reinstall (from the local repository) using &lt;br /&gt;
&lt;br /&gt;
sudo port install -f gtk2 +quartz+no_x11&lt;br /&gt;
&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++ &lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install subversion&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# Edit the file osx-build.sh to remove the configure option --enable-osxapp&lt;br /&gt;
# (line 24). I used TextWrangler for this, pico or another command line editor will do the same.&lt;br /&gt;
&lt;br /&gt;
# Back to the terminal:&lt;br /&gt;
&lt;br /&gt;
# configure it:&lt;br /&gt;
sudo ./osx-build.sh c&lt;br /&gt;
&lt;br /&gt;
# build it: &lt;br /&gt;
sudo ./osx-build.sh b&lt;br /&gt;
&lt;br /&gt;
# install it: &lt;br /&gt;
sudo ./osx-build.sh i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&lt;br /&gt;
# or double click the inkscape image in path-to-inkscape-sources/Build/bin&lt;br /&gt;
&lt;br /&gt;
# (This may not work - not reason to fall into despair so far, just go ahead an pack it…)&lt;br /&gt;
&lt;br /&gt;
# Build a Mac OS X package:&lt;br /&gt;
&lt;br /&gt;
# download python packages at http://inkscape.modevia.com/macosx-snap/Python-packages.dmg&lt;br /&gt;
# put the contents in a folder named &amp;quot;python&amp;quot; and put it somewhere - the following command&lt;br /&gt;
# expects it in the folder in which the inkscape sources folder lives&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# and pack:&lt;br /&gt;
&lt;br /&gt;
./osx-build.sh p -py ../../../python/ &lt;br /&gt;
&lt;br /&gt;
# To avoid X11 from launching simultaneously), edit&lt;br /&gt;
inkscape.app/Contents/Resources/script and comment the line&lt;br /&gt;
&lt;br /&gt;
# open-x11 /tmp/getdisplay.sh || \&lt;br /&gt;
&lt;br /&gt;
# (in my script it's line 30)&lt;br /&gt;
&lt;br /&gt;
# Probabely there is a nicer solution…&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the end this procedure works pretty straightforward, delivering a native inkscape which works fairly well - it still has the disadvantage not to be portable to another machine, because some libraries are not compiled into the app bundle. Work is in progress…&lt;br /&gt;
&lt;br /&gt;
As the author of this lines knows very little about compiling etc., I do recommend to send requests for support to the devel mailing list (mailto: inkscape-devel@lists.sourceforge.net). I'm reading there and may occasionally have the chance to answer some questions.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=58399</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=58399"/>
		<updated>2010-02-11T15:47:46Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* Building Aqua February 2010 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gsl gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*Xcode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, Xcode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
* Working version of the &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_set&amp;amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_map&amp;amp;gt;&amp;lt;/tt&amp;gt; headers. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' If Inkscape 0.47+devel fails to build on Mac OS X 10.5.8 Leopard (Xcode 3.1.4) with an [[build failure in tr1/hashtable|error]] in &amp;lt;tt&amp;gt;/usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/tt&amp;gt; it is necessary to either patch the installed &amp;lt;tt&amp;gt;tr1/hashtable&amp;lt;/tt&amp;gt; header file of libstdc++-v3 or install a [http://trac.macports.org/wiki/UsingTheRightCompiler newer version of GCC] via MacPorts. The build failure occurs because Apple's default compiler ([http://gcc.gnu.org/gcc-4.0/ GNU Compiler Collection 4.0.1]) and libstdc++ library ([http://gcc.gnu.org/libstdc++/ GNU Standard C++ Library v3]) installed by Xcode 3.1.x have never been fully updated to the last released version of the [http://gcc.gnu.org/gcc-4.0/changes.html#4.0.1 GCC 4_0 release series].&lt;br /&gt;
&lt;br /&gt;
; gcc/g++ versions by Apple known to fail to compile (bzr revno &amp;gt;= 8976)&lt;br /&gt;
: i686-apple-darwin9-g++-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)&lt;br /&gt;
: i686-apple-darwin9-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577)&lt;br /&gt;
&lt;br /&gt;
Steps to replace the faulty header file on OS X 10.5.8 with Xcode 3.1.4 installed:&lt;br /&gt;
&lt;br /&gt;
#Download [http://gcc.gnu.org/viewcvs/branches/gcc-4_0-branch/libstdc%2B%2B-v3/include/tr1/hashtable?revision=104939&amp;amp;view=co SVN revision 104939] of &amp;lt;tt&amp;gt;tr1/hashtable&amp;lt;/tt&amp;gt; from the [http://gcc.gnu.org/viewcvs/branches/gcc-4_0-branch/libstdc++-v3/include/tr1/hashtable?view=log gcc-4_0-branch SVN repository]&lt;br /&gt;
#Replace Apple's version with the downloaded file from SVN revision 104939 and restore file permissions and ownership:&lt;br /&gt;
:*Replace file (assuming the new file is located in ~/Downloads): &lt;br /&gt;
&amp;lt;pre&amp;gt;$ sudo mv /usr/include/c++/4.0.0/tr1/hashtable /usr/include/c++/4.0.0/tr1/hashtable-orig&lt;br /&gt;
$ sudo cp ~/Downloads/hashtable /usr/include/c++/4.0.0/tr1&amp;lt;/pre&amp;gt;&lt;br /&gt;
:*Check new file:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls -l /usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/pre&amp;gt;&lt;br /&gt;
:*Change permissions/ownership if needed:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sudo chmod 644 /usr/include/c++/4.0.0/tr1/hashtable&lt;br /&gt;
$ sudo chown root:wheel /usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new MacPorts installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed MacPorts, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause MacPorts to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the MacPorts libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
addition in Nov-2009 by Wolf:&lt;br /&gt;
Meanwhile building a native inkscape aqua version is quite easy - dont be afraid! I do ask every Mac OS X user to try it and to file or to support bug reports. The more bug report come in, the quicker we'll have a really working inkscape aqua.  I'll try to provide binaries, but making them seem to be a bit more tricky. Here is a set of instructions - should be quite comprehensive: [[#Building Aqua November 2009]]&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second MacPorts tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let's say I want to install a new tree for native versions in /opt/local-native. I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can omit the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You should also set alternate applications_dir and frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks installed by this MacPorts (for example by python) don't clash with your standard MacPorts tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the PATH at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the native version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here. Omit them when editing your shell configuration file and put everything on one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua February 2010 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what was to do on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD.&lt;br /&gt;
&lt;br /&gt;
Install [http://www.macports.org macports], retrieve the inkscape sources. &lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372]. (Maybe this is obsolete by Feb, 2010).&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk2-clearlooks&lt;br /&gt;
&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++ &lt;br /&gt;
&lt;br /&gt;
# At the moment (11-Feb-2010) gtk2 needs to be patched, according to &lt;br /&gt;
# http://trac.macports.org/ticket/22451&lt;br /&gt;
&lt;br /&gt;
# 1. Create a folder in your home directory e.g. /Users/&amp;lt;Username&amp;gt;/ports to act as the local&lt;br /&gt;
#  repository&lt;br /&gt;
&lt;br /&gt;
# 2. download &lt;br /&gt;
# http://trac.macports.org/attachment/ticket/22451/modified-gtk2-port.tar.bz&lt;br /&gt;
# unpack it and put the occuring folder called &amp;quot;x11&amp;quot; into the &amp;quot;ports&amp;quot; folder you created&lt;br /&gt;
&lt;br /&gt;
# 3. Edit the file /opt/local/etc/macports/sources.conf and add a line&lt;br /&gt;
# file:///Users/mark/ports before the  rsync://... line (this means Macports will use locally modified&lt;br /&gt;
# ports in preference to ports of the same name in the global repository, in our case port 'gtk2')&lt;br /&gt;
&lt;br /&gt;
# 4. cd to /Users/&amp;lt;Username&amp;gt;mark/ports and type &lt;br /&gt;
&lt;br /&gt;
portindex&lt;br /&gt;
&lt;br /&gt;
# to get Macports to index this local version of gtk2&lt;br /&gt;
&lt;br /&gt;
# 5. Then uninstall gtk2 with sudo port -f uninstall gtk2 (if necessary), &lt;br /&gt;
&lt;br /&gt;
cd ~/ports/x11/gtk2/ and&lt;br /&gt;
&lt;br /&gt;
# reinstall (from the local repository) using &lt;br /&gt;
&lt;br /&gt;
sudo port install -f gtk2 +quartz+no_x11&lt;br /&gt;
&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++ &lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install subversion&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# Edit the file osx-build.sh to remove the configure option --enable-osxapp&lt;br /&gt;
# (line 24). I used TextWrangler for this, pico or another command line editor will do the same.&lt;br /&gt;
&lt;br /&gt;
# Back to the terminal:&lt;br /&gt;
&lt;br /&gt;
# configure it:&lt;br /&gt;
sudo ./osx-build.sh c&lt;br /&gt;
&lt;br /&gt;
# build it: &lt;br /&gt;
sudo ./osx-build.sh b&lt;br /&gt;
&lt;br /&gt;
# install it: &lt;br /&gt;
sudo ./osx-build.sh i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&lt;br /&gt;
# or double click the inkscape image in path-to-inkscape-sources/Build/bin&lt;br /&gt;
&lt;br /&gt;
# (This may not work - not reason to fall into despair so far, just go ahead an pack it…)&lt;br /&gt;
&lt;br /&gt;
# Build a Mac OS X package:&lt;br /&gt;
&lt;br /&gt;
# download python packages at http://inkscape.modevia.com/macosx-snap/Python-packages.dmg&lt;br /&gt;
# put the contents in a folder named &amp;quot;python&amp;quot; and put it somewhere - the following command&lt;br /&gt;
# expects it in the folder in which the inkscape sources folder lives&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# and pack:&lt;br /&gt;
&lt;br /&gt;
./osx-build.sh p -py ../../../python/ &lt;br /&gt;
&lt;br /&gt;
# To avoid X11 from launching simultaneously (very ugly and brutal hack - &lt;br /&gt;
may more skilled people be so kind and find a more elegant solution), edit&lt;br /&gt;
inkscape.app/Contents/Resources/script and add&lt;br /&gt;
&lt;br /&gt;
# killall X11 &lt;br /&gt;
&lt;br /&gt;
# behind the line&lt;br /&gt;
&lt;br /&gt;
export DISPLAY=`cat /tmp/display.$UID`&lt;br /&gt;
&lt;br /&gt;
The new line is #39 in my build. Sorry - there must be a much nicer solution.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the end this procedure works pretty straightforward, delivering a native inkscape which works fairly well - it still has the disadvantage not to be portable to another machine, because some libraries are not compiled into the app bundle. Work is in progress…&lt;br /&gt;
&lt;br /&gt;
As the author of this lines knows very little about compiling etc., I do recommend to send requests for support to the devel mailing list (mailto: inkscape-devel@lists.sourceforge.net). I'm reading there and may occasionally have the chance to answer some questions.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=58393</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=58393"/>
		<updated>2010-02-11T15:44:29Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* Building Aqua November 2009 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gsl gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*Xcode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, Xcode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
* Working version of the &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_set&amp;amp;gt;&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;&amp;amp;lt;tr1/unordered_map&amp;amp;gt;&amp;lt;/tt&amp;gt; headers. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' If Inkscape 0.47+devel fails to build on Mac OS X 10.5.8 Leopard (Xcode 3.1.4) with an [[build failure in tr1/hashtable|error]] in &amp;lt;tt&amp;gt;/usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/tt&amp;gt; it is necessary to either patch the installed &amp;lt;tt&amp;gt;tr1/hashtable&amp;lt;/tt&amp;gt; header file of libstdc++-v3 or install a [http://trac.macports.org/wiki/UsingTheRightCompiler newer version of GCC] via MacPorts. The build failure occurs because Apple's default compiler ([http://gcc.gnu.org/gcc-4.0/ GNU Compiler Collection 4.0.1]) and libstdc++ library ([http://gcc.gnu.org/libstdc++/ GNU Standard C++ Library v3]) installed by Xcode 3.1.x have never been fully updated to the last released version of the [http://gcc.gnu.org/gcc-4.0/changes.html#4.0.1 GCC 4_0 release series].&lt;br /&gt;
&lt;br /&gt;
; gcc/g++ versions by Apple known to fail to compile (bzr revno &amp;gt;= 8976)&lt;br /&gt;
: i686-apple-darwin9-g++-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493)&lt;br /&gt;
: i686-apple-darwin9-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5577)&lt;br /&gt;
&lt;br /&gt;
Steps to replace the faulty header file on OS X 10.5.8 with Xcode 3.1.4 installed:&lt;br /&gt;
&lt;br /&gt;
#Download [http://gcc.gnu.org/viewcvs/branches/gcc-4_0-branch/libstdc%2B%2B-v3/include/tr1/hashtable?revision=104939&amp;amp;view=co SVN revision 104939] of &amp;lt;tt&amp;gt;tr1/hashtable&amp;lt;/tt&amp;gt; from the [http://gcc.gnu.org/viewcvs/branches/gcc-4_0-branch/libstdc++-v3/include/tr1/hashtable?view=log gcc-4_0-branch SVN repository]&lt;br /&gt;
#Replace Apple's version with the downloaded file from SVN revision 104939 and restore file permissions and ownership:&lt;br /&gt;
:*Replace file (assuming the new file is located in ~/Downloads): &lt;br /&gt;
&amp;lt;pre&amp;gt;$ sudo mv /usr/include/c++/4.0.0/tr1/hashtable /usr/include/c++/4.0.0/tr1/hashtable-orig&lt;br /&gt;
$ sudo cp ~/Downloads/hashtable /usr/include/c++/4.0.0/tr1&amp;lt;/pre&amp;gt;&lt;br /&gt;
:*Check new file:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls -l /usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/pre&amp;gt;&lt;br /&gt;
:*Change permissions/ownership if needed:&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sudo chmod 644 /usr/include/c++/4.0.0/tr1/hashtable&lt;br /&gt;
$ sudo chown root:wheel /usr/include/c++/4.0.0/tr1/hashtable&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new MacPorts installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed MacPorts, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause MacPorts to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the MacPorts libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
addition in Nov-2009 by Wolf:&lt;br /&gt;
Meanwhile building a native inkscape aqua version is quite easy - dont be afraid! I do ask every Mac OS X user to try it and to file or to support bug reports. The more bug report come in, the quicker we'll have a really working inkscape aqua.  I'll try to provide binaries, but making them seem to be a bit more tricky. Here is a set of instructions - should be quite comprehensive: [[#Building Aqua November 2009]]&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second MacPorts tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let's say I want to install a new tree for native versions in /opt/local-native. I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can omit the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You should also set alternate applications_dir and frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks installed by this MacPorts (for example by python) don't clash with your standard MacPorts tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the PATH at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the native version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here. Omit them when editing your shell configuration file and put everything on one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua February 2010 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what was to do on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Install [http://developer.apple.com/tools/xcode/ Xcode tools] from your OS X installation DVD.&lt;br /&gt;
&lt;br /&gt;
Install [http://www.macports.org macports], retrieve the inkscape sources. &lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372].&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk2-clearlooks&lt;br /&gt;
&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++ &lt;br /&gt;
&lt;br /&gt;
# At the moment (11-Feb-2010) gtk2 needs to be patched, according to &lt;br /&gt;
# http://trac.macports.org/ticket/22451&lt;br /&gt;
&lt;br /&gt;
# 1. Create a folder in your home directory e.g. /Users/&amp;lt;Username&amp;gt;/ports to act as the local&lt;br /&gt;
#  repository&lt;br /&gt;
&lt;br /&gt;
# 2. download &lt;br /&gt;
# http://trac.macports.org/attachment/ticket/22451/modified-gtk2-port.tar.bz&lt;br /&gt;
# unpack it and put the occuring folder called &amp;quot;x11&amp;quot; into the &amp;quot;ports&amp;quot; folder you created&lt;br /&gt;
&lt;br /&gt;
# 3. Edit the file /opt/local/etc/macports/sources.conf and add a line&lt;br /&gt;
# file:///Users/mark/ports before the  rsync://... line (this means Macports will use locally modified&lt;br /&gt;
#  ports in preference to ports of the same name in the global repository, in our case port 'gtk2')&lt;br /&gt;
&lt;br /&gt;
# 4. cd to /Users/&amp;lt;Username&amp;gt;mark/ports and type &lt;br /&gt;
&lt;br /&gt;
portindex&lt;br /&gt;
&lt;br /&gt;
# to get Macports to index this local version of gtk2&lt;br /&gt;
&lt;br /&gt;
# 5. Then uninstall gtk2 with sudo port -f uninstall gtk2 (if necessary), &lt;br /&gt;
&lt;br /&gt;
cd ~/ports/x11/gtk2/ and&lt;br /&gt;
&lt;br /&gt;
# reinstall (from the local repository) using &lt;br /&gt;
&lt;br /&gt;
sudo port install -f gtk2 +quartz+no_x11&lt;br /&gt;
&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++ &lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install subversion&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# Edit the file osx-build.sh to remove the configure option --enable-osxapp&lt;br /&gt;
# (line 24)&lt;br /&gt;
&lt;br /&gt;
# I used TextWrangler for this, pico or another command line editor will do the same.&lt;br /&gt;
&lt;br /&gt;
# Back to the terminal:&lt;br /&gt;
&lt;br /&gt;
# configure it:&lt;br /&gt;
sudo ./osx-build.sh c&lt;br /&gt;
&lt;br /&gt;
# build it: &lt;br /&gt;
sudo ./osx-build.sh b&lt;br /&gt;
&lt;br /&gt;
# install it: &lt;br /&gt;
sudo ./osx-build.sh i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&lt;br /&gt;
or double click the inkscape image in path-to-inkscape-sources/Build/bin&lt;br /&gt;
&lt;br /&gt;
(This may not work - not reason to fall into despair so far, just go ahead an pack it…)&lt;br /&gt;
&lt;br /&gt;
# Build a Mac OS X package:&lt;br /&gt;
&lt;br /&gt;
# download python packages at http://inkscape.modevia.com/macosx-snap/Python-packages.dmg&lt;br /&gt;
# put the contents in a folder named &amp;quot;python&amp;quot; and put it somewhere - the following command&lt;br /&gt;
# expects it in the folder in which the inkscape sources folder lives&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# and pack:&lt;br /&gt;
&lt;br /&gt;
./osx-build.sh p -py ../../../python/ &lt;br /&gt;
&lt;br /&gt;
# To avoid X11 from launching simultaneously (very ugly and brutal hack - &lt;br /&gt;
may more skilled people be so kind and find a more elegant solution), edit&lt;br /&gt;
inkscape.app/Contents/Resources/script and add&lt;br /&gt;
&lt;br /&gt;
# killall X11 &lt;br /&gt;
&lt;br /&gt;
# behind the line&lt;br /&gt;
&lt;br /&gt;
export DISPLAY=`cat /tmp/display.$UID`&lt;br /&gt;
&lt;br /&gt;
The new line is #39 in my build. Sorry - there must be a much nicer solution.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the end this procedure works pretty straightforward, delivering a native inkscape which works fairly well - it still has the disadvantage not to be portable to another machine, because some libraries are not compiled into the app bundle. Work is in progress…&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As the author of this lines knows very little about compiling etc., I do recommend to send requests for support to the devel mailing list (mailto: inkscape-devel@lists.sourceforge.net). I'm reading there and may occasionally have the chance to answer some questions.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=54999</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=54999"/>
		<updated>2009-11-28T18:15:50Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* Compiling Inkscape with native GTK using MacPorts [experimental] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ XCode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port sync&lt;br /&gt;
sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*XCode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, XCode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new Macports installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed Macports, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause Macports to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the Macports libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
addition in Nov-2009 by Wolf:&lt;br /&gt;
Meanwhile building a native inkscape aqua version is quite easy - dont be afraid! I do ask every Mac OS X user to try it and to file or to support bug reports. The more bug report come in, the quicker we'll have a really working inkscape aqua.  I'll try to provide binaries, but making them seem to be a bit more tricky. Here is a set of instructions - should be quite comprehensive: [[#Building Aqua November 2009]]&lt;br /&gt;
&lt;br /&gt;
++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second Macports tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let say I want to install a new tree for native versions in /opt/local/native, I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can remove the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You may also need to set alternate applications_dir and  frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks install by this macports (for example by python) don't clash with your standard  macports tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the path at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the universal version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here, suppress them and put everything in one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua November 2009 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what was to do on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Install [http://developer.apple.com/tools/xcode/ XCode tools] from your OS X installation DVD.&lt;br /&gt;
&lt;br /&gt;
Install [http://www.macports.org macports], retrieve the inkscape sources. &lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372].&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk2 +quartz&lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install subversion&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# Edit the file osx-build.sh to remove the configure option --enable-osxapp&lt;br /&gt;
# (line 24)&lt;br /&gt;
&lt;br /&gt;
# I used TextWrangler for this, pico or another command line editor will do the same.&lt;br /&gt;
&lt;br /&gt;
# Back to the terminal:&lt;br /&gt;
&lt;br /&gt;
# configure it:&lt;br /&gt;
sudo ./osx-build.sh c&lt;br /&gt;
&lt;br /&gt;
# build it: &lt;br /&gt;
sudo ./osx-build.sh b&lt;br /&gt;
&lt;br /&gt;
# install it: &lt;br /&gt;
sudo ./osx-build.sh i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&lt;br /&gt;
or double click the inkscape image in path-to-inkscape-sources/Build/bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the end this procedure works pretty straightforward, delivering a native inkscape which works fairly well.&lt;br /&gt;
&lt;br /&gt;
As the author of this lines knows very little about compiling etc., I do recommend to send requests for support to the devel mailing list (mailto: inkscape-devel@lists.sourceforge.net). I'm reading there and may occasionally have the chance to answer some questions.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=54927</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=54927"/>
		<updated>2009-11-23T20:26:59Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* Building Aqua November 2009 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ XCode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port sync&lt;br /&gt;
sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*XCode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, XCode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new Macports installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed Macports, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause Macports to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the Macports libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
Meanwhile building a native inkscape aqua version is quite easy - dont be afraid! I do ask every Mac OS X user to try it and to file or to support bug reports. The more bug report come in, the quicker we'll have a really working inkscape aqua.  I'll try to provide binaries, but making them seem to be a bit more tricky. Here is a set of instructions - should be quite comprehensive: [[#Building Aqua November 2009]] &lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second Macports tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let say I want to install a new tree for native versions in /opt/local/native, I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can remove the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You may also need to set alternate applications_dir and  frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks install by this macports (for example by python) don't clash with your standard  macports tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the path at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the universal version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here, suppress them and put everything in one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua November 2009 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what was to do on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Install [http://developer.apple.com/tools/xcode/ XCode tools] from your OS X installation DVD.&lt;br /&gt;
&lt;br /&gt;
Install [http://www.macports.org macports], retrieve the inkscape sources. &lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372].&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk2 +quartz&lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install subversion&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# Edit the file osx-build.sh to remove the configure option --enable-osxapp&lt;br /&gt;
# (line 24)&lt;br /&gt;
&lt;br /&gt;
# I used TextWrangler for this, pico or another command line editor will do the same.&lt;br /&gt;
&lt;br /&gt;
# Back to the terminal:&lt;br /&gt;
&lt;br /&gt;
# configure it:&lt;br /&gt;
sudo ./osx-build.sh c&lt;br /&gt;
&lt;br /&gt;
# build it: &lt;br /&gt;
sudo ./osx-build.sh b&lt;br /&gt;
&lt;br /&gt;
# install it: &lt;br /&gt;
sudo ./osx-build.sh i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&lt;br /&gt;
or double click the inkscape image in path-to-inkscape-sources/Build/bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the end this procedure works pretty straightforward, delivering a native inkscape which works fairly well.&lt;br /&gt;
&lt;br /&gt;
As the author of this lines knows very little about compiling etc., I do recommend to send requests for support to the devel mailing list (mailto: inkscape-devel@lists.sourceforge.net). I'm reading there and may occasionally have the chance to answer some questions.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=54925</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=54925"/>
		<updated>2009-11-23T17:50:26Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* Building Aqua November 2009 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ XCode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port sync&lt;br /&gt;
sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*XCode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, XCode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new Macports installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed Macports, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause Macports to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the Macports libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
Meanwhile building a native inkscape aqua version is quite easy - dont be afraid! I do ask every Mac OS X user to try it and to file or to support bug reports. The more bug report come in, the quicker we'll have a really working inkscape aqua.  I'll try to provide binaries, but making them seem to be a bit more tricky. Here is a set of instructions - should be quite comprehensive: [[#Building Aqua November 2009]] &lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second Macports tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let say I want to install a new tree for native versions in /opt/local/native, I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can remove the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You may also need to set alternate applications_dir and  frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks install by this macports (for example by python) don't clash with your standard  macports tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the path at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the universal version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here, suppress them and put everything in one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua November 2009 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what I did on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Installed [http://www.macports.org macports], retrieved the inkscape sources. &lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372].&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk2 +quartz&lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install subversion&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
Edit the file osx-build.sh to remove the configure option --enable-osxapp&lt;br /&gt;
(line 24)&lt;br /&gt;
&lt;br /&gt;
# I used TextWrangler for this, pico or another command line editor will do the same.&lt;br /&gt;
&lt;br /&gt;
# Back to the terminal:&lt;br /&gt;
&lt;br /&gt;
# configure it:&lt;br /&gt;
sudo ./osx-build.sh c&lt;br /&gt;
&lt;br /&gt;
# build it: &lt;br /&gt;
sudo ./osx-build.sh b&lt;br /&gt;
&lt;br /&gt;
# install it: &lt;br /&gt;
sudo ./osx-build.sh i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&lt;br /&gt;
or double click the inkscape image in path-to-inkscape-sources/Build/bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the end this procedure works pretty straightforward, delivering a native inkscape which works fairly well.&lt;br /&gt;
&lt;br /&gt;
As the author of this lines knows very little about compiling etc., I do recommend to send requests for support to the devel mailing list (mailto: inkscape-devel@lists.sourceforge.net). I'm reading there and may occasionally have the chance to answer some questions.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=54923</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=54923"/>
		<updated>2009-11-23T17:40:24Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* Building Aqua November 2009 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ XCode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port sync&lt;br /&gt;
sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*XCode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, XCode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new Macports installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed Macports, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause Macports to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the Macports libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
Meanwhile building a native inkscape aqua version is quite easy - dont be afraid! I do ask every Mac OS X user to try it and to file or to support bug reports. The more bug report come in, the quicker we'll have a really working inkscape aqua.  I'll try to provide binaries, but making them seem to be a bit more tricky. Here is a set of instructions - should be quite comprehensive: [[#Building Aqua November 2009]] &lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second Macports tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let say I want to install a new tree for native versions in /opt/local/native, I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can remove the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You may also need to set alternate applications_dir and  frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks install by this macports (for example by python) don't clash with your standard  macports tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the path at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the universal version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here, suppress them and put everything in one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua November 2009 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what I did on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Installed [http://www.macports.org macports], retrieved the inkscape sources. Then moved to ''Inkscape_sources_folder''/packaging/macosx, edited the file osx-build.sh to remove the configure option --enable-osxapp&lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372].&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk2 +quartz&lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install subversion&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# configure it:&lt;br /&gt;
sudo ./osx-build.sh c&lt;br /&gt;
&lt;br /&gt;
# build it: &lt;br /&gt;
sudo ./osx-build.sh b&lt;br /&gt;
&lt;br /&gt;
# install it: &lt;br /&gt;
sudo ./osx-build.sh i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&lt;br /&gt;
or double click the inkscape image in path-to-inkscape-sources/Build/bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the end this procedure works pretty straightforward, delivering a native inkscape which works fairly well.&lt;br /&gt;
&lt;br /&gt;
As the author of this lines knows very little about compiling etc., I do recommend to send requests for support to the devel mailing list (mailto: inkscape-devel@lists.sourceforge.net). I'm reading there and may occasionally have the chance to answer some questions.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=54921</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=54921"/>
		<updated>2009-11-23T17:33:40Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* Building Aqua September 2009 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ XCode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port sync&lt;br /&gt;
sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*XCode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, XCode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new Macports installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed Macports, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause Macports to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the Macports libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
Meanwhile building a native inkscape aqua version is quite easy - dont be afraid! I do ask every Mac OS X user to try it and to file or to support bug reports. The more bug report come in, the quicker we'll have a really working inkscape aqua.  I'll try to provide binaries, but making them seem to be a bit more tricky. Here is a set of instructions - should be quite comprehensive: [[#Building Aqua November 2009]] &lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second Macports tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let say I want to install a new tree for native versions in /opt/local/native, I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can remove the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You may also need to set alternate applications_dir and  frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks install by this macports (for example by python) don't clash with your standard  macports tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the path at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the universal version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here, suppress them and put everything in one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua November 2009 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what I did on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Installed macports, retrieved the sources. Then moved to ''Inkscape_sources_folder''/packaging/macosx, edited the file osx-build.sh to remove the configure option --enable-osxapp&lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372].&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk2 +quartz&lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install subversion&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# configure it:&lt;br /&gt;
sudo ./osx-build.sh c&lt;br /&gt;
&lt;br /&gt;
# build it: &lt;br /&gt;
sudo ./osx-build.sh b&lt;br /&gt;
&lt;br /&gt;
# install it: &lt;br /&gt;
sudo ./osx-build.sh i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&lt;br /&gt;
or double click the inkscape image in path-to-inkscape-sources/Build/bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the end this procedure works pretty straightforward, delivering a native inkscape which works fairly well.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=54919</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=54919"/>
		<updated>2009-11-23T17:33:11Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* Compiling Inkscape with native GTK using MacPorts [experimental] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ XCode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port sync&lt;br /&gt;
sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*XCode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, XCode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new Macports installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed Macports, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause Macports to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the Macports libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
Meanwhile building a native inkscape aqua version is quite easy - dont be afraid! I do ask every Mac OS X user to try it and to file or to support bug reports. The more bug report come in, the quicker we'll have a really working inkscape aqua.  I'll try to provide binaries, but making them seem to be a bit more tricky. Here is a set of instructions - should be quite comprehensive: [[#Building Aqua November 2009]] &lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second Macports tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let say I want to install a new tree for native versions in /opt/local/native, I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can remove the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You may also need to set alternate applications_dir and  frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks install by this macports (for example by python) don't clash with your standard  macports tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the path at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the universal version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here, suppress them and put everything in one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua September 2009 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what I did on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Installed macports, retrieved the sources. Then moved to ''Inkscape_sources_folder''/packaging/macosx, edited the file osx-build.sh to remove the configure option --enable-osxapp&lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372].&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk2 +quartz&lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install subversion&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# configure it:&lt;br /&gt;
sudo ./osx-build.sh c&lt;br /&gt;
&lt;br /&gt;
# build it: &lt;br /&gt;
sudo ./osx-build.sh b&lt;br /&gt;
&lt;br /&gt;
# install it: &lt;br /&gt;
sudo ./osx-build.sh i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&lt;br /&gt;
or double click the inkscape image in path-to-inkscape-sources/Build/bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the end this procedure works pretty straightforward, delivering a native inkscape which works fairly well.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=54917</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=54917"/>
		<updated>2009-11-23T17:26:55Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* Building Aqua September 2009 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ XCode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port sync&lt;br /&gt;
sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*XCode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, XCode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new Macports installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed Macports, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause Macports to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the Macports libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
A more recent attempt is described here: [[#Building Aqua September 2009]] &lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second Macports tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let say I want to install a new tree for native versions in /opt/local/native, I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can remove the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You may also need to set alternate applications_dir and  frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks install by this macports (for example by python) don't clash with your standard  macports tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the path at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the universal version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here, suppress them and put everything in one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua September 2009 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what I did on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Installed macports, retrieved the sources. Then moved to ''Inkscape_sources_folder''/packaging/macosx, edited the file osx-build.sh to remove the configure option --enable-osxapp&lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372].&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk2 +quartz&lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install subversion&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
# ++++++++++++++++++++++++++++++++++++++++++++++++++++&lt;br /&gt;
&lt;br /&gt;
cd path-to-inkscape-sources/packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# configure it:&lt;br /&gt;
sudo ./osx-build.sh c&lt;br /&gt;
&lt;br /&gt;
# build it: &lt;br /&gt;
sudo ./osx-build.sh b&lt;br /&gt;
&lt;br /&gt;
# install it: &lt;br /&gt;
sudo ./osx-build.sh i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&lt;br /&gt;
or double click the inkscape image in path-to-inkscape-sources/Build/bin&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the end this procedure works pretty straightforward, delivering a native inkscape which works fairly well.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=54849</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=54849"/>
		<updated>2009-11-21T12:58:21Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* Building Aqua September 2009 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ XCode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port sync&lt;br /&gt;
sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*XCode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, XCode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new Macports installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed Macports, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause Macports to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the Macports libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
A more recent attempt is described here: [[#Building Aqua September 2009]] &lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second Macports tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let say I want to install a new tree for native versions in /opt/local/native, I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can remove the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You may also need to set alternate applications_dir and  frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks install by this macports (for example by python) don't clash with your standard  macports tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the path at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the universal version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here, suppress them and put everything in one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua September 2009 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what I did on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Installed macports, retrieved the sources. Then moved to ''Inkscape_sources_folder''/packaging/macosx, edited the file osx-build.sh to remove the configure option --enable-osxapp&lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372].&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk2 +quartz&lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install subversion&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
&lt;br /&gt;
export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
sudo ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
sudo ./configure --disable-static --enable-shared --prefix=/Users/bub/Desktop&lt;br /&gt;
&lt;br /&gt;
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
&lt;br /&gt;
sudo ./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
&lt;br /&gt;
cd packaging/macosx&lt;br /&gt;
&lt;br /&gt;
# build it:&lt;br /&gt;
sudo ./osx-build.sh u a c b i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That was the result of quite a lot of trial and error. I'm not sure this will work from scratch again, probabely there are some mistakes in my records. In the case of doubt, please keep to the instructions given above.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=53961</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=53961"/>
		<updated>2009-09-29T11:04:03Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* Compiling Inkscape with native GTK using MacPorts [experimental] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ XCode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port sync&lt;br /&gt;
sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*XCode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, XCode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new Macports installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed Macports, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause Macports to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the Macports libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
A more recent attempt is described here: [[#Building Aqua September 2009]] &lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second Macports tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let say I want to install a new tree for native versions in /opt/local/native, I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can remove the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You may also need to set alternate applications_dir and  frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks install by this macports (for example by python) don't clash with your standard  macports tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the path at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the universal version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here, suppress them and put everything in one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua September 2009 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what I did on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Installed macports, retrieved the sources. Then moved to ''Inkscape_sources_folder''/packaging/macosx, edited the file osx-build.sh to remove the configure option --enable-osxapp&lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372].&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk2 +quartz&lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install subversion&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
&lt;br /&gt;
export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
sudo ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
sudo ./configure --disable-static --enable-shared --prefix=/Users/bub/Desktop&lt;br /&gt;
&lt;br /&gt;
sudo export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
&lt;br /&gt;
# build it:&lt;br /&gt;
./osx-build.sh u a c b i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That was the result of quite a lot of trial and error. I'm not sure this will work from scratch again, probabely there are some mistakes in my records. In the case of doubt, please keep to the instructions given above.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=53959</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=53959"/>
		<updated>2009-09-29T07:57:01Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* Building Aqua September 2009 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ XCode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port sync&lt;br /&gt;
sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*XCode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, XCode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new Macports installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed Macports, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause Macports to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the Macports libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
A more recent attempt is described here: [[CompilingMacOsX#Building Aqua September 2009]] &lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second Macports tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let say I want to install a new tree for native versions in /opt/local/native, I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can remove the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You may also need to set alternate applications_dir and  frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks install by this macports (for example by python) don't clash with your standard  macports tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the path at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the universal version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here, suppress them and put everything in one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua September 2009 ==&lt;br /&gt;
As I had a nicely working X11 version, I didnt care about compiling for X11, so this is an aqua-only procedure, which fairly started from scratch.&lt;br /&gt;
&lt;br /&gt;
Here is what I did on a G4 (PPC) with Mac OS X 10.4.11:&lt;br /&gt;
&lt;br /&gt;
Installed macports, retrieved the sources. Then moved to ''Inkscape_sources_folder''/packaging/macosx, edited the file osx-build.sh to remove the configure option --enable-osxapp&lt;br /&gt;
&lt;br /&gt;
In order to install gtk2 on a PowerPC, you may have to apply this workaround: [http://trac.macports.org/ticket/20372].&lt;br /&gt;
&lt;br /&gt;
Then copy into the terminal: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&lt;br /&gt;
&lt;br /&gt;
sudo port install librsvg libwpd libwpg libcroco&lt;br /&gt;
&lt;br /&gt;
sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&lt;br /&gt;
&lt;br /&gt;
sudo port install cairo +quartz+no_x11 cairomm pango +quartz+no_x11 poppler +quartz gtk2 +quartz&lt;br /&gt;
&lt;br /&gt;
sudo port install gsl&lt;br /&gt;
&lt;br /&gt;
sudo port install hicolor-icon-theme&lt;br /&gt;
&lt;br /&gt;
sudo port install subversion&lt;br /&gt;
&lt;br /&gt;
sudo port install libxml2 libxslt&lt;br /&gt;
&lt;br /&gt;
# optional to speed up the compiling process:&lt;br /&gt;
sudo port install ccache&lt;br /&gt;
export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&lt;br /&gt;
&lt;br /&gt;
export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
sudo ./autogen.sh&lt;br /&gt;
&lt;br /&gt;
sudo ./configure --disable-static --enable-shared --prefix=/Users/bub/Desktop&lt;br /&gt;
&lt;br /&gt;
sudo export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
&lt;br /&gt;
# build it:&lt;br /&gt;
./osx-build.sh u a c b i&lt;br /&gt;
&lt;br /&gt;
# test it:&lt;br /&gt;
cd ../../Build/bin/./inkscape&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That was the result of quite a lot of trial and error. I'm not sure this will work from scratch again, probabely there are some mistakes in my records. In the case of doubt, please keep to the instructions given above.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=53957</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=53957"/>
		<updated>2009-09-29T07:38:18Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* Compiling Inkscape with native GTK using MacPorts [experimental] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ XCode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port sync&lt;br /&gt;
sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*XCode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, XCode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new Macports installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed Macports, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause Macports to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the Macports libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
A more recent attempt is described here: [[CompilingMacOsX#Building Aqua September 2009]] &lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second Macports tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let say I want to install a new tree for native versions in /opt/local/native, I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can remove the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You may also need to set alternate applications_dir and  frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks install by this macports (for example by python) don't clash with your standard  macports tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the path at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the universal version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here, suppress them and put everything in one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
== Building Aqua September 2009 ==&lt;br /&gt;
In September 2009 there was another attempt.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
	<entry>
		<id>https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=53955</id>
		<title>CompilingMacOsX</title>
		<link rel="alternate" type="text/html" href="https://wiki.inkscape.org/wiki/index.php?title=CompilingMacOsX&amp;diff=53955"/>
		<updated>2009-09-29T07:34:58Z</updated>

		<summary type="html">&lt;p&gt;Herrdeh: /* Compiling Inkscape with native GTK using MacPorts [experimental] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= For the impatient =&lt;br /&gt;
&lt;br /&gt;
1. Install [http://developer.apple.com/tools/xcode/ XCode tools] from your OS X installation DVD&lt;br /&gt;
&lt;br /&gt;
2. Download and install [http://www.macports.org/ MacPorts]&lt;br /&gt;
&lt;br /&gt;
3. In Terminal (Applications&amp;gt;Utilities&amp;gt;Terminal) type&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port sync&lt;br /&gt;
sudo port selfupdate&lt;br /&gt;
sudo port install cairo boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt poppler boost \ &lt;br /&gt;
 gnome-vfs libgnomeprintui automake autoconf subversion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: subversion is pre-installed on Leopard, so you may be fine leaving subversion out of the port install command chain.&lt;br /&gt;
&lt;br /&gt;
Grab a cup of coffee&lt;br /&gt;
&lt;br /&gt;
4. In Terminal, get and build Inkscape&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn co https://inkscape.svn.sourceforge.net/svnroot/inkscape/inkscape/trunk inkscape&lt;br /&gt;
cd inkscape/packaging/macosx/&lt;br /&gt;
./osx-build.sh a c b i -s p&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Et voilà''. If you want to understand what you just did, read on.&lt;br /&gt;
&lt;br /&gt;
= Requirements =&lt;br /&gt;
To compile Inkscape from source you need:&lt;br /&gt;
*Mac OS X &amp;gt; 10.3&lt;br /&gt;
*XCode Tools. They are on your installation DVD, in the optional installs, or can be download from [http://developer.apple.com/tools/xcode/ Apple Developer Connection]. You can customize the install to make it smaller (avoir documentation and example software for example). You need at least: gcc, XCode, X11SDK.&lt;br /&gt;
*Inkscape's source code. You can download an [http://www.inkscape.org/download.php official release source code], a [http://inkscape.modevia.com/svn-snap/?M=D development snapshot] or checkout a copy of the current state of the [http://www.inkscape.org/svn.php?lang=en SVN repository] using [http://subversion.tigris.org/ subversion]. Subversion comes pre-installed on Leopard. On previous system, subversion can be installed by package management systems (see point below) or with an OS X installer [http://homepage.mac.com/martinott/ package]&lt;br /&gt;
*A means of getting Inkscape's numerous dependencies: glibmm, gtkmm, lmcs, boehmgc... We recommend the use of [http://www.macports.org/ MacPorts] right now. ([http://www.finkproject.org/ Fink] was used in the past but it no longer meets Inkscape's needs currently.)&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with X11, using MacPorts [Recommended method]=&lt;br /&gt;
&lt;br /&gt;
== Installing dependencies ==&lt;br /&gt;
You can use MacPorts to list Inkscape dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;port deps inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some are mandatory and you can install them with the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install boehmgc gtkmm gtk-engines2 intltool libxslt lcms popt boost gsl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Others provide additional functionality to Inkscape:&lt;br /&gt;
* &amp;lt;code&amp;gt;gnome-vfs&amp;lt;/code&amp;gt; : access to remote servers, in particular import from Open Clipart Library&lt;br /&gt;
* &amp;lt;code&amp;gt;aspell&amp;lt;/code&amp;gt; : check spelling of text elements [Note: I have never seen it working on OS X, though at least it should install fine]&lt;br /&gt;
* &amp;lt;code&amp;gt;libgnomeprintui&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;loudmouth&amp;lt;/code&amp;gt; : jabber library used by InkBoard&lt;br /&gt;
* &amp;lt;code&amp;gt;cairo&amp;lt;/code&amp;gt; : ps and pdf export&lt;br /&gt;
* &amp;lt;code&amp;gt;poppler&amp;lt;/code&amp;gt; : better pdf import&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install gnome-vfs aspell libgnomeprintui loudmouth cairo poppler&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: Cairo was already installed at previous step as a GTK dependency. You need to either deactivate the old version and install this one, or directly write it on the command line above. &lt;br /&gt;
If you're unsure about MacPorts commands, you can find a guide that is easy to skim here: [http://guide.macports.org/ MacPorts Guide]&lt;br /&gt;
&lt;br /&gt;
In addition, Inkscape requires versions of the autotools more recent thant those that ship with OS X. Install them:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install autoconf automake&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More recent (Sep 2008) pre-packaged nightly builds for Mac OS X also feature additional dependencies:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install librsvg libwpd libwpg libcroco&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: At the time of editing (2008-12-01) there was a problem fetching &amp;quot;lzmautils&amp;quot; as the URL MacPorts tried to use as download source dies in a timeout. &lt;br /&gt;
As this package is needed as a dependency for one or more packages noted above you need to download the source tarball of lzmautils from somewhere else (for example, from [ftp://sunfreeware.mirrors.tds.net/pub/sunfreeware/SOURCES/lzma-4.32.7.tar.gz here]) and put that into the local MacPorts repository at &amp;quot;/opt/local/var/macports/distfiles/lzmautils&amp;quot;. You should now be able to run the commands above.&lt;br /&gt;
&lt;br /&gt;
Also make sure that you have &amp;quot;libxml2&amp;quot; and &amp;quot;libxslt&amp;quot; installed with MacPorts. This should have been installed previously, either directly or as a dependency.&lt;br /&gt;
You will need those later to compile the &amp;quot;lxml&amp;quot; Python module if you want to use Python effects. First check what's installed and if they are missing from your MacPorts repository install them by doing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;port installed&lt;br /&gt;
sudo port install libxml2 libxslt&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pre-compiling the Python modules  ==&lt;br /&gt;
&lt;br /&gt;
If you cannot use the pre-built Python modules from [http://inkscape.modevia.com/macosx-snap/?C=M;O=D Modevia], say, because you're using an unsupported Python version or you just want to install from source you need to pre-compile both modules.&lt;br /&gt;
&lt;br /&gt;
In case you are using a Python version installed through MacPorts do a search for both modules and install the ones suitable for the Python version activated within MacPorts.&lt;br /&gt;
&amp;lt;pre&amp;gt;port search lxml numpy&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using Leopard's default Python 2.5.1 installation or a more recent one (e.g. MacPython 2.6) you will need to compile both modules outside of MacPorts. Download both modules from [http://pypi.python.org PyPI] if they are available there for your Python version. At the time of editing (2008-12-01) both modules were only available through SVN for Python 2.6.&lt;br /&gt;
&lt;br /&gt;
There are lots of tutorials for building and installing the &amp;quot;numpy&amp;quot; module. One good place to start looking is the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] entry referenced at the end of this guide. &lt;br /&gt;
&lt;br /&gt;
Building the &amp;quot;lxml&amp;quot; module deviates a little from the standard way, so if you cannot install it try the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/lxml/source&lt;br /&gt;
sudo python setup.py install \&lt;br /&gt;
--with-xslt-config=/opt/local/bin/xslt-config \&lt;br /&gt;
--with-xml2-config=/opt/local/bin/xml2-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This tells it to use the libxml2 and libxslt packages we installed earlier with MacPorts instead of Mac OS X' default versions, which have been known to cause problems when trying to build &amp;quot;lxml&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you are compiling the Python modules outside of MacPorts you will need to make a mental note for after running the .app-bundle building script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]] in this guide) to copy the &amp;quot;lxml&amp;quot; and &amp;quot;numpy&amp;quot; dirs from the standard installation destination (by default &amp;quot;/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages&amp;quot; for MacPython 2.6 and &amp;quot;/Library/Python/2.5/site-packages/&amp;quot; for Leopard's default Python 2.5.1 installation) to either&lt;br /&gt;
* the &amp;quot;extensions&amp;quot; folder inside the Inkscape.app bundle (&amp;quot;Inkscape.app/Contents/Resources/extensions&amp;quot;) if all you care about is getting the Inkscape build to work with your Python version. This method is more foolproof but supports only one Python version.&lt;br /&gt;
* the &amp;quot;site-packages&amp;quot; folder inside the Inkspace.app bundle. The &amp;quot;site-packages&amp;quot; folder is the right place for putting your pre-compiled Python modules if you want to redistribute your build. Make a subfolder within &amp;quot;site-packages&amp;quot; with the name of your arch (&amp;quot;i386&amp;quot; for Intel, &amp;quot;PPC&amp;quot; for PowerPC or type &amp;lt;code&amp;gt;arch&amp;lt;/code&amp;gt; into a Terminal window) and another subfolder within the arch folder with the name of your Python version (e.g. &amp;quot;2.5&amp;quot; or &amp;quot;2.6&amp;quot; etc.). This allows you to include support for multiple Python versions with your Inkscape build. Note, however, that if someone has multiple Python versions installed they may run into problems with the PATH order exported by the internal script (&amp;quot;Inkspace.app/Contents/Resources/bin/inkscape&amp;quot;) responsible for preparing the Inkscape launch environment. &lt;br /&gt;
&lt;br /&gt;
Armed with this knowledge you should be able to take care of the &amp;quot;...needs the fantastic libxml2 wrapper...&amp;quot; message when executing Python effects. Normally the &amp;lt;code&amp;gt;osx-app.sh&amp;lt;/code&amp;gt; script (detailed [[CompilingMacOsX#Creating_an_.app_bundle|later]])  should take care of this for you, but if for whatever reason it didn't you know how to copy the modules manually.&lt;br /&gt;
&lt;br /&gt;
For further info refer to the [[GettingEffectsWorking#on_Mac_OS_X|Getting Effects Working]] section of this wiki.&lt;br /&gt;
&lt;br /&gt;
== Setting the build environment ==&lt;br /&gt;
MacPorts's hierarchy (/opt/local/) is not searched for libraries by default. Therefore, before the configuration starts, some environment variables need to be set. The environment variables are presented in bash syntax here. &lt;br /&gt;
&amp;lt;pre&amp;gt;export LIBPREFIX=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$LIBPREFIX/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$LIBPREFIX/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$LIBPREFIX/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;lt;code&amp;gt;[http://en.wikipedia.org/wiki/Ccache ccache]&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;sudo port install ccache&amp;lt;/code&amp;gt;) to speed up the compilation a bit. To do so, add compiler variables:&lt;br /&gt;
&amp;lt;pre&amp;gt;export CC=&amp;quot;ccache gcc&amp;quot;&lt;br /&gt;
export CXX=&amp;quot;ccache g++&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
If you compile Inkscape for the first time from an svn checkout you need to generate the configure script. Navigate to Inkscape's source directory and run:&lt;br /&gt;
&amp;lt;pre&amp;gt;./autogen.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then run configure with the options &amp;lt;code&amp;gt;--disable-static --enable-shared&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--prefix&amp;lt;/code&amp;gt; which sets the directory where the build products are placed. It must be somewhere you have write access to.&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to package Inkscape into a double-clickable &amp;lt;code&amp;gt;.app&amp;lt;/code&amp;gt; bundle in order to access it like a regular OS X application (you probably want to), you need to add the option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure {...} --enable-osxapp&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have loudmouth installed and you want to enable whiteboard functionality in Inkscape, add &amp;lt;code&amp;gt;--enable-inkboard&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Other configuration options can be set, check the list of options by issuing:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here's an example which covers most options that can be set:&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --disable-static --enable-shared --prefix=/path/to/build/products/ --with-xft \&lt;br /&gt;
--with-gnome-vfs --with-python=/path/to/python/modules --enable-osxapp --enable-lcms \&lt;br /&gt;
--enable-poppler-cairo --enable-inkboard&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Building and Installing ==&lt;br /&gt;
Just run:&lt;br /&gt;
&amp;lt;pre&amp;gt;make&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Creating an .app bundle ==&lt;br /&gt;
Assuming that you have used the &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; option during &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, navigate to Mac OS X packaging directory in Inkscape source code and use the automated script:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&lt;br /&gt;
./osx-app.sh -s -b /path/to/install/prefix/bin/inkscape -p ../../Info.plist&amp;lt;/pre&amp;gt;&lt;br /&gt;
The script copies Inkscape binary and all its dependencies into the app bundle. The &amp;lt;code&amp;gt;-s&amp;lt;/code&amp;gt; options strips libraries from debugging information (the bundle is therefore smaller). Omit this option if you want to keep debugging info.&lt;br /&gt;
&lt;br /&gt;
== Creating a disk image to distribute Inkscape ==&lt;br /&gt;
Inkscape.app created at the previous step is completely independent from the original location of MacPorts libraries and can therefore be distributed. It will only work on your platform though (PPC or Intel) and incompatibilities are known between X11 versions on different major versions of OS X (Panther, Tiger and Leopard). The general rule is that versions are not backward compatible.&lt;br /&gt;
&lt;br /&gt;
The most widespread way of distributing applications on Mac OS X is via .dmg images. You can created a dmg image of Inkscape, with a nice background and all, using the script:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-dmg.sh -p Inkscape.app&amp;lt;/pre&amp;gt;&lt;br /&gt;
in the packaging directory for Mac OS X (where your app bundle should be, otherwise modify the path to Inkscape.app).&lt;br /&gt;
&lt;br /&gt;
== Automated build script ==&lt;br /&gt;
All essential steps are automated by a build script: &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt;. It has built-in help so to know how to use it just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: Excluded steps involve Pre-compiliation of the Python modules and installing the additional nightly build features.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Universal Binary of Inkscape with X11, using MacPorts=&lt;br /&gt;
&lt;br /&gt;
These instructions should work on both 10.4 and 10.5 machines with the latest Xcode version installed.&lt;br /&gt;
&lt;br /&gt;
== Build Universal dependencies ==&lt;br /&gt;
&lt;br /&gt;
The easiest way to do this is to create a new Macports installation. It is recommended that you install macports from source into a long prefix (of 50 character) such as &amp;quot;/opt/local-macports-with-a-really-long-directory-name/&amp;quot; -- this will allow enough space to later perform path rewriting on all the bundled libraries.  &lt;br /&gt;
&lt;br /&gt;
Once you have installed Macports, edit the $PREFIX/etc/macports/variants.conf file to have the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;+universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will cause Macports to install the Universal variant of each package you later ask it to install.&lt;br /&gt;
&lt;br /&gt;
If you already have non-universal versions of some ports installed, for each of these you may need to deactivate the port and rebuild it, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port -f uninstall cairo&lt;br /&gt;
sudo port clean cairo&lt;br /&gt;
sudo port -v install cairo +universal&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build Universal Inkscape ==&lt;br /&gt;
&lt;br /&gt;
First, Set your SDK, 10.5 for Leopard, 10.4u for TIger:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.5.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; (For Leopard)&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;CODE&amp;gt;export SDK=/Developer/SDKs/MacOSX10.4u.sdk&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp;  (For Tiger)&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, set up your environment to point to the Macports libraries:&lt;br /&gt;
&amp;lt;pre&amp;gt;export MACPORTS=&amp;quot;/opt/local&amp;quot;&lt;br /&gt;
export PATH=$MACPORTS/bin:$MACPORTS/sbin:/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/sbin&lt;br /&gt;
#  automake seach path&lt;br /&gt;
export CPATH=&amp;quot;$MACPORTS/include&amp;quot;&lt;br /&gt;
#  configure search path&lt;br /&gt;
export CPPFLAGS=&amp;quot;-I$MACPORTS/include&amp;quot;&lt;br /&gt;
export LDFLAGS=&amp;quot;-L$MACPORTS/lib&amp;quot;&lt;br /&gt;
#  compiler arguments&lt;br /&gt;
export CFLAGS=&amp;quot;-O3 -Wall -isysroot $SDK -arch ppc -arch i386&amp;quot;&lt;br /&gt;
export CXXFLAGS=&amp;quot;$CFLAGS&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The final step is to configure and compile Inkscape.  Inkscape must be configured with the following options:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; &amp;amp;nbsp; &amp;amp;nbsp;   Sets the correct path for Inkscape to be used from an .app bundle&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;--disable-dependency-tracking&amp;lt;/code&amp;gt;  &amp;amp;nbsp; &amp;amp;nbsp; Dependency tracking can't be used when compiling universal binaries.&lt;br /&gt;
&lt;br /&gt;
Inkscape can then be built (with make), installed, and packaged into a Universal .app bundle using the standard .app bundle building instruction above.&lt;br /&gt;
&lt;br /&gt;
= Compiling Inkscape with native GTK using MacPorts [experimental] =&lt;br /&gt;
This process is very similar to compiling an X11 version of Inkscape except for the building of dependencies: need to build native versions of Inkscape dependencies. At the moment (2007-12-17) this process does not produce a usable version of Inkscape but the more people try to use it, the quicker the bugs will be ironed out!&lt;br /&gt;
&lt;br /&gt;
A more recent attempt is described here: [[CompilingMacOsX#Building Aqua September 2009]] &lt;br /&gt;
&lt;br /&gt;
== Native version of Inkscape dependencies ==&lt;br /&gt;
Thanks to the power of port &amp;quot;variants&amp;quot; and port &amp;quot;deactivation&amp;quot; you can install native versions of gtk, cairo, pango and such, alongside the regular X11 ones. To know which ports have a &amp;lt;code&amp;gt;quartz&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;no_x11&amp;lt;/code&amp;gt; variant, use the command:&lt;br /&gt;
&amp;lt;pre&amp;gt;port list variant:quartz variant:no_x11&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will give you an idea of what need to be replaced.&lt;br /&gt;
&lt;br /&gt;
Assuming your MacPorts tree has been already used to build regular versions of Inkscape, you first need to deactivate (suppress from the tree without really uninstalling) the X11 versions of gtk, cairo, cairomm and pango:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port deactivate gtk2 cairo cairomm pango&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then install native variants:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install cairo +quartz+no_x11 cairomm pango +no_x11 poppler +quartz gtk2 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Installing a second Macports tree (recommended approach) ==&lt;br /&gt;
Rather than deactivating and reactivating ports, you can also keep two MacPorts trees side by side, provided you install the second one from source. Let say I want to install a new tree for native versions in /opt/local/native, I would do&lt;br /&gt;
&amp;lt;pre&amp;gt;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin&lt;br /&gt;
cd ~/MacPorts-1.x.x/&lt;br /&gt;
./configure --prefix=/opt/local-native --with-tclpackage=/Library/Tcl/macports-native&lt;br /&gt;
make&lt;br /&gt;
sudo make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can set this second tree up to always build packages with specific variants.  For example, you can edit the /opt/local-native/etc/macports/variants.conf file to have the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;+universal +no_x11 +quartz&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can remove the +universal if you only want to build inkscape for your host architecture.&lt;br /&gt;
You may also need to set alternate applications_dir and  frameworks_dir variables in the /opt/local-native/etc/macports/macports.conf file so that applications and frameworks install by this macports (for example by python) don't clash with your standard  macports tree.&lt;br /&gt;
&lt;br /&gt;
Then you need to have only one version of the port command in the path at any time so you need to setup your .bashrc (or .bash_profile or .profile) accordingly. I use shell aliases to quickly and temporarily switch to the universal version:&lt;br /&gt;
&amp;lt;pre&amp;gt;alias portpathregular=&amp;quot;export PATH=/opt/local/bin:/opt/local/sbin:/Developer/Tools:/usr/local/bin: \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&lt;br /&gt;
alias portpathnative=&amp;quot;export PATH=/opt/local-native/bin:/opt/local-native/sbin:/Developer/Tools:/usr/local/bin:  \&lt;br /&gt;
/usr/X11R6/bin:/bin:/sbin:/usr/bin:/usr/sbin&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
NB: the \ are just to mark line continuation here, suppress them and put everything in one line.&lt;br /&gt;
&lt;br /&gt;
== Install the rest ==&lt;br /&gt;
Eventually, follow the regular install procedure for the rest:&lt;br /&gt;
&amp;lt;pre&amp;gt;sudo port install libxslt boost boehmgc gtkmm lcms intltool popt&amp;lt;/pre&amp;gt;&lt;br /&gt;
If your MacPorts tree was already ready to compile Inkscape, you should not need to reinstall anything, with the possible exception of gtkmm, which may need to be rebuilt against the native version of gtk rather than against the X11 one (please someone confirm this).&lt;br /&gt;
&lt;br /&gt;
Get inkscape source code and go in the mac OS X specific packaging directory&lt;br /&gt;
&amp;lt;pre&amp;gt;cd packaging/macosx&amp;lt;/pre&amp;gt;&lt;br /&gt;
There edit &amp;lt;code&amp;gt;osx-build.sh&amp;lt;/code&amp;gt; to remove the configure option &amp;lt;code&amp;gt;--enable-osxapp&amp;lt;/code&amp;gt; because it puts inkscape in a .app bundle where it is started together with X11, which would defeat the purpose of this native compilation. You can also specify an alternative install prefix if you want. Then&lt;br /&gt;
&amp;lt;pre&amp;gt;./osx-build.sh u a c b i&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a native version of Inkscape is installed in the prefix you specified or in the &amp;lt;code&amp;gt;Build/bin&amp;lt;/code&amp;gt; directory of Inkscape's source code. You can test it by&lt;br /&gt;
&amp;lt;pre&amp;gt; cd ../../Build/bin/&lt;br /&gt;
./inkscape&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NB: if you compiled a GTK theme engine against your old GTK install (i.e. the one with X11) and try to use it with the new install, it will complain, so edit &amp;lt;code&amp;gt;~/.gtkrc-2.0&amp;lt;/code&amp;gt; to remove the offending theme or recompile it with the new native GTK.&lt;br /&gt;
&lt;br /&gt;
= Enabling python effects =&lt;br /&gt;
moved to [[GettingEffectsWorking]]. They should work out of the box in the new versions anyway.&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
== User Examples ==&lt;br /&gt;
* Adam Strzeleki has outlined some improvements to this process on the Inkscape [http://www.nabble.com/Inkscape-native-Mac-OS-X-build---look-improvements-td14733036.html email list]. See his screenshot from January 10, 2008 [http://www.nabble.com/attachment/14733036/1/Inkscape%20OSX%20PL.gif here].&lt;br /&gt;
* JiHO has a video of his builds [http://jo.irisson.free.fr/?p=34 here] and [http://jo.irisson.free.fr/?p=62 here].&lt;br /&gt;
&lt;br /&gt;
== Apple Documentation ==&lt;br /&gt;
* [http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/BPRuntimeConfig.html Introduction to Runtime Configuration] Covers the Info.plist files, Preferences, Environment variables and has a list of the most important Properties that the Property List should contain.&lt;br /&gt;
&lt;br /&gt;
== Packaging ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.sveinbjorn.org/platypus Sveinbjorn Thordarson's Website] The author of Platypus, the Script Exec wrapper that launches the Inkscape binary.&lt;br /&gt;
* [http://freespace.ausgamers.com/2005/02/creating-os-x-application-bundles-step.html  Creating OS X application bundles step by step] Covers the bundle concepts, copying libraries into the bundle, editing libraries with the install_name_tool, the Info.plist file and adding an icon.&lt;br /&gt;
* [http://java.sun.com/developer/technicalArticles/JavaLP/JavaToMac3/ Bringing your Java Application to Mac OS X] I would regard this a little dated, and the detail is (unsurprisingly) Java-related, but it is a gentle introduction to the role of the .app bundle and give a most clear account of how to create one.&lt;br /&gt;
* The [http://gimp-app.sourceforge.net/gimp.app.howto.txt Gimp .app Howto] This is a very bare document, and would be of little help to you if you were new to making packages. Note that it seems to refer to a more mature Clipboard technique and Online help than we currently have; and we ought to move to parity in these areas.&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer Documentation]]&lt;/div&gt;</summary>
		<author><name>Herrdeh</name></author>
	</entry>
</feed>