EAPI=5
-inherit apache-module
+inherit apache-module depend.apache
DESCRIPTION="Look up Apache ~user directories in an LDAP directory"
HOMEPAGE="http://horde.net/~jwm/software/${PN}/"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="ssl"
+DEPEND="net-nds/openldap
+ ssl? ( dev-libs/openssl )"
+
# The module will compile fine without apache[ldap], but Apache will
-# crash if you try to load ${PN} without mod_ldap loaded.
-COMMON_DEPEND="net-nds/openldap
- ssl? ( dev-libs/openssl )"
-DEPEND="${COMMON_DEPEND}
- www-servers/apache"
-RDEPEND="${COMMON_DEPEND}
- www-servers/apache[ldap]"
+# crash if you try to load ${PN} without mod_ldap loaded. The funny-
+# looking atom was taken from depend.apache.eclass (need_apache2).
+RDEPEND="${DEPEND}
+ =www-servers/apache-2*[ldap]"
APACHE2_MOD_CONF="47_${PN}"
APACHE2_MOD_DEFINE="LDAP LDAP_USERDIR"
DOCFILES="DIRECTIVES README user-ldif"
+
+# Don't try to get away without this, even though it causes some deps to
+# be repeated.
+need_apache2