/pidgin/main: e0a388ced476: win32: enable GnuTLS, this also enab...

Tomasz Wasilczyk tomkiewicz at cpw.pidgin.im
Sat May 18 14:49:37 EDT 2013


Changeset: e0a388ced47695b099e96d9e386b86adee801eea
Author:	 Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date:	 2013-05-18 20:49 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/e0a388ced476

Description:

win32: enable GnuTLS, this also enables ssl support for gg prpl

diffstat:

 config.h.mingw                        |   7 ++++---
 libpurple/plugins/ssl/Makefile.mingw  |  25 ++++++++++++++++++-------
 libpurple/protocols/gg/Makefile.mingw |  10 +++++++---
 libpurple/win32/global.mak            |   1 +
 pidgin/win32/nsis/generate_gtk_zip.sh |   7 +++++--
 pidgin/win32/prepare-workspace.sh     |   3 +++
 6 files changed, 38 insertions(+), 15 deletions(-)

diffs (190 lines):

diff --git a/config.h.mingw b/config.h.mingw
--- a/config.h.mingw
+++ b/config.h.mingw
@@ -29,7 +29,8 @@
 /* #undef HAVE_CONNECT */
 
 /* Define to 1 if Cyrus SASL is present */
-#define HAVE_CYRUS_SASL 1
+/* It's defined in global.mak. */
+/* #undef HAVE_CYRUS_SASL */
 
 /* Define if you have the external 'daylight' variable. */
 #define HAVE_DAYLIGHT 1
@@ -75,10 +76,10 @@
 /* #define HAVE_GETTEXT 1 */
 
 /* Define if you have GNUTLS */
-/* #define HAVE_GNUTLS 1 */
+#define HAVE_GNUTLS 1
 
 /* Define to 1 if you have the <gnutls/gnutls.h> header file. */
-/* #define HAVE_GNUTLS_GNUTLS_H 1 */
+#define HAVE_GNUTLS_GNUTLS_H 1
 
 /* Define if <inttypes.h> exists and doesn't clash with <sys/types.h>. */
 #define HAVE_INTTYPES_H 1
diff --git a/libpurple/plugins/ssl/Makefile.mingw b/libpurple/plugins/ssl/Makefile.mingw
--- a/libpurple/plugins/ssl/Makefile.mingw
+++ b/libpurple/plugins/ssl/Makefile.mingw
@@ -12,6 +12,7 @@ include $(PIDGIN_TREE_TOP)/libpurple/win
 ##
 TARGET = ssl
 TARGET_NSS = ssl-nss
+TARGET_GNUTLS = ssl-gnutls
 
 ##
 ## INCLUDE PATHS
@@ -24,19 +25,24 @@ INCLUDE_PATHS +=	-I. \
 			-I$(PURPLE_TOP)/win32 \
 			-I$(PIDGIN_TREE_TOP) \
 			-I$(NSS_TOP)/include/nspr4 \
-			-I$(NSS_TOP)/include/nss3
+			-I$(NSS_TOP)/include/nss3 \
+			-I$(GNUTLS_TOP)/include
 
-LIB_PATHS +=		-L$(GTK_TOP)/lib \
+LIB_PATHS += \
+			-L$(GTK_TOP)/lib \
 			-L$(PURPLE_TOP) \
-			-L$(NSS_TOP)/lib
+			-L$(NSS_TOP)/lib \
+			-L$(GNUTLS_TOP)/lib
 
 ##
 ##  SOURCES, OBJECTS
 ##
 C_SRC =			ssl.c
 C_SRC_NSS =		ssl-nss.c
+C_SRC_GNUTLS =	ssl-gnutls.c
 OBJECTS = $(C_SRC:%.c=%.o)
 OBJECTS_NSS = $(C_SRC_NSS:%.c=%.o)
+OBJECTS_GNUTLS = $(C_SRC_GNUTLS:%.c=%.o)
 
 ##
 ## LIBRARIES
@@ -49,7 +55,8 @@ LIBS =	\
 			-lnss3 \
 			-lnspr4 \
 			-lssl3 \
-			-lsmime3
+			-lsmime3 \
+			-lgnutls
 
 include $(PIDGIN_COMMON_RULES)
 
@@ -58,13 +65,14 @@ include $(PIDGIN_COMMON_RULES)
 ##
 .PHONY: all install clean
 
-all: $(TARGET).dll $(TARGET_NSS).dll
+all: $(TARGET).dll $(TARGET_NSS).dll $(TARGET_GNUTLS).dll
 
 install: all $(PURPLE_INSTALL_PLUGINS_DIR) $(PURPLE_INSTALL_DIR)
 	cp $(TARGET).dll $(PURPLE_INSTALL_PLUGINS_DIR)
 	cp $(TARGET_NSS).dll $(PURPLE_INSTALL_PLUGINS_DIR)
+	cp $(TARGET_GNUTLS).dll $(PURPLE_INSTALL_PLUGINS_DIR)
 
-$(OBJECTS) $(OBJECTS_NSS): $(PURPLE_CONFIG_H)
+$(OBJECTS) $(OBJECTS_NSS) $(OBJECTS_GNUTLS): $(PURPLE_CONFIG_H)
 
 ##
 ## BUILD DLL
@@ -75,10 +83,13 @@ install: all $(PURPLE_INSTALL_PLUGINS_DI
 $(TARGET_NSS).dll: $(PURPLE_DLL) $(OBJECTS_NSS)
 	$(CC) -shared $(OBJECTS_NSS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $(TARGET_NSS).dll
 
+$(TARGET_GNUTLS).dll: $(PURPLE_DLL) $(OBJECTS_GNUTLS)
+	$(CC) -shared $(OBJECTS_GNUTLS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $(TARGET_GNUTLS).dll
+
 ##
 ## CLEAN RULES
 ##
 clean:
-	rm -f $(OBJECTS) $(OBJECTS_NSS) $(TARGET).dll $(TARGET_NSS).dll
+	rm -f $(OBJECTS) $(OBJECTS_NSS) $(TARGET).dll $(TARGET_NSS).dll $(TARGET_GNUTLS).dll
 
 include $(PIDGIN_COMMON_TARGETS)
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
@@ -31,10 +31,13 @@ INCLUDE_PATHS +=\
 			-I./lib \
 			-I$(GTK_TOP)/include \
 			-I$(GTK_TOP)/include/glib-2.0 \
-			-I$(GTK_TOP)/lib/glib-2.0/include
+			-I$(GTK_TOP)/lib/glib-2.0/include \
+			-I$(GNUTLS_TOP)/include
 
-LIB_PATHS +=		-L$(GTK_TOP)/lib \
-			-L$(PURPLE_TOP) \
+LIB_PATHS += \
+			-L$(GTK_TOP)/lib \
+			-L$(GNUTLS_TOP)/lib \
+			-L$(PURPLE_TOP)
 
 ##
 ##  SOURCES, OBJECTS
@@ -86,6 +89,7 @@ OBJECTS = $(C_SRC:%.c=%.o)
 ##
 LIBS =	\
 			-lglib-2.0 \
+			-lgnutls \
 			-lintl \
 			-lpurple \
 			-lws2_32 \
diff --git a/libpurple/win32/global.mak b/libpurple/win32/global.mak
--- a/libpurple/win32/global.mak
+++ b/libpurple/win32/global.mak
@@ -12,6 +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
 GTK_TOP ?= $(WIN32_DEV_TOP)/gtk2-2.24
 GTK_BIN ?= $(GTK_TOP)/bin
 BONJOUR_TOP ?= $(WIN32_DEV_TOP)/bonjour-sdk
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
@@ -18,7 +18,7 @@ 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="f9945cbdcd591eed7af569d2c4ac806fe27ea97a"
+BUNDLE_SHA1SUM="dfbefd657bd9040dab4e02b93e1c656e791da8b4"
 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"
@@ -87,6 +87,9 @@ FREETYPE="${DOWNLOAD_HOST}mingw32-freety
 GDK_PIXBUF="${DOWNLOAD_HOST}mingw32-gdk-pixbuf-2.28.0-1.2.noarch.rpm gdk-pixbuf 2.28.0-1.2 sha1sum:8673e06c3a838e47a093043bf86bb62ea3627fe0"
 GEOCLUE="${DOWNLOAD_HOST}mingw32-libgeoclue-0.12.99-1.10.noarch.rpm Geoclue 0.12.99-1.10 sha1sum:84410ca9a6d2fac46217c51e22ebbc5ac3cae040"
 GLIB="${DOWNLOAD_HOST}mingw32-glib2-2.36.1-1.1.noarch.rpm Glib 2.36.1-1.1 sha1sum:ed468f064f61c5a12b716c83cba8ccbe05d22992"
+GNUTLS="${DOWNLOAD_HOST}mingw32-libgnutls-2.12.22-2.2.noarch.rpm GnuTLS 2.12.22-2.2 sha1sum:ee65a8971582f55aa469dbce82eb180fb1b35705"
+GNUTLS_GCRYPT="${DOWNLOAD_HOST}mingw32-libgcrypt-1.5.2-1.1.noarch.rpm libgcrypt 1.5.2-1.1 sha1sum:861335a6edaa8419bc8f2d4ba6104c8da197e8e2"
+GNUTLS_GPGERR="${DOWNLOAD_HOST}mingw32-libgpg-error-1.10-1.6.noarch.rpm gpg-error 1.10-1.6 sha1sum:51a649ee41167ed3fafd243f8ded5d30b53f213d"
 GST="${DOWNLOAD_HOST}mingw32-libgstreamer-0.10.35-1.10.noarch.rpm GStreamer 0.10.35-1.10 sha1sum:7097499f3a34b42c25a200fa18f5df6f3f3ba527"
 GST_INT="${DOWNLOAD_HOST}mingw32-libgstinterfaces-0.10.32-5.10.noarch.rpm GStreamer-interfaces 0.10.32-5.10 sha1sum:29cfb0668a2e54287ea969eab1a4f3672a09c04a"
 GTK2="${DOWNLOAD_HOST}mingw32-gtk2-2.24.14-2.7.noarch.rpm GTK+ 2.24.14-2.7 sha1sum:a6f98a0c974c0273127c6423d89fca5f48c7d30c"
@@ -122,7 +125,7 @@ TK="${DOWNLOAD_HOST}mingw32-tk-8.5.9-8.7
 WEBKITGTK="${DOWNLOAD_HOST}mingw32-libwebkitgtk-1.10.2-9.2.noarch.rpm WebKitGTK+ 1.10.2-9.2 sha1sum:010dbad413f824696cd1e32fe70046c9a1cb425f"
 ZLIB="${DOWNLOAD_HOST}mingw32-zlib-1.2.7-1.4.noarch.rpm zlib 1.2.7-1.4 sha1sum:83e91f3b4d14e47131ca33fc69e12b82aabdd589"
 
-ALL="ATK CAIRO2 DBUS DBUS_GLIB ENCHANT FONTCONFIG FREETYPE GDK_PIXBUF GEOCLUE GLIB GST GST_INT GTK2 GTKSPELL LIBFFI LIBGCC LIBGNURX LIBHB LIBJASPER LIBICU LIBINTL LIBJPEG LIBJSON LIBLZMA LIBPNG LIBSILC LIBSILCCL LIBSOUP LIBSSP LIBSTDCPP LIBTIFF LIBXML LIBXSLT MEANW MOZNSS MOZNSPR PANGO PIXMAN PTHREADS SQLITE TCL TK WEBKITGTK ZLIB"
+ALL="ATK CAIRO2 DBUS DBUS_GLIB ENCHANT FONTCONFIG FREETYPE GDK_PIXBUF GEOCLUE GLIB GNUTLS GNUTLS_GCRYPT GNUTLS_GPGERR GST GST_INT GTK2 GTKSPELL LIBFFI LIBGCC LIBGNURX LIBHB LIBJASPER LIBICU LIBINTL LIBJPEG LIBJSON LIBLZMA LIBPNG LIBSILC LIBSILCCL LIBSOUP LIBSSP LIBSTDCPP LIBTIFF LIBXML LIBXSLT MEANW MOZNSS MOZNSPR PANGO PIXMAN PTHREADS SQLITE TCL TK WEBKITGTK ZLIB"
 
 mkdir -p $STAGE_DIR
 cd $STAGE_DIR
diff --git a/pidgin/win32/prepare-workspace.sh b/pidgin/win32/prepare-workspace.sh
--- a/pidgin/win32/prepare-workspace.sh
+++ b/pidgin/win32/prepare-workspace.sh
@@ -32,6 +32,9 @@ ARCHIVES+="ARC_NSS "
 ARC_NSP="${DOWNLOAD_HOST}mingw32-mozilla-nspr-devel-4.9.6-4.1.noarch.rpm;NSPR;4.9.6-4.1;b15aefbf99ade3042d0e4ed32f9368ff38064ecd;${OBS_SKIP};nss-3.14"
 ARCHIVES+="ARC_NSP "
 
+ARC_GTLS="${DOWNLOAD_HOST}mingw32-libgnutls-devel-2.12.22-2.2.noarch.rpm;GnuTLS;2.12.22-2.2;22ae0425842b2c905bdbb93e8e5f3f813db4680f;${OBS_SKIP};gnutls-2.12"
+ARCHIVES+="ARC_GTLS "
+
 ARC_PID="${DOWNLOAD_HOST}pidgin-inst-deps-20130214.tar.gz;inst-deps;20130214;372218ab472c4070cd45489dae175dea5638cf17;;"
 ARCHIVES+="ARC_PID "
 



More information about the Commits mailing list