summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMart Raudsepp <leio@gentoo.org>2024-03-17 23:49:36 +0200
committerMart Raudsepp <leio@gentoo.org>2024-04-01 22:53:29 +0300
commita4715fdb5226865f742df060abc89485e5f714d1 (patch)
treef352c46c46a163b4cbf87d011e3d82d359452edc /eclass
parentdev-python/gst-python: enable py3.12 (diff)
downloadgentoo-a4715fdb5226865f742df060abc89485e5f714d1.tar.gz
gentoo-a4715fdb5226865f742df060abc89485e5f714d1.tar.bz2
gentoo-a4715fdb5226865f742df060abc89485e5f714d1.zip
gstreamer-meson.eclass: Avoid needlessly compiling helper libraries in split packages
When a split package uses gstreamer_system_package() for a helper library in gst-libs/ that is in the same tarball, it wasn't working fully anymore these days because for subprojects support they all do a meson.override_dependency as well, which is also overriding the dependency our eclass helper adds at the top of the split plugins subdir meson.build. Because of that, it was building these helper libraries from scratch and link against them, only to discard it after linking against it and potentially also causing some ABI issues, as at runtime the system version from the main package is used (though that hasn't been observed as of yet, only the extra big compilation). Fix it by deleting the relevant override_dependency call as part of gstreamer_system_package() as well, which works as long as the syntax used for it is standard in terms of whitespace usage. For example gst-plugins-cdparanoia had 51 build units before due to this, but only 2 after the fix. Signed-off-by: Mart Raudsepp <leio@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/gstreamer-meson.eclass6
1 files changed, 5 insertions, 1 deletions
diff --git a/eclass/gstreamer-meson.eclass b/eclass/gstreamer-meson.eclass
index 299a46ab60a1..b9b9b9fa95df 100644
--- a/eclass/gstreamer-meson.eclass
+++ b/eclass/gstreamer-meson.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: gstreamer-meson.eclass
@@ -126,6 +126,10 @@ gstreamer_system_package() {
pc=${tuple#*:}-${SLOT}
sed -e "1i${dependency} = dependency('${pc}', required : true)" \
-i "${pdir}"/meson.build || die
+ # TODO: Remove conditional applying once older versions are all gone
+ if ver_test ${PV} -gt 1.22.5 ; then
+ sed -e "/meson\.override_dependency[(]pkg_name, ${dependency}[)]/d" -i "${S}"/gst-libs/gst/*/meson.build || die
+ fi
done
done
}