-
Simon Morlat authored
One can't be fixed: linker complaining about -pthread. This comes from .la files installed by macports. Meanwhile, it is necessary to use --disable-strict on macos until macport moves to clang.
7390fca8
**********************************
* Compiling linphone on macos X *
**********************************
You need:
- Xcode (download from apple or using appstore application)
- Macports: http://www.macports.org/
Download and install macports using its user friendly installer.
- In order to enable generation of bundle for multiple macos version it is recommended to edit /opt/local/etc/macports/macports.conf to add the
following line:
macosx_deployment_target 10.6
- Install build time dependencies
$ sudo port install automake autoconf libtool intltool
- Install some linphone dependencies with macports
$ sudo port install speex
$ sudo port install ffmpeg-devel -gpl2
$ sudo port install libvpx
$ sudo port install readline
- Install gtk. It is recommended to use the quartz backend for better integration.
$ 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
- Install sqlite3 for message storage
$ sudo port install sqlite3
The softwares below need to be compiled manually. To ensure compatibility with multiple mac os version it is recommended to do:
$ export MACOSX_DEPLOYMENT_TARGET=10.6
- Install belle-sip (sip stack)
$ git clone git://git.linphone.org/belle-sip.git
$ cd belle-sip
$ ./autogen.sh && ./configure --prefix=/opt/local && make
$ sudo make install
- Install srtp (optional) for call encryption
$ sudo port install srtp
If that fails, get from source:
$ git clone git://git.linphone.org/srtp.git
$ cd srtp && autoconf && ./configure --prefix=/opt/local && make libsrtp.a
$ sudo make install
- Install zrtpcpp (optional), for unbreakable call encryption
$ sudo port install cmake
$ git clone git://git.linphone.org/zrtpcpp.git
$ cd zrtpcpp && cmake -Denable-ccrtp=false . && make
$ sudo make install
** 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
$ ./configure --prefix=/opt/local --without-ca-certificates && make
$ sudo make install
- Compile and install the tunnel library (optional, proprietary extension only)
If you got the source code from git, run ./autogen.sh first
Then or otherwise, do:
7172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
$ ./configure --prefix=/opt/local && make && sudo make install
- Compile linphone
If you got the source code from git, run ./autogen.sh first.
Then or otherwise, do:
$ ./configure --prefix=/opt/local --with-readline=/opt/local --disable-x11 --with-srtp=/opt/local --with-gsm=/opt/local --enable-zrtp --disable-strict && make
Install to /opt/local
$ sudo make install
Done.
If you want to generate a portable bundle, then install gtk-mac-bundler.
Use git:
$ git clone https://github.com/jralls/gtk-mac-bundler.git
$ cd gtk-mac-bundler && make install
$ export PATH=$PATH:~/.local/bin
#make this dummy charset.alias file for the bundler to be happy:
$ sudo touch touch /opt/local/lib/charset.alias
Then run, inside linphone source tree:
Run configure as told before but with "--enable-relativeprefix" appended.
$ make
$ make bundle
The resulting bundle is located in linphone build directory, together with a zipped version.
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
Generate a new bundle to have it included.
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