diff options
author | Mart Raudsepp <leio@gentoo.org> | 2024-03-18 16:08:40 +0200 |
---|---|---|
committer | Mart Raudsepp <leio@gentoo.org> | 2024-04-01 22:53:31 +0300 |
commit | 7946efcd4ae878f55b93e58eb7e4ad9475150d89 (patch) | |
tree | 539b806fd3d6bcf96bd9c128674664646949227d /eclass | |
parent | gstreamer-meson.eclass: fix false positive missing introspection warnings (diff) | |
download | gentoo-7946efcd4ae878f55b93e58eb7e4ad9475150d89.tar.gz gentoo-7946efcd4ae878f55b93e58eb7e4ad9475150d89.tar.bz2 gentoo-7946efcd4ae878f55b93e58eb7e4ad9475150d89.zip |
gstreamer-meson.eclass: fix false positive missing IUSE=orc warnings
Main packages are assumed to always want IUSE=orc when the meson option is there,
whereas split plugins are considered to need it when they refer to orc_dep in one
of their plugin subdirs and not need it when none do.
Closes: https://bugs.gentoo.org/810417
Signed-off-by: Mart Raudsepp <leio@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/gstreamer-meson.eclass | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/eclass/gstreamer-meson.eclass b/eclass/gstreamer-meson.eclass index da514129a5ae..d8343280dab9 100644 --- a/eclass/gstreamer-meson.eclass +++ b/eclass/gstreamer-meson.eclass @@ -303,9 +303,14 @@ gstreamer_multilib_src_configure() { if grep -q "option('orc'" "${EMESON_SOURCE}"/meson_options.txt ; then if in_iuse orc ; then gst_conf+=( -Dorc=$(usex orc enabled disabled) ) + if [[ "${PN}" != "${GST_ORG_MODULE}" ]] && ! _gstreamer_get_has_orc_dep; then + eqawarn "QA: IUSE=orc is present while plugin does not seem to support it" + fi else gst_conf+=( -Dorc=disabled ) - eqawarn "QA: IUSE=orc is missing while plugin supports it" + if [[ "${PN}" == "${GST_ORG_MODULE}" ]] || _gstreamer_get_has_orc_dep; then + eqawarn "QA: IUSE=orc is missing while plugin supports it" + fi fi else if in_iuse orc ; then @@ -398,6 +403,23 @@ EOF || die "Failed to extract target filenames from meson-info" } +# @FUNCTION: _gstreamer_get_has_orc_dep +# @INTERNAL +# @DESCRIPTION: +# Finds whether plugin appears to use dev-lang/orc or not. +_gstreamer_get_has_orc_dep() { + local has_orc_dep pdir plugin_dir + has_orc_dep=0 + + for plugin_dir in ${GST_PLUGINS_BUILD_DIR} ; do + pdir=$(gstreamer_get_plugin_dir ${plugin_dir}) + if grep -q "orc_dep" "${S}/${pdir}"/meson.build ; then + has_orc_dep=1 + fi + done + [[ ${has_orc_dep} -ne 0 ]] +} + # @FUNCTION: gstreamer_multilib_src_compile # @DESCRIPTION: # Compiles requested gstreamer plugin. |