diff options
| author | David Seifert <soap@gentoo.org> | 2023-03-17 23:04:31 +0100 |
|---|---|---|
| committer | David Seifert <soap@gentoo.org> | 2023-03-17 23:04:31 +0100 |
| commit | 2cba2db27919bc449ed2a7bf7ed3259c6b96e65f (patch) | |
| tree | c89a0929ca3e7cc95c737085614214e89450c999 /eclass/php-pear-r2.eclass | |
| parent | b5240fb0f593fc3c45885125682d33069cfb45c8 (diff) | |
| download | gentoo-2cba2db27919bc449ed2a7bf7ed3259c6b96e65f.tar.gz gentoo-2cba2db27919bc449ed2a7bf7ed3259c6b96e65f.tar.bz2 gentoo-2cba2db27919bc449ed2a7bf7ed3259c6b96e65f.zip | |
eclass: standardize prologue/epilogue
Closes: https://github.com/gentoo/gentoo/pull/30061
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'eclass/php-pear-r2.eclass')
| -rw-r--r-- | eclass/php-pear-r2.eclass | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/eclass/php-pear-r2.eclass b/eclass/php-pear-r2.eclass index 2d204ed24c3c..29bcf1e6fce8 100644 --- a/eclass/php-pear-r2.eclass +++ b/eclass/php-pear-r2.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: php-pear-r2.eclass @@ -14,20 +14,16 @@ # Note that this eclass doesn't handle dependencies of PEAR packages # on purpose; please use (R)DEPEND to define them correctly! -EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm - -case "${EAPI:-0}" in - 6|7) - ;; - 8) - IDEPEND=">=dev-php/pear-1.8.1" - ;; - *) - die "Unsupported EAPI=${EAPI} for ${ECLASS}" - ;; +case ${EAPI} in + 6|7|8) ;; + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; esac +if [[ -z ${_PHP_PEAR_R2_ECLASS} ]]; then +_PHP_PEAR_R2_ECLASS=1 + RDEPEND=">=dev-php/pear-1.8.1" +[[ ${EAPI} != [67] ]] && IDEPEND=">=dev-php/pear-1.8.1" # @ECLASS_VARIABLE: PHP_PEAR_PKG_NAME # @DESCRIPTION: @@ -129,3 +125,7 @@ php-pear-r2_pkg_postrm() { # Uninstall known dependency "${EROOT%/}/usr/bin/peardev" uninstall -nrO "${PHP_PEAR_DOMAIN}/${PHP_PEAR_PKG_NAME}" } + +fi + +EXPORT_FUNCTIONS src_install pkg_postinst pkg_postrm |
