summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-06-21 06:38:03 +0100
committerSam James <sam@gentoo.org>2021-06-21 06:38:03 +0100
commit371c510d5bfbce3a1580374352f2667f71c2ab57 (patch)
tree18e45d61bda98c70b086ca4ffe4b165266cb0363
parentcron.eclass: fix @SUPPORTED_EAPIS eclassdoc (diff)
downloadgentoo-371c510d5bfbce3a1580374352f2667f71c2ab57.tar.gz
gentoo-371c510d5bfbce3a1580374352f2667f71c2ab57.tar.bz2
gentoo-371c510d5bfbce3a1580374352f2667f71c2ab57.zip
findlib.eclass: add EAPI guard
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--eclass/cdrom.eclass6
-rw-r--r--eclass/findlib.eclass11
2 files changed, 17 insertions, 0 deletions
diff --git a/eclass/cdrom.eclass b/eclass/cdrom.eclass
index 623a19867d42..9dca3f63bc10 100644
--- a/eclass/cdrom.eclass
+++ b/eclass/cdrom.eclass
@@ -4,6 +4,7 @@
# @ECLASS: cdrom.eclass
# @MAINTAINER:
# games@gentoo.org
+# @SUPPORTED_EAPIS: 6 7
# @BLURB: Functions for CD-ROM handling
# @DESCRIPTION:
# Acquire CD(s) for those lovely CD-based emerges. Yes, this violates
@@ -14,6 +15,11 @@
# eclass will require RESTRICT="bindist" but the point still stands.
# The functions are generally called in src_unpack.
+case ${EAPI:-0} in
+ [67]) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
if [[ -z ${_CDROM_ECLASS} ]]; then
_CDROM_ECLASS=1
diff --git a/eclass/findlib.eclass b/eclass/findlib.eclass
index d117c0b2bfd6..e8b6e73c97af 100644
--- a/eclass/findlib.eclass
+++ b/eclass/findlib.eclass
@@ -6,10 +6,19 @@
# ML <ml@gentoo.org>
# @AUTHOR:
# Original author: Matthieu Sozeau <mattam@gentoo.org> (retired)
+# @SUPPORTED_EAPIS: 6 7
# @BLURB: ocamlfind (a.k.a. findlib) eclass
# @DESCRIPTION:
# ocamlfind (a.k.a. findlib) eclass
+case ${EAPI:-0} in
+ [67]) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
+if [[ -z ${_FINDLIB_ECLASS} ]] ; then
+_FINDLIB_ECLASS=1
+
# Do not complain about CFLAGS etc since ML projects do not use them.
QA_FLAGS_IGNORED='.*'
@@ -60,3 +69,5 @@ findlib_src_install() {
findlib_src_preinst
make DESTDIR="${D}" "$@" install || die "make failed"
}
+
+fi