# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: /home/cvsroot/gentoo-x86/dev-perl/HTML-Clean/HTML-Clean-0.8.ebuild,v 1.6 2003/08/07 02:13:57 vapier Exp $ inherit perl-module DESCRIPTION="Embed Perl code in HTML documents" MY_P=${P/HTML-/} MY_P=${MY_P/_beta/b} SRC_URI="http://cpan.org/modules/by-module/HTML/${MY_P}.tar.gz" HOMEPAGE="http://cpan.org/modules/by-module/HTML/${MY_P}.readme" LICENSE="GPL-2 | Artistic" KEYWORDS="~x86 ~alpha ~sparc ~ppc ~hppa ~amd64 ~ia64" S=${WORKDIR}/${MY_P} IUSE="apache2" newdepend "dev-perl/libwww-perl dev-perl/HTML-Parser net-www/apache dev-perl/mod_perl" # cribbed from mod_php ebuild detectapache() { local domsg= [ -n "$1" ] && domsg=1 HAVE_APACHE1= HAVE_APACHE2= has_version '=net-www/apache-1*' && HAVE_APACHE1=1 has_version '=net-www/apache-2*' && HAVE_APACHE2=1 [ -n "${HAVE_APACHE1}" ] && APACHEVER=1 [ -n "${HAVE_APACHE2}" ] && APACHEVER=2 [ -n "${HAVE_APACHE1}" ] && [ -n "${HAVE_APACHE2}" ] && APACHEVER='both' case "${APACHEVER}" in 1) [ -n "${domsg}" ] && einfo 'Apache1 only detected' ;; 2) [ -n "${domsg}" ] && einfo 'Apache2 only detected';; both) if [ "`use apache2`" ]; then [ -n "${domsg}" ] && einfo "Multiple Apache versions detected, using Apache2 (USE=apache2)" APACHEVER=2 else [ -n "${domsg}" ] && einfo 'Multiple Apache versions detected, using Apache1 (USE=-apache2)' APACHEVER=1 fi ;; *) if [ -n "${domsg}" ]; then MSG="Unknown Apache version!"; eerror $MSG ; die $MSG else APACHEVER=0 fi; ;; esac } detectapache # would like to slot to apachever, but can't see how to easily get two # copies to cohabitate #SLOT="${APACHEVER}" SLOT="0" [ "${APACHEVER}" -eq '2' ] && APVSFX='2' || APVSFX='' myconf="/usr/include/apache${APSFX}" myfood="/usr/sbin/apache${APVSFX}\n\ /usr/lib/apache${APVSFX}\n\ /usr/lib/apache${APVSFX}-extramodules\n\ /usr/lib/apache${APVSFX}\n" src_compile() { if [ "${MMSIXELEVEN}" ]; then echo -e ${myfood} | perl Makefile.PL ${myconf} \ PREFIX=/usr INSTALLDIRS=vendor DESTDIR=${D} else echo -e ${myfood} | perl Makefile.PL ${myconf} \ PREFIX=${D}/usr INSTALLDIRS=vendor fi SRC_PREP="yes" perl-module_src_compile perl-module_src_test }