--- lighttpd-1.4.20.ebuild 2009-02-07 13:43:10.000000000 +0100 +++ lighttpd-1.4.22.ebuild 2009-04-01 21:54:29.000000000 +0200 @@ -2,8 +2,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/lighttpd-1.4.20.ebuild,v 1.8 2009/02/03 12:46:51 betelgeuse Exp $ -WANT_AUTOCONF=latest -WANT_AUTOMAKE=latest +EAPI="2" + inherit eutils autotools depend.php DESCRIPTION="Lightweight high-performance web server" @@ -12,13 +12,10 @@ LICENSE="BSD" SLOT="0" -KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 ~sh sparc ~sparc-fbsd x86 ~x86-fbsd" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" IUSE="bzip2 doc fam fastcgi gdbm ipv6 ldap lua minimal memcache mysql pcre php rrdtool ssl test webdav xattr" -# cherokee block should be resolved properly -# http://bugs.gentoo.org/show_bug.cgi?id=224781 RDEPEND=" - !www-servers/cherokee >=sys-libs/zlib-1.1 bzip2? ( app-arch/bzip2 ) fam? ( virtual/fam ) @@ -28,8 +25,9 @@ memcache? ( dev-libs/libmemcache ) mysql? ( >=virtual/mysql-4.0 ) pcre? ( >=dev-libs/libpcre-3.1 ) - php? ( virtual/httpd-php ) - rrdtool? ( net-analyzer/rrdtool ) + php? ( virtual/httpd-php[cgi] ) + rrdtool? ( net-analyzer/rrdtool ) + fastcgi? ( www-servers/spawn-fcgi ) ssl? ( >=dev-libs/openssl-0.9.7 ) webdav? ( dev-libs/libxml2 @@ -61,7 +59,6 @@ # remove non-essential stuff (for USE=minimal) remove_non_essential() { local libdir="${D}/usr/$(get_libdir)/${PN}" - # text docs use doc || rm -fr "${D}"/usr/share/doc/${PF}/txt @@ -76,10 +73,6 @@ use lua || rm -f ${libdir}/mod_{cml,magnet}.* use rrdtool || rm -f ${libdir}/mod_rrdtool.* - if ! use fastcgi ; then - rm -f ${libdir}/mod_fastcgi.* "${D}"/usr/bin/spawn-fcgi \ - "${D}"/usr/share/man/man1/spawn-fcgi.* - fi } pkg_setup() { @@ -98,10 +91,7 @@ enewuser lighttpd -1 -1 /var/www/localhost/htdocs lighttpd } -src_unpack() { - unpack ${A} - cd "${S}" - +src_prepare() { EPATCH_SUFFIX="diff" EPATCH_OPTS="-l" epatch "${FILESDIR}"/"${PVR}" || die "Patching failed!" eautoreconf || die @@ -115,7 +105,7 @@ die "sed doc/cml.txt failed" } -src_compile() { +src_configure() { econf --libdir=/usr/$(get_libdir)/${PN} \ --enable-lfs \ $(use_enable ipv6) \ @@ -132,7 +122,9 @@ $(use_with webdav webdav-locks) \ $(use_with xattr attr) \ || die "econf failed" +} +src_compile() { emake || die "emake failed" if use doc ; then @@ -151,11 +143,6 @@ use fam && has_version app-admin/fam && \ sed -i 's/after famd/need famd/g' "${D}"/etc/init.d/lighttpd - if use php || use fastcgi ; then - newinitd "${FILESDIR}"/spawn-fcgi.initd spawn-fcgi || die - newconfd "${FILESDIR}"/spawn-fcgi.confd spawn-fcgi || die - fi - # configs insinto /etc/lighttpd doins "${FILESDIR}"/conf/lighttpd.conf @@ -187,13 +174,16 @@ fowners lighttpd:lighttpd /var/l{ib,og}/lighttpd fperms 0750 /var/l{ib,og}/lighttpd + #spawn-fcgi is installed by a separate package + rm -f "${D}"/usr/$(get_libdir)/${PN}/mod_fastcgi.* "${D}"/usr/bin/spawn-fcgi \ + "${D}"/usr/share/man/man1/spawn-fcgi.* + use minimal && remove_non_essential } pkg_postinst () { echo if [[ -f ${ROOT}etc/conf.d/spawn-fcgi.conf ]] ; then - einfo "spawn-fcgi is now included with lighttpd" einfo "spawn-fcgi's init script configuration is now located" einfo "at /etc/conf.d/spawn-fcgi." echo @@ -205,10 +195,4 @@ ewarn "existing configuration." ebeep 5 fi - - if use fam ; then - einfo "Remember to re-emerge lighttpd should you switch from" - einfo "app-admin/famd to app-admin/gamin or vice versa." - fi - echo }