MacPortsInstall

Version 3 (coder, 01/11/2013 23:40)

1 1 admin
{{>toc}}
2 1 admin
3 1 admin
This page describe how to fulfill libavg dependencies using MacPorts. An alternative method (which uses self-contained dependencies) is described here: [[MacSourceInstall]].
4 1 admin
5 1 admin
h1. Installing the required dependencies
6 1 admin
7 2 coder
* Install XCode (http://developer.apple.com/technology/xcode.html). We tested XCode 5.0.1.
8 1 admin
* Install MacPorts (http://www.macports.org/install.php)
9 1 admin
* Install the following packages:
10 1 admin
11 1 admin
<pre>
12 2 coder
$ sudo port install boost +python27
13 3 coder
$ sudo port install gdk-pixbuf2 autoconf automake ffmpeg libsdl pango subversion \
14 3 coder
  libtool libdc1394 librsvg python_select
15 1 admin
</pre>
16 1 admin
17 3 coder
* Make sure MacPort has correctly added /opt/local/bin to the PATH (usually on .profile)
18 2 coder
* Switch to MacPort's python 2.7
19 1 admin
20 1 admin
<pre>
21 2 coder
$ sudo python_select python27
22 1 admin
</pre>
23 1 admin
24 1 admin
h1. Fetching and compiling libavg
25 1 admin
26 1 admin
<pre>
27 1 admin
$ svn co https://www.libavg.de/svn/trunk/libavg
28 3 coder
$ cd libavg
29 3 coder
$ ./bootstrap
30 3 coder
$ BOOST_PYTHON_LIBS=boost_python-mt ./configure --with-boost-thread=-mt
31 1 admin
</pre>
32 1 admin
33 1 admin
Compile with (adjust the concurrency parameter to the number of CPU cores you have + 1):
34 1 admin
35 1 admin
<pre>
36 3 coder
$ make -j3
37 1 admin
</pre>
38 1 admin
39 1 admin
h2. Test
40 1 admin
41 1 admin
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:
42 1 admin
43 1 admin
<pre>
44 3 coder
$ make check
45 1 admin
</pre>
46 1 admin
47 1 admin
h1. Installation
48 1 admin
49 3 coder
<pre>
50 3 coder
$ make install
51 3 coder
</pre>
52 1 admin
53 3 coder
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_.
54 3 coder
55 3 coder
In order to circumvent this problem, add the directory to PYTHONPATH:
56 1 admin
57 1 admin
<pre>
58 2 coder
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
59 1 admin
</pre>
60 1 admin
61 1 admin
Add this line to _.profile_ to make it permanent.