# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ MY_V=${P/_/} S=${WORKDIR}/${MY_V} DESCRIPTION="A log analyser for email, www, firewall, proxy and other logs" HOMEPAGE="http://logreport.org/lire/" SRC_URI="http://download.logreport.org/pub/${MY_V}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86 ~sparc" IUSE="pdf gd berkdb lynx" DEPEND=">=dev-libs/expat-0.9 >=dev-lang/perl-5.6.1 >=dev-perl/XML-Parser-0.29 >=dev-perl/DBI-1.37 dev-perl/MIME-tools >=dev-libs/libxslt-1.0.4 >=app-text/docbook-xml-dtd-4.1.2 >=app-text/docbook-xsl-stylesheets-1.62.0 pdf? ( app-text/openjade app-text/docbook-dsssl-stylesheets >=app-text/jadetex-3.12 ) gd? ( dev-perl/GDGraph ) berkdb? ( dev-perl/DB_File ) lynx? ( net-www/lynx )" src_compile() { # Most of the dependencies are handled correctly at runtime. The # only one that needs a Makefile fix is HASJADE, and unfortunately # the ./configure script isn't smart enough to handle this as an # option. if [ `use pdf` ] ; then JADEOPTIONS="yes" else JADEOPTIONS="no" fi find ${S} -name Makefile.in -exec sed -i '{}' \ -e "s:^HASJADE = @.*@\$:HASJADE = ${JADEOPTIONS}:" \ -e "s:^HASPDFJADETEX = @.*@\$:HASPDFJADETEX = ${JADEOPTIONS}:" ';' ### # for testing only: remove SQLite requirement for now ### sed -e 's!if $PATHTOPERL _test.pl 2> /dev/null!if perl -e "print qq{hi}; > /dev/null" !' \ ### -i ${S}/configure || die "configure hack failed" # The configure script can't find the DTD or stylesheets by # itself, so we have to export a few things to make sure that # it picks them up. First, though, we have to find them... # DSSL is the easy one, as it has a symlink DBK_DSSSL_STYLESHEETS="/usr/share/sgml/stylesheets/dsssl/docbook/" # For the DTD, we have to parse /etc/xml/docbook DBK_XML_DTD="`sed -n -e \ 's!.*file://\(.*docbookx\.dtd\).*!\1!p' /etc/xml/docbook`" # Same for the XSL stylesheets DBK_XSL_STYLESHEETS="`sed -n -e \ 's!.*xsl/current.*file://\([^"]*\).*!\1!p' /etc/xml/docbook | head -n 1`" export DBK_DSSSL_STYLESHEETS DBK_XML_DTD DBK_XSL_STYLESHEETS econf || die "econf failed" emake || die "emake failed" } src_install() { make DESTDIR=${D} install || die "make install failed" dodoc AUTHORS NEWS README README.lire-client THANKS VERSION }