Commit 743f68ee authored by Simon Morlat's avatar Simon Morlat
Browse files

fix macos build and crash at exit from dock.

parent 5741ede7
......@@ -15,26 +15,18 @@ You need:
$ port install libosip2
$ port install libeXosip2
$ port install ffmpeg-devel
- Install SDL (for video display)
Unfortunately the current (august 2011) version of sdl in macports crashes all the time. Fortunately these bugs are fixed in the development branch of SDL.
So we recommend to download SDL 1.3 with mercurial (hg) and compile it by yourself, like this:
First, make sure you have mercurial:
$ sudo port install mercurial
Fetch SDL:
$ hg clone http://hg.libsdl.org/SDL
Compile:
$ cd SDL
$ ./autogen.sh
$ ./configure --prefix=/opt/local && make -j4
- Install srtp (optional) for call encryption
$ 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
When this version will be integrated into macports, only this will be necessary:
$ port install libsdl-devel
- Install gtk. It is recommended to use the quartz backend for better integration.
$ port install cairo +quartz +no_x11
$ port install pango +quartz +no_x11
$ port install gtk2 +quartz +no_x11
$ port install ige-mac-integration
$ port install hicolor-icon-theme
......@@ -45,7 +37,7 @@ 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-strict --disable-x11 && make
$ ./configure --prefix=/opt/local --with-readline=/opt/local --disable-strict --disable-x11 --with-srtp=/opt/local && make
Install to /opt/local
......@@ -58,6 +50,8 @@ 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:
1. Run configure as told before but with "--enable-relativeprefix" appended.
......
......@@ -374,17 +374,14 @@ int sal_listen_port(Sal *ctx, const char *addr, int port, SalTransport tr, int i
memset(&tlsCtx, 0, sizeof(tlsCtx));
snprintf(tlsCtx.root_ca_cert, sizeof(tlsCtx.client.cert), "%s", ctx->rootCa);
eXosip_set_tls_ctx(&tlsCtx);
}
}
#ifdef HAVE_EXOSIP_TLS_VERIFY_CERTIFICATE
eXosip_tls_verify_certificate(ctx->verify_server_certs);
#endif
break;
default:
ms_warning("unexpected proto, using datagram");
}
#if 0
/* it does not work, exosip does not implement this option correctly*/
err=0;
eXosip_set_option(EXOSIP_OPT_DNS_CAPABILITIES,&err); /*0=no NAPTR */
#endif
/*see if it looks like an IPv6 address*/
int use_rports = ctx->use_rports; // Copy char to int to avoid bad alignment
eXosip_set_option(EXOSIP_OPT_USE_RPORT,&use_rports);
......@@ -399,10 +396,6 @@ int sal_listen_port(Sal *ctx, const char *addr, int port, SalTransport tr, int i
return -1;
}
err=eXosip_listen_addr(proto, addr, port, ipv6 ? PF_INET6 : PF_INET, is_secure);
#ifdef HAVE_EXOSIP_GET_SOCKET
ms_message("Exosip has socket number %i",eXosip_get_socket(proto));
#endif
ctx->running=TRUE;
return err;
}
......@@ -451,7 +444,9 @@ void sal_set_root_ca(Sal* ctx, const char* rootCa) {
void sal_verify_server_certificates(Sal *ctx, bool_t verify){
ctx->verify_server_certs=verify;
#ifdef HAVE_EXOSIP_TLS_VERIFY_CERTIFICATE
eXosip_tls_verify_certificate(verify);
#endif
}
static int extract_received_rport(osip_message_t *msg, const char **received, int *rportval,SalTransport* transport){
......
......@@ -1583,14 +1583,19 @@ static void linphone_gtk_check_soundcards(){
}
static void linphone_gtk_quit(void){
linphone_gtk_uninit_instance();
linphone_gtk_destroy_log_window();
linphone_core_destroy(the_core);
linphone_gtk_log_uninit();
static gboolean quit_done=FALSE;
if (!quit_done){
quit_done=TRUE;
g_source_remove_by_user_data(linphone_gtk_get_core());
linphone_gtk_uninit_instance();
linphone_gtk_destroy_log_window();
linphone_core_destroy(the_core);
linphone_gtk_log_uninit();
#ifdef HAVE_NOTIFY
notify_uninit();
notify_uninit();
#endif
gdk_threads_leave();
gdk_threads_leave();
}
}
#ifdef HAVE_GTK_OSX
......
......@@ -42,6 +42,10 @@ AC_CHECK_LIB([eXosip2],[eXosip_get_version],
[AC_DEFINE([HAVE_EXOSIP_GET_VERSION],[1],[Defined when eXosip_get_version is available])],
[],
[-losipparser2 -losip2 ])
AC_CHECK_LIB([eXosip2],[eXosip_tls_verify_certificate],
[AC_DEFINE([HAVE_EXOSIP_TLS_VERIFY_CERTIFICATE],[1],[Defined when eXosip_tls_verify_certificate is available])],
[AC_MSG_WARN([Could not find eXosip_tls_verify_certificate in eXosip2 !])],
[-losipparser2 -losip2 ])
AC_CHECK_LIB([eXosip2],[eXosip_get_socket],
[AC_DEFINE([HAVE_EXOSIP_GET_SOCKET],[1],[Defined when eXosip_get_socket is available])],
[AC_MSG_WARN([Could not find eXosip_get_socket in eXosip2 !])],
......
mediastreamer2 @ 668bdcc2
Subproject commit 0d7553a33aba3237f76b742a42af1802c3b74ec3
Subproject commit 668bdcc2c04a487fb94f31b7790ef301908c47b5
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment