diff options
author | Mart Raudsepp <leio@gentoo.org> | 2024-03-18 01:24:58 +0200 |
---|---|---|
committer | Mart Raudsepp <leio@gentoo.org> | 2024-04-01 22:53:30 +0300 |
commit | aec35ae3a3f21a7443be9078fe4e24fd5cdb8011 (patch) | |
tree | 8e275cebd38132f6c7ce3d839ce7501d83a39c99 /eclass/gstreamer-meson.eclass | |
parent | media-plugins/gst-plugins-opus: Drop obsolete gst-plugins-opusparse blocker (diff) | |
download | gentoo-aec35ae3a3f21a7443be9078fe4e24fd5cdb8011.tar.gz gentoo-aec35ae3a3f21a7443be9078fe4e24fd5cdb8011.tar.bz2 gentoo-aec35ae3a3f21a7443be9078fe4e24fd5cdb8011.zip |
gstreamer-meson.eclass: Refactor away repetition in gstreamer_get_plugins()
Signed-off-by: Mart Raudsepp <leio@gentoo.org>
Diffstat (limited to 'eclass/gstreamer-meson.eclass')
-rw-r--r-- | eclass/gstreamer-meson.eclass | 45 |
1 files changed, 16 insertions, 29 deletions
diff --git a/eclass/gstreamer-meson.eclass b/eclass/gstreamer-meson.eclass index bc4bdcedb5b0..82e4faa2192e 100644 --- a/eclass/gstreamer-meson.eclass +++ b/eclass/gstreamer-meson.eclass @@ -83,36 +83,23 @@ gstreamer_get_plugins() { "${S}/meson_options.txt" || die "Failed to extract options for plugins with external deps" ) - # opencv and hls in gst-plugins-bad are split, can't be properly detected - if grep -q "option('opencv'" "${EMESON_SOURCE}"/meson_options.txt ; then - GST_PLUGINS_EXT_DEPS="${GST_PLUGINS_EXT_DEPS} -opencv" - fi - if grep -q "option('hls'" "${EMESON_SOURCE}"/meson_options.txt ; then - GST_PLUGINS_EXT_DEPS="${GST_PLUGINS_EXT_DEPS} -hls" - fi - - # soup in gst-plugins-good is split, can't be properly detected - if grep -q "option('soup'" "${EMESON_SOURCE}"/meson_options.txt ; then - GST_PLUGINS_EXT_DEPS="${GST_PLUGINS_EXT_DEPS} -soup" - fi - - if grep -q "option('gl'" "${EMESON_SOURCE}"/meson_options.txt ; then - GST_PLUGINS_EXT_DEPS="${GST_PLUGINS_EXT_DEPS} -gl" - fi + # meson_options that should be in GST_PLUGINS_EXT_DEPS but automatic parsing above can't catch + local extra_options + extra_options=( + opencv + hls + soup + gl + qt5 + qt6 + ) - # See bug #907483 - if grep -q "option('qt5'" "${EMESON_SOURCE}"/meson_options.txt ; then - GST_PLUGINS_EXT_DEPS="${GST_PLUGINS_EXT_DEPS} -qt5" - fi - if grep -q "option('qt6'" "${EMESON_SOURCE}"/meson_options.txt ; then - GST_PLUGINS_EXT_DEPS="${GST_PLUGINS_EXT_DEPS} -qt6" - fi + for option in ${extra_options[@]} ; do + if grep -q "option('${option}'" "${EMESON_SOURCE}"/meson_options.txt ; then + GST_PLUGINS_EXT_DEPS="${GST_PLUGINS_EXT_DEPS} +${option}" + fi + done } # @FUNCTION: gstreamer_system_package |