Hey all -- depend.apache.eclass currently calls get_libdir() in global
scope due to _init_apache2 being called by need_apache*() functions.
This patch drops _init_apache2 from these need_apache*() functions on
all EAPIS other than 0-5, and calls it during depend.apache_pkg_setup().

FYI, there are nine packages which would need to be adjusted if this
change were to not be EAPI6 specific, and none of the adjustments
would need revbumps or stabilizations:

app-text/refbase
dev-perl/Apache-Test
media-sound/mserv
sci-geosciences/mapserver
www-apps/Apache-Gallery
www-apps/lxr
www-apps/redmine
www-apps/rt
www-misc/zoneminder



diff --git a/eclass/depend.apache.eclass b/eclass/depend.apache.eclass
index 22a8216..d0b30eb 100644
--- a/eclass/depend.apache.eclass
+++ b/eclass/depend.apache.eclass
@@ -162,6 +162,8 @@ depend.apache_pkg_setup() {
 		else
 			_init_no_apache
 		fi
+	else
+		_init_apache2
 	fi
 }
 
@@ -226,7 +228,9 @@ need_apache2() {
 
 	DEPEND="${DEPEND} ${APACHE2_DEPEND}"
 	RDEPEND="${RDEPEND} ${APACHE2_DEPEND}"
-	_init_apache2
+	case "${EAPI:-0}" in
+	0|1|2|3|4|5) _init_apache2 ;;
+	esac
 }
 
 # @FUNCTION: need_apache2_2
@@ -237,7 +241,9 @@ need_apache2_2() {
 
 	DEPEND="${DEPEND} ${APACHE2_2_DEPEND}"
 	RDEPEND="${RDEPEND} ${APACHE2_2_DEPEND}"
-	_init_apache2
+	case "${EAPI:-0}" in
+	0|1|2|3|4|5) _init_apache2 ;;
+	esac
 }
 
 # @FUNCTION: need_apache2_4
@@ -248,7 +254,9 @@ need_apache2_4() {
 
         DEPEND="${DEPEND} ${APACHE2_4_DEPEND}"
         RDEPEND="${RDEPEND} ${APACHE2_4_DEPEND}"
-        _init_apache2
+	case "${EAPI:-0}" in
+	0|1|2|3|4|5) _init_apache2 ;;
+	esac
 }
 
 # @FUNCTION: has_apache

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to