MacHomebrewInstall

Version 2 (Richy, 03/06/2014 20:07)

1 1 admin
h1. MacHomebrewInstall
2 1 admin
3 1 admin
{{>toc}}
4 1 admin
5 2 Richy
How to manually compile libavg git master on Mac OS X using the homebrew package manager.
6 1 admin
7 1 admin
Homebrew is probably the most nerd friendly package manager for os x but out of the box not suited for building libavg, therefore I proudly present the following ...
8 1 admin
9 1 admin
detailed build instructions (mostly for 10.6, for 10.5 see below) partially written from memory
10 1 admin
11 1 admin
YMMV ...
12 1 admin
13 1 admin
h1. Basic Homebrew stuff
14 1 admin
15 1 admin
* Install XCode >= 3.2.2
16 1 admin
* Symlink /usr/lib/libiconv* to /usr/local/lib (This solves many headaches...)
17 1 admin
* Install homebrew
18 1 admin
* I suggest to have at least: brew install git berkeley-db binutils coreutils readline gettext getopt pkg-config
19 1 admin
20 1 admin
h1. Prereqs
21 1 admin
22 1 admin
* brew install all dependencies as detailed on avg wiki (I added a few transitive dependencies below)
23 1 admin
* brew install libogg libvorbis pango libpng libtiff icu4c libxml2 jasper jam ffmpeg sdl sdl_image sdl_mixer sdl_net sdl_sound sdl_ttf fontconfig expat freetype
24 1 admin
* brew link fontconfig
25 1 admin
* You need this for AVG but watch out it might interact with os x' fontconfig
26 1 admin
* Three packages require some more work
27 1 admin
** brew edit boost s.t. the bootstrap.sh is called with --python-version=2.6
28 1 admin
** brew install boost
29 1 admin
** brew edit graphicsmagick s.t. graphicsmagick++ does not get disabled in the build
30 1 admin
** brew install graphicsmagick 
31 1 admin
* for camera support, install dc1394 2.0 manually
32 1 admin
** ./configure --prefix=/usr/local/Cellar/dc1394/Version
33 1 admin
** make && make install && brew link dc1394 
34 1 admin
35 1 admin
h1. Build and Install
36 1 admin
37 2 Richy
* Clone HEAD of avg git master and export AVG_PATH = toplevel checkout dir
38 1 admin
* Set up build environment
39 1 admin
* export BOOST_PYTHON_LIB="-L/usr/local/lib -lboost_python-mt"
40 1 admin
* export MAGICK_CFLAGS=$(pkg-config --cflags GraphicsMagick?++)
41 1 admin
* export MAGICK_LIBS=$(pkg-config --libs GraphicsMagick?++)
42 1 admin
* export LDFLAGS=-L/usr/local/lib
43 1 admin
* export CFLAGS=-I/usr/local/include
44 1 admin
* export LIBS=-L/usr/local/lib
45 1 admin
* Configure step is as described in the wiki except for requiring
46 1 admin
** aclocal -I m4 -I /usr/local/share/m4 (due to SDL from /usr/local)
47 2 Richy
** ./configure --prefix=/usr/local/Cellar/libavg/libavg
48 1 admin
* make && make install
49 1 admin
* brew link libavg
50 1 admin
* export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.6/site-packages/libavg
51 1 admin
** I find this setting weird, but works 
52 1 admin
* make check
53 1 admin
* Multimedia, YAY!
54 1 admin
* If you hit libJPEG library dyld fuckup, try
55 1 admin
** export DYLD_INSERT_LIBRARIES=/System/Library/Frameworks/ApplicationServices?.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib:/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib:/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib:/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
56 1 admin
** This is how it's like to be on a mac 
57 1 admin
58 1 admin
h1. Optional
59 1 admin
60 1 admin
* export VIDEOCHOOSER_VIDEO_DIR=$AVG_PATH/avg_media/scanner/medien/movies/
61 1 admin
* export AVG_DEPLOY=1 for full screen mode 
62 1 admin
63 1 admin
h1. Mac OS X 10.5
64 1 admin
65 1 admin
* Use latest XCode 3.1.X
66 1 admin
* Get Python 2.6 from www.python.org, otherwise you won't get a working version of boost
67 1 admin
* There was an issue with ffmpeg headers:
68 1 admin
** Add #include <stdint.h> to /usr/local/inclue/libavutil/common.h
69 1 admin
** You need additional compile flags which I forgot. Will add later. 
70 1 admin
71 1 admin
h1. Wave Version
72 1 admin
73 1 admin
I keep this around as a "public google wave":https://wave.google.com/wave/?anon_access=true#hidden:nav,hidden:contact,hidden:search,restored:leftinfo,restored:wave:googlewave.com/w+B6igSZiZE