On Tue, Dec 9, 2008 at 8:24 AM, Andreas Schneider <[EMAIL PROTECTED]> wrote:
> On Tuesday 09 December 2008 09:33:25 Ludovico Cavedon wrote:
>> Anyway, here it is the patch in order to use system libpurple, simpler
>> than expected :)
>> And it seems to work with the latest libpurple in Debian sid (2.5.2)!
>
> Woohooo. That's great! :)

Now come the bad news: using the external libpurple on Debian sid it
crashes when logging out e logging back in. I guess some reace
conditions comes up :(

Here is an updated version of the patch (with a fix I forgot for the
"make install" part) that does not enable external libpurple by
default. I would suggest applying this patch, do people can try and
build it with LIBPURPLE_INTERNAL=OFF

Thanks,
Ludovico
Index: qutecom-2.2~rc2.dfsg0/libs/3rdparty/libpurple/CMakeLists-external.txt
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ qutecom-2.2~rc2.dfsg0/libs/3rdparty/libpurple/CMakeLists-external.txt	2008-12-10 08:39:25.000000000 +0000
@@ -0,0 +1,10 @@
+if (NOT LIBPURPLE_FOUND)
+        find_package(LibPurple REQUIRED)
+endif (NOT LIBPURPLE_FOUND)
+
+ow_create_project(libpurple)
+
+ow_use_public_libraries(
+        LIBPURPLE
+)
+
Index: qutecom-2.2~rc2.dfsg0/libs/3rdparty/libpurple/CMakeLists.txt
===================================================================
--- qutecom-2.2~rc2.dfsg0.orig/libs/3rdparty/libpurple/CMakeLists.txt	2008-12-10 08:39:22.000000000 +0000
+++ qutecom-2.2~rc2.dfsg0/libs/3rdparty/libpurple/CMakeLists.txt	2008-12-10 08:39:25.000000000 +0000
@@ -1,7 +1,11 @@
 if (NOT WIN32)
 	# Not MSVC and not MinGW
-	include(CMakeLists-unix.txt)
+        if (LIBPURPLE_INTERNAL)
+                include(CMakeLists-unix.txt)
+        else (LIBPURPLE_INTERNAL)
+                include(CMakeLists-external.txt)
+        endif (LIBPURPLE_INTERNAL)
 else (NOT WIN32)
 	# If MSVC or MinGW
 	include(CMakeLists-win32.txt)
-endif (NOT WIN32)
\ No newline at end of file
+endif (NOT WIN32)
Index: qutecom-2.2~rc2.dfsg0/libs/3rdparty/CMakeLists.txt
===================================================================
--- qutecom-2.2~rc2.dfsg0.orig/libs/3rdparty/CMakeLists.txt	2008-12-10 08:39:22.000000000 +0000
+++ qutecom-2.2~rc2.dfsg0/libs/3rdparty/CMakeLists.txt	2008-12-10 08:39:25.000000000 +0000
@@ -8,6 +8,7 @@
 	option(SAMPLERATE_INTERNAL "Use internal libsamplerate" OFF)
 	option(OSIP2_INTERNAL "Use internal oSIP" ON)
 	option(CURL_INTERNAL "Use internal cURL" OFF)
+	option(LIBPURPLE_INTERNAL "Use internal libpurple" ON)
 else (LINUX)
 	option(PORTAUDIO_INTERNAL "Use internal PortAudio" ON)
 	option(FFMPEG_INTERNAL "Use internal FFmpeg" ON)
@@ -16,6 +17,7 @@
 	option(SAMPLERATE_INTERNAL "Use internal libsamplerate" ON)
 	option(OSIP2_INTERNAL "Use internal oSIP" ON)
 	option(CURL_INTERNAL "Use internal cURL" ON)
+	option(LIBPURPLE_INTERNAL "Use internal libpurple" ON)
 endif (LINUX)
 
 if (WIN32)
Index: qutecom-2.2~rc2.dfsg0/libs/imwrapper/src/purple/PurpleIMFactory.h
===================================================================
--- qutecom-2.2~rc2.dfsg0.orig/libs/imwrapper/src/purple/PurpleIMFactory.h	2008-12-10 08:39:22.000000000 +0000
+++ qutecom-2.2~rc2.dfsg0/libs/imwrapper/src/purple/PurpleIMFactory.h	2008-12-10 08:39:25.000000000 +0000
@@ -24,6 +24,7 @@
 #include <imwrapper/IMAccount.h>
 
 #include <glib.h>
+#include <glib/gtypes.h>
 
 class PurpleAccountMngr;
 class PurpleChatMngr;
Index: qutecom-2.2~rc2.dfsg0/libs/imwrapper/CMakeLists.txt
===================================================================
--- qutecom-2.2~rc2.dfsg0.orig/libs/imwrapper/CMakeLists.txt	2008-12-10 08:39:22.000000000 +0000
+++ qutecom-2.2~rc2.dfsg0/libs/imwrapper/CMakeLists.txt	2008-12-10 08:39:25.000000000 +0000
@@ -9,6 +9,7 @@
 
 ow_use_public_libraries(
 	owsettings
+	glib2
 )
 
 ow_use_private_libraries(
Index: qutecom-2.2~rc2.dfsg0/wengophone/src/presentation/qt/CMakeLists-install-linux.txt
===================================================================
--- qutecom-2.2~rc2.dfsg0.orig/wengophone/src/presentation/qt/CMakeLists-install-linux.txt	2008-12-10 08:39:32.000000000 +0000
+++ qutecom-2.2~rc2.dfsg0/wengophone/src/presentation/qt/CMakeLists-install-linux.txt	2008-12-10 08:40:02.000000000 +0000
@@ -23,7 +23,6 @@
 	${TMP_BUILD_DIR}/libowsl.so
 	${TMP_BUILD_DIR}/libowutil.so
 	${TMP_BUILD_DIR}/libpsiidle.so
-	${TMP_BUILD_DIR}/liblibpurple.so
 	DESTINATION lib${LIB_SUFFIX}/qutecom)
 
 if (ENABLE_CRASHREPORT)
@@ -39,6 +38,12 @@
 		DESTINATION lib${LIB_SUFFIX}/qutecom)
 endif (CURL_INTERNAL)
 
+if (LIBPURPLE_INTERNAL)
+	install(PROGRAMS
+		${TMP_BUILD_DIR}/liblibpurple.so
+		DESTINATION lib${LIB_SUFFIX}/qutecom)
+endif (LIBPURPLE_INTERNAL)
+
 install(DIRECTORY
 	${TMP_BUILD_DIR}/lang
 	DESTINATION ${DATA_INSTALL_DIR}
_______________________________________________
QuteCom-dev mailing list
[email protected]
http://lists.qutecom.org/mailman/listinfo/qutecom-dev

Reply via email to