--- apache-2.0.52.ebuild.org 2004-10-25 15:05:05.803072768 +0200 +++ apache-2.0.52.ebuild 2004-10-25 15:43:54.775015216 +0200 @@ -14,7 +14,7 @@ LICENSE="Apache-2.0" SLOT="2" KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sparc x86" -IUSE="berkdb gdbm ldap threads ipv6 doc static ssl" +IUSE="berkdb gdbm ldap threads ipv6 doc static ssl apache-htdocs apache-icons apache-error apache-cgi" #Standard location for Gentoo Linux DATADIR="/var/www/localhost" @@ -55,6 +55,18 @@ EPATCH_SUFFIX="patch" epatch ${WORKDIR}/apache-patches-${PVR} || die + # check for existing data directories. do not overwrite unless forced by USE-flags + # first check for use flags + if [ -d ${DATADIR}/htdocs ] && ! use apache-htdocs ; then DISABLE_HTDOCS=1; fi + if [ -d ${DATADIR}/error ] && ! use apache-error ; then DISABLE_ERROR=1; fi + if [ -d ${DATADIR}/icons ] && ! use apache-icons ; then DISABLE_ICONS=1; fi + if [ -d ${DATADIR}/cgi-bin ] && ! use apache-cgi ; then DISABLE_CGI=1; fi + # now disable building in makefile + if [ $DISABLE_HTDOCS ]; then einfo "Disabling install of htdocs. Force with USE-flag: apache-htdocs." && sed -i 's/install-htdocs\ //' Makefile.in; fi + if [ $DISABLE_ERROR ]; then einfo "Disabling install of error messages. Force with USE-flag: apache-error." && sed -i 's/install-error\ //' Makefile.in; fi + if [ $DISABLE_ICONS ]; then einfo "Disabling install of icons. Force with USE-flag: apache-icons." && sed -i 's/install-icons\ //' Makefile.in; fi + if [ $DISABLE_CGI ]; then einfo "Disabling install of cgi-scripts. Force with USE-flag: apache-cgi." && sed -i 's/install-cgi\ //' Makefile.in; fi + if use berkdb; then einfo "Enabling berkdb." if has_version '=sys-libs/db-4*'; then