[rhythmbox/mesonjunk: 9/11] build: move plugin selection to the root build file
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox/mesonjunk: 9/11] build: move plugin selection to the root build file
- Date: Sun, 29 May 2022 07:50:35 +0000 (UTC)
commit 3cc6787fa1bf76d442e494905dc333aec81066c5
Author: Jonathan Matthew <jonathan d14n org>
Date: Sun May 29 16:00:14 2022 +1000
build: move plugin selection to the root build file
This keeps all the relevant stuff in one place, and means we don't have
to invent a bunch of variable names to carry information around.
meson.build | 108 ++++++++++++++++++++++++++++++++-------------
plugins/meson.build | 76 -------------------------------
sample-plugins/meson.build | 12 -----
3 files changed, 78 insertions(+), 118 deletions(-)
---
diff --git a/meson.build b/meson.build
index 37aabb471..490dcbada 100644
--- a/meson.build
+++ b/meson.build
@@ -130,11 +130,10 @@ pkgdatadir = datadir / 'rhythmbox'
# Plugin support
plugindir = libdir / 'rhythmbox' / 'plugins'
-cdata.set('PLUGINDIR', plugindir)
-
plugindatadir = datadir / 'rhythmbox' / 'plugins'
-cdata.set('PLUGINDATADIR', plugindatadir)
-cdata.set('SAMPLEPLUGINDIR', libdir / 'rhythmbox' / 'sample-plugins')
+
+sampleplugindir = libdir / 'rhythmbox' / 'sample-plugins'
+sampleplugindatadir = datadir / 'rhythmbox' / 'sample-plugins'
enable_python = false
python_install = python.find_installation('python3', required: get_option('plugins_python'))
@@ -151,70 +150,109 @@ if vala_found
add_project_arguments(['--vapidir', vapi_dir], language: 'vala')
endif
+plugin_headers = ['plugins/rb-plugin-macros.h']
+install_headers(plugin_headers, subdir: 'rhythmbox/plugins')
+
+po_dir = meson.project_source_root() / 'po'
+# FIXME: Move custom_target to i18n.merge_file when gettext acquires plugin support.
+# http://lists.gnu.org/archive/html/bug-gettext/2017-06/msg00001.html
+msgfmt_plugin_cmd = [
+ find_program('msgfmt'),
+ '--desktop',
+ '--keyword=Name',
+ '--keyword=Description',
+ '--template=@INPUT@',
+ '-d', po_dir,
+ '--output=@OUTPUT@'
+]
+
##########
# Plugins
-use_ipod = false
+plugins = [
+ 'audiocd',
+ 'audioscrobbler',
+ 'dbus-media-server',
+ 'generic-player',
+ 'iradio',
+ 'mpris',
+ 'power-manager'
+]
+
+if enable_python
+ plugins += [
+ 'rb',
+
+ 'artsearch',
+ 'im-status',
+ 'listenbrainz',
+ 'lyrics',
+ 'magnatune',
+ 'pythonconsole',
+ 'rbzeitgeist',
+ 'replaygain',
+ 'webremote',
+
+ # 'context'
+ ]
+endif
+
libgpod = dependency('libgpod-1.0', version: '>= 0.7.92', required: get_option('ipod'))
if libgpod.found()
- use_ipod = true
+ plugins += 'ipod'
endif
-use_mtp = false
libmtp = dependency('libmtp', version: '>= 0.3.0', required: get_option('mtp'))
if libmtp.found()
if use_gudev
- use_mtp = true
+ plugins += 'mtpdevice'
elif get_option('mtp').enabled()
error('MTP explicitly requested but GUdev is not available')
endif
endif
+if use_gudev
+ plugins += 'android'
+endif
-use_notify = false
libnotify = dependency('libnotify', version: '>= 0.7.0', required: get_option('libnotify'))
if libnotify.found()
- use_notify = true
+ plugins += 'notification'
endif
-use_lirc = false
lirc = dependency('lirc', required: get_option('lirc'))
if lirc.found()
- use_lirc = true
+ plugins += 'lirc'
endif
-have_libbrasero_media = false
brasero_media = dependency('libbrasero-media3', version: '>= 2.31.5', required: get_option('brasero'))
if brasero_media.found()
- have_libbrasero_media = true
+ plugins += 'brasero-disc-recorder'
endif
-enable_fm_radio = false
if get_option('fm_radio').allowed()
if cc.has_header('linux/videodev2.h')
- enable_fm_radio = true
+ plugins += 'fmradio'
elif get_option('fm_radio').enabled()
error('FM radio plugin explicitly requested, but cannot be built')
endif
endif
-have_libdmapsharing = false
if get_option('daap').allowed()
libdmapsharing4 = dependency('libdmapsharing-4.0', version: '>= 3.9.4', required: false)
if libdmapsharing4.found()
- have_libdmapsharing = true
+ plugins += 'daap'
else
libdmapsharing = dependency('libdmapsharing-3.0', version: '>= 2.9.19', required: get_option('daap'))
if libdmapsharing.found()
- have_libdmapsharing = true
+ plugins += 'daap'
endif
endif
endif
-enable_grilo = false
grilo = dependency('grilo-0.3', version: '>= 0.3.1', required: get_option('grilo'))
if grilo.found()
- enable_grilo = true
+ plugins += 'grilo'
endif
enable_check = false
@@ -252,17 +290,17 @@ summary({'Tests': enable_check,
},
section: 'General',
bool_yn: true)
-summary({'iPod integration': use_ipod,
- 'MTP integration': use_mtp,
- 'CD burning support': have_libbrasero_media,
- 'DAAP (music sharing) support': have_libdmapsharing,
- 'libnotify support': use_notify,
+summary({'iPod integration': plugins.contains('ipod'),
+ 'MTP integration': plugins.contains('mtpdevice'),
+ 'CD burning support': plugins.contains('brasero-disc-recorder'),
+ 'DAAP (music sharing) support': plugins.contains('daap'),
+ 'libnotify support': plugins.contains('notification'),
'GUdev support': use_gudev,
'Python plugin support': enable_python,
'Vala plugin support': enable_vala,
'Libsecret keyring support': use_libsecret,
- 'FM radio support': enable_fm_radio,
- 'Grilo support': enable_grilo,
+ 'FM radio support': plugins.contains('fmradio'),
+ 'Grilo support': plugins.contains('grilo'),
'Sample plugins': get_option('sample-plugins'),
},
section: 'Plugins',
@@ -290,9 +328,19 @@ subdir('podcast')
subdir('sources')
subdir('widgets')
subdir('shell')
-subdir('plugins')
+
+foreach p : plugins
+ subdir('plugins' / p)
+endforeach
if get_option('sample-plugins')
- subdir('sample-plugins')
+
+ subdir('sample')
+ if enable_python
+ subdir('sample-python')
+ endif
+ if enable_vala
+ subdir('sample-vala')
+ endif
endif
subdir('remote')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]