commit:     0dcaafc4c96820046d5c3afd7c3da7d148cc4e5b
Author:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 29 06:24:29 2023 +0000
Commit:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Sun Oct  8 10:03:22 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0dcaafc4

eclass/depend.apache: deprecate apache 2.2 methods

www-servers/apache-2.2 has been removed in 2019.

Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>

 eclass/depend.apache.eclass | 30 ++++++++++++++++++++++--------
 1 file changed, 22 insertions(+), 8 deletions(-)

diff --git a/eclass/depend.apache.eclass b/eclass/depend.apache.eclass
index 4dc3f68daabc..4d1ca573611b 100644
--- a/eclass/depend.apache.eclass
+++ b/eclass/depend.apache.eclass
@@ -109,7 +109,7 @@ APACHE2_DEPEND="=www-servers/apache-2*"
 
 # @ECLASS_VARIABLE: APACHE2_2_DEPEND
 # @DESCRIPTION:
-# Dependencies for Apache 2.2.x
+# Dependencies for Apache 2.2.x. Deprecated and removed in EAPI 8.
 APACHE2_2_DEPEND="=www-servers/apache-2.2*"
 
 # @ECLASS_VARIABLE: APACHE2_4_DEPEND
@@ -215,10 +215,17 @@ want_apache2() {
 want_apache2_2() {
        debug-print-function $FUNCNAME $*
 
-       local myiuse=${1:-apache2}
-       IUSE="${IUSE} ${myiuse}"
-       DEPEND="${DEPEND} ${myiuse}? ( ${APACHE2_2_DEPEND} )"
-       RDEPEND="${RDEPEND} ${myiuse}? ( ${APACHE2_2_DEPEND} )"
+       case ${EAPI:-0} in
+               6|7)
+                       local myiuse=${1:-apache2}
+                       IUSE="${IUSE} ${myiuse}"
+                       DEPEND="${DEPEND} ${myiuse}? ( ${APACHE2_2_DEPEND} )"
+                       RDEPEND="${RDEPEND} ${myiuse}? ( ${APACHE2_2_DEPEND} )"
+                       ;;
+               *)
+                       errror "want-apache2_2 is no longer supported in EAPI 8"
+                       ;;
+       esac
 }
 
 # @FUNCTION: want_apache2_4
@@ -263,9 +270,16 @@ need_apache2() {
 need_apache2_2() {
        debug-print-function $FUNCNAME $*
 
-       DEPEND="${DEPEND} ${APACHE2_2_DEPEND}"
-       RDEPEND="${RDEPEND} ${APACHE2_2_DEPEND}"
-       _init_apache2
+       case ${EAPI:-0} in
+               6|7)
+                       DEPEND="${DEPEND} ${APACHE2_2_DEPEND}"
+                       RDEPEND="${RDEPEND} ${APACHE2_2_DEPEND}"
+                       _init_apache2
+                       ;;
+               *)
+                       error "need_apache2-2 is no longer supported in EAPI 8"
+                       ;;
+       esac
 }
 
 # @FUNCTION: need_apache2_4

Reply via email to