[gnome-control-center/wip/hadess/fix-polkit-dep: 4/4] build: Check for polkit supplementary files




commit 76e7f6b80e3a6bdd69b7692a8dc5485d1c548485
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Oct 15 11:02:20 2021 +0200

    build: Check for polkit supplementary files
    
    Which are shipped in newer versions of polkit, as well as backported in
    older versions of Ubuntu, rather than hardcoding a newer version of
    polkit and expecting newcomers to know to downgrade the version
    requirement.
    
    Fixes: 9ebcd17236a54daa0927a22d973d0309dfb4c8df

 meson.build | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index 1a953067b..6e662e216 100644
--- a/meson.build
+++ b/meson.build
@@ -127,7 +127,6 @@ gnome_settings_dep = dependency('gnome-settings-daemon', version: '>= 3.27.90')
 goa_dep = dependency('goa-1.0', version: goa_req_version)
 gsettings_desktop_dep = dependency('gsettings-desktop-schemas', version: '>= 40.alpha')
 libxml_dep = dependency('libxml-2.0')
-polkit_gobject_dep = dependency('polkit-gobject-1', version: '>= 0.103')
 pulse_dep = dependency('libpulse', version: pulse_req_version)
 pulse_mainloop_dep = dependency('libpulse-mainloop-glib', version: pulse_req_version)
 upower_glib_dep = dependency('upower-glib', version: '>= 0.99.8')
@@ -148,6 +147,15 @@ common_deps = [
   dependency('gtk+-3.0', version: '>= 3.22.20')
 ]
 
+polkit_gobject_dep = dependency('polkit-gobject-1', version: '>= 0.103')
+# Also verify that polkit ITS files exist:
+# https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/491
+polkit_files = [ 'gettext/its/polkit.its', 'gettext/its/polkit.loc' ]
+foreach polkit_file: polkit_files
+  r = run_command('build-aux/meson/find_xdg_file.py', polkit_file)
+  assert(r.returncode() == 0, 'ITS support missing from polkit, please upgrade or contact your distribution')
+endforeach
+
 # Check for CUPS 1.4 or newer
 cups_dep = dependency('cups', version : '>= 1.4', required: false)
 assert(cups_dep.found(), 'CUPS 1.4 or newer not found')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]