summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/php-ext-pecl-r3.eclass')
-rw-r--r--eclass/php-ext-pecl-r3.eclass15
1 files changed, 13 insertions, 2 deletions
diff --git a/eclass/php-ext-pecl-r3.eclass b/eclass/php-ext-pecl-r3.eclass
index 19040a7e762b..eaf20e026f90 100644
--- a/eclass/php-ext-pecl-r3.eclass
+++ b/eclass/php-ext-pecl-r3.eclass
@@ -5,11 +5,22 @@
# @MAINTAINER:
# Gentoo PHP team <php-bugs@gentoo.org>
# @BLURB: A uniform way to install PECL extensions
+# @SUPPORTED_EAPIS: 6 7
# @DESCRIPTION:
# This eclass should be used by all dev-php/pecl-* ebuilds as a uniform
# way of installing PECL extensions. For more information about PECL,
# see https://pecl.php.net/
+case ${EAPI:-0} in
+ [67]) ;;
+ *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
+esac
+
+EXPORT_FUNCTIONS src_install src_test
+
+if [[ -z ${_PHP_EXT_PECL_R3_ECLASS} ]] ; then
+_PHP_EXT_PECL_R3_ECLASS=1
+
# @ECLASS-VARIABLE: PHP_EXT_PECL_PKG
# @PRE_INHERIT
# @DESCRIPTION:
@@ -46,8 +57,6 @@ S="${WORKDIR}/${PHP_EXT_PECL_PKG_V}"
inherit php-ext-source-r3
-EXPORT_FUNCTIONS src_install src_test
-
if [[ -z "${PHP_EXT_PECL_FILENAME}" ]] ; then
SRC_URI="https://pecl.php.net/get/${PHP_EXT_PECL_PKG_V}.tgz"
else
@@ -85,3 +94,5 @@ php-ext-pecl-r3_src_test() {
NO_INTERACTION="yes" emake test
done
}
+
+fi