--- ulogd-1.23-r1.ebuild.orig 2007-04-28 23:35:24.000000000 +0600 +++ ulogd-1.23-r1.ebuild 2008-01-26 00:22:16.000000000 +0500 @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/app-admin/ulogd/ulogd-1.23-r1.ebuild,v 1.2 2007/04/28 17:09:31 tove Exp $ -inherit eutils flag-o-matic +inherit autotools eutils flag-o-matic DESCRIPTION="iptables daemon for ULOG target for userspace iptables filter logging" SRC_URI="http://ftp.netfilter.org/pub/ulogd/${P}.tar.bz2" @@ -11,9 +11,10 @@ SLOT="0" LICENSE="GPL-2" KEYWORDS="amd64 ppc -sparc x86" -IUSE="mysql postgres" +IUSE="sqlite3 mysql postgres ip-as-string" DEPEND="net-firewall/iptables + sqlite3? ( =dev-db/sqlite-3* ) mysql? ( virtual/mysql ) postgres? ( dev-db/postgresql )" @@ -22,18 +23,35 @@ cd "${S}" epatch "${FILESDIR}/${P}-gcc41.patch" + epatch "${FILESDIR}/${P}-configure.in.patch" EPATCH_OPTS="-F3" \ epatch "${FILESDIR}/glsa-200701.patch" + + eautoreconf } src_compile() { # enables logfiles over 2G (#74924) append-lfs-flags - econf \ - `use_with mysql` \ - `use_with postgres pgsql` \ - || die "configure failed" + CONF_OPTS="" + if use ip-as-string; then + use sqlite3 && CONF_OPTS="$CONF_OPTS --with-sqlite3-log-ip-as-string" + use mysql && CONF_OPTS="$CONF_OPTS --with-mysql-log-ip-as-string" + use postgres && CONF_OPTS="$CONF_OPTS --with-pgsql-log-ip-as-string" + fi + + if [ -z "$CONF_OPTS" ]; then + ewarn + ewarn "No database support enabled, ip-as-string flag ignored." + epause + fi + + CONF_OPTS="${CONF_OPTS} `use_with sqlite3`" + CONF_OPTS="${CONF_OPTS} `use_with mysql`" + CONF_OPTS="${CONF_OPTS} `use_with postgres pgsql`" + + econf ${CONF_OPTS} || die "configure failed" # not parallel make safe: bug #128976 emake -j1 || die "make failed"