MacPortsInstall

Version 3 (coder, 01/11/2013 23:40) → Version 4/6 (coder, 01/11/2013 23:48)

{{>toc}}

This page describe how to fulfill libavg dependencies using MacPorts. An alternative method (which uses self-contained dependencies) is described here: [[MacSourceInstall]].

h1. Installing the required dependencies

* Install XCode (http://developer.apple.com/technology/xcode.html). We tested XCode 5.0.1.
* Install MacPorts (http://www.macports.org/install.php)
* Install the following packages:

<pre>
$ sudo port install boost +python27
$ sudo port install gdk-pixbuf2 autoconf automake ffmpeg libsdl pango subversion \
libtool libdc1394 librsvg python_select
</pre>

* Make sure MacPort has correctly added /opt/local/bin to the PATH (usually on .profile)
* Switch to MacPort's python 2.7

<pre>
$ sudo python_select python27
</pre>

h1. Fetching and compiling libavg

<pre>
$ svn co https://www.libavg.de/svn/trunk/libavg
$ cd libavg
$ ./bootstrap
$ BOOST_PYTHON_LIBS=-lboost_python-mt BOOST_PYTHON_LIBS=boost_python-mt ./configure --with-boost-thread=-mt
</pre>

Compile with (adjust the concurrency parameter to the number of CPU cores you have + 1):

<pre>
$ make -j3
</pre>

h2. Test

If everything runs fine, you may run the unit tests. Be aware that at first time startup, fontconfig requires several seconds to initialize its fonts cache:

<pre>
$ make check
</pre>

h1. Installation

<pre>
$ make install
</pre>

Anyway, there is a present issue with the install location, which defaults to _/usr/local/lib/python2.7/site-packages/libavg_ instead of _/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages_.

In order to circumvent this problem, add the directory to PYTHONPATH:

<pre>
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
</pre>

Add this line to _.profile_ to make it permanent.