From 43688e22051ccf4711ae203c468c45c2c845c804 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 18 Aug 2011 12:00:54 +0200 Subject: [PATCH 1/7] update ms2 --- mediastreamer2 | 2 +- oRTP | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mediastreamer2 b/mediastreamer2 index 548c70123..45f2ab75d 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 548c7012382db6442a2ec75f4d9ff8f67c853244 +Subproject commit 45f2ab75d5261b309c62957b78e11cac15728b3c diff --git a/oRTP b/oRTP index 536ad766c..3af8aa68f 160000 --- a/oRTP +++ b/oRTP @@ -1 +1 @@ -Subproject commit 536ad766cf13da4115c456170afee96113de533f +Subproject commit 3af8aa68f253d802b674cc1807115e4556c0fafa From f7bb65c20e8809708b74ab73658a9ea1e154c8f0 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Fri, 19 Aug 2011 10:25:42 +0200 Subject: [PATCH 2/7] new ortp version --- oRTP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oRTP b/oRTP index 3af8aa68f..3e3ba3f49 160000 --- a/oRTP +++ b/oRTP @@ -1 +1 @@ -Subproject commit 3af8aa68f253d802b674cc1807115e4556c0fafa +Subproject commit 3e3ba3f4922a9f2eaddd782b571abf3968aa41b9 From b4219a114e00932b6d887e9448868e88a708da4c Mon Sep 17 00:00:00 2001 From: Guillaume Beraudo Date: Mon, 22 Aug 2011 10:36:57 +0200 Subject: [PATCH 3/7] Display authentication code in display status. --- coreapi/linphonecall.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index ee69c93dc..393d43d8f 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -103,10 +103,17 @@ static void linphone_call_videostream_encryption_changed(void *data, bool_t encr #endif static void linphone_call_audiostream_encryption_changed(void *data, bool_t encrypted) { + char status[255]={0}; ms_message("Audio stream is %s ", encrypted ? "encrypted" : "not encrypted"); LinphoneCall *call = (LinphoneCall *)data; call->audiostream_encrypted=encrypted; + + if (encrypted && call->core->vtable.display_status != NULL) { + snprintf(status,sizeof(status)-1,_("Authentication token is %s"),call->auth_token); + call->core->vtable.display_status(call->core, status); + } + propagate_encryption_changed(call); From 7209bedfdfb55c012705dd4c307e27048a69a68d Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 22 Aug 2011 11:54:02 +0200 Subject: [PATCH 4/7] fix for osip checks (must never add -L/usr/lib !!!) --- m4/osip.m4 | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/m4/osip.m4 b/m4/osip.m4 index 629f92a4e..585a13ffa 100644 --- a/m4/osip.m4 +++ b/m4/osip.m4 @@ -5,28 +5,16 @@ AC_ARG_WITH( osip, [ --with-osip Set prefix where osip can be found (ex:/usr or /usr/local)[default=/usr] ], [ osip_prefix=${withval}],[ osip_prefix=/usr ]) -dnl FC6's compat-osip2 headers live into "/usr/include/osip2-2.2.2", -dnl while libraries are "/usr/lib/libosipparser2-2.2.2.so*". -AC_ARG_WITH( osip-version,dnl -AC_HELP_STRING([--with-osip-version=VERSION], - [Set osip legacy version @<:@empty@:>@]), - [osip_legacy_version="-${withval}"], - [osip_legacy_version=""]) osip_pkgconfig=true osip_pkgconfig_file=libosip2 -if test -n "$osip_legacy_version"; then - osip_pkgconfig_file=libosip2${osip_legacy_version} -fi -PKG_CHECK_MODULES(OSIP, $osip_pkgconfig_file >= 3.0.0, ,osip_pkgconfig=false) +PKG_CHECK_MODULES(OSIP, $osip_pkgconfig_file >= 3.3.0, ,osip_pkgconfig=false) if test $osip_pkgconfig = false; then - if test -z "$osip_legacy_version"; then + if test "$osip_prefix" != "/usr" ; then OSIP_CFLAGS="-I${osip_prefix}/include" - else - OSIP_CFLAGS="-I${osip_prefix}/include/osip2${osip_legacy_version}" fi dnl check osip2 headers @@ -36,7 +24,10 @@ dnl check osip2 headers CPPFLAGS=$CPPFLAGS_save dnl check for osip2 libs - OSIP_LIBS="-L$osip_prefix/lib -losipparser2${osip_legacy_version}" + if test "$osip_prefix" != "/usr" ; then + OSIP_LIBS="-L$osip_prefix/lib" + fi + OSIP_LIBS="$OSIP_LIBS -losipparser2" LDFLAGS_save=$LDFLAGS LDFLAGS=$OSIP_LIBS LIBS_save=$LIBS @@ -49,8 +40,8 @@ dnl check for osip2 libs ;; esac OSIP_LIBS="$OSIP_LIBS $osip_aux_libs" - AC_CHECK_LIB(osip2${osip_legacy_version},osip_init, , AC_MSG_ERROR([Could not find osip2 library !]),[-losipparser2${osip_legacy_version} $osip_aux_libs ]) - AC_CHECK_LIB(osipparser2${osip_legacy_version},osip_message_init, , AC_MSG_ERROR([Could not find osipparser2 library !]),[$osip_aux_libs]) + AC_CHECK_LIB(osip2,osip_init, , AC_MSG_ERROR([Could not find osip2 library !]),[-losipparser2 $osip_aux_libs ]) + AC_CHECK_LIB(osipparser2,osip_message_init, , AC_MSG_ERROR([Could not find osipparser2 library !]),[$osip_aux_libs]) LDFLAGS=$LDFLAGS_save LIBS=$LIBS_save fi From 12bcc48f1864bc1e98b14d7d5749fe0322a91c7c Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 22 Aug 2011 22:06:32 +0200 Subject: [PATCH 5/7] macos x build procedure improved - fix quit procedure (unsaved settings) --- README.macos | 85 +++++++++++++--------------------------------------- gtk/main.c | 12 +++++++- 2 files changed, 31 insertions(+), 66 deletions(-) diff --git a/README.macos b/README.macos index e9440307e..99d2e2816 100644 --- a/README.macos +++ b/README.macos @@ -2,83 +2,38 @@ * 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. -You have two options: using gtk-osx framework (http://gtk-osx.sourceforge.net/) which results in a Linphone GTK well integrated into Mac OS -environment. The other option is using MacPort, in which case Linphone will run as an X11 application inside Mac OS. - -At the date of March 25, 2011, no video support is available yet. - - -Compiling using gtk-osx -======================= - -Requirements: -* gtk-osx framework -* xcode (for gcc) -* macport (to retrieve dependencies easily, such as libosip2, libeXosip2, libspeex -* linphone git tree - -Steps: - -- Install gtk-osx jhbuild environment as described at -http://sourceforge.net/apps/trac/gtk-osx/wiki/Build -It will build gtk for osx as well as many dependencies. - -- Install ige-mac-bundler following instructions here (git clone method is preferred): -http://sourceforge.net/apps/trac/gtk-osx/wiki/Bundle +- Install build time dependencies + $ port install automake autoconf libtool intltool - Install some linphone dependencies with macports $ port install speex-dev $ port install osip2 $ port install eXosip2 + $ port install ffmpeg-devel + $ port install sdl-devel -- Install libSDL and ffmpeg from their official git or hg repositories. At this date (2011/05/09) the macports version are too old and buggy. +- Install gtk. It is recommended to use the quartz backend for better integration. + $ port install gtk2 +no_x11 + $ port install ige-mac-integration -- Now you can compile linphone +- Compile linphone -$ jhbuild shell -$ PKG_CONFIG_PATH=$HOME/gtk/inst/lib/pkgconfig:/opt/local/lib/pkgconfig/ ./configure --disable-static --disable-strict --with-gsm=/opt/local --disable-x11 -#assuming you have gsm installed in /opt/local. However gsm is optional. -$ make +If you got the source code from git, run ./autogen.sh first. -- You can generate a bundle using -$ make bundle - -The bundle is generated in ~/Desktop/Linphone and can safely be exported to other places and computers. - - -Compiling using MacPort -======================= - -This procedure works for audio, video still not fully supported. -It was tested on macos X (leopard) on september 2009. - -Requirements: -* xcode (for gcc) -* macport (GNU porting project) -* svn or git checkout'd linphone tree. - -Steps: -* install with the 'port install' command the following dependencies - - automake - - autoconf - - libtool - - gettext - - intltool - - gtk2 - - speex-dev - - osip2 - - eXosip2 +Then or otherwise, do: -* add /opt/local/bin to your PATH by editing (or creating) ~/.profile, logout and login again for changes to take effect - -* within linphone source directory, run ./autogen.sh -* run - ./configure --prefix=/opt/local --disable-video --with-readline=none && make - (note: we disable readline for linphonec because it appears to hang at this time) -* install to /opt/local - sudo make install + $ ./configure --prefix=/opt/local --with-readline=/opt/local --disable-strict --disable-x11 && make +Install to /opt/local + + $ sudo make install + +Done. diff --git a/gtk/main.c b/gtk/main.c index 6968466d8..03d66dc37 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -65,6 +65,7 @@ static gboolean iconified=FALSE; static gchar *workingdir=NULL; static char *progpath=NULL; gchar *linphone_logfile=NULL; +static gboolean app_terminated=FALSE; static GOptionEntry linphone_options[]={ { @@ -1364,6 +1365,14 @@ static void linphone_gtk_check_soundcards(){ } } +#ifdef HAVE_GTK_OSX +static gboolean on_block_termination(void){ + gtk_main_quit(); + g_message("Block termination returning %i",!app_terminated); + return !app_terminated; +} +#endif + int main(int argc, char *argv[]){ #ifdef ENABLE_NLS void *p; @@ -1458,7 +1467,7 @@ int main(int argc, char *argv[]){ g_signal_connect(G_OBJECT(theMacApp),"NSApplicationDidBecomeActive",(GCallback)linphone_gtk_show_main_window,NULL); g_signal_connect(G_OBJECT(theMacApp),"NSApplicationWillTerminate",(GCallback)gtk_main_quit,NULL); /*never block termination:*/ - g_signal_connect(G_OBJECT(theMacApp),"NSApplicationBlockTermination",(GCallback)gtk_false,NULL); + g_signal_connect(G_OBJECT(theMacApp),"NSApplicationBlockTermination",(GCallback)on_block_termination,NULL); #endif the_ui=linphone_gtk_create_window("main"); @@ -1491,6 +1500,7 @@ int main(int argc, char *argv[]){ linphone_gtk_destroy_log_window(); linphone_core_destroy(the_core); linphone_gtk_log_uninit(); + app_terminated=TRUE; #ifndef HAVE_GTK_OSX /*workaround a bug on win32 that makes status icon still present in the systray even after program exit.*/ gtk_status_icon_set_visible(icon,FALSE); From bfb9249a9a27f53687d7cbee7cbb7276b977e489 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 23 Aug 2011 00:12:29 +0200 Subject: [PATCH 6/7] update Portfile-devel --- Makefile.am | 9 +++++++-- README.macos | 17 ++++++++++++++++- configure.ac | 4 +++- mediastreamer2 | 2 +- scripts/Portfile-devel.tmpl | 12 +++++++++--- 5 files changed, 36 insertions(+), 8 deletions(-) diff --git a/Makefile.am b/Makefile.am index b972eba81..ff9efa459 100644 --- a/Makefile.am +++ b/Makefile.am @@ -163,14 +163,19 @@ setup.exe: filelist newdate: cd gtk && $(MAKE) newdate +if HAVE_MD5SUM +GEN_MD5=$(shell $(MD5SUM) linphone-$(VERSION).tar.gz | awk {'print $$4'}) +else +GEN_MD5=$(shell $(MD5SUM) linphone-$(VERSION).tar.gz | awk {'print $$1'}) +endif Portfile: $(top_srcdir)/scripts/Portfile.tmpl dist sed -e 's/\@VERSION\@/$(LINPHONE_VERSION)/g' \ - -e 's/\@LINPHONE_MD5\@/$(shell md5sum linphone-$(VERSION).tar.gz | awk {'print $$1'})/' < $< > $@ + -e 's/\@LINPHONE_MD5\@/$(GEN_MD5)/' < $< > $@ Portfile-devel: $(top_srcdir)/scripts/Portfile-devel.tmpl dist sed -e 's/\@VERSION\@/$(LINPHONE_VERSION)/g' \ - -e 's/\@LINPHONE_MD5\@/$(shell md5sum linphone-$(VERSION).tar.gz | awk {'print $$1'})/' < $< > $@ + -e 's/\@LINPHONE_MD5\@/$(GEN_MD5)/' < $< > $@ bundle: rm -rf $(INSTALLDIR) diff --git a/README.macos b/README.macos index 99d2e2816..1ed55dc76 100644 --- a/README.macos +++ b/README.macos @@ -15,6 +15,21 @@ You need: $ port install osip2 $ port install eXosip2 $ 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 --disable-video-dummy --disable-video-x11 && make -j4 + $ sudo make install + +When this version will be integrated into macports, only this will be necessary: $ port install sdl-devel - Install gtk. It is recommended to use the quartz backend for better integration. @@ -27,7 +42,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 + $ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --prefix=/opt/local --with-readline=/opt/local --disable-strict --disable-x11 && make Install to /opt/local diff --git a/configure.ac b/configure.ac index 08bcd8bf9..03f65f7d0 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([linphone],[3.4.3],[linphone-developers@nongnu.org]) +AC_INIT([linphone],[3.4.99.1],[linphone-developers@nongnu.org]) AC_CANONICAL_SYSTEM AC_CONFIG_SRCDIR([coreapi/linphonecore.c]) @@ -41,6 +41,8 @@ AC_C_INLINE AM_PROG_CC_STDC AC_HEADER_STDC AM_PROG_CC_C_O +AC_CHECK_PROGS(MD5SUM,[md5sum md5]) +AM_CONDITIONAL(HAVE_MD5SUM,test -n $MD5SUM) case $target_os in *mingw32ce) diff --git a/mediastreamer2 b/mediastreamer2 index 45f2ab75d..340acff00 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 45f2ab75d5261b309c62957b78e11cac15728b3c +Subproject commit 340acff0001e92d1f126b484d100e1c1d0746b34 diff --git a/scripts/Portfile-devel.tmpl b/scripts/Portfile-devel.tmpl index 418c0a97b..8a1b46119 100644 --- a/scripts/Portfile-devel.tmpl +++ b/scripts/Portfile-devel.tmpl @@ -17,8 +17,14 @@ distname linphone-${version} checksums md5 @LINPHONE_MD5@ -depends_lib port:libglade2 \ +depends_lib port:ffmpeg \ + port:readline \ port:speex-devel \ - port:libeXosip2 + port:libeXosip2 \ + port:libsdl-devel \ + port:gtk2 \ + port:ige-mac-integration + +configure.args-append --disable-x11 --with-readline=/opt/local --disable-strict + -configure.args-append --disable-video --with-readline=none From a1b315393998fc356a23267d048aaf4578a0988c Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 23 Aug 2011 10:42:49 +0200 Subject: [PATCH 7/7] support video --- scripts/Portfile-devel.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/Portfile-devel.tmpl b/scripts/Portfile-devel.tmpl index 8a1b46119..cb6a6b9d6 100644 --- a/scripts/Portfile-devel.tmpl +++ b/scripts/Portfile-devel.tmpl @@ -17,9 +17,9 @@ distname linphone-${version} checksums md5 @LINPHONE_MD5@ -depends_lib port:ffmpeg \ +depends_lib port:ffmpeg-devel \ port:readline \ - port:speex-devel \ + port:speex \ port:libeXosip2 \ port:libsdl-devel \ port:gtk2 \