Version 1/6 - Next ยป - Current version
admin, 20/03/2012 14:22

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

$ sudo port install boost +python26
$ sudo port install GraphicsMagick autoconf automake ffmpeg libsdl pango subversion \
  libtool libdc1394 python_select
  • Make sure MacPort has correctly added /opt/local/bin to PATH (usually on .profile)
  • Switch to MacPort's python 2.6
$ sudo python_select python26

Fetching and compiling libavg


$ svn co


for revisions >= 7066

cd libavg

for revisions < 7066

cd libavg
glibtoolize --copy --force
aclocal -I m4
automake --foreign --add-missing --copy 


for revisions >= 7066


for revisions < 7066 and >= r5230:

LIBS=-L/opt/local/lib ./configure

for revisions < r5230:

CPPFLAGS=-D__STDC_CONSTANT_MACROS LIBS=-L/opt/local/lib ./configure


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

make -j3


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


Staging libavg is only matter of issuing a make install. Anyway, there is a present issue with the install location, which defaults to /usr/local/lib/python2.6/site-packages/libavg instead of /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages.

In order to circumvent this problem, add /usr/local/lib/python2.6/site-packages to PYTHONPATH:

export PYTHONPATH=/usr/local/lib/python2.6/site-packages:$PYTHONPATH

Add this line to .profile to make it permanent.