Code

add Meson option "lyrics_plugin_dir"
authorMax Kellermann <max.kellermann@gmail.com>
Sun, 5 Nov 2017 16:24:09 +0000 (17:24 +0100)
committerMax Kellermann <max.kellermann@gmail.com>
Sun, 5 Nov 2017 16:24:09 +0000 (17:24 +0100)
The option "--with-lyrics-plugin-dir" was lost in the Meson
transition.

Closes #7

NEWS
meson.build
meson_options.txt

diff --git a/NEWS b/NEWS
index d202e7415fd7595bd0d3c2f34721e29202917c4a..9e7b11c7d7c58ba59766cdd132022f372f7208a2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 ncmpc 0.29 - not yet released
 * fix crash after losing MPD connection
 * fix crash after DNS lookup error
 ncmpc 0.29 - not yet released
 * fix crash after losing MPD connection
 * fix crash after DNS lookup error
+* add Meson option "lyrics_plugin_dir"
 
 ncmpc 0.28 - (2017-09-21)
 * fix crash on lyrics screen
 
 ncmpc 0.28 - (2017-09-21)
 * fix crash on lyrics screen
index b2fd42a4d7dc2e195830976f73742e22c778a3e3..428e41e3b45156e5cae210124f8972a62fb93992 100644 (file)
@@ -271,7 +271,11 @@ conf.set('ENABLE_LYRICS_SCREEN', enable_lyrics_screen)
 if enable_lyrics_screen
   sources += ['src/screen_lyrics.c', 'src/lyrics.c']
 
 if enable_lyrics_screen
   sources += ['src/screen_lyrics.c', 'src/lyrics.c']
 
-  lyrics_plugin_dir = join_paths(get_option('prefix'), get_option('libdir'), meson.project_name(), 'lyrics')
+  lyrics_plugin_dir = get_option('lyrics_plugin_dir')
+  if lyrics_plugin_dir == ''
+    lyrics_plugin_dir = join_paths(get_option('prefix'), get_option('libdir'), meson.project_name(), 'lyrics')
+  endif
+
   conf.set_quoted('LYRICS_PLUGIN_DIR', lyrics_plugin_dir)
   install_data(
     'lyrics/10-hd.sh',
   conf.set_quoted('LYRICS_PLUGIN_DIR', lyrics_plugin_dir)
   install_data(
     'lyrics/10-hd.sh',
index 4f58ed3230acea3378114ea8e6ac4a91520025c9..7f7a9718da8980517ff36210b6c909987190f4b6 100644 (file)
@@ -68,6 +68,10 @@ option('lyrics_screen', type: 'boolean',
   value: false,
   description: 'Enable the lyrics screen')
 
   value: false,
   description: 'Enable the lyrics screen')
 
+option('lyrics_plugin_dir', type: 'string',
+  value: '',
+  description: 'Directory where lyrics plugins are stored')
+
 option('outputs_screen', type: 'boolean',
   value: true,
   description: 'Enable the outputs screen')
 option('outputs_screen', type: 'boolean',
   value: true,
   description: 'Enable the outputs screen')