mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-20 03:35:41 +02:00
modules/mpris: Moved code over to 'sd-bus'
- Ported d-bus specific code from 'libdbus' to 'sd-bus' - 'sd_bus' has been added to mesons dependencies. If systemd (>=221) is not installed, we fall back to [basu](https://git.sr.ht/~emersion/basu) v2.1 - Fixed a memory leak upon metadata change
This commit is contained in:
parent
8415d40988
commit
b55d5a6739
4 changed files with 412 additions and 359 deletions
|
@ -4,13 +4,15 @@ project('yambar', 'c',
|
|||
meson_version: '>=0.59.0',
|
||||
default_options: ['c_std=c18',
|
||||
'warning_level=1',
|
||||
'werror=true',
|
||||
'b_ndebug=if-release'])
|
||||
|
||||
is_debug_build = get_option('buildtype').startswith('debug')
|
||||
plugs_as_libs = get_option('core-plugins-as-shared-libraries')
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
cc_flags = [
|
||||
'-Werror=all'
|
||||
]
|
||||
|
||||
if cc.has_function('memfd_create',
|
||||
args: ['-D_GNU_SOURCE=200809L'],
|
||||
|
@ -75,7 +77,12 @@ backend_wayland = wayland_client.found() and wayland_cursor.found()
|
|||
tllist = dependency('tllist', version: '>=1.0.1', fallback: 'tllist')
|
||||
fcft = dependency('fcft', version: ['>=3.0.0', '<4.0.0'], fallback: 'fcft')
|
||||
|
||||
# DBus dependency. Used by 'modules/mpris'
|
||||
dbus = dependency('libsystemd', version: '>=221', fallback: 'basu')
|
||||
# dbus = dependency('basu')
|
||||
|
||||
add_project_arguments(
|
||||
cc_flags +
|
||||
['-D_GNU_SOURCE'] +
|
||||
(is_debug_build ? ['-D_DEBUG'] : []) +
|
||||
(backend_x11 ? ['-DENABLE_X11'] : []) +
|
||||
|
|
|
@ -22,8 +22,8 @@ plugin_mem_enabled = get_option('plugin-mem').allowed()
|
|||
mpd = dependency('libmpdclient', required: get_option('plugin-mpd'))
|
||||
plugin_mpd_enabled = mpd.found()
|
||||
|
||||
mpris = dependency('dbus-1', required: get_option('plugin-mpris'))
|
||||
plugin_mpris_enabled = mpris.found()
|
||||
mpris = dbus
|
||||
plugin_mpris_enabled = dbus.found()
|
||||
|
||||
json_i3 = dependency('json-c', required: get_option('plugin-i3'))
|
||||
plugin_i3_enabled = json_i3.found()
|
||||
|
|
755
modules/mpris.c
755
modules/mpris.c
File diff suppressed because it is too large
Load diff
3
subprojects/basu.wrap
Normal file
3
subprojects/basu.wrap
Normal file
|
@ -0,0 +1,3 @@
|
|||
[wrap-git]
|
||||
url = https://git.sr.ht/~emersion/basu
|
||||
revision = v0.2.1
|
Loading…
Add table
Reference in a new issue