pidgin/pidgin

Add a Meson devenv configuration.

2021-10-01, Elliott Sales de Andrade
00e6bda3ef95
Parents b46de1b53654
Children 3d135d1f8b6e
Add a Meson devenv configuration.

This allows running `meson devenv` as defined at https://mesonbuild.com/Commands.html#devenv

Testing Done:
Ran `meson devenv -C build pidgin3` and `meson devenv -C build finch3` on a system without either installed (even from this build).

Note stock icons don't seem to work with `XDG_DATA_DIRS`, which is why the other review requests were needed. If anything still has stock icons, they'll be broken without an install.

Reviewed at https://reviews.imfreedom.org/r/973/
--- a/finch/plugins/meson.build Fri Oct 01 01:04:00 2021 -0500
+++ b/finch/plugins/meson.build Fri Oct 01 01:06:04 2021 -0500
@@ -31,3 +31,4 @@
name_prefix : '',
install : true, install_dir : FINCH_PLUGINDIR)
+devenv.append('FINCH_PLUGIN_PATH', meson.current_build_dir())
--- a/libpurple/plugins/keyrings/kwallet/meson.build Fri Oct 01 01:04:00 2021 -0500
+++ b/libpurple/plugins/keyrings/kwallet/meson.build Fri Oct 01 01:06:04 2021 -0500
@@ -14,5 +14,6 @@
dependencies : [kwallet, qt5_dep, libpurple_dep],
name_prefix : '',
install : true, install_dir : PURPLE_PLUGINDIR)
+
+ devenv.append('PURPLE_PLUGIN_PATH', meson.current_build_dir())
endif
-
--- a/libpurple/plugins/keyrings/meson.build Fri Oct 01 01:04:00 2021 -0500
+++ b/libpurple/plugins/keyrings/meson.build Fri Oct 01 01:06:04 2021 -0500
@@ -22,3 +22,6 @@
install : true, install_dir : PURPLE_PLUGINDIR)
endif
+if nettle.found() or secretservice.found() or IS_WIN32
+ devenv.append('PURPLE_PLUGIN_PATH', meson.current_build_dir())
+endif
--- a/libpurple/plugins/meson.build Fri Oct 01 01:04:00 2021 -0500
+++ b/libpurple/plugins/meson.build Fri Oct 01 01:06:04 2021 -0500
@@ -40,3 +40,5 @@
dependencies : [libpurple_dep],
name_prefix: '',
install : true, install_dir : PURPLE_PLUGINDIR)
+
+devenv.append('PURPLE_PLUGIN_PATH', meson.current_build_dir())
--- a/libpurple/plugins/notification-sound/meson.build Fri Oct 01 01:04:00 2021 -0500
+++ b/libpurple/plugins/notification-sound/meson.build Fri Oct 01 01:06:04 2021 -0500
@@ -5,5 +5,6 @@
dependencies : [libpurple_dep, glib, CANBERRA],
name_prefix : '',
install : true, install_dir : PURPLE_PLUGINDIR)
+
+ devenv.append('PURPLE_PLUGIN_PATH', meson.current_build_dir())
endif
-
--- a/libpurple/protocols/bonjour/meson.build Fri Oct 01 01:04:00 2021 -0500
+++ b/libpurple/protocols/bonjour/meson.build Fri Oct 01 01:06:04 2021 -0500
@@ -30,4 +30,6 @@
link_args : bonjour_link_args,
dependencies : [libxml, avahi, libpurple_dep, glib, nice, ws2_32],
install : true, install_dir : PURPLE_PLUGINDIR)
+
+ devenv.append('PURPLE_PLUGIN_PATH', meson.current_build_dir())
endif
--- a/libpurple/protocols/facebook/meson.build Fri Oct 01 01:04:00 2021 -0500
+++ b/libpurple/protocols/facebook/meson.build Fri Oct 01 01:06:04 2021 -0500
@@ -28,4 +28,6 @@
facebook_dep = declare_dependency(
link_with : facebook_prpl,
dependencies : [json, libpurple_dep, glib])
+
+ devenv.append('PURPLE_PLUGIN_PATH', meson.current_build_dir())
endif
--- a/libpurple/protocols/gg/meson.build Fri Oct 01 01:04:00 2021 -0500
+++ b/libpurple/protocols/gg/meson.build Fri Oct 01 01:06:04 2021 -0500
@@ -53,4 +53,6 @@
gg_prpl = shared_library('gg', GG_SOURCES,
dependencies : [libgadu, json, libpurple_dep, libsoup, glib],
install : true, install_dir : PURPLE_PLUGINDIR)
+
+ devenv.append('PURPLE_PLUGIN_PATH', meson.current_build_dir())
endif
--- a/libpurple/protocols/irc/meson.build Fri Oct 01 01:04:00 2021 -0500
+++ b/libpurple/protocols/irc/meson.build Fri Oct 01 01:06:04 2021 -0500
@@ -17,4 +17,6 @@
irc_prpl = shared_library('irc', IRC_SOURCES,
dependencies : [sasl, libpurple_dep, glib, gio, ws2_32],
install : true, install_dir : PURPLE_PLUGINDIR)
+
+ devenv.append('PURPLE_PLUGIN_PATH', meson.current_build_dir())
endif
--- a/libpurple/protocols/jabber/meson.build Fri Oct 01 01:04:00 2021 -0500
+++ b/libpurple/protocols/jabber/meson.build Fri Oct 01 01:06:04 2021 -0500
@@ -96,5 +96,7 @@
dependencies : [gstreamer, idn, libxml, sasl, libpurple_dep, libsoup, glib, gio, math, nice, ws2_32],
install : true, install_dir : PURPLE_PLUGINDIR)
+ devenv.append('PURPLE_PLUGIN_PATH', meson.current_build_dir())
+
subdir('tests')
endif
--- a/libpurple/protocols/novell/meson.build Fri Oct 01 01:04:00 2021 -0500
+++ b/libpurple/protocols/novell/meson.build Fri Oct 01 01:06:04 2021 -0500
@@ -27,4 +27,6 @@
novell_prpl = shared_library('novell', NOVELL_SOURCES,
dependencies : [libpurple_dep, glib, ws2_32],
install : true, install_dir : PURPLE_PLUGINDIR)
+
+ devenv.append('PURPLE_PLUGIN_PATH', meson.current_build_dir())
endif
--- a/libpurple/protocols/null/meson.build Fri Oct 01 01:04:00 2021 -0500
+++ b/libpurple/protocols/null/meson.build Fri Oct 01 01:06:04 2021 -0500
@@ -8,4 +8,6 @@
null_prpl = shared_library('null', NULL_SOURCES,
dependencies : [libpurple_dep, glib],
install : false, install_dir : PURPLE_PLUGINDIR)
+
+ devenv.append('PURPLE_PLUGIN_PATH', meson.current_build_dir())
endif
--- a/libpurple/protocols/sametime/meson.build Fri Oct 01 01:04:00 2021 -0500
+++ b/libpurple/protocols/sametime/meson.build Fri Oct 01 01:06:04 2021 -0500
@@ -11,5 +11,7 @@
dependencies : [meanwhile, gmime, libpurple_dep, glib],
install : true, install_dir : PURPLE_PLUGINDIR)
+ devenv.append('PURPLE_PLUGIN_PATH', meson.current_build_dir())
+
subdir('tests')
endif
--- a/libpurple/protocols/silc/meson.build Fri Oct 01 01:04:00 2021 -0500
+++ b/libpurple/protocols/silc/meson.build Fri Oct 01 01:06:04 2021 -0500
@@ -16,4 +16,6 @@
silc_prpl = shared_library('silcpurple', SILC_SOURCES,
dependencies : [silc, libpurple_dep, glib],
install : true, install_dir : PURPLE_PLUGINDIR)
+
+ devenv.append('PURPLE_PLUGIN_PATH', meson.current_build_dir())
endif
--- a/libpurple/protocols/zephyr/meson.build Fri Oct 01 01:04:00 2021 -0500
+++ b/libpurple/protocols/zephyr/meson.build Fri Oct 01 01:06:04 2021 -0500
@@ -74,4 +74,6 @@
c_args : '-Dlint',
dependencies : [extdep, libpurple_dep, glib],
install : true, install_dir : PURPLE_PLUGINDIR)
+
+ devenv.append('PURPLE_PLUGIN_PATH', meson.current_build_dir())
endif
--- a/meson.build Fri Oct 01 01:04:00 2021 -0500
+++ b/meson.build Fri Oct 01 01:06:04 2021 -0500
@@ -75,6 +75,9 @@
output : 'package_revision.h',
fallback : meson.project_version())
+# For running `meson devenv`.
+devenv = environment()
+
# For man pages.
man_conf.set('VERSION', meson.project_version())
man_conf.set('prefix', get_option('prefix'))
@@ -666,6 +669,16 @@
configure_file(output : 'config.h',
configuration : conf)
+if meson.version().version_compare('>=0.58.0')
+ config_home = get_option('devenv-config-dir')
+ if config_home == ''
+ config_home = meson.build_root() / 'config'
+ endif
+ devenv.set('XDG_CONFIG_HOME', config_home)
+
+ meson.add_devenv(devenv)
+endif
+
summary({
'prefix': get_option('prefix'),
'bindir': get_option('bindir'),
--- a/meson_options.txt Fri Oct 01 01:04:00 2021 -0500
+++ b/meson_options.txt Fri Oct 01 01:06:04 2021 -0500
@@ -1,6 +1,9 @@
##############################################################################
# General Options
+option('devenv-config-dir', type : 'string',
+ description : 'config directory for running a devenv (defaults to a subdirectory of buildroot)')
+
option('doc', type : 'boolean', value : false,
description : 'build documentation with gtk-doc')
--- a/pidgin/data/meson.build Fri Oct 01 01:04:00 2021 -0500
+++ b/pidgin/data/meson.build Fri Oct 01 01:06:04 2021 -0500
@@ -1,3 +1,5 @@
if INSTALL_PIXMAPS
subdir('icons')
endif
+
+devenv.prepend('XDG_DATA_DIRS', meson.current_source_dir())
--- a/pidgin/plugins/disco/meson.build Fri Oct 01 01:04:00 2021 -0500
+++ b/pidgin/plugins/disco/meson.build Fri Oct 01 01:06:04 2021 -0500
@@ -16,3 +16,4 @@
name_prefix : '',
install : true, install_dir : PIDGIN_PLUGINDIR)
+devenv.append('PIDGIN_PLUGIN_PATH', meson.current_build_dir())
--- a/pidgin/plugins/gestures/meson.build Fri Oct 01 01:04:00 2021 -0500
+++ b/pidgin/plugins/gestures/meson.build Fri Oct 01 01:06:04 2021 -0500
@@ -11,3 +11,4 @@
name_prefix : '',
install : true, install_dir : PIDGIN_PLUGINDIR)
+devenv.append('PIDGIN_PLUGIN_PATH', meson.current_build_dir())
--- a/pidgin/plugins/meson.build Fri Oct 01 01:04:00 2021 -0500
+++ b/pidgin/plugins/meson.build Fri Oct 01 01:06:04 2021 -0500
@@ -43,3 +43,4 @@
install : true, install_dir : PIDGIN_PLUGINDIR)
endif
+devenv.append('PIDGIN_PLUGIN_PATH', meson.current_build_dir())
--- a/pidgin/plugins/xmppconsole/meson.build Fri Oct 01 01:04:00 2021 -0500
+++ b/pidgin/plugins/xmppconsole/meson.build Fri Oct 01 01:06:04 2021 -0500
@@ -8,3 +8,4 @@
name_prefix : '',
install : true, install_dir : PIDGIN_PLUGINDIR)
+devenv.append('PIDGIN_PLUGIN_PATH', meson.current_build_dir())