--- /usr/portage/eclass/apache-2.eclass 2012-05-23 05:31:13.000000000 +0200 +++ /usr/local/portage/eclass/apache-2.eclass 2012-07-26 12:53:23.449568498 +0200 @@ -69,8 +69,20 @@ IUSE_MPMS="${IUSE_MPMS_FORK} ${IUSE_MPMS_THREAD}" IUSE="${IUSE} debug doc ldap selinux ssl static suexec threads" +# @ECLASS-VARIABLE: MODULE_DEFAULTS +# @DESCRIPTION: +# This variable can be set in the ebuild and contains a space-separated +# list of modules to be expanded to default flags according to IUSE-defaults. +# Example: +# IUSE_MODULES="foo" with MODULE_DEFAULTS="" => IUSE="apache2_modules_foo" +# IUSE_MODULES="foo" with MODULE_DEFAULTS="foo" => IUSE="+apache2_modules_foo" + for module in ${IUSE_MODULES} ; do - IUSE="${IUSE} apache2_modules_${module}" + if has ${module} ${MODULE_DEFAULTS} ; then + IUSE="${IUSE} +apache2_modules_${module}" + else + IUSE="${IUSE} apache2_modules_${module}" + fi done for mpm in ${IUSE_MPMS} ; do