diff options
author | Elliott Sales de Andrade <qulogic@pidgin.im> | 2017-06-29 22:24:53 -0400 |
---|---|---|
committer | Elliott Sales de Andrade <qulogic@pidgin.im> | 2017-06-29 22:24:53 -0400 |
commit | e45525d9c94a0f83bf21ba6cc5cf7957195cf5c6 (patch) | |
tree | d8df484e741bc91f9f64d95a551b00fb8cfe04ee | |
parent | b632b2f3c368887dc296fe47652d42870f81c8c0 (diff) | |
download | pidgin-e45525d9c94a0f83bf21ba6cc5cf7957195cf5c6.tar.gz |
Switch GnuTLS/NSS for Nettle in Meson build.
-rw-r--r-- | libpurple/meson.build | 30 | ||||
-rw-r--r-- | libpurple/plugins/keyrings/meson.build | 10 | ||||
-rw-r--r-- | libpurple/plugins/meson.build | 8 | ||||
-rw-r--r-- | libpurple/protocols/simple/meson.build | 4 | ||||
-rw-r--r-- | libpurple/tests/meson.build | 10 | ||||
-rw-r--r-- | meson.build | 100 | ||||
-rw-r--r-- | meson_options.txt | 6 |
7 files changed, 43 insertions, 125 deletions
diff --git a/libpurple/meson.build b/libpurple/meson.build index b28d369fe7..add210dee0 100644 --- a/libpurple/meson.build +++ b/libpurple/meson.build @@ -7,13 +7,6 @@ purple_coresources = [ 'buddylist.c', 'buddyicon.c', 'chat.c', - 'ciphers/aescipher.c', - 'ciphers/descipher.c', - 'ciphers/des3cipher.c', - 'ciphers/md4hash.c', - 'ciphers/pbkdf2cipher.c', - 'ciphers/rc4cipher.c', - 'cipher.c', 'circularbuffer.c', 'cmds.c', 'connection.c', @@ -97,7 +90,6 @@ purple_coreheaders = [ 'buddylist.h', 'buddyicon.h', 'chat.h', - 'cipher.h', 'circularbuffer.h', 'cmds.h', 'connection.h', @@ -199,19 +191,9 @@ purple_mediaheaders = [ 'media/enum-types.h' ] -purple_cipherheaders = [ - 'ciphers/aescipher.h', - 'ciphers/descipher.h', - 'ciphers/des3cipher.h', - 'ciphers/md4hash.h', - 'ciphers/pbkdf2cipher.h', - 'ciphers/rc4cipher.h', -] - purple_enumheaders = [ 'account.h', 'buddyicon.h', - 'cipher.h', 'connection.h', 'conversation.h', 'conversationtypes.h', @@ -305,7 +287,7 @@ dbus_exported = [ 'protocols.h' ] -purple_build_coreheaders = purple_coreheaders + purple_cipherheaders + purple_mediaheaders +purple_build_coreheaders = purple_coreheaders + purple_mediaheaders purple_build_coreheaders += purple_builtheaders @@ -411,8 +393,8 @@ libpurple = library('purple', dependencies : # static_link_libs [dbus, dbus_glib, dnsapi, ws2_32, glib, gio, gplugin, libxml, farstream, gstreamer, gstreamer_video, - gstreamer_app, idn, json, gnutls, - nss, zlib, math]) + gstreamer_app, idn, json, + zlib, math]) libpurple_dep = declare_dependency( sources : purple_builtheaders, # Ensure built before any dependencies. include_directories : [toplevel_inc, libpurple_inc], @@ -434,9 +416,6 @@ endif install_headers(purple_coreheaders + dbus_headers, subdir : 'libpurple') -install_headers(purple_cipherheaders, - subdir : 'libpurple/ciphers') - install_headers(purple_mediaheaders, subdir : 'libpurple/media') @@ -464,8 +443,7 @@ endif # INSTALL_I18N if enable_introspection introspection_sources = (purple_coreheaders + purple_builtheaders + - dbus_headers + purple_cipherheaders + - purple_mediaheaders) + dbus_headers + purple_mediaheaders) Purple_gir_includes = ['GObject-2.0', 'Gio-2.0'] if PLUGINS diff --git a/libpurple/plugins/keyrings/meson.build b/libpurple/plugins/keyrings/meson.build index fe626a37bc..afcd91ab50 100644 --- a/libpurple/plugins/keyrings/meson.build +++ b/libpurple/plugins/keyrings/meson.build @@ -1,8 +1,10 @@ if PLUGINS - internalkeyring_plugin = library('internalkeyring', 'internalkeyring.c', - dependencies : [libpurple_dep], - name_prefix : '', - install : true, install_dir : PURPLE_PLUGINDIR) + if enable_nettle + internalkeyring_plugin = library('internalkeyring', 'internalkeyring.c', + dependencies : [nettle, libpurple_dep], + name_prefix : '', + install : true, install_dir : PURPLE_PLUGINDIR) + endif if enable_secret_service secretsservice_plugin = library('secretservice', 'secretservice.c', diff --git a/libpurple/plugins/meson.build b/libpurple/plugins/meson.build index bae393139e..7e5294aace 100644 --- a/libpurple/plugins/meson.build +++ b/libpurple/plugins/meson.build @@ -11,14 +11,6 @@ if PLUGINS name_prefix : '', install : true, install_dir : PURPLE_PLUGINDIR) - caesarcipher = library('caesarcipher', 'caesarcipher.c', 'caesarcipher.h', - dependencies : [libpurple_dep], - name_prefix : '') - - caesarcipher_consumer = shared_module('caesarcipher_consumer', 'caesarcipher_consumer.c', - dependencies : [libpurple_dep], - name_prefix : '') - codeinline = library('codeinline', 'codeinline.c', dependencies : [libpurple_dep], name_prefix : '') diff --git a/libpurple/protocols/simple/meson.build b/libpurple/protocols/simple/meson.build index 887c8e5495..f0ee8b64c3 100644 --- a/libpurple/protocols/simple/meson.build +++ b/libpurple/protocols/simple/meson.build @@ -10,9 +10,9 @@ SIMPLESOURCES = [ if STATIC_SIMPLE simple_prpl = static_library('simple', SIMPLESOURCES, c_args : '-DPURPLE_STATIC_PRPL', - dependencies : [libpurple_dep, glib, gio]) + dependencies : [libpurple_dep, nettle, glib, gio]) elif DYNAMIC_SIMPLE simple_prpl = shared_library('simple', SIMPLESOURCES, - dependencies : [libpurple_dep, glib, gio], + dependencies : [libpurple_dep, nettle, glib, gio], install : true, install_dir : PURPLE_PLUGINDIR) endif diff --git a/libpurple/tests/meson.build b/libpurple/tests/meson.build index 1f3f6f4c78..2b09fa18e9 100644 --- a/libpurple/tests/meson.build +++ b/libpurple/tests/meson.build @@ -1,4 +1,12 @@ -foreach prog : ['des', 'des3', 'image', 'md4', 'smiley', 'smiley_list', 'trie', 'util', 'xmlnode'] +PROGS = [ + 'image', + 'smiley', + 'smiley_list', + 'trie', + 'util', + 'xmlnode' +] +foreach prog : PROGS e = executable('test_' + prog, 'test_@0@.c'.format(prog), c_args : [ '-DTEST_DATA_DIR="@0@/data"'.format(meson.current_source_dir()) diff --git a/meson.build b/meson.build index 00b8cb0835..1b48976fde 100644 --- a/meson.build +++ b/meson.build @@ -1267,85 +1267,6 @@ if SSL_CERTIFICATES_DIR != '' endif INSTALL_SSL_CERTIFICATES = SSL_CERTIFICATES_DIR == '' -enable_gnutls = get_option('gnutls') -have_gnutls = false -enable_nss = get_option('nss') -have_nss = false - -msg_ssl = 'None. Novell Groupwise and Google Talk will not work without GnuTLS or NSS. OpenSSL is NOT usable!' -msg_gnutls = '' -msg_nss = '' - -# -# Check for GnuTLS if it isn't disabled -# -looked_for_gnutls = false -if enable_gnutls - looked_for_gnutls = true - - # minimum required version should almost certainly be higher - gnutls = dependency('gnutls', version : '>= 2.10', required : false) - have_gnutls = gnutls.found() - if have_gnutls - conf.set('HAVE_GNUTLS', true) - msg_gnutls = 'GnuTLS' - endif -else - gnutls = [] -endif - -# -# Check for NSS if it isn't disabled -# -looked_for_nss = false -if enable_nss - looked_for_nss = true - - # TODO: set required minimum version - nss = dependency('mozilla-nss', required : false) - if nss.found() - have_nss = true - else - # TODO: set required minimum version - nss = dependency('nss', required : false) - have_nss = nss.found() - endif - - if have_nss - conf.set('HAVE_NSS', true) - msg_nss = 'Mozilla NSS' - endif -else - nss = [] -endif - - -if msg_nss != '' and msg_gnutls != '' - msg_ssl = msg_nss + ' and ' + msg_gnutls -elif msg_nss != '' - msg_ssl = msg_nss -elif msg_gnutls != '' - msg_ssl = msg_gnutls -elif looked_for_gnutls and looked_for_nss and force_deps - error(''' -Neither GnuTLS or NSS SSL development headers found. -Use -Dnss=false -Dgnutls=false if you do not need SSL support. -Novell Groupwise and Google Talk will not work without GnuTLS or NSS. OpenSSL is NOT usable! -''') -elif looked_for_gnutls and force_deps - error(''' -GnuTLS SSL development headers not found. -Use -Dgnutls=false if you do not need SSL support. -Novell Groupwise and Google Talk will not work without SSL support. -''') -elif looked_for_nss and force_deps - error(''' -NSS SSL development headers not found. -Use -Dnss=false if you do not need SSL support. -Novell Groupwise and Google Talk will not work without SSL support. -''') -endif - if get_option('plugins') conf.set('PURPLE_PLUGINS', 1) PLUGINS = true @@ -1356,6 +1277,25 @@ else endif ####################################################################### +# Check for Nettle (Crypto Library) +####################################################################### + +enable_nettle = get_option('nettle') + +if enable_nettle + nettle = dependency('nettle', version : '>= 3.0') + enable_nettle = nettle.found() + conf.set('HAVE_NETTLE', enable_nettle) + + if not enable_nettle and force_deps + error(''' +Nettle development headers not found +Use -Dnettle=false if you do not need it. +''') + endif +endif + +####################################################################### # Check for Cyrus-SASL (for xmpp/irc) ####################################################################### foreach func : ['snprintf', 'connect'] @@ -1513,10 +1453,10 @@ message('Build with GStreamer support.. : ' + enable_gst.to_string()) message('Build with D-Bus support...... : ' + enable_dbus.to_string()) message('Build with voice and video.... : ' + enable_vv.to_string()) message('Build with GNU Libidn......... : ' + get_option('idn').to_string()) -message('SSL Library/Libraries......... : ' + msg_ssl) if SSL_CERTIFICATES_DIR != '' message('SSL CA certificates directory. : ' + SSL_CERTIFICATES_DIR) endif +message('Build with Nettle support..... : ' + enable_nettle.to_string()) message('Build with Cyrus SASL support. : ' + enable_cyrus_sasl.to_string()) message('Use kerberos 4 with zephyr.... : ' + kerberos.to_string()) message('Use external libzephyr........ : ' + zephyr.to_string()) diff --git a/meson_options.txt b/meson_options.txt index 38cdf9205e..221e34f6f7 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -109,10 +109,8 @@ option('kwallet', type : 'boolean', value : true, option('system-ssl-certs', type : 'string', description : 'directory containing system-wide SSL CA certificates') -option('gnutls', type : 'boolean', value : true, - description : 'attempt to use GnuTLS for SSL support') -option('nss', type : 'boolean', value : true, - description : 'attempt to use Mozilla libnss for SSL support') +option('nettle', type : 'boolean', value : true, + description : 'enable Nettle support') option('cyrus-sasl', type : 'boolean', value : false, description : 'enable Cyrus SASL support for XMPP/IRC') |