summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2009-02-09 17:53:26 +0000
committerPeter Volkov <pva@gentoo.org>2009-02-09 17:53:26 +0000
commitcf5f2c427f704f026e0d8c5af04070145cff0f98 (patch)
tree58d56a79febfc2f4bdfc84d5a28d0fadc289c5a0 /net-firewall
parentQuote S and define RDEPEND (diff)
downloadgentoo-2-cf5f2c427f704f026e0d8c5af04070145cff0f98.tar.gz
gentoo-2-cf5f2c427f704f026e0d8c5af04070145cff0f98.tar.bz2
gentoo-2-cf5f2c427f704f026e0d8c5af04070145cff0f98.zip
l7-filters back as upstream does not provide patch.
(Portage version: 2.2_rc23/cvs/Linux i686)
Diffstat (limited to 'net-firewall')
-rw-r--r--net-firewall/iptables/ChangeLog5
-rw-r--r--net-firewall/iptables/iptables-1.4.2-r2.ebuild41
2 files changed, 39 insertions, 7 deletions
diff --git a/net-firewall/iptables/ChangeLog b/net-firewall/iptables/ChangeLog
index c0ff5511ad2a..975daadd16d1 100644
--- a/net-firewall/iptables/ChangeLog
+++ b/net-firewall/iptables/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for net-firewall/iptables
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/ChangeLog,v 1.189 2009/02/08 15:59:31 klausman Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/ChangeLog,v 1.190 2009/02/09 17:53:26 pva Exp $
+
+ 09 Feb 2009; Peter Volkov <pva@gentoo.org> iptables-1.4.2-r2.ebuild:
+ l7-filters back as upstream does not provide patch.
08 Feb 2009; Tobias Klausmann <klausman@gentoo.org>
iptables-1.4.2-r2.ebuild:
diff --git a/net-firewall/iptables/iptables-1.4.2-r2.ebuild b/net-firewall/iptables/iptables-1.4.2-r2.ebuild
index f0c0742a7176..fe7a92cbf639 100644
--- a/net-firewall/iptables/iptables-1.4.2-r2.ebuild
+++ b/net-firewall/iptables/iptables-1.4.2-r2.ebuild
@@ -1,23 +1,48 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/iptables-1.4.2-r2.ebuild,v 1.5 2009/02/08 19:19:02 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/iptables-1.4.2-r2.ebuild,v 1.6 2009/02/09 17:53:26 pva Exp $
-inherit eutils toolchain-funcs
+inherit eutils toolchain-funcs linux-info
+
+L7_PV=2.21
+L7_P=netfilter-layer7-v${L7_PV}
DESCRIPTION="Linux kernel (2.4+) firewall, NAT and packet mangling tools"
HOMEPAGE="http://www.iptables.org/"
-SRC_URI="http://iptables.org/projects/iptables/files/${P}.tar.bz2"
+SRC_URI="http://iptables.org/projects/iptables/files/${P}.tar.bz2
+ l7filter? ( mirror://sourceforge/l7-filter/${L7_P}.tar.gz )"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ~ia64 m68k ~mips ~ppc ~ppc64 s390 sh ~sparc x86"
-IUSE=""
+IUSE="l7filter"
DEPEND="virtual/os-headers"
RDEPEND=""
+pkg_setup() {
+ if use l7filter ; then
+ ewarn "WARNING: 3rd party extensions has been enabled."
+ ewarn "This means that iptables will use your currently installed"
+ ewarn "kernel in ${KERNEL_DIR} as headers for iptables."
+ linux-info_pkg_setup
+
+ if kernel_is lt 2 6 20 ; then
+ eerror "Currently there is no l7-filter patch available for iptables-1.4.x"
+ eerror "and kernel version before 2.6.20."
+ eerror "If you need to compile iptables 1.4.x against Linux 2.6.19.x"
+ eerror "or earlier, with l7-filter patch, please, report upstream."
+ die "No patch available."
+ fi
+
+ [[ ! -f ${KERNEL_DIR}/include/linux/netfilter/xt_layer7.h ]] && \
+ die "For layer 7 support emerge net-misc/l7-filter-${L7_PV} before this."
+ fi
+}
+
src_unpack() {
unpack ${P}.tar.bz2
+ use l7filter && unpack ${L7_P}.tar.gz
cd "${S}"
epatch "${FILESDIR}"/${P}-glibc.patch
epatch "${FILESDIR}"/${P}-no-ldconfig.patch
@@ -40,18 +65,22 @@ src_unpack() {
break
fi
done
+
+ if use l7filter ; then
+ cp "${WORKDIR}/${L7_P}/iptables-1.4.1.1-for-kernel-2.6.20forward"/* extensions \
+ || die "Failed to copy l7filter sources"
+ fi
}
src_compile() {
econf \
--sbindir=/sbin \
--libexecdir=/$(get_libdir) \
- --without-kernel \
--enable-devel \
--enable-libipq \
--enable-shared \
--enable-static \
- || die
+ $(use_with l7filter kernel ${KERNEL_DIR})
emake V=1 || die
}