summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMart Raudsepp <leio@gentoo.org>2024-03-25 00:46:45 +0200
committerMart Raudsepp <leio@gentoo.org>2024-04-01 22:53:32 +0300
commit0ce2194fd23f5a7996c7d7fb8b55005ccdfac9ba (patch)
tree6ab7d2801c3fe5ef916f73dcff25169d8eb4eab3 /eclass
parentmedia-plugins/gst-plugins-smoothstreaming: Note existence of gst-plugins-adap... (diff)
downloadgentoo-0ce2194fd23f5a7996c7d7fb8b55005ccdfac9ba.tar.gz
gentoo-0ce2194fd23f5a7996c7d7fb8b55005ccdfac9ba.tar.bz2
gentoo-0ce2194fd23f5a7996c7d7fb8b55005ccdfac9ba.zip
gstreamer-meson.eclass: add EAPI 8 support with pkg_setup and python-any-r1
pkg_setup is exported in EAPI-8 to proxy to python-any-r1_pkg_setup while being future-proof for any other changes and make it less surprising when some ebuild needs to important something else that exports pkg_setup too by not having it be implicit export via an indirect inherit. Bug: https://bugs.gentoo.org/834789 Bug: https://bugs.gentoo.org/807959 Bug: https://bugs.gentoo.org/804597 Bug: https://bugs.gentoo.org/804600 Bug: https://bugs.gentoo.org/804948 Bug: https://bugs.gentoo.org/805515 Bug: https://bugs.gentoo.org/808111 Bug: https://bugs.gentoo.org/808114 Bug: https://bugs.gentoo.org/813029 Bug: https://bugs.gentoo.org/813156 Bug: https://bugs.gentoo.org/813159 Bug: https://bugs.gentoo.org/834790 Bug: https://bugs.gentoo.org/834791 Bug: https://bugs.gentoo.org/834878 Bug: https://bugs.gentoo.org/835398 Bug: https://bugs.gentoo.org/843986 Bug: https://bugs.gentoo.org/866797 Bug: https://bugs.gentoo.org/866800 Bug: https://bugs.gentoo.org/866803 Bug: https://bugs.gentoo.org/866806 Bug: https://bugs.gentoo.org/866824 Bug: https://bugs.gentoo.org/866827 Bug: https://bugs.gentoo.org/866830 Bug: https://bugs.gentoo.org/866833 Bug: https://bugs.gentoo.org/866836 Bug: https://bugs.gentoo.org/866845 Bug: https://bugs.gentoo.org/866848 Bug: https://bugs.gentoo.org/866851 Bug: https://bugs.gentoo.org/866854 Bug: https://bugs.gentoo.org/866857 Bug: https://bugs.gentoo.org/866860 Bug: https://bugs.gentoo.org/866863 Bug: https://bugs.gentoo.org/866866 Bug: https://bugs.gentoo.org/866914 Bug: https://bugs.gentoo.org/866917 Bug: https://bugs.gentoo.org/866920 Bug: https://bugs.gentoo.org/866926 Bug: https://bugs.gentoo.org/888129 Bug: https://bugs.gentoo.org/907435 Bug: https://bugs.gentoo.org/907437 Bug: https://bugs.gentoo.org/907438 Bug: https://bugs.gentoo.org/907440 Bug: https://bugs.gentoo.org/907441 Bug: https://bugs.gentoo.org/907466 Bug: https://bugs.gentoo.org/907467 Bug: https://bugs.gentoo.org/907468 Bug: https://bugs.gentoo.org/907469 Signed-off-by: Mart Raudsepp <leio@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/gstreamer-meson.eclass36
1 files changed, 27 insertions, 9 deletions
diff --git a/eclass/gstreamer-meson.eclass b/eclass/gstreamer-meson.eclass
index d8343280dab9..bf3acddf39e5 100644
--- a/eclass/gstreamer-meson.eclass
+++ b/eclass/gstreamer-meson.eclass
@@ -5,6 +5,7 @@
# @MAINTAINER:
# gstreamer@gentoo.org
# @AUTHOR:
+# Mart Raudsepp <leio@gentoo.org>
# Haelwenn (lanodan) Monnier <contact@hacktivis.me>
# Michał Górny <mgorny@gentoo.org>
# Gilles Dartiguelongue <eva@gentoo.org>
@@ -12,7 +13,7 @@
# foser <foser@gentoo.org>
# zaheerm <zaheerm@gentoo.org>
# Steven Newbury
-# @SUPPORTED_EAPIS: 7
+# @SUPPORTED_EAPIS: 7 8
# @PROVIDES: meson multilib-minimal
# @BLURB: Helps building core & split gstreamer plugins
# @DESCRIPTION:
@@ -26,21 +27,25 @@
# plugin, consider adding media-plugins/gst-plugins-meta dependency, but
# also list any packages that provide explicitly requested plugins.
-# TODO: Remove after all older versions are gone from tree
-if ver_test ${PV} -lt 1.22.10 ; then
- inherit virtualx
-fi
-# multilib-minimal goes last
-inherit meson multilib toolchain-funcs xdg-utils multilib-minimal
-
case "${EAPI:-0}" in
- 7)
+ 7|8)
;;
*)
die "EAPI=\"${EAPI}\" is not supported"
;;
esac
+PYTHON_COMPAT=( python3_{10..12} )
+[[ ${EAPI} == 8 ]] && inherit python-any-r1
+
+# TODO: Remove after all older versions are gone from tree
+if ver_test ${PV} -lt 1.22.10 ; then
+ inherit virtualx
+fi
+
+# multilib-minimal goes last
+inherit meson multilib toolchain-funcs xdg-utils multilib-minimal
+
# @ECLASS_VARIABLE: GST_PLUGINS_ENABLED
# @DESCRIPTION:
# Defines the plugins to be built.
@@ -208,6 +213,7 @@ BDEPEND="
virtual/pkgconfig
virtual/perl-JSON-PP
"
+[[ ${EAPI} == 8 ]] && BDEPEND="${BDEPEND} ${PYTHON_DEPS}"
if [[ "${PN}" != "gstreamer" ]]; then
RDEPEND="
@@ -445,6 +451,14 @@ gstreamer_multilib_src_compile() {
fi
}
+# @FUNCTION: gstreamer-meson_pkg_setup
+# @DESCRIPTION:
+# Proxies python-any-r1_pkg_setup for forward-proofing any future pkg_setup needs.
+# Only exported for EAPI-8.
+gstreamer-meson_pkg_setup() {
+ python-any-r1_pkg_setup
+}
+
# @FUNCTION: gstreamer_multilib_src_test
# @DESCRIPTION:
# Tests the gstreamer plugin (non-split)
@@ -483,3 +497,7 @@ gstreamer_multilib_src_install_all() {
[[ -e ${dir}/README ]] && dodoc "${dir}"/README
done
}
+
+if [[ ${EAPI} == 8 ]]; then
+ EXPORT_FUNCTIONS pkg_setup
+fi