/soc/2013/ankitkv/gobjectification: c2947ee224ca: Merged default...

Ankit Vani a at nevitus.org
Sun Jan 5 07:02:40 EST 2014


Changeset: c2947ee224ca7ad210d512bf6e0a0b9f9239d3d5
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2014-01-05 17:32 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/c2947ee224ca

Description:

Merged default branch

diffstat:

 configure.ac                          |  12 +++++++++
 libpurple/internal.h                  |   1 +
 libpurple/protocols/gg/Makefile.mingw |  22 +++--------------
 libpurple/protocols/gg/gg.c           |   3 +-
 libpurple/protocols/gg/gg.h           |   6 ++++
 libpurple/protocols/gg/multilogon.c   |   2 +-
 libpurple/win32/global.mak            |   3 +-
 pidgin/Makefile.am                    |   7 +---
 pidgin/Makefile.mingw                 |   3 ++
 pidgin/gtkdialogs.c                   |  12 +++++---
 pidgin/win32/nsis/generate_gtk_zip.sh |  45 +++++++++++++++++++++++++++-------
 pidgin/win32/prepare-workspace.sh     |  13 ++++++---
 12 files changed, 83 insertions(+), 46 deletions(-)

diffs (truncated from 431 to 300 lines):

diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -1178,6 +1178,7 @@ fi
 dnl #######################################################################
 dnl # Check for Gadu-Gadu client includes and libraries
 dnl #######################################################################
+dnl TODO: we should get rid of manually entered dirs at some point
 AC_ARG_WITH(gadu-includes, [AS_HELP_STRING([--with-gadu-includes=DIR], [compile the Gadu-Gadu plugin against includes in DIR])], [ac_gadu_includes="$withval"], [ac_gadu_includes="no"])
 AC_ARG_WITH(gadu-libs, [AS_HELP_STRING([--with-gadu-libs=DIR], [compile the Gadu-Gadu plugin against the libs in DIR])], [ac_gadu_libs="$withval"], [ac_gadu_libs="no"])
 GADU_CFLAGS=""
@@ -1210,6 +1211,8 @@ else
 	GADU_LIBS="$GADU_LIBS -lgadu"
 	AC_CHECK_LIB(gadu, gg_libgadu_version, [gadu_libs=yes], , $GADU_LIBS)
 fi
+
+dnl TODO: it shouldn't be necessary with 1.12.0 and newer
 GADU_CFLAGS=`echo $GADU_CFLAGS |$sedpath 's/-Wall//'`
 
 if test "x$gadu_libs" = "xyes"; then
@@ -1240,6 +1243,7 @@ if test "x$gadu_libs" = "xyes"; then
 	CPPFLAGS="$CPPFLAGS_save"
 fi
 
+dnl TODO: this one shouldn't be necessary too
 if test "x$gadu_libs" = "xyes" -a "x$gadu_manual_check" = "xyes"; then
 	AC_MSG_CHECKING(for supplied libgadu compatibility)
 	CPPFLAGS_save="$CPPFLAGS"
@@ -1271,6 +1275,14 @@ fi
 AM_CONDITIONAL(HAVE_LIBGADU, test "x$gadu_libs" = "xyes")
 AM_CONDITIONAL(USE_INTERNAL_LIBGADU, test "x$gadu_libs" != "xyes")
 
+if test "x$gadu_libs" = "xyes"; then
+	AC_DEFINE(HAVE_LIBGADU, 1, [Linked with libgadu])
+fi
+
+if test "x$gadu_libs" != "xyes"; then
+	AC_DEFINE(USE_INTERNAL_LIBGADU, 1, [Using internal libgadu])
+fi
+
 if test "x$gadu_libs" = "x"; then
 	gadu_libs=no
 fi
diff --git a/libpurple/internal.h b/libpurple/internal.h
--- a/libpurple/internal.h
+++ b/libpurple/internal.h
@@ -48,6 +48,7 @@
 #ifdef ENABLE_NLS
 #  include <locale.h>
 #  include <libintl.h>
+#  undef printf
 #  define _(String) ((const char *)dgettext(PACKAGE, String))
 #  ifdef gettext_noop
 #    define N_(String) gettext_noop (String)
diff --git a/libpurple/protocols/gg/Makefile.mingw b/libpurple/protocols/gg/Makefile.mingw
--- a/libpurple/protocols/gg/Makefile.mingw
+++ b/libpurple/protocols/gg/Makefile.mingw
@@ -28,16 +28,17 @@ INCLUDE_PATHS +=\
 			-I$(PIDGIN_TREE_TOP) \
 			-I$(PURPLE_TOP) \
 			-I$(PURPLE_TOP)/win32 \
-			-I./lib \
 			-I$(GTK_TOP)/include \
 			-I$(GTK_TOP)/include/glib-2.0 \
 			-I$(GTK_TOP)/lib/glib-2.0/include \
 			-I$(GNUTLS_TOP)/include \
-			-I$(JSON_GLIB_TOP)/include/json-glib-1.0
+			-I$(JSON_GLIB_TOP)/include/json-glib-1.0 \
+			-I$(LIBGADU_TOP)/include
 
 LIB_PATHS += \
 			-L$(GTK_TOP)/lib \
 			-L$(GNUTLS_TOP)/lib \
+			-L$(LIBGADU_TOP)/lib \
 			-L$(JSON_GLIB_TOP)/lib \
 			-L$(PURPLE_TOP)
 
@@ -54,22 +55,6 @@ C_SRC =	\
 	gg.c \
 	html.c \
 	image.c \
-	lib/common.c \
-	lib/dcc.c \
-	lib/dcc7.c \
-	lib/debug.c \
-	lib/deflate.c \
-	lib/encoding.c \
-	lib/events.c \
-	lib/handlers.c \
-	lib/http.c \
-	lib/libgadu.c \
-	lib/message.c \
-	lib/obsolete.c \
-	lib/pubdir.c \
-	lib/pubdir50.c \
-	lib/resolver.c \
-	lib/sha1.c \
 	libgadu-events.c \
 	libgaduw.c \
 	message-prpl.c \
@@ -94,6 +79,7 @@ OBJECTS = $(C_SRC:%.c=%.o)
 ## LIBRARIES
 ##
 LIBS =	\
+			-lgadu \
 			-lglib-2.0 \
 			-lgobject-2.0 \
 			-lgnutls \
diff --git a/libpurple/protocols/gg/gg.c b/libpurple/protocols/gg/gg.c
--- a/libpurple/protocols/gg/gg.c
+++ b/libpurple/protocols/gg/gg.c
@@ -399,7 +399,8 @@ static void ggp_callback_recv(gpointer _
 			info->imtoken = g_strdup(ev->event.imtoken.imtoken);
 			break;
 		case GG_EVENT_PONG110:
-			purple_debug_info("gg", "gg11: got PONG110 %lu\n", ev->event.pong110.time);
+			purple_debug_info("gg", "gg11: got PONG110 %lu\n",
+				(long unsigned)ev->event.pong110.time);
 			break;
 		case GG_EVENT_CHAT_INFO:
 		case GG_EVENT_CHAT_INFO_GOT_ALL:
diff --git a/libpurple/protocols/gg/gg.h b/libpurple/protocols/gg/gg.h
--- a/libpurple/protocols/gg/gg.h
+++ b/libpurple/protocols/gg/gg.h
@@ -25,9 +25,15 @@
 #define _PURPLE_GG_H
 
 #define GGP_UIN_LEN_MAX 10
+
+#ifdef _WIN32
+#define GGP_ENABLE_GG11 1
+#else
 #define GGP_ENABLE_GG11 0
+#endif
 
 #include <libgadu.h>
+
 #include "internal.h"
 #include "search.h"
 #include "connection.h"
diff --git a/libpurple/protocols/gg/multilogon.c b/libpurple/protocols/gg/multilogon.c
--- a/libpurple/protocols/gg/multilogon.c
+++ b/libpurple/protocols/gg/multilogon.c
@@ -79,7 +79,7 @@ void ggp_multilogon_info(PurpleConnectio
 		purple_debug_misc("gg", "ggp_multilogon_info: "
 			"session [%s] logged in at %lu\n",
 			info->sessions[i].name,
-			info->sessions[i].logon_time);
+			(unsigned long)info->sessions[i].logon_time);
 	}
 
 	mldata->session_count = info->count;
diff --git a/libpurple/win32/global.mak b/libpurple/win32/global.mak
--- a/libpurple/win32/global.mak
+++ b/libpurple/win32/global.mak
@@ -12,7 +12,7 @@
 WIN32_DEV_TOP ?= $(PIDGIN_TREE_TOP)/../win32-dev
 GTKSPELL_TOP ?= $(WIN32_DEV_TOP)/gtkspell-2.0
 ENCHANT_TOP ?= $(WIN32_DEV_TOP)/enchant-1.6
-GNUTLS_TOP ?= $(WIN32_DEV_TOP)/gnutls-2.12
+GNUTLS_TOP ?= $(WIN32_DEV_TOP)/gnutls-3.1
 GTK_TOP ?= $(WIN32_DEV_TOP)/gtk2-2.24
 GTK_BIN ?= $(GTK_TOP)/bin
 BONJOUR_TOP ?= $(WIN32_DEV_TOP)/bonjour-sdk
@@ -30,6 +30,7 @@ WEBKITGTK_TOP ?= $(WIN32_DEV_TOP)/libweb
 LIBSOUP_TOP ?= $(WIN32_DEV_TOP)/libsoup-2.42
 GETTEXT_TOP ?= $(WIN32_DEV_TOP)/gettext-0.18
 INTLTOOL_TOP ?= $(WIN32_DEV_TOP)/intltool-0.50
+LIBGADU_TOP ?= $(WIN32_DEV_TOP)/libgadu-1.12
 
 # Where we installing this stuff to?
 PIDGIN_INSTALL_DIR := $(PIDGIN_TREE_TOP)/win32-install-dir
diff --git a/pidgin/Makefile.am b/pidgin/Makefile.am
--- a/pidgin/Makefile.am
+++ b/pidgin/Makefile.am
@@ -186,13 +186,10 @@ libpidgin_la_LIBADD = \
 	$(WEBKIT_LIBS) \
 	$(GTK_LIBS) \
 	$(X11_LIBS) \
+	$(GADU_LIBS) \
 	$(INTROSPECTION_LIBS) \
 	$(top_builddir)/libpurple/libpurple.la
 
-if USE_INTERNAL_LIBGADU
-INTGG_CFLAGS = -DUSE_INTERNAL_LIBGADU
-endif
-
 pidgin_DEPENDENCIES = $(builddir)/libpidgin.la
 pidgin_LDFLAGS = -export-dynamic
 pidgin_LDADD = $(builddir)/libpidgin.la $(libpidgin_la_LIBADD)
@@ -219,7 +216,7 @@ AM_CPPFLAGS = \
 	$(GTKSPELL_CFLAGS) \
 	$(LIBXML_CFLAGS) \
 	$(WEBKIT_CFLAGS) \
-	$(INTGG_CFLAGS) \
+	$(GADU_CFLAGS) \
 	$(INTROSPECTION_CFLAGS)
 
 -include $(INTROSPECTION_MAKEFILE)
diff --git a/pidgin/Makefile.mingw b/pidgin/Makefile.mingw
--- a/pidgin/Makefile.mingw
+++ b/pidgin/Makefile.mingw
@@ -44,10 +44,12 @@ INCLUDE_PATHS +=	\
 			-I$(GTK_TOP)/lib/gtk-2.0/include \
 			-I$(GTKSPELL_TOP)/include/gtkspell-2.0 \
 			-I$(LIBSOUP_TOP)/include/libsoup-2.4 \
+			-I$(LIBGADU_TOP)/include \
 			-I$(WEBKITGTK_TOP)/include/webkitgtk-1.0
 
 LIB_PATHS +=		-L$(GTK_TOP)/lib \
 			-L$(WEBKITGTK_TOP)/lib \
+			-L$(LIBGADU_TOP)/lib \
 			-L$(PURPLE_TOP) \
 			-L$(PIDGIN_TOP) \
 			$(VV_LIB_PATHS)
@@ -136,6 +138,7 @@ PIDGIN_LIBS =	\
 		-lgdk-win32-2.0 \
 		-lgdk_pixbuf-2.0 \
 		-lgdi32 \
+		-lgadu \
 		-lwinmm \
 		$(VV_LIBS) \
 		-lwebkitgtk-1.0
diff --git a/pidgin/gtkdialogs.c b/pidgin/gtkdialogs.c
--- a/pidgin/gtkdialogs.c
+++ b/pidgin/gtkdialogs.c
@@ -48,6 +48,10 @@
 #include <gst/gst.h>
 #endif
 
+#ifdef HAVE_LIBGADU
+#include <libgadu.h>
+#endif
+
 #include "gtk3compat.h"
 
 static GList *dialogwindows = NULL;
@@ -639,15 +643,13 @@ void pidgin_dialogs_buildinfo(void)
 #endif
 #endif
 
-#if defined(_WIN32) || defined(USE_INTERNAL_LIBGADU)
+#if defined(USE_INTERNAL_LIBGADU)
 	g_string_append(str, "<dt>Gadu-Gadu library (libgadu):</dt><dd>Internal</dd>");
-#else
-#ifdef HAVE_LIBGADU
-	g_string_append(str, "<dt>Gadu-Gadu library (libgadu):</dt><dd>Enabled</dd>");
+#elif defined(HAVE_LIBGADU)
+	g_string_append_printf(str, "<dt>Gadu-Gadu library (libgadu):</dt><dd>%s</dd>", gg_libgadu_version());
 #else
 	g_string_append(str, "<dt>Gadu-Gadu library (libgadu):</dt><dd>Disabled</dd>");
 #endif
-#endif
 
 #ifdef USE_GTKSPELL
 	g_string_append(str, "<dt>GtkSpell:</dt><dd>Enabled</dd>");
diff --git a/pidgin/win32/nsis/generate_gtk_zip.sh b/pidgin/win32/nsis/generate_gtk_zip.sh
--- a/pidgin/win32/nsis/generate_gtk_zip.sh
+++ b/pidgin/win32/nsis/generate_gtk_zip.sh
@@ -10,6 +10,12 @@ if [ ! -e $PIDGIN_BASE/ChangeLog ]; then
 	exit 1
 fi
 
+if [ ! -e $PIDGIN_BASE/VERSION ]; then
+	cd ../../..
+	make -f Makefile.mingw VERSION
+	cd - > /dev/null
+fi
+
 STAGE_DIR=`readlink -f $PIDGIN_BASE/pidgin/win32/nsis/gtk_runtime_stage`
 #Subdirectory of $STAGE_DIR
 INSTALL_DIR=Gtk
@@ -18,10 +24,10 @@ PIDGIN_VERSION=$( < $PIDGIN_BASE/VERSION
 
 #This needs to be changed every time there is any sort of change.
 BUNDLE_VERSION=2.24.14.0
-BUNDLE_SHA1SUM="df28047f00934e6a00a5962387a1005114ec772e"
+BUNDLE_SHA1SUM="cbc0c5fe9849dc7af845af039b940a913a20a199"
 ZIP_FILE="$PIDGIN_BASE/pidgin/win32/nsis/gtk-runtime-$BUNDLE_VERSION.zip"
 #BUNDLE_URL="https://pidgin.im/win32/download_redir.php?version=$PIDGIN_VERSION&gtk_version=$BUNDLE_VERSION&dl_pkg=gtk"
-BUNDLE_URL="https://dl.dropbox.com/u/5448886/pidgin-win32/gtk-runtime-2.24.14.0.zip"
+BUNDLE_URL="https://pidgin.im/~twasilczyk/win32/gtk-runtime-$BUNDLE_VERSION.zip"
 
 function download() {
 	if [ -e "$2" ]; then
@@ -75,9 +81,8 @@ else
 	exit 0
 fi
 
-#DOWNLOAD_HOST="http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.3/noarch/"
-#TODO: this is just a temporary mirror - Tomek Wasilczyk's <tomkiewicz at cpw.pidgin.im> Dropbox
-DOWNLOAD_HOST="https://dl.dropbox.com/u/5448886/pidgin-win32/runtime-deps/"
+# origin: http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_12.3/noarch/
+DOWNLOAD_HOST="https://pidgin.im/~twasilczyk/win32/runtime-deps/"
 
 ALL=""
 
@@ -108,10 +113,10 @@ ALL+="ARC_GDK_PIXBUF "
 ARC_GEOCLUE="${DOWNLOAD_HOST}mingw32-libgeoclue-0.12.99-1.10.noarch.rpm Geoclue 0.12.99-1.10 sha1sum:84410ca9a6d2fac46217c51e22ebbc5ac3cae040"
 ALL+="ARC_GEOCLUE "



More information about the Commits mailing list