summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-06-20 23:15:40 +0200
committerDavid Seifert <soap@gentoo.org>2021-06-20 23:15:40 +0200
commit35b26326f80d43cba0264a5aef3fe5011024b005 (patch)
tree8388d46016a301159a31820553dae96cb072959c /eclass/vala.eclass
parentuser-info.eclass: [QA] add EAPI guard (diff)
downloadgentoo-35b26326f80d43cba0264a5aef3fe5011024b005.tar.gz
gentoo-35b26326f80d43cba0264a5aef3fe5011024b005.tar.bz2
gentoo-35b26326f80d43cba0264a5aef3fe5011024b005.zip
vala.eclass: [QA] add EAPI guard, drop support for < EAPI 6, add basic eclassdoc
* Declare supported EAPIs as: [QA] 6, 7 * Add inherit guards to die on unsupported/untested EAPIs * Add guard to prevent multiple inherits Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'eclass/vala.eclass')
-rw-r--r--eclass/vala.eclass18
1 files changed, 11 insertions, 7 deletions
diff --git a/eclass/vala.eclass b/eclass/vala.eclass
index 4bf15eae2684..eb6abc741e83 100644
--- a/eclass/vala.eclass
+++ b/eclass/vala.eclass
@@ -6,7 +6,7 @@
# gnome@gentoo.org
# @AUTHOR:
# Alexandre Rostovtsev <tetromino@gentoo.org>
-# @SUPPORTED_EAPIS: 1 2 3 4 5 6 7
+# @SUPPORTED_EAPIS: 6 7
# @BLURB: Sets up the environment for using a specific version of vala.
# @DESCRIPTION:
# This eclass sets up commonly used environment variables for using a specific
@@ -16,14 +16,16 @@
#
# This eclass provides one phase function: src_prepare.
-inherit eutils multilib
-
-case "${EAPI:-0}" in
- 0) die "EAPI=0 is not supported" ;;
- 1) ;;
- *) EXPORT_FUNCTIONS src_prepare ;;
+case ${EAPI:-0} in
+ [67]) inherit eutils multilib ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
+EXPORT_FUNCTIONS src_prepare
+
+if [[ -z ${_VALA_ECLASS} ]] ; then
+_VALA_ECLASS=1
+
# @ECLASS-VARIABLE: VALA_MIN_API_VERSION
# @DESCRIPTION:
# Minimum vala API version (e.g. 0.36).
@@ -170,3 +172,5 @@ vala_src_prepare() {
: ${PKG_CONFIG_PATH:="${EPREFIX}/usr/$(get_libdir)/pkgconfig:${EPREFIX}/usr/share/pkgconfig"}
export PKG_CONFIG_PATH="${T}/pkgconfig:${PKG_CONFIG_PATH}"
}
+
+fi