MacPortsInstall

Version 2 (coder, 01/11/2013 22:52)

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 2 coder
$ sudo port install gdk-pixbuf autoconf automake ffmpeg libsdl pango subversion \
14 1 admin
  libtool libdc1394 python_select
15 1 admin
</pre>
16 1 admin
17 1 admin
* Make sure MacPort has correctly added /opt/local/bin to 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
h2. Checkout
27 1 admin
28 1 admin
<pre>
29 1 admin
$ svn co https://www.libavg.de/svn/trunk/libavg
30 1 admin
</pre>
31 1 admin
32 1 admin
h2. Bootstrap
33 1 admin
34 1 admin
<pre>
35 1 admin
cd libavg
36 1 admin
./bootstrap
37 1 admin
</pre>
38 1 admin
39 1 admin
h2. Configure
40 1 admin
41 1 admin
<pre>
42 1 admin
./configure
43 1 admin
</pre>
44 1 admin
45 1 admin
h2. Compile
46 1 admin
47 1 admin
Compile with (adjust the concurrency parameter to the number of CPU cores you have + 1):
48 1 admin
49 1 admin
<pre>
50 1 admin
make -j3
51 1 admin
</pre>
52 1 admin
53 1 admin
h2. Test
54 1 admin
55 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:
56 1 admin
57 1 admin
<pre>
58 1 admin
make check
59 1 admin
</pre>
60 1 admin
61 1 admin
h1. Installation
62 1 admin
63 2 coder
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.7/site-packages/libavg_ instead of _/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.6/site-packages_.
64 1 admin
65 1 admin
In order to circumvent this problem, add _/usr/local/lib/python2.6/site-packages_ to PYTHONPATH:
66 1 admin
67 1 admin
<pre>
68 2 coder
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
69 1 admin
</pre>
70 1 admin
71 1 admin
Add this line to _.profile_ to make it permanent.