# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils apache-module DESCRIPTION="Easily implement object oriented apache-2.0 handlers with C++" HOMEPAGE="http://modcplusplus.sourceforge.net/" SRC_URI="mirror://sourceforge/modcplusplus/${P}.tar.gz" RESTRICT="nomirror" LICENSE="BSD" IUSE="" SLOT="0" KEYWORDS="~x86" DOCFILES="" APACHE2_MOD_FILE=".libs/libmod_cplusplus.so" APACHE2_MOD_CONF="${PVR}/51_${PN}" APACHE2_MOD_DEFINE="CPLUSPLUS" APACHE2_MODULES_CONFDIR="/etc/apache2/conf/modules.d/" need_apache2 RDEPEND="" DEPEND="" src_unpack() { echo ewarn "This module will segfault when loaded in an Apache without" ewarn "applied libPCRE patch." ewarn "See http://issues.apache.org/bugzilla/show_bug.cgi?id=27550" ewarn "Current Gentoo Apache ebuilds do NOT apply the libPCRE patch" echo sleep 5 unpack ${A} mv ${PN} ${P} } src_compile() { cd ${WORKDIR}/${P} epatch "${FILESDIR}"/${PV}/configure.in.patch einfo "export WANT_AUTOMAKE=1.9" export WANT_AUTOMAKE=1.9 ./autogen.sh --with-apxs=${APXS2} emake || die "Error: emake failed" } src_install() { insinto /usr/include/apache2 doins ${WORKDIR}/${P}/include/*.h apache-module_src_install } pkg_postinst() { einfo "A default configuration file has been installed to" einfo "${APACHE2_MODULES_CONFDIR}/51_${PN}." einfo "Add ${APACHE2_MOD_DEFINE} to APACHE2_OPTS in /etc/conf.d/apache2" einfo "to load the module on Apache startup." }