diff options
author | Gary Kramlich <grim@reaperworld.com> | 2018-12-28 23:34:00 +0000 |
---|---|---|
committer | Gary Kramlich <grim@reaperworld.com> | 2018-12-28 23:34:00 +0000 |
commit | 317122dac0865ece3b58867f950467f79c424525 (patch) | |
tree | 3604d73bc2ba7f93eb8b2cb180a5ccd9f687d166 | |
parent | 4b18859ffb4437b6a5d50236ed275c29ab13a78c (diff) | |
parent | 99389efe83c566166cc5e876eca5e3873368c6e8 (diff) | |
download | pidgin-317122dac0865ece3b58867f950467f79c424525.tar.gz |
Merged in default (pull request #448)
Drop static plugin build support
Approved-by: Elliott Sales de Andrade
Approved-by: Gary Kramlich
Approved-by: Eion Robb
-rw-r--r-- | libpurple/core.c | 7 | ||||
-rw-r--r-- | libpurple/plugins.h | 80 | ||||
-rw-r--r-- | libpurple/protocols/bonjour/meson.build | 7 | ||||
-rw-r--r-- | libpurple/protocols/facebook/meson.build | 6 | ||||
-rw-r--r-- | libpurple/protocols/gg/meson.build | 6 | ||||
-rw-r--r-- | libpurple/protocols/irc/meson.build | 6 | ||||
-rw-r--r-- | libpurple/protocols/jabber/meson.build | 7 | ||||
-rw-r--r-- | libpurple/protocols/novell/meson.build | 6 | ||||
-rw-r--r-- | libpurple/protocols/oscar/meson.build | 7 | ||||
-rw-r--r-- | libpurple/protocols/sametime/meson.build | 6 | ||||
-rw-r--r-- | libpurple/protocols/silc/meson.build | 6 | ||||
-rw-r--r-- | libpurple/protocols/simple/meson.build | 6 | ||||
-rw-r--r-- | libpurple/protocols/zephyr/meson.build | 6 | ||||
-rw-r--r-- | meson.build | 63 | ||||
-rw-r--r-- | meson_options.txt | 3 | ||||
-rw-r--r-- | pidgin/plugins/ticker/gtkticker.h | 2 |
16 files changed, 16 insertions, 208 deletions
diff --git a/libpurple/core.c b/libpurple/core.c index 6a8e9ca190..6a3b8b191c 100644 --- a/libpurple/core.c +++ b/libpurple/core.c @@ -60,9 +60,6 @@ struct PurpleCore static PurpleCoreUiOps *_ops = NULL; static PurpleCore *_core = NULL; -STATIC_PROTO_LOAD -STATIC_PROTO_UNLOAD - static void purple_core_print_version(void) { @@ -144,9 +141,6 @@ purple_core_init(const char *ui) purple_cmds_init(); purple_protocols_init(); - /* Load all static protocols. */ - static_proto_load(); - /* Since plugins get probed so early we should probably initialize their * subsystem right away too. */ @@ -248,7 +242,6 @@ purple_core_quit(void) purple_prefs_uninit(); purple_plugins_uninit(); - static_proto_unload(); purple_protocols_uninit(); purple_cmds_uninit(); diff --git a/libpurple/plugins.h b/libpurple/plugins.h index 26a3164e5e..dc97f802db 100644 --- a/libpurple/plugins.h +++ b/libpurple/plugins.h @@ -239,27 +239,7 @@ struct _PurplePluginAction { * * Defines the plugin's entry points. */ -#if !defined(PURPLE_PLUGINS) || defined(PURPLE_STATIC_PRPL) -#define PURPLE_PLUGIN_INIT(pluginname,pluginquery,pluginload,pluginunload) \ - PurplePluginInfo * pluginname##_plugin_query(void); \ - PurplePluginInfo * pluginname##_plugin_query(void) { \ - return pluginquery(NULL); \ - } \ - gboolean pluginname##_plugin_load(void); \ - gboolean pluginname##_plugin_load(void) { \ - GError *e = NULL; \ - gboolean loaded = pluginload(NULL, &e); \ - if (e) g_error_free(e); \ - return loaded; \ - } \ - gboolean pluginname##_plugin_unload(void); \ - gboolean pluginname##_plugin_unload(void) { \ - GError *e = NULL; \ - gboolean unloaded = pluginunload(NULL, &e); \ - if (e) g_error_free(e); \ - return unloaded; \ - } -#else /* PURPLE_PLUGINS && !PURPLE_STATIC_PRPL */ +#ifdef PURPLE_PLUGINS #define PURPLE_PLUGIN_INIT(pluginname,pluginquery,pluginload,pluginunload) \ G_MODULE_EXPORT GPluginPluginInfo *gplugin_query(GError **e); \ G_MODULE_EXPORT GPluginPluginInfo *gplugin_query(GError **e) { \ @@ -285,14 +265,8 @@ struct _PurplePluginAction { * function; and a *_register_type() function for use in your plugin's load * function. You must define an instance initialization function *_init() * and a class initialization function *_class_init() for the type. - * - * The type will be registered statically if used in a static protocol or if - * plugins support is disabled. */ -#if !defined(PURPLE_PLUGINS) || defined(PURPLE_STATIC_PRPL) -#define PURPLE_DEFINE_TYPE(TN, t_n, T_P) \ - PURPLE_DEFINE_STATIC_TYPE(TN, t_n, T_P) -#else +#ifdef PURPLE_PLUGINS #define PURPLE_DEFINE_TYPE(TN, t_n, T_P) \ PURPLE_DEFINE_DYNAMIC_TYPE(TN, t_n, T_P) #endif @@ -308,10 +282,7 @@ struct _PurplePluginAction { * A more general version of PURPLE_DEFINE_TYPE() which allows you to * specify #GTypeFlags and custom code. */ -#if !defined(PURPLE_PLUGINS) || defined(PURPLE_STATIC_PRPL) -#define PURPLE_DEFINE_TYPE_EXTENDED \ - PURPLE_DEFINE_STATIC_TYPE_EXTENDED -#else +#ifdef PURPLE_PLUGINS #define PURPLE_DEFINE_TYPE_EXTENDED \ PURPLE_DEFINE_DYNAMIC_TYPE_EXTENDED #endif @@ -341,10 +312,7 @@ struct _PurplePluginAction { * of PURPLE_DEFINE_TYPE_EXTENDED(). You should use this macro if the * interface lives in the plugin. */ -#if !defined(PURPLE_PLUGINS) || defined(PURPLE_STATIC_PRPL) -#define PURPLE_IMPLEMENT_INTERFACE(TYPE_IFACE, iface_init) \ - PURPLE_IMPLEMENT_INTERFACE_STATIC(TYPE_IFACE, iface_init) -#else +#ifdef PURPLE_PLUGINS #define PURPLE_IMPLEMENT_INTERFACE(TYPE_IFACE, iface_init) \ PURPLE_IMPLEMENT_INTERFACE_DYNAMIC(TYPE_IFACE, iface_init) #endif @@ -400,46 +368,6 @@ void type_name##_register_type(PurplePlugin *plugin) { \ purple_plugin_add_interface(plugin, type_id, TYPE_IFACE, &interface_info); \ } -/** - * PURPLE_DEFINE_STATIC_TYPE: - * - * A convenience macro for static type implementations. - */ -#define PURPLE_DEFINE_STATIC_TYPE(TN, t_n, T_P) \ - PURPLE_DEFINE_STATIC_TYPE_EXTENDED (TN, t_n, T_P, 0, {}) - -/** - * PURPLE_DEFINE_STATIC_TYPE_EXTENDED: - * - * A more general version of PURPLE_DEFINE_STATIC_TYPE(). - */ -#define PURPLE_DEFINE_STATIC_TYPE_EXTENDED(TypeName, type_name, TYPE_PARENT, flags, CODE) \ -static GType type_name##_type_id = 0; \ -GType type_name##_get_type(void) { \ - if (G_UNLIKELY(type_name##_type_id == 0)) { \ - GType type_id; \ - const GTypeInfo type_info = { \ - sizeof (TypeName##Class), \ - (GBaseInitFunc) NULL, \ - (GBaseFinalizeFunc) NULL, \ - (GClassInitFunc) type_name##_class_init, \ - (GClassFinalizeFunc) NULL, \ - NULL, \ - sizeof (TypeName), \ - 0, \ - (GInstanceInitFunc) type_name##_init, \ - NULL \ - }; \ - type_id = g_type_register_static(TYPE_PARENT, #TypeName, &type_info, \ - (GTypeFlags) flags); \ - type_name##_type_id = type_id; \ - { CODE ; } \ - } \ - return type_name##_type_id; \ -} \ -void type_name##_register_type(PurplePlugin *); \ -void type_name##_register_type(PurplePlugin *plugin) { } - G_BEGIN_DECLS /**************************************************************************/ diff --git a/libpurple/protocols/bonjour/meson.build b/libpurple/protocols/bonjour/meson.build index 929f7f17cb..7cb337d276 100644 --- a/libpurple/protocols/bonjour/meson.build +++ b/libpurple/protocols/bonjour/meson.build @@ -23,12 +23,7 @@ else bonjour_link_args = [] endif -if STATIC_BONJOUR - bonjour_prpl = static_library('bonjour', BONJOURSOURCES, - c_args : '-DPURPLE_STATIC_PRPL', - link_args : bonjour_link_args, - dependencies : [libxml, avahi, libpurple_dep, glib, ws2_32]) -elif DYNAMIC_BONJOUR +if DYNAMIC_BONJOUR bonjour_prpl = shared_library('bonjour', BONJOURSOURCES, link_args : bonjour_link_args, dependencies : [libxml, avahi, libpurple_dep, glib, ws2_32], diff --git a/libpurple/protocols/facebook/meson.build b/libpurple/protocols/facebook/meson.build index 5de81eca0f..882e081fec 100644 --- a/libpurple/protocols/facebook/meson.build +++ b/libpurple/protocols/facebook/meson.build @@ -18,11 +18,7 @@ FACEBOOKSOURCES = [ 'util.h' ] -if STATIC_FACEBOOK - facebook_prpl = static_library('facebook', FACEBOOKSOURCES, - c_args : '-DPURPLE_STATIC_PRPL', - dependencies : [json, libpurple_dep, glib]) -elif DYNAMIC_FACEBOOK +if DYNAMIC_FACEBOOK facebook_prpl = shared_library('facebook', FACEBOOKSOURCES, dependencies : [json, libpurple_dep, glib], install : true, install_dir : PURPLE_PLUGINDIR) diff --git a/libpurple/protocols/gg/meson.build b/libpurple/protocols/gg/meson.build index bc6e18a249..6f224a7fb9 100644 --- a/libpurple/protocols/gg/meson.build +++ b/libpurple/protocols/gg/meson.build @@ -51,11 +51,7 @@ GGSOURCES = [ 'oauth/oauth-purple.h' ] -if STATIC_GG - gg_prpl = static_library('gg', GGSOURCES, - c_args : '-DPURPLE_STATIC_PRPL', - dependencies : [libgadu, json, libpurple_dep, glib]) -elif DYNAMIC_GG +if DYNAMIC_GG gg_prpl = shared_library('gg', GGSOURCES, dependencies : [libgadu, json, libpurple_dep, glib], install : true, install_dir : PURPLE_PLUGINDIR) diff --git a/libpurple/protocols/irc/meson.build b/libpurple/protocols/irc/meson.build index 603707d56d..1640b51f93 100644 --- a/libpurple/protocols/irc/meson.build +++ b/libpurple/protocols/irc/meson.build @@ -7,11 +7,7 @@ IRCSOURCES = [ 'parse.c' ] -if STATIC_IRC - irc_prpl = static_library('irc', IRCSOURCES, - c_args : '-DPURPLE_STATIC_PRPL', - dependencies : [sasl, libpurple_dep, glib, gio, ws2_32]) -elif DYNAMIC_IRC +if DYNAMIC_IRC irc_prpl = shared_library('irc', IRCSOURCES, dependencies : [sasl, libpurple_dep, glib, gio, ws2_32], install : true, install_dir : PURPLE_PLUGINDIR) diff --git a/libpurple/protocols/jabber/meson.build b/libpurple/protocols/jabber/meson.build index 2fba0794fb..84823b5299 100644 --- a/libpurple/protocols/jabber/meson.build +++ b/libpurple/protocols/jabber/meson.build @@ -114,12 +114,7 @@ else jabber_link_args = [] endif -if STATIC_JABBER - jabber_prpl = static_library('jabber', JABBERSOURCES, - c_args : ['-DPURPLE_STATIC_PRPL', use_idn], - link_args : jabber_link_args, - dependencies : [gstreamer, idn, libxml, sasl, libpurple_dep, glib, gio, math, ws2_32]) -elif DYNAMIC_JABBER +if DYNAMIC_JABBER jabber_prpl = shared_library('jabber', JABBERSOURCES, c_args : use_idn, link_args : jabber_link_args, diff --git a/libpurple/protocols/novell/meson.build b/libpurple/protocols/novell/meson.build index 76bd801a54..3e039593ba 100644 --- a/libpurple/protocols/novell/meson.build +++ b/libpurple/protocols/novell/meson.build @@ -23,11 +23,7 @@ NOVELLSOURCES = [ 'novell.c' ] -if STATIC_NOVELL - novell_prpl = static_library('novell', NOVELLSOURCES, - c_args : '-DPURPLE_STATIC_PRPL', - dependencies : [libpurple_dep, glib, ws2_32]) -elif DYNAMIC_NOVELL +if DYNAMIC_NOVELL novell_prpl = shared_library('novell', NOVELLSOURCES, dependencies : [libpurple_dep, glib, ws2_32], install : true, install_dir : PURPLE_PLUGINDIR) diff --git a/libpurple/protocols/oscar/meson.build b/libpurple/protocols/oscar/meson.build index f447ed531f..17da574c19 100644 --- a/libpurple/protocols/oscar/meson.build +++ b/libpurple/protocols/oscar/meson.build @@ -53,12 +53,7 @@ else oscar_link_args = [] endif -if STATIC_OSCAR - oscar_prpl = static_library('oscar', OSCARSOURCES, - c_args : '-DPURPLE_STATIC_PRPL', - link_args : oscar_link_args, - dependencies : [libpurple_dep, glib, ws2_32]) -elif DYNAMIC_OSCAR +if DYNAMIC_OSCAR oscar_prpl = shared_library('oscar', OSCARSOURCES, link_args : oscar_link_args, dependencies : [libpurple_dep, glib, ws2_32], diff --git a/libpurple/protocols/sametime/meson.build b/libpurple/protocols/sametime/meson.build index 6e9852a184..df30aaa7a2 100644 --- a/libpurple/protocols/sametime/meson.build +++ b/libpurple/protocols/sametime/meson.build @@ -3,11 +3,7 @@ SAMETIMESOURCES = [ 'sametime.h' ] -if STATIC_SAMETIME - sametime_prpl = static_library('sametime', SAMETIMESOURCES, - c_args : ['-DG_LOG_DOMAIN="sametime"', '-DPURPLE_STATIC_PRPL'], - dependencies : [meanwhile, libpurple_dep, glib]) -elif DYNAMIC_SAMETIME +if DYNAMIC_SAMETIME sametime_prpl = shared_library('sametime', SAMETIMESOURCES, c_args : ['-DG_LOG_DOMAIN="sametime"'], dependencies : [meanwhile, libpurple_dep, glib], diff --git a/libpurple/protocols/silc/meson.build b/libpurple/protocols/silc/meson.build index 6571656ee9..98fb76c9ca 100644 --- a/libpurple/protocols/silc/meson.build +++ b/libpurple/protocols/silc/meson.build @@ -11,11 +11,7 @@ SILCSOURCES = [ 'wb.h' ] -if STATIC_SILC - silc_prpl = static_library('silcpurple', SILCSOURCES, - c_args : '-DPURPLE_STATIC_PRPL', - dependencies : [silc, libpurple_dep, glib]) -elif DYNAMIC_SILC +if DYNAMIC_SILC silc_prpl = shared_library('silcpurple', SILCSOURCES, dependencies : [silc, libpurple_dep, glib], install : true, install_dir : PURPLE_PLUGINDIR) diff --git a/libpurple/protocols/simple/meson.build b/libpurple/protocols/simple/meson.build index 0743d199af..5182d79c73 100644 --- a/libpurple/protocols/simple/meson.build +++ b/libpurple/protocols/simple/meson.build @@ -7,11 +7,7 @@ SIMPLESOURCES = [ 'sipmsg.h' ] -if STATIC_SIMPLE - simple_prpl = static_library('simple', SIMPLESOURCES, - c_args : '-DPURPLE_STATIC_PRPL', - dependencies : [libpurple_dep, nettle, glib, gio, ws2_32]) -elif DYNAMIC_SIMPLE +if DYNAMIC_SIMPLE simple_prpl = shared_library('simple', SIMPLESOURCES, dependencies : [libpurple_dep, nettle, glib, gio, ws2_32], install : true, install_dir : PURPLE_PLUGINDIR) diff --git a/libpurple/protocols/zephyr/meson.build b/libpurple/protocols/zephyr/meson.build index 658588fa4a..dc18ed2787 100644 --- a/libpurple/protocols/zephyr/meson.build +++ b/libpurple/protocols/zephyr/meson.build @@ -68,11 +68,7 @@ if EXTERNAL_LIBZEPHYR extdep = ext_zephyr endif -if STATIC_ZEPHYR - zephyr_prpl = static_library('zephyr', ZEPHYRSOURCES, - c_args : ['-Dlint', '-DPURPLE_STATIC_PRPL'], - dependencies : [extdep, libpurple_dep, glib]) -elif DYNAMIC_ZEPHYR +if DYNAMIC_ZEPHYR zephyr_prpl = shared_library('zephyr', ZEPHYRSOURCES, c_args : '-Dlint', dependencies : [extdep, libpurple_dep, glib], diff --git a/meson.build b/meson.build index da99b76cd3..983e57e0ea 100644 --- a/meson.build +++ b/meson.build @@ -535,68 +535,6 @@ DEFAULT_PRPLS = ['bonjour', 'facebook', 'gg', 'irc', 'jabber', 'novell', ALL_PRPLS = DEFAULT_PRPLS + ['null'] dynamic_list = get_option('dynamic-prpls').split(',') -static_list = get_option('static-prpls').split(',') -if (static_list != [''] and static_list != []) and dynamic_list == ['all'] - dynamic_list = [] -endif - -if static_list == ['all'] - static_list = DEFAULT_PRPLS -endif -STATIC_PRPLS = [] -foreach prpl : static_list - if prpl == '' - # The list was empty; do nothing. - elif prpl == 'sametime' and not enable_meanwhile - # Do nothing - elif prpl == 'bonjour' and not enable_avahi - # Do nothing - elif prpl == 'silc' and not have_silc - # Do nothing - elif prpl == 'gg' and not have_libgadu - # Do nothing - elif prpl == 'zephyr' and IS_WIN32 - # Do nothing - else - STATIC_PRPLS += [prpl] - endif -endforeach -STATIC_LINK_LIBS = [] -extern_load = [] -load_proto = [] -extern_unload = [] -unload_proto = [] -foreach prpl : STATIC_PRPLS - # Ugly special case for 'libsilcpurple.la': - if prpl == 'silc' - STATIC_LINK_LIBS.append('\$(top_builddir)/libpurple/protocols/@1@/lib@1@purple.la'.format(meson.build_root(), prpl)) - else - # FIXME: Shouldn't be libtool: - STATIC_LINK_LIBS.append('\$(top_builddir)/libpurple/protocols/@1@/lib@1@.la'.format(meson.build_root(), prpl)) - endif - extern_load.append('extern gboolean @0@_plugin_load();'.format(prpl)) - load_proto.append('@0@_plugin_load();'.format(prpl)) - extern_unload.append('extern gboolean @0@_plugin_unload();'.format(prpl)) - unload_proto.append('@0@_plugin_unload();'.format(prpl)) -endforeach -STATIC_BONJOUR = STATIC_PRPLS.contains('bonjour') -STATIC_FACEBOOK = STATIC_PRPLS.contains('facebook') -STATIC_GG = STATIC_PRPLS.contains('gg') -STATIC_IRC = STATIC_PRPLS.contains('irc') -STATIC_JABBER = STATIC_PRPLS.contains('jabber') -STATIC_NOVELL = STATIC_PRPLS.contains('novell') -STATIC_OSCAR = STATIC_PRPLS.contains('oscar') or STATIC_PRPLS.contains('aim') or STATIC_PRPLS.contains('icq') -STATIC_SAMETIME = STATIC_PRPLS.contains('sametime') -STATIC_SILC = STATIC_PRPLS.contains('silc') -STATIC_SIMPLE = STATIC_PRPLS.contains('simple') -STATIC_ZEPHYR = STATIC_PRPLS.contains('zephyr') -conf.set('STATIC_PROTO_LOAD', - ' '.join(extern_load) + - ' static void static_proto_load(void) { ' + ' '.join(load_proto) + ' }') -conf.set('STATIC_PROTO_UNLOAD', - ' '.join(extern_unload) + - ' static void static_proto_unload(void) { ' + ' '.join(unload_proto) + ' }') - if dynamic_list == ['all'] dynamic_list = DEFAULT_PRPLS endif @@ -1019,7 +957,6 @@ message('Build for X11................. : ' + with_x.to_string()) message('') message('Enable Gestures............... : ' + enable_gestures.to_string()) message('Protocols to build dynamically : @0@'.format(DYNAMIC_PRPLS)) -message('Protocols to link statically.. : @0@'.format(STATIC_PRPLS)) message('') message('Build with GStreamer support.. : ' + enable_gst.to_string()) message('Build with voice and video.... : ' + enable_vv.to_string()) diff --git a/meson_options.txt b/meson_options.txt index 54a9fc0689..090e568da3 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -56,9 +56,6 @@ option('libgadu', type : 'boolean', value : true, option('silc', type : 'boolean', value : false, description : 'compile with SILC plugin') -option('static-prpls', type : 'string', - description : 'Link to certain protocols statically') - option('dynamic-prpls', type : 'string', value: 'all', description : 'specify which protocols to build dynamically') diff --git a/pidgin/plugins/ticker/gtkticker.h b/pidgin/plugins/ticker/gtkticker.h index 9831e1dd8c..3237f8dc18 100644 --- a/pidgin/plugins/ticker/gtkticker.h +++ b/pidgin/plugins/ticker/gtkticker.h @@ -28,7 +28,7 @@ #include <gdk/gdk.h> #include <gtk/gtk.h> -#include "plugins.h" +#include <purple.h> G_BEGIN_DECLS |