Patrick Williams | 4585273 | 2022-04-02 08:58:32 -0500 | [diff] [blame] | 1 | From b311f9e75f13205fd0738f7e89fd2062b9e7b237 Mon Sep 17 00:00:00 2001 |
| 2 | From: Carlos Rafael Giani <crg7475@mailbox.org> |
| 3 | Date: Wed, 30 Mar 2022 19:44:38 +0200 |
| 4 | Subject: [PATCH] meson: Add option to enable/disable legacy RTKit module |
| 5 | |
| 6 | The RTKit module is being replaced by the RT module. Currently, it is |
| 7 | always built if D-Bus is present. For packagers, it can be beneficial to |
| 8 | be able to disable the legacy module. Add a Meson option to allow for |
| 9 | exactly that. Make it enabled by default to not change default behavior. |
| 10 | |
| 11 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/1204] |
| 12 | --- |
| 13 | meson_options.txt | 4 ++++ |
| 14 | src/modules/meson.build | 2 +- |
| 15 | 2 files changed, 5 insertions(+), 1 deletion(-) |
| 16 | |
| 17 | diff --git a/meson_options.txt b/meson_options.txt |
| 18 | index 49d5b2203..2687bfe7e 100644 |
| 19 | --- a/meson_options.txt |
| 20 | +++ b/meson_options.txt |
| 21 | @@ -237,3 +237,7 @@ option('libcanberra', |
| 22 | description: 'Enable code that depends on libcanberra', |
| 23 | type: 'feature', |
| 24 | value: 'auto') |
| 25 | +option('legacy-rtkit', |
| 26 | + description: 'Build legacy rtkit module', |
| 27 | + type: 'boolean', |
| 28 | + value: 'true') |
| 29 | diff --git a/src/modules/meson.build b/src/modules/meson.build |
| 30 | index ee724bf52..2d26cc459 100644 |
| 31 | --- a/src/modules/meson.build |
| 32 | +++ b/src/modules/meson.build |
| 33 | @@ -139,7 +139,7 @@ pipewire_module_rt = shared_library('pipewire-module-rt', [ 'module-rt.c' ], |
| 34 | dependencies : [dbus_dep, mathlib, dl_lib, pipewire_dep], |
| 35 | ) |
| 36 | |
| 37 | -build_module_rtkit = dbus_dep.found() |
| 38 | +build_module_rtkit = dbus_dep.found() and (get_option('legacy-rtkit') == true) |
| 39 | if build_module_rtkit |
| 40 | # TODO: This serves as a temporary alias to prevent breaking existing setups |
| 41 | # while `module-rtkit` is being migrated to `module-rt` |
| 42 | -- |
| 43 | 2.32.0 |
| 44 | |