/soc/2013/ankitkv/gobjectification: cfa7c57f9ca5: Merge default ...

Ankit Vani a at nevitus.org
Wed Apr 16 03:18:58 EDT 2014


Changeset: cfa7c57f9ca59a4ad66420a1174060fcc5850ec3
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2014-04-16 12:04 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/cfa7c57f9ca5

Description:

Merge default branch

diffstat:

 configure.ac                                   |  51 +++++++++++++++++++++++++-
 doc/reference/finch/Makefile.am                |   2 +-
 doc/reference/libpurple/Makefile.am            |   2 +-
 doc/reference/libpurple/plugin_i18n.xml        |   2 +-
 doc/reference/pidgin/Makefile.am               |   2 +-
 finch/Makefile.am                              |   4 --
 finch/gntsound.c                               |   4 +-
 finch/libfinch.c                               |   4 +-
 finch/libgnt/wms/Makefile.am                   |   1 -
 finch/plugins/Makefile.am                      |   1 -
 libpurple/Makefile.am                          |  23 ++++++-----
 libpurple/certificate.c                        |  15 ++++---
 libpurple/core.c                               |   2 +-
 libpurple/dbus-server.h                        |   2 +
 libpurple/dnsquery.c                           |   4 +-
 libpurple/dnssrv.c                             |   2 +-
 libpurple/example/Makefile.am                  |   4 --
 libpurple/example/nullclient.c                 |  38 +++++++++++++++++-
 libpurple/plugins.c                            |   2 +-
 libpurple/plugins/Makefile.am                  |   1 -
 libpurple/plugins/dbus-example.c               |   8 ++--
 libpurple/plugins/log_reader.c                 |   5 --
 libpurple/plugins/perl/Makefile.am             |   1 -
 libpurple/plugins/ssl/Makefile.am              |   2 -
 libpurple/prefs.c                              |  17 ++------
 libpurple/protocols/gg/lib/fileio.h            |   6 +++
 libpurple/protocols/jabber/Makefile.am         |   4 ++
 libpurple/protocols/jabber/iq.c                |   2 +-
 libpurple/protocols/mxit/mxit.h                |   1 -
 libpurple/protocols/oscar/family_icbm.c        |   4 --
 libpurple/protocols/oscar/family_locate.c      |   3 -
 libpurple/protocols/oscar/flap_connection.c    |   4 --
 libpurple/protocols/oscar/oscar.h              |   2 -
 libpurple/protocols/oscar/peer.c               |   4 --
 libpurple/protocols/oscar/util.c               |   4 --
 libpurple/protocols/zephyr/Makefile.am         |   1 -
 libpurple/protocols/zephyr/ZVariables.c        |   4 +-
 libpurple/protocols/zephyr/zephyr.c            |   6 +++
 libpurple/tests/Makefile.am                    |   3 +-
 libpurple/tests/check_libpurple.c              |   2 +-
 libpurple/win32/giowin32.c                     |   8 ++--
 libpurple/win32/libc_interface.c               |   2 +-
 libpurple/win32/win32dep.c                     |  16 +++++++-
 libpurple/win32/win32dep.h                     |  12 +-----
 m4macros/Makefile.am                           |   2 +-
 m4macros/as-ac-expand.m4                       |  49 ++++++++++++++++++++++++
 pidgin/Makefile.am                             |  34 +++++++++++++++--
 pidgin/gtkblist.c                              |  34 ++++++++++-------
 pidgin/gtkconv-theme.c                         |   6 ++-
 pidgin/gtkconv.c                               |   8 ++--
 pidgin/gtkdialogs.c                            |   3 +-
 pidgin/gtkdnd-hints.c                          |  10 ++---
 pidgin/gtkdocklet.c                            |   3 +-
 pidgin/gtkeventloop.c                          |   4 +-
 pidgin/gtkprefs.c                              |   3 +-
 pidgin/gtksmiley-theme.c                       |   2 +-
 pidgin/gtksound.c                              |   6 +-
 pidgin/gtkutils.c                              |  11 +++--
 pidgin/libpidgin.c                             |   7 ++-
 pidgin/pidgin.h                                |   2 +-
 pidgin/pidginstock.c                           |   2 +-
 pidgin/plugins/Makefile.am                     |   1 -
 pidgin/plugins/cap/Makefile.am                 |   1 -
 pidgin/plugins/disco/Makefile.am               |   1 -
 pidgin/plugins/disco/gtkdisco.c                |  12 ++++--
 pidgin/plugins/gestures/Makefile.am            |   1 -
 pidgin/plugins/gevolution/Makefile.am          |   1 -
 pidgin/plugins/musicmessaging/Makefile.am      |   1 -
 pidgin/plugins/musicmessaging/musicmessaging.c |  42 ++++++++++++++++-----
 pidgin/plugins/ticker/Makefile.am              |   1 -
 pidgin/win32/gtkwin32dep.c                     |   1 -
 pidgin/win32/wspell.c                          |   2 +-
 72 files changed, 348 insertions(+), 189 deletions(-)

diffs (truncated from 1561 to 300 lines):

diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -126,16 +126,21 @@ dnl Check for Win32
 case "$host" in
 	*-*-mingw* | *-*-cygwin*)
 		is_win32="yes"
+		LIBS="$LIBS -lws2_32"
+		DNSAPI_LIBS="-ldnsapi"
+		AC_SUBST(DNSAPI_LIBS)
 		;;
 	*)
 		is_win32="no"
+		AC_CHECK_HEADERS(signal.h)
 		;;
 esac
+AM_CONDITIONAL(IS_WIN32, test "x$is_win32" = "xyes")
 
 dnl Checks for header files.
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS(arpa/nameser_compat.h fcntl.h sys/time.h unistd.h locale.h signal.h stdint.h)
+AC_CHECK_HEADERS(arpa/nameser_compat.h fcntl.h sys/time.h unistd.h locale.h stdint.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
@@ -146,6 +151,40 @@ AC_CHECK_SIZEOF(time_t, ,[
 
 AC_C_BIGENDIAN
 
+dnl Check for directories
+if test "x$is_win32" = "xyes" ; then
+	purple_datadir="wpurple_data_dir()"
+	purple_libdir="wpurple_lib_dir()"
+	pidgin_libdir="wpurple_lib_dir()"
+	finch_libdir="wpurple_lib_dir()"
+	purple_sysconfdir="wpurple_sysconf_dir()"
+	purple_localedir="wpurple_locale_dir()"
+else
+	AS_AC_EXPAND(purple_datadir, "$datadir")
+	purple_datadir="\"$purple_datadir\""
+	AS_AC_EXPAND(purple_sysconfdir, "$sysconfdir")
+	purple_sysconfdir="\"$purple_sysconfdir\""
+	AS_AC_EXPAND(purple_localedir, "$localedir")
+	purple_localedir="\"$purple_localedir\""
+
+	AS_AC_EXPAND(common_libdir, "$libdir")
+	purple_libdir="\"$common_libdir/purple-$PURPLE_MAJOR_VERSION\""
+	pidgin_libdir="\"$common_libdir/pidgin\""
+	finch_libdir="\"$common_libdir/finch\""
+fi
+AC_DEFINE_UNQUOTED([PURPLE_DATADIR], [$purple_datadir],
+	[datadir to use, may expand into a function call that returns const char *])
+AC_DEFINE_UNQUOTED([PURPLE_LIBDIR], [$purple_libdir],
+	[libdir to use for libpurple, may expand into a function call that returns const char *])
+AC_DEFINE_UNQUOTED([PIDGIN_LIBDIR], [$pidgin_libdir],
+	[libdir to use for Pidgin, may expand into a function call that returns const char *])
+AC_DEFINE_UNQUOTED([FINCH_LIBDIR], [$finch_libdir],
+	[libdir to use for Finch, may expand into a function call that returns const char *])
+AC_DEFINE_UNQUOTED([PURPLE_SYSCONFDIR], [$purple_sysconfdir],
+	[sysconfdir to use, may expand into a function call that returns const char *])
+AC_DEFINE_UNQUOTED([PURPLE_LOCALEDIR], [$purple_localedir],
+	[localedir to use, may expand into a function call that returns const char *])
+
 dnl Checks for library functions.
 AC_TYPE_SIGNAL
 AC_FUNC_STRFTIME
@@ -1350,6 +1389,9 @@ fi
 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
 	STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/silc//'`
 fi
+if test "x$is_win32" = "xyes" ; then
+	STATIC_PRPLS=`echo $STATIC_PRPLS | $sedpath 's/zephyr//'`
+fi
 AC_SUBST(STATIC_PRPLS)
 STATIC_LINK_LIBS=
 extern_load=
@@ -1419,6 +1461,9 @@ fi
 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
 	DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/silc//'`
 fi
+if test "x$is_win32" = "xyes" ; then
+	DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/zephyr//'`
+fi
 AC_SUBST(DYNAMIC_PRPLS)
 for i in $DYNAMIC_PRPLS ; do
 	case $i in
@@ -1952,6 +1997,10 @@ if ! test -z "$ssl_certificates_dir" ; t
 	SSL_CERTIFICATES_DIR="$ssl_certificates_dir"
 fi
 AC_SUBST(SSL_CERTIFICATES_DIR)
+if test "x$SSL_CERTIFICATES_DIR" != "x" ; then
+	AC_DEFINE_UNQUOTED([SSL_CERTIFICATES_DIR], ["$SSL_CERTIFICATES_DIR"],
+		[Directory where SSL certificates can be found])
+fi
 AM_CONDITIONAL(INSTALL_SSL_CERTIFICATES, test "x$SSL_CERTIFICATES_DIR" = "x")
 
 dnl These two are inverses of each other <-- stolen from evolution!
diff --git a/doc/reference/finch/Makefile.am b/doc/reference/finch/Makefile.am
--- a/doc/reference/finch/Makefile.am
+++ b/doc/reference/finch/Makefile.am
@@ -131,7 +131,7 @@ dist-hook: html-build.stamp
 if ENABLE_GTK_DOC
 TESTS_ENVIRONMENT = \
   DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \
-  SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir)
+  SRCDIR=$(abs_srcdir)
 #TODO: fix and enable
 #TESTS = $(GTKDOC_CHECK)
 endif
diff --git a/doc/reference/libpurple/Makefile.am b/doc/reference/libpurple/Makefile.am
--- a/doc/reference/libpurple/Makefile.am
+++ b/doc/reference/libpurple/Makefile.am
@@ -176,7 +176,7 @@ dist-hook: html-build.stamp
 if ENABLE_GTK_DOC
 TESTS_ENVIRONMENT = \
   DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \
-  SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir)
+  SRCDIR=$(abs_srcdir)
 #TODO: fix and enable
 #TESTS = $(GTKDOC_CHECK)
 endif
diff --git a/doc/reference/libpurple/plugin_i18n.xml b/doc/reference/libpurple/plugin_i18n.xml
--- a/doc/reference/libpurple/plugin_i18n.xml
+++ b/doc/reference/libpurple/plugin_i18n.xml
@@ -136,7 +136,7 @@ may vary, but it's the third parameter t
 Now add the following within your 'plugin_load' function:
 <programlisting>
 #ifdef ENABLE_NLS
-	bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
+	bindtextdomain(GETTEXT_PACKAGE, PURPLE_LOCALEDIR);
 	bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
 #endif /* ENABLE_NLS */
 
diff --git a/doc/reference/pidgin/Makefile.am b/doc/reference/pidgin/Makefile.am
--- a/doc/reference/pidgin/Makefile.am
+++ b/doc/reference/pidgin/Makefile.am
@@ -148,7 +148,7 @@ dist-hook: html-build.stamp
 if ENABLE_GTK_DOC
 TESTS_ENVIRONMENT = \
   DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \
-  SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir)
+  SRCDIR=$(abs_srcdir)
 #TODO: fix and enable
 #TESTS = $(GTKDOC_CHECK)
 endif
diff --git a/finch/Makefile.am b/finch/Makefile.am
--- a/finch/Makefile.am
+++ b/finch/Makefile.am
@@ -90,10 +90,6 @@ finch_LDADD = $(builddir)/libfinch.la $(
 
 AM_CPPFLAGS = \
 	-DSTANDALONE \
-	-DDATADIR=\"$(datadir)\" \
-	-DLIBDIR=\"$(libdir)/finch/\" \
-	-DLOCALEDIR=\"$(datadir)/locale\" \
-	-DSYSCONFDIR=\"$(sysconfdir)\" \
 	-I$(top_srcdir)/libpurple/ \
 	-I$(top_srcdir) \
 	-I$(srcdir)/libgnt/ \
diff --git a/finch/gntsound.c b/finch/gntsound.c
--- a/finch/gntsound.c
+++ b/finch/gntsound.c
@@ -608,8 +608,8 @@ finch_sound_play_event(PurpleSoundEventI
 		char *filename = g_strdup(purple_prefs_get_path(file_pref));
 		if (!filename || !strlen(filename)) {
 			g_free(filename);
-			/* XXX Consider creating a constant for "sounds/purple" to be shared with Pidgin */
-			filename = g_build_filename(DATADIR, "sounds", "purple", sounds[event].def, NULL);
+			filename = g_build_filename(PURPLE_DATADIR,
+				"sounds", "purple", sounds[event].def, NULL);
 		}
 
 		purple_sound_play_file(filename, NULL);
diff --git a/finch/libfinch.c b/finch/libfinch.c
--- a/finch/libfinch.c
+++ b/finch/libfinch.c
@@ -280,7 +280,7 @@ init_libpurple(int argc, char **argv)
 	};
 
 #ifdef ENABLE_NLS
-	bindtextdomain(PACKAGE, LOCALEDIR);
+	bindtextdomain(PACKAGE, PURPLE_LOCALEDIR);
 	bind_textdomain_codeset(PACKAGE, "UTF-8");
 	textdomain(PACKAGE);
 #endif
@@ -373,7 +373,7 @@ init_libpurple(int argc, char **argv)
 	purple_plugins_add_search_path(path);
 	g_free(path);
 
-	purple_plugins_add_search_path(LIBDIR);
+	purple_plugins_add_search_path(FINCH_LIBDIR);
 	purple_plugins_refresh();
 
 	/* TODO: should this be moved into finch_prefs_init() ? */
diff --git a/finch/libgnt/wms/Makefile.am b/finch/libgnt/wms/Makefile.am
--- a/finch/libgnt/wms/Makefile.am
+++ b/finch/libgnt/wms/Makefile.am
@@ -29,7 +29,6 @@ s_la_LIBADD =  \
 EXTRA_DIST = 
 
 AM_CPPFLAGS = \
-	-DDATADIR=\"$(datadir)\" \
 	-I$(top_srcdir)/libpurple \
 	-I$(top_srcdir)/finch \
 	-I$(top_srcdir)/finch/libgnt \
diff --git a/finch/plugins/Makefile.am b/finch/plugins/Makefile.am
--- a/finch/plugins/Makefile.am
+++ b/finch/plugins/Makefile.am
@@ -39,7 +39,6 @@ endif # PLUGINS
 EXTRA_DIST = pietray.py
 
 AM_CPPFLAGS = \
-	-DDATADIR=\"$(datadir)\" \
 	-I$(top_builddir)/libpurple \
 	-I$(top_srcdir)/libpurple \
 	-I$(top_srcdir) \
diff --git a/libpurple/Makefile.am b/libpurple/Makefile.am
--- a/libpurple/Makefile.am
+++ b/libpurple/Makefile.am
@@ -208,6 +208,18 @@ purple_coreheaders = \
 	xfer.h \
 	xmlnode.h
 
+if IS_WIN32
+purple_coresources += \
+	win32/giowin32.c \
+	win32/libc_interface.c \
+	win32/win32dep.c
+purple_coreheaders += \
+	win32/libc_interface.h \
+	win32/libc_internal.h \
+	win32/win32dep.h \
+	win32/wpurpleerror.h
+endif
+
 purple_mediaheaders = \
 	backend-iface.h \
 	candidate.h \
@@ -394,6 +406,7 @@ libpurple_la_LDFLAGS = -export-dynamic -
 libpurple_la_LIBADD = \
 	$(STATIC_LINK_LIBS) \
 	$(DBUS_LIBS) \
+	$(DNSAPI_LIBS) \
 	$(GLIB_LIBS) \
 	$(GPLUGIN_LIBS) \
 	$(LIBXML_LIBS) \
@@ -412,10 +425,6 @@ libpurple_la_LIBADD = \
 	-lm
 
 AM_CPPFLAGS = \
-	-DDATADIR=\"$(datadir)\" \
-	-DLIBDIR=\"$(libdir)/purple-$(PURPLE_MAJOR_VERSION)/\" \
-	-DLOCALEDIR=\"$(datadir)/locale\" \
-	-DSYSCONFDIR=\"$(sysconfdir)\" \
 	$(GLIB_CFLAGS) \
 	$(GPLUGIN_CFLAGS) \
 	$(DEBUG_CFLAGS) \
@@ -433,12 +442,6 @@ AM_CPPFLAGS = \
 	$(ZLIB_CFLAGS) \
 	$(INTROSPECTION_CFLAGS)
 
-# INSTALL_SSL_CERTIFICATES is true when SSL_CERTIFICATES_DIR is empty.
-# We want to use SSL_CERTIFICATES_DIR when it's not empty.
-if ! INSTALL_SSL_CERTIFICATES
-AM_CPPFLAGS += -DSSL_CERTIFICATES_DIR=\"$(SSL_CERTIFICATES_DIR)\"
-endif
-
 -include $(INTROSPECTION_MAKEFILE)
 INTROSPECTION_GIRS =
 INTROSPECTION_SCANNER_ARGS = --warn-all
diff --git a/libpurple/certificate.c b/libpurple/certificate.c
--- a/libpurple/certificate.c
+++ b/libpurple/certificate.c
@@ -918,15 +918,16 @@ x509_ca_init(void)
 {
 	/* Attempt to point at the appropriate system path */
 	if (NULL == x509_ca_paths) {
+#ifdef SSL_CERTIFICATES_DIR
+		x509_ca_paths = g_list_append(x509_ca_paths,
+			g_strdup(SSL_CERTIFICATES_DIR));
+#endif
 #ifdef _WIN32
-		x509_ca_paths = g_list_append(NULL, g_build_filename(DATADIR,
-						   "ca-certs", NULL));
+		x509_ca_paths = g_list_append(x509_ca_paths, g_build_filename(
+			PURPLE_DATADIR, "ca-certs", NULL));
 #else
-# ifdef SSL_CERTIFICATES_DIR
-		x509_ca_paths = g_list_append(NULL, g_strdup(SSL_CERTIFICATES_DIR));
-# endif
-		x509_ca_paths = g_list_append(x509_ca_paths,
-			g_build_filename(DATADIR, "purple", "ca-certs", NULL));
+		x509_ca_paths = g_list_append(x509_ca_paths, g_build_filename(
+			PURPLE_DATADIR, "purple", "ca-certs", NULL));
 #endif
 	}
 
diff --git a/libpurple/core.c b/libpurple/core.c
--- a/libpurple/core.c



More information about the Commits mailing list