commit:     8b610ae73860af6e842622ab64ed4ebef5fd0ef9
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 21 05:40:57 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jun 21 05:40:57 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b610ae7

findlib.eclass: add EAPI guard

Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/findlib.eclass | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/eclass/findlib.eclass b/eclass/findlib.eclass
index d117c0b2bfd..e8b6e73c97a 100644
--- a/eclass/findlib.eclass
+++ b/eclass/findlib.eclass
@@ -6,10 +6,19 @@
 # ML <m...@gentoo.org>
 # @AUTHOR:
 # Original author: Matthieu Sozeau <mat...@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

Reply via email to