This page describe how to fulfill libavg dependencies using MacPorts. An alternative method (which uses self-contained dependencies) is described here: MacSourceInstall.
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:
$ sudo port install boost +python27 $ sudo port install gdk-pixbuf2 autoconf automake ffmpeg libsdl pango subversion \ libtool libdc1394 librsvg python_select
- Make sure MacPort has correctly added /opt/local/bin to the PATH (usually on .profile)
- Switch to MacPort's python 2.7
$ port select --set python python27
Fetching and compiling libavg¶
$ git clone https://github.com/libavg/libavg.git $ cd libavg $ ./bootstrap $ BOOST_PYTHON_LIBS=-lboost_python-mt ./configure --with-boost-thread=-mt
Compile with (adjust the concurrency parameter to the number of CPU cores you have + 1):
$ make -j3
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:
$ make check
Installation¶
$ make install
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:
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
Add this line to .profile to make it permanent.