/soc/2013/ankitkv/gobjectification: 5778e65626ca: Move ciphers b...

Ankit Vani a at nevitus.org
Tue Sep 24 08:35:08 EDT 2013


Changeset: 5778e65626ca2b78395137e1e84230002c5598ed
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-09-24 17:53 +0530
Branch:	 soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/5778e65626ca

Description:

Move ciphers build to libpurple's Makefile

diffstat:

 ChangeLog                     |   1 +
 configure.ac                  |   1 -
 libpurple/Makefile.am         |  48 +++++++++++++++++++++++++++++++++++++-----
 libpurple/ciphers/Makefile.am |  29 -------------------------
 4 files changed, 43 insertions(+), 36 deletions(-)

diffs (168 lines):

diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -60,6 +60,7 @@ version 3.0.0 (??/??/????):
 	General:
 	* Add support for Python3 in build scripts. (Ashish Gupta) (#15624)
 	* Various core components of libpurple are now GObjects.
+	* Ciphers are now built from the libpurple directory.
 
 	Windows-Specific Changes:
 	* Updates to dependencies:
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -2868,7 +2868,6 @@ AC_CONFIG_FILES([Makefile
 		   pidgin/plugins/perl/common/Makefile.PL
 		   pidgin/plugins/ticker/Makefile
 		   pidgin/themes/Makefile
-		   libpurple/ciphers/Makefile
 		   libpurple/example/Makefile
 		   libpurple/gconf/Makefile
 		   libpurple/purple-3.pc
diff --git a/libpurple/Makefile.am b/libpurple/Makefile.am
--- a/libpurple/Makefile.am
+++ b/libpurple/Makefile.am
@@ -34,7 +34,16 @@ endif
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = purple-3.pc
 
-SUBDIRS = $(GCONF_DIR) plugins protocols ciphers . tests example
+SUBDIRS = $(GCONF_DIR) plugins protocols . tests example
+
+if USE_NSS
+AES_SOURCE = ciphers/aescipher.c
+AES_HEADER = aescipher.h
+endif
+if USE_GNUTLS
+AES_SOURCE = ciphers/aescipher.c
+AES_HEADER = aescipher.h
+endif
 
 purple_coresources = \
 	account.c \
@@ -45,6 +54,16 @@ purple_coresources = \
 	buddylist.c \
 	buddyicon.c \
 	certificate.c \
+	$(AES_SOURCE) \
+	ciphers/descipher.c \
+	ciphers/des3cipher.c \
+	ciphers/hmaccipher.c \
+	ciphers/md4hash.c \
+	ciphers/md5hash.c \
+	ciphers/pbkdf2cipher.c \
+	ciphers/rc4cipher.c \
+	ciphers/sha1hash.c \
+	ciphers/sha256hash.c \
 	cipher.c \
 	circularbuffer.c \
 	cmds.c \
@@ -184,6 +203,18 @@ purple_mediaheaders = \
 	codec.h \
 	enum-types.h
 
+purple_cipherheaders = \
+	$(AES_HEADER) \
+	descipher.h \
+	des3cipher.h \
+	hmaccipher.h \
+	md4hash.h \
+	md5hash.h \
+	pbkdf2cipher.h \
+	rc4cipher.h \
+	sha1hash.h \
+	sha256hash.h
+
 purple_builtheaders = purple.h version.h enums.h marshallers.h
 
 purple_enumheaders = \
@@ -240,6 +271,7 @@ dbus_exported = dbus-useful.h dbus-defin
                 server.h util.h xmlnode.h prpl.h
 
 purple_build_coreheaders = $(addprefix $(srcdir)/, $(purple_coreheaders)) \
+		$(addprefix $(srcdir)/ciphers/, $(purple_cipherheaders)) \
 		$(addprefix $(srcdir)/media/, $(purple_mediaheaders)) \
 		$(purple_builtheaders)
 dbus_build_exported = $(addprefix $(srcdir)/, $(dbus_exported))
@@ -275,7 +307,7 @@ libpurple_client_la_LIBADD = $(DBUS_LIBS
 purple-client-bindings.c: dbus-analyze-functions.py $(dbus_exported)
 	$(AM_V_GEN)cat $(dbus_build_exported) | $(PYTHON) $(srcdir)/dbus-analyze-functions.py --client > $@
 
-purple-client-bindings.h: dbus-analyze-types.py dbus-analyze-functions.py $(purple_coreheaders) $(addprefix media/, $(purple_mediaheaders)) $(purple_builtheaders) $(dbus_exported)
+purple-client-bindings.h: dbus-analyze-types.py dbus-analyze-functions.py $(purple_coreheaders) $(addprefix ciphers/, $(purple_cipherheaders)) $(addprefix media/, $(purple_mediaheaders)) $(purple_builtheaders) $(dbus_exported)
 	$(AM_V_GEN)cat $(purple_build_coreheaders) | $(PYTHON) $(srcdir)/dbus-analyze-types.py --keyword=enum --verbatim > $@
 	$(AM_V_at)cat $(dbus_build_exported) | $(PYTHON) $(srcdir)/dbus-analyze-functions.py --client --headers >> $@
 
@@ -333,13 +365,16 @@ libpurpleinclude_HEADERS = \
 	$(purple_builtheaders) \
 	$(dbus_headers)
 
+cipherincludedir=$(includedir)/libpurple/ciphers
+cipherinclude_HEADERS = \
+	$(addprefix $(srcdir)/ciphers/, $(purple_cipherheaders))
+
 mediaincludedir=$(includedir)/libpurple/media
 mediainclude_HEADERS = \
 	$(addprefix $(srcdir)/media/, $(purple_mediaheaders))
 
 libpurple_la_DEPENDENCIES = \
-	$(STATIC_LINK_LIBS) \
-	ciphers/libpurple-ciphers.la
+	$(STATIC_LINK_LIBS)
 
 libpurple_la_LDFLAGS = -export-dynamic -version-info $(PURPLE_LT_VERSION_INFO) -no-undefined
 libpurple_la_LIBADD = \
@@ -357,7 +392,6 @@ libpurple_la_LIBADD = \
 	$(JSON_LIBS) \
 	$(GNUTLS_LIBS) \
 	$(NSS_LIBS) \
-	ciphers/libpurple-ciphers.la \
 	-lm
 
 AM_CPPFLAGS = \
@@ -375,7 +409,9 @@ AM_CPPFLAGS = \
 	$(GSTINTERFACES_CFLAGS) \
 	$(IDN_CFLAGS) \
 	$(NETWORKMANAGER_CFLAGS) \
-	$(JSON_CFLAGS)
+	$(JSON_CFLAGS) \
+	$(GNUTLS_CFLAGS) \
+	$(NSS_CFLAGS)
 
 # INSTALL_SSL_CERTIFICATES is true when SSL_CERTIFICATES_DIR is empty.
 # We want to use SSL_CERTIFICATES_DIR when it's not empty.
diff --git a/libpurple/ciphers/Makefile.am b/libpurple/ciphers/Makefile.am
deleted file mode 100644
--- a/libpurple/ciphers/Makefile.am
+++ /dev/null
@@ -1,29 +0,0 @@
-noinst_LTLIBRARIES=libpurple-ciphers.la
-
-if USE_NSS
-AES_SOURCE = aescipher.c
-endif
-if USE_GNUTLS
-AES_SOURCE = aescipher.c
-endif
-
-libpurple_ciphers_la_SOURCES=\
-	$(AES_SOURCE) \
-	descipher.c \
-	des3cipher.c \
-	hmaccipher.c \
-	md4hash.c \
-	md5hash.c \
-	pbkdf2cipher.c \
-	rc4cipher.c \
-	sha1hash.c \
-	sha256hash.c
-
-AM_CPPFLAGS = \
-	-I$(top_srcdir)/libpurple \
-	$(INTGG_CFLAGS) \
-	$(AM_CFLAGS) \
-	$(GLIB_CFLAGS) \
-	$(DEBUG_CFLAGS) \
-	$(GNUTLS_CFLAGS) \
-	$(NSS_CFLAGS)



More information about the Commits mailing list