[totem/wip/hadess/update-ci: 1/3] build: Add option to disable GStreamer plugin checking




commit 421aa19f2a4360453b638fc74736e84e27e3002f
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jan 26 14:36:08 2022 +0100

    build: Add option to disable GStreamer plugin checking
    
    It currently fails on Fedora 36 inside a CI, so make it possible to
    disable this check.

 meson_options.txt       |  1 +
 src/backend/meson.build | 58 +++++++++++++++++++++++++------------------------
 2 files changed, 31 insertions(+), 28 deletions(-)
---
diff --git a/meson_options.txt b/meson_options.txt
index 31edd2c20..c3561f322 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,6 +1,7 @@
 option('help', type: 'boolean', value: true, description: 'Build help')
 option('enable-easy-codec-installation', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', 
description: 'Whether to enable easy codec installation support for GStreamer')
 option('enable-python', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'Enable 
python support')
+option('check-plugins', type: 'boolean', value: true, description: 'Whether to check for GStreamer plugins')
 option('with-plugins', type: 'combo', choices: ['all', 'none', 'auto'], value: 'auto', description: 'Which 
Totem plugins to compile (default: auto; "all", "none" and "auto" are valid)')
 option('enable-gtk-doc', type: 'boolean', value: false, description: 'use gtk-doc to build documentation')
 option('profile', type: 'combo', choices: ['default', 'development'], value: 'default', description: 'Build 
profiles')
diff --git a/src/backend/meson.build b/src/backend/meson.build
index 9bd9e468e..9efdcbbc3 100644
--- a/src/backend/meson.build
+++ b/src/backend/meson.build
@@ -1,36 +1,38 @@
 backend_inc = include_directories('.')
 
-gst_inspect = find_program(
-  'gst-inspect-1.0',
-  join_paths(gst_dep.get_pkgconfig_variable('toolsdir'), 'gst-inspect-1.0'),
-  required: false
-)
-
-assert(gst_inspect.found(),
-       'Cannot find required GStreamer-1.0 tool "gst-inspect-1.0". It should be part of gstreamer-1_0-utils. 
Please install it.')
-
-gst_base_plugins = [
-  'playbin',
-  'videoscale'
-]
+if get_option('check-plugins')
+  gst_inspect = find_program(
+    'gst-inspect-1.0',
+    join_paths(gst_dep.get_pkgconfig_variable('toolsdir'), 'gst-inspect-1.0'),
+    required: false
+  )
+
+  assert(gst_inspect.found(),
+         'Cannot find required GStreamer-1.0 tool "gst-inspect-1.0". It should be part of 
gstreamer-1_0-utils. Please install it.')
+
+  gst_base_plugins = [
+    'playbin',
+    'videoscale'
+  ]
 
-foreach plugin: gst_base_plugins
-  r = run_command(gst_inspect, plugin, check: false)
-  assert(r.returncode() == 0,
-         'Cannot find required GStreamer-1.0 plugin "' + plugin + '". It should be part of gst-plugins-base. 
Please install it.')
-endforeach
+  foreach plugin: gst_base_plugins
+    r = run_command(gst_inspect, plugin, check: false)
+    assert(r.returncode() == 0,
+           'Cannot find required GStreamer-1.0 plugin "' + plugin + '". It should be part of 
gst-plugins-base. Please install it.')
+  endforeach
 
-gst_good_plugins = [
-  'autoaudiosink',
-  'goom',
-  'scaletempo'
-]
+  gst_good_plugins = [
+    'autoaudiosink',
+    'goom',
+    'scaletempo'
+  ]
 
-foreach plugin: gst_good_plugins
-  r = run_command(gst_inspect, plugin, check: false)
-  assert(r.returncode() == 0,
-         'Cannot find required GStreamer-1.0 plugin "' + plugin + '". It should be part of gst-plugins-good. 
Please install it.')
-endforeach
+  foreach plugin: gst_good_plugins
+    r = run_command(gst_inspect, plugin, check: false)
+    assert(r.returncode() == 0,
+           'Cannot find required GStreamer-1.0 plugin "' + plugin + '". It should be part of 
gst-plugins-good. Please install it.')
+  endforeach
+endif
 
 sources = files(
   'bacon-time-label.c',


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