- Add EAPI conditional
- Drop unnecessary die statements
- Use sed instead of cat, to preserve indentation of output
Signed-off-by: Ulrich Müller <
ulm@gentoo.org>
---
eclass/wrapper.eclass | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/eclass/wrapper.eclass b/eclass/wrapper.eclass
index 399c7cc269d4..8d3d273d81c6 100644
--- a/eclass/wrapper.eclass
+++ b/eclass/wrapper.eclass
@@ -1,59 +1,64 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: wrapper.eclass
# @MAINTAINER:
#
base-system@gentoo.org
+# @SUPPORTED_EAPIS: 5 6 7 8
# @BLURB: create a shell wrapper script
+case ${EAPI} in
+ 5|6|7|8) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
if [[ -z ${_WRAPPER_ECLASS} ]]; then
_WRAPPER_ECLASS=1
# @FUNCTION: make_wrapper
# @USAGE: <wrapper> <target> [chdir] [libpaths] [installpath]
# @DESCRIPTION:
# Create a shell wrapper script named wrapper in installpath
# (defaults to the bindir) to execute target (default of wrapper)
# by first optionally setting LD_LIBRARY_PAT