README.macos 4.24 KB
Newer Older
1 2 3 4
**********************************
* Compiling linphone on macos X  *
**********************************

5 6 7 8
You need:
 - Xcode (download from apple or using appstore application)
 - Macports: http://www.macports.org/
   Download and install macports using its user friendly installer.
9

10
- Install build time dependencies
Simon Morlat's avatar
Simon Morlat committed
11
 $ sudo port install automake autoconf libtool intltool
12 13

- Install some linphone dependencies with macports
Simon Morlat's avatar
Simon Morlat committed
14 15 16 17 18 19
 $ sudo port install speex
 $ sudo port install libosip2 # WARNING: currently outdated in macport
 $ sudo port install libeXosip2 #WARNING: currently outdated in macport
 $ sudo port install ffmpeg-devel -gpl2
 $ sudo port install libvpx
 $ sudo port install readline
20 21
 
- Install srtp (optional) for call encryption
Simon Morlat's avatar
Simon Morlat committed
22
 $ sudo port install srtp
23 24 25
 If that fails, get from source:
 $ git clone git://git.linphone.org/srtp.git
 $ cd srtp && autoconf && ./configure --prefix=/opt/local && make libsrtp.a
Simon Morlat's avatar
Simon Morlat committed
26 27
 $ sudo make install

Simon Morlat's avatar
Simon Morlat committed
28
- Install zrtpcpp (optional), for unbreakable call encryption
Simon Morlat's avatar
Simon Morlat committed
29
 $ sudo port install cmake
Simon Morlat's avatar
Simon Morlat committed
30
 $ git clone git://git.linphone.org/zrtpcpp.git
Simon Morlat's avatar
Simon Morlat committed
31
 $ cd zrtpcpp && cmake -Denable-ccrtp=false . && make
Simon Morlat's avatar
Simon Morlat committed
32
 $ sudo make install
33

34
- Install gtk. It is recommended to use the quartz backend for better integration.
Simon Morlat's avatar
Simon Morlat committed
35 36 37 38 39 40 41
 $ sudo port install gtk2 +quartz +no_x11
 $ sudo port install gtk-osx-application -python27
 $ sudo port install hicolor-icon-theme
 
- Install additional librairies required for wizard (linphone.org account creation assistant)
 $ sudo port install libsoup
 
Margaux Clerc's avatar
Margaux Clerc committed
42 43 44
 - Install sqlite3 for message storage
 $ sudo port install sqlite3
 
Simon Morlat's avatar
Simon Morlat committed
45 46 47 48 49
 ** WARNING 2013-03-06 glib-networking is currently broken in macports - generates crashes or hangs when used in a bundle **
 As a temporary workaround, build a newer version by yourself:
 $ wget http://ftp.gnome.org/pub/gnome/sources/glib-networking/2.34/glib-networking-2.34.2.tar.xz
 $ tar -xvzf glib-networking-2.34.2.tar.xz
 $ cd glib-networking-2.34.2
Simon Morlat's avatar
Simon Morlat committed
50
 $ ./configure --prefix=/opt/local --without-ca-certificates && make 
Simon Morlat's avatar
Simon Morlat committed
51
 $ sudo make install
Simon Morlat's avatar
Simon Morlat committed
52

Simon Morlat's avatar
Simon Morlat committed
53
- Compile and install the tunnel library (optional, proprietary extension only)
54

Simon Morlat's avatar
Simon Morlat committed
55
 If you got the source code from git, run ./autogen.sh first
56

Simon Morlat's avatar
Simon Morlat committed
57
 Then or otherwise, do:
58 59 60 61

 $ ./configure --prefix=/opt/local && make && sudo make install


62
- Compile linphone
63

Simon Morlat's avatar
Simon Morlat committed
64
 If you got the source code from git, run ./autogen.sh first.
65

Simon Morlat's avatar
Simon Morlat committed
66
 Then or otherwise, do:
smorlat's avatar
smorlat committed
67
	
jehan's avatar
jehan committed
68
 $ ./configure --prefix=/opt/local --with-readline=/opt/local --disable-x11 --with-srtp=/opt/local --with-gsm=/opt/local --enable-zrtp && make
69

Simon Morlat's avatar
Simon Morlat committed
70
 Install to /opt/local
71

72
 $ sudo make install 
73

Simon Morlat's avatar
Simon Morlat committed
74
 Done.
75

76
If you want to generate a portable bundle, then install gtk-mac-bundler.
77
Use git:
78 79
 $ git clone https://github.com/jralls/gtk-mac-bundler.git 
 $ cd gtk-mac-bundler && make install
80
 $ export PATH=$PATH:~/.local/bin
81 82
 #make this dummy charset.alias file for the bundler to be happy:
 $ sudo touch touch /opt/local/lib/charset.alias
83

84
Then run, inside linphone source tree:
Simon Morlat's avatar
Simon Morlat committed
85 86 87
 1. Run configure as told before but with "--enable-relativeprefix" appended.
 
 $ make
88 89
 $ make bundle

90
The resulting bundle is located in linphone build directory, together with a zipped version.
91 92 93 94 95 96 97 98 99

For a better appearance, you can install the gtk-quartz-engine (a gtk theme) that make gtk application more similar to other mac applications (but not perfect).

 $ git clone https://github.com/jralls/gtk-quartz-engine.git
 $ cd gtk-quartz-engine
 $ autoreconf -i 
 $ ./configure --prefix=/opt/local && make 
 $ sudo make install

Simon Morlat's avatar
Simon Morlat committed
100
Generate a new bundle to have it included.
101

102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
libiconv hack 
*************

The Makefile.am rules used to generate the bundle fetch a libiconv.2.dylib from a linphone download page.
This library adds some additional symbols so that dependencies requiring the iconv from /usr/lib and the ones requiring from the bundle are both satisfied.
In case this library needs to generated, here are the commands:
 $ wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
 $ cd libiconv-1.14
 $ patch -p1 < ../linphone/build/macos/libiconv-macos.patch
 $ ./configure --prefix=/opt/local --disable-static 'CFLAGS=-arch i386 -arch x86_64 -mmacosx-version-min=10.5' 'LDFLAGS=-arch i386 -arch x86_64 -mmacosx-version-min=10.5'  CXXFLAGS="-arch i386 -arch x86_64 -mmacosx-version-min=10.5" && make
 $ make install DESTDIR=/tmp

The resulted library can be found in /tmp/opt/local/lib

 

118