mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-25 13:25:39 +02:00
Merge branch 'make-mpd-support-optional'
This commit is contained in:
commit
185f313580
5 changed files with 26 additions and 2 deletions
|
@ -11,6 +11,9 @@
|
||||||
## Unreleased
|
## Unreleased
|
||||||
### Added
|
### Added
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
* Made `libmpdclient` an optional dependency
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
### Removed
|
### Removed
|
||||||
### Fixed
|
### Fixed
|
||||||
|
@ -22,6 +25,7 @@
|
||||||
### Security
|
### Security
|
||||||
### Contributors
|
### Contributors
|
||||||
|
|
||||||
|
* [sochotnicky](https://codeberg.org/sochotnicky)
|
||||||
|
|
||||||
## 1.7.0
|
## 1.7.0
|
||||||
|
|
||||||
|
|
|
@ -119,6 +119,7 @@ yambar = executable(
|
||||||
version,
|
version,
|
||||||
dependencies: [bar, pixman, yaml, threads, dl, tllist, fcft] +
|
dependencies: [bar, pixman, yaml, threads, dl, tllist, fcft] +
|
||||||
decorations + particles + modules,
|
decorations + particles + modules,
|
||||||
|
c_args: [plugin_mpd_enabled? '-DPLUGIN_ENABLED_MPD':[]],
|
||||||
build_rpath: '$ORIGIN/modules:$ORIGIN/decorations:$ORIGIN/particles',
|
build_rpath: '$ORIGIN/modules:$ORIGIN/decorations:$ORIGIN/particles',
|
||||||
export_dynamic: true,
|
export_dynamic: true,
|
||||||
install: true,
|
install: true,
|
||||||
|
@ -153,3 +154,9 @@ summary(
|
||||||
},
|
},
|
||||||
bool_yn: true
|
bool_yn: true
|
||||||
)
|
)
|
||||||
|
|
||||||
|
summary(
|
||||||
|
{'Music Player Daemon (MPD)': plugin_mpd_enabled},
|
||||||
|
section: 'Optional modules',
|
||||||
|
bool_yn: true
|
||||||
|
)
|
||||||
|
|
|
@ -5,3 +5,6 @@ option(
|
||||||
option(
|
option(
|
||||||
'core-plugins-as-shared-libraries', type: 'boolean', value: false,
|
'core-plugins-as-shared-libraries', type: 'boolean', value: false,
|
||||||
description: 'Compiles modules, particles and decorations as shared libraries, which are loaded on-demand')
|
description: 'Compiles modules, particles and decorations as shared libraries, which are loaded on-demand')
|
||||||
|
option(
|
||||||
|
'plugin-mpd', type: 'feature', value: 'auto',
|
||||||
|
description: 'Music Player Daemon (MPD) support')
|
||||||
|
|
|
@ -5,9 +5,12 @@ modules = []
|
||||||
alsa = dependency('alsa')
|
alsa = dependency('alsa')
|
||||||
udev = dependency('libudev')
|
udev = dependency('libudev')
|
||||||
json = dependency('json-c')
|
json = dependency('json-c')
|
||||||
mpd = dependency('libmpdclient')
|
|
||||||
xcb_xkb = dependency('xcb-xkb', required: get_option('backend-x11'))
|
xcb_xkb = dependency('xcb-xkb', required: get_option('backend-x11'))
|
||||||
|
|
||||||
|
# Optional deps
|
||||||
|
mpd = dependency('libmpdclient', required: get_option('plugin-mpd'))
|
||||||
|
plugin_mpd_enabled = mpd.found()
|
||||||
|
|
||||||
# Module name -> (source-list, dep-list)
|
# Module name -> (source-list, dep-list)
|
||||||
mod_data = {
|
mod_data = {
|
||||||
'alsa': [[], [m, alsa]],
|
'alsa': [[], [m, alsa]],
|
||||||
|
@ -16,13 +19,16 @@ mod_data = {
|
||||||
'clock': [[], []],
|
'clock': [[], []],
|
||||||
'i3': [['i3-common.c', 'i3-common.h'], [dynlist, json]],
|
'i3': [['i3-common.c', 'i3-common.h'], [dynlist, json]],
|
||||||
'label': [[], []],
|
'label': [[], []],
|
||||||
'mpd': [[], [mpd]],
|
|
||||||
'network': [[], []],
|
'network': [[], []],
|
||||||
'removables': [[], [dynlist, udev]],
|
'removables': [[], [dynlist, udev]],
|
||||||
'script': [[], []],
|
'script': [[], []],
|
||||||
'sway-xkb': [['i3-common.c', 'i3-common.h'], [dynlist, json]],
|
'sway-xkb': [['i3-common.c', 'i3-common.h'], [dynlist, json]],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if plugin_mpd_enabled
|
||||||
|
mod_data += {'mpd': [[], [mpd]]}
|
||||||
|
endif
|
||||||
|
|
||||||
if backend_x11
|
if backend_x11
|
||||||
mod_data += {
|
mod_data += {
|
||||||
'xkb': [[], [xcb_stuff, xcb_xkb]],
|
'xkb': [[], [xcb_stuff, xcb_xkb]],
|
||||||
|
|
4
plugin.c
4
plugin.c
|
@ -39,7 +39,9 @@ EXTERN_MODULE(clock);
|
||||||
EXTERN_MODULE(foreign_toplevel);
|
EXTERN_MODULE(foreign_toplevel);
|
||||||
EXTERN_MODULE(i3);
|
EXTERN_MODULE(i3);
|
||||||
EXTERN_MODULE(label);
|
EXTERN_MODULE(label);
|
||||||
|
#if defined(PLUGIN_ENABLED_MPD)
|
||||||
EXTERN_MODULE(mpd);
|
EXTERN_MODULE(mpd);
|
||||||
|
#endif
|
||||||
EXTERN_MODULE(network);
|
EXTERN_MODULE(network);
|
||||||
EXTERN_MODULE(removables);
|
EXTERN_MODULE(removables);
|
||||||
EXTERN_MODULE(river);
|
EXTERN_MODULE(river);
|
||||||
|
@ -117,7 +119,9 @@ init(void)
|
||||||
#endif
|
#endif
|
||||||
REGISTER_CORE_MODULE(i3, i3);
|
REGISTER_CORE_MODULE(i3, i3);
|
||||||
REGISTER_CORE_MODULE(label, label);
|
REGISTER_CORE_MODULE(label, label);
|
||||||
|
#if defined(PLUGIN_ENABLED_MPD)
|
||||||
REGISTER_CORE_MODULE(mpd, mpd);
|
REGISTER_CORE_MODULE(mpd, mpd);
|
||||||
|
#endif
|
||||||
REGISTER_CORE_MODULE(network, network);
|
REGISTER_CORE_MODULE(network, network);
|
||||||
REGISTER_CORE_MODULE(removables, removables);
|
REGISTER_CORE_MODULE(removables, removables);
|
||||||
#if defined(HAVE_PLUGIN_river)
|
#if defined(HAVE_PLUGIN_river)
|
||||||
|
|
Loading…
Add table
Reference in a new issue