summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-06-20 23:15:55 +0200
committerDavid Seifert <soap@gentoo.org>2021-06-20 23:15:55 +0200
commit9e892293b5c2517fa7d25c07d351f192ace0d1f0 (patch)
treeced83cd7bf2b216c9dfc843b30bc12e6f6dca68a /eclass/webapp.eclass
parentwaf-utils.eclass: [QA] drop support for < EAPI 6 (diff)
downloadgentoo-9e892293b5c2517fa7d25c07d351f192ace0d1f0.tar.gz
gentoo-9e892293b5c2517fa7d25c07d351f192ace0d1f0.tar.bz2
gentoo-9e892293b5c2517fa7d25c07d351f192ace0d1f0.zip
webapp.eclass: [QA] add EAPI guard
* Declare supported EAPIs as: [QA] 5, 6, 7 * Add guards to die on unsupported/untested EAPIs * Add inherit guards to prevent multiple sourcing Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'eclass/webapp.eclass')
-rw-r--r--eclass/webapp.eclass15
1 files changed, 13 insertions, 2 deletions
diff --git a/eclass/webapp.eclass b/eclass/webapp.eclass
index 6907ef1c321..5ef7dbce03c 100644
--- a/eclass/webapp.eclass
+++ b/eclass/webapp.eclass
@@ -4,11 +4,22 @@
# @ECLASS: webapp.eclass
# @MAINTAINER:
# web-apps@gentoo.org
+# @SUPPORTED_EAPIS: 5 6 7
# @BLURB: functions for installing applications to run under a web server
# @DESCRIPTION:
# The webapp eclass contains functions to handle web applications with
# webapp-config. Part of the implementation of GLEP #11
+case ${EAPI:-0} in
+ [567]) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
+EXPORT_FUNCTIONS pkg_postinst pkg_setup src_install pkg_prerm
+
+if [[ -z ${_WEBAPP_ECLASS} ]]; then
+_WEBAPP_ECLASS=1
+
# @ECLASS-VARIABLE: WEBAPP_DEPEND
# @DESCRIPTION:
# An ebuild should use WEBAPP_DEPEND if a custom DEPEND needs to be built, most
@@ -35,8 +46,6 @@ if [[ "${WEBAPP_OPTIONAL}" != "yes" ]]; then
RDEPEND="${DEPEND}"
fi
-EXPORT_FUNCTIONS pkg_postinst pkg_setup src_install pkg_prerm
-
INSTALL_DIR="/${PN}"
IS_UPGRADE=0
IS_REPLACE=0
@@ -577,3 +586,5 @@ webapp_pkg_prerm() {
echo
fi
}
+
+fi