MacPortsInstall

Version 1 (admin, 20/03/2012 14:22)

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 1 admin
* Install XCode (http://developer.apple.com/technology/xcode.html). We tested XCode 4.2.
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 1 admin
$ sudo port install boost +python26
13 1 admin
$ sudo port install GraphicsMagick 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 1 admin
* Switch to MacPort's python 2.6
19 1 admin
20 1 admin
<pre>
21 1 admin
$ sudo python_select python26
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
_for revisions_ >= 7066
35 1 admin
36 1 admin
<pre>
37 1 admin
cd libavg
38 1 admin
./bootstrap
39 1 admin
</pre>
40 1 admin
41 1 admin
_for revisions_ < 7066
42 1 admin
43 1 admin
<pre>
44 1 admin
cd libavg
45 1 admin
glibtoolize --copy --force
46 1 admin
aclocal -I m4
47 1 admin
autoheader
48 1 admin
automake --foreign --add-missing --copy 
49 1 admin
autoconf
50 1 admin
</pre>
51 1 admin
52 1 admin
h2. Configure
53 1 admin
54 1 admin
_for revisions_ >= 7066
55 1 admin
56 1 admin
<pre>
57 1 admin
./configure
58 1 admin
</pre>
59 1 admin
60 1 admin
_for revisions_ < 7066 and >= r5230:
61 1 admin
62 1 admin
<pre>
63 1 admin
LIBS=-L/opt/local/lib ./configure
64 1 admin
</pre>
65 1 admin
66 1 admin
_for revisions_ < r5230:
67 1 admin
68 1 admin
<pre>
69 1 admin
CPPFLAGS=-D__STDC_CONSTANT_MACROS LIBS=-L/opt/local/lib ./configure
70 1 admin
</pre>
71 1 admin
72 1 admin
h2. Compile
73 1 admin
74 1 admin
Compile with (adjust the concurrency parameter to the number of CPU cores you have + 1):
75 1 admin
76 1 admin
<pre>
77 1 admin
make -j3
78 1 admin
</pre>
79 1 admin
80 1 admin
h2. Test
81 1 admin
82 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:
83 1 admin
84 1 admin
<pre>
85 1 admin
make check
86 1 admin
</pre>
87 1 admin
88 1 admin
h1. Installation
89 1 admin
90 1 admin
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_.
91 1 admin
92 1 admin
In order to circumvent this problem, add _/usr/local/lib/python2.6/site-packages_ to PYTHONPATH:
93 1 admin
94 1 admin
<pre>
95 1 admin
export PYTHONPATH=/usr/local/lib/python2.6/site-packages:$PYTHONPATH
96 1 admin
</pre>
97 1 admin
98 1 admin
Add this line to _.profile_ to make it permanent.