/pidgin/main: e0826e3b631b: Merge 2.x.y

Tomasz Wasilczyk twasilczyk at pidgin.im
Mon Feb 17 10:43:22 EST 2014


Changeset: e0826e3b631b487231c3ca29a455283466961b44
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-02-17 16:43 +0100
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/e0826e3b631b

Description:

Merge 2.x.y

diffstat:

 .hgignore                                                                         |   1 +
 ChangeLog                                                                         |   3 +
 Makefile.am                                                                       |   5 +-
 configure.ac                                                                      |  24 ++-------
 finch/libgnt/gntwm.c                                                              |  17 ++++++-
 libpurple/protocols/zephyr/zephyr.c                                               |   1 -
 pidgin/win32/nsis/pidgin-installer.nsi                                            |   6 +-
 share/ca-certs/Makefile.am                                                        |   6 +-
 share/ca-certs/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G2.pem   |   0 
 share/ca-certs/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5_2.pem |   0 
 share/ca-certs/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5.pem   |   0 
 11 files changed, 35 insertions(+), 28 deletions(-)

diffs (172 lines):

diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -107,6 +107,7 @@ pidgin-*.*.*-win32-bin.zip$
 pidgin-*.*.*-win32bin$
 pidgin-.*.tar.bz2
 pidgin-.*.tar.gz
+pidgin-[0-9a-z.-]+/
 pidgin.apspec$
 pidgin.desktop$
 pidgin.desktop.in$
diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -64,6 +64,9 @@ version 3.0.0 (??/??/????):
 	* Ciphers are now built from the libpurple directory.
 	* Doxygen has been replaced by gtk-doc for generating documentation.
 
+	Finch:
+	* Fix build against Python 3. (Ed Catmur) (#15969)
+
 version 2.10.9 (2/2/2014):
 	XMPP:
 	* Fix problems logging into some servers including jabber.org and
diff --git a/Makefile.am b/Makefile.am
--- a/Makefile.am
+++ b/Makefile.am
@@ -122,9 +122,10 @@ SUBDIRS = . m4macros libpurple $(GNT_DIR
 
 # perl's MakeMaker uninstall foo doesn't work well with DESTDIR set, which
 # breaks "make distcheck" unless we ignore perl things
+# TODO drop it when we drop perl wrapper
 
 distuninstallcheck_listfiles = \
-	find . -type f -print | grep -v perl | grep -v Purple.3pm
+	find . -type f -print | grep -v perl | grep -v Purple.3pm | grep -v Pidgin.3pm
 
 DISTCLEANFILES= $(DESKTOP_FILE) libpurple/gconf/purple.schemas intltool-extract \
-			intltool-merge intltool-update
+			intltool-merge intltool-update package_revision_raw.txt
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -645,7 +645,7 @@ Use --disable-gtkspell if you do not nee
 		else
 			if test "x$force_deps" = "xyes" ; then
 				AC_MSG_ERROR([
-Evolution development headers not found.
+Evolution development headers not found (libebook, libedata-book, evolution-data-server >= 3.6).
 Use --disable-gevolution if you do not need it.
 ])
 			fi
@@ -1878,27 +1878,15 @@ dnl Check for Python headers (currently 
 dnl (Thanks to XChat)
 if test "x$enable_consoleui" = "xyes" -a ! -z "$PYTHON" -a x"$PYTHON" != x"no" ; then
 	AC_MSG_CHECKING(for Python compile flags)
-	PY_PREFIX=`$PYTHON -c 'import sys ; sys.stdout.write(sys.prefix)'`
-	PY_EXEC_PREFIX=`$PYTHON -c 'import sys ; sys.stdout.write(sys.exec_prefix)'`
-	changequote(<<, >>)dnl
-	PY_VERSION=`$PYTHON -c 'import sys ; sys.stdout.write(sys.version[0:3])'`
-	PY_MAJOR=`$PYTHON -c 'import sys ; sys.stdout.write(sys.version[0:2])'`
-	changequote([, ])dnl
-	if test -f $PY_PREFIX/include/python$PY_VERSION/Python.h; then
-		AC_MSG_RESULT()
-		AC_CHECK_LIB(pthread, pthread_create, )
-		AC_CHECK_LIB(util, openpty, )
-		AC_CHECK_LIB(db, dbopen, )
-		PY_LIBS="-L$PY_EXEC_PREFIX/lib/python$PY_VERSION/config -lpython$PY_VERSION"
-		PY_CFLAGS="-I$PY_PREFIX/include/python$PY_VERSION"
+	if test -f ${PYTHON}-config; then
+		PY_CFLAGS=`${PYTHON}-config --includes`
+		PY_LIBS=`${PYTHON}-config --libs`
 		AC_DEFINE(USE_PYTHON, [1], [Define if python headers are available.])
-		dnl Because the above AC_CHECK_LIB get in the way...
-		AC_MSG_CHECKING(for Python compile flags)
 		AC_MSG_RESULT(ok)
 	else
-		AC_MSG_RESULT([Can't find Python.h])
+		AC_MSG_RESULT([Cannot find ${PYTHON}-config])
+		PY_CFLAGS=""
 		PY_LIBS=""
-		PY_CFLAGS=""
 	fi
 fi
 AC_SUBST(PY_CFLAGS)
diff --git a/finch/libgnt/gntwm.c b/finch/libgnt/gntwm.c
--- a/finch/libgnt/gntwm.c
+++ b/finch/libgnt/gntwm.c
@@ -1277,7 +1277,12 @@ python_script_selected(GntFileSel *fs, c
 {
 	char *dir = g_path_get_dirname(path);
 	FILE *file = fopen(path, "r");
-	PyObject *pp = PySys_GetObject("path"), *dirobj = PyString_FromString(dir);
+	PyObject *pp = PySys_GetObject("path");
+#if PY_MAJOR_VERSION >= 3
+	PyObject *dirobj = PyUnicode_FromString(dir);
+#else
+	PyObject *dirobj = PyString_FromString(dir);
+#endif
 
 	PyList_Insert(pp, 0, dirobj);
 	Py_DECREF(dirobj);
@@ -1568,7 +1573,17 @@ gnt_wm_class_init(GntWMClass *klass)
 	gnt_bindable_class_register_action(GNT_BINDABLE_CLASS(klass), "run-python", run_python,
 				GNT_KEY_F3, NULL);
 	if (!Py_IsInitialized()) {
+#if PY_MAJOR_VERSION >= 3
+		wchar_t *name;
+		size_t len;
+		len = mbstowcs(NULL, "gnt", 0);
+		name = g_new(wchar_t, len + 1);
+		mbstowcs(name, "gnt", len + 1);
+		Py_SetProgramName(name);
+		g_free(name);
+#else
 		Py_SetProgramName("gnt");
+#endif
 		Py_Initialize();
 		started_python = TRUE;
 	}
diff --git a/libpurple/protocols/zephyr/zephyr.c b/libpurple/protocols/zephyr/zephyr.c
--- a/libpurple/protocols/zephyr/zephyr.c
+++ b/libpurple/protocols/zephyr/zephyr.c
@@ -838,7 +838,6 @@ static void handle_message(PurpleConnect
 		/* Need to deal with 0 length  messages to handle typing notification (OPCODE) ping messages */
 		/* One field zephyrs would have caused purple to crash */
 		if ( (notice.z_message_len == 0) || (signature_length >= notice.z_message_len - 1)) {
-			/* message has no body */
 			len = 0;
 			purple_debug_info("zephyr","message_size %d %d %d\n",len,notice.z_message_len,signature_length);
 			buf3 = g_strdup("");
diff --git a/pidgin/win32/nsis/pidgin-installer.nsi b/pidgin/win32/nsis/pidgin-installer.nsi
--- a/pidgin/win32/nsis/pidgin-installer.nsi
+++ b/pidgin/win32/nsis/pidgin-installer.nsi
@@ -554,9 +554,9 @@ Section Uninstall
     Delete "$INSTDIR\ca-certs\ValiCert_Class_2_VA.pem"
     Delete "$INSTDIR\ca-certs\VeriSign_Class3_Extended_Validation_CA.pem"
     Delete "$INSTDIR\ca-certs\Verisign_Class3_Primary_CA.pem"
-    Delete "$INSTDIR\ca-certs\VeriSign_Class_3_Public_Primary_Certification_Authority_-_G2.pem"
-    Delete "$INSTDIR\ca-certs\VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5.pem"
-    Delete "$INSTDIR\ca-certs\VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5_2.pem"
+    Delete "$INSTDIR\ca-certs\VeriSign_Class_3_Primary_CA-G2.pem"
+    Delete "$INSTDIR\ca-certs\VeriSign_Class_3_Primary_CA-G5.pem"
+    Delete "$INSTDIR\ca-certs\VeriSign_Class_3_Primary_CA-G5-2.pem"
     Delete "$INSTDIR\ca-certs\VeriSign_International_Server_Class_3_CA.pem"
     Delete "$INSTDIR\ca-certs\Verisign_RSA_Secure_Server_CA.pem"
     RMDir "$INSTDIR\ca-certs"
diff --git a/share/ca-certs/Makefile.am b/share/ca-certs/Makefile.am
--- a/share/ca-certs/Makefile.am
+++ b/share/ca-certs/Makefile.am
@@ -17,9 +17,9 @@ CERTIFICATES = \
 		Thawte_Primary_Root_CA.pem \
 		ValiCert_Class_2_VA.pem \
 		Verisign_Class3_Primary_CA.pem \
-		VeriSign_Class_3_Public_Primary_Certification_Authority_-_G2.pem \
-		VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5.pem \
-		VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5_2.pem
+		VeriSign_Class_3_Primary_CA-G2.pem \
+		VeriSign_Class_3_Primary_CA-G5.pem \
+		VeriSign_Class_3_Primary_CA-G5-2.pem
 
 # TODO: Microsoft_Secure_Server_Authority_2010.pem is going to expire
 # on 19-05-2014. After this date, remove it.
diff --git a/share/ca-certs/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G2.pem b/share/ca-certs/VeriSign_Class_3_Primary_CA-G2.pem
rename from share/ca-certs/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G2.pem
rename to share/ca-certs/VeriSign_Class_3_Primary_CA-G2.pem
diff --git a/share/ca-certs/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5_2.pem b/share/ca-certs/VeriSign_Class_3_Primary_CA-G5-2.pem
rename from share/ca-certs/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5_2.pem
rename to share/ca-certs/VeriSign_Class_3_Primary_CA-G5-2.pem
diff --git a/share/ca-certs/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5.pem b/share/ca-certs/VeriSign_Class_3_Primary_CA-G5.pem
rename from share/ca-certs/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5.pem
rename to share/ca-certs/VeriSign_Class_3_Primary_CA-G5.pem



More information about the Commits mailing list