Index: iptables-1.3.8.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/net-firewall/iptables/iptables-1.3.8.ebuild,v retrieving revision 1.2 diff -u -b -B -r1.2 iptables-1.3.8.ebuild --- iptables-1.3.8.ebuild 25 Jun 2007 17:01:42 -0000 1.2 +++ iptables-1.3.8.ebuild 4 Jul 2007 14:12:21 -0000 @@ -4,10 +4,10 @@ inherit eutils flag-o-matic toolchain-funcs linux-info -L7_PV="2.9" +L7_PV="2.11" L7_P="netfilter-layer7-v${L7_PV}" L7_PATCH="iptables-layer7-${L7_PV}.patch" -IMQ_PATCH="iptables-1.3.0-imq1.diff" +IMQ_PATCH="iptables-1.3.6-imq.diff" DESCRIPTION="Linux kernel (2.4+) firewall, NAT and packet mangling tools" HOMEPAGE="http://www.iptables.org/ http://www.linuximq.net/ http://l7-filter.sf.net/" @@ -40,8 +40,14 @@ linux-info_pkg_setup fi + if kernel_is ge 2 6 20 + then + L7FILE=${KERNEL_DIR}/net/netfilter/xt_layer7.c + else + L7FILE=${KERNEL_DIR}/net/ipv4/netfilter/ipt_layer7.c + fi if use l7filter && \ - [ ! -f "${KERNEL_DIR}/net/ipv4/netfilter/ipt_layer7.c" ]; then + [ ! -f "${L7FILE}" ]; then die "For layer 7 support emerge net-misc/l7-filter-${L7_PV} before this" fi if use imq && \ @@ -52,7 +58,10 @@ src_unpack() { unpack ${P}.tar.bz2 - use l7filter && unpack ${L7_P}.tar.gz + if use l7filter + then + unpack ${L7_P}.tar.gz + fi cd "${S}" epatch "${FILESDIR}"/${PN}-1.3.7-sparc64.patch #166201 @@ -72,11 +81,21 @@ if use imq ; then EPATCH_OPTS="-p1" epatch "${DISTDIR}"/${IMQ_PATCH} - chmod +x extensions/{.IMQ-test*,.childlevel-test*} + for OA in extensions/.IMQ-test extensions/.IMQ-test6 ; do + mv ${OA} ${OA}.orig + tr '\015' '\012' < ${OA}.orig > ${OA}.orig + rm ${OA}.orig + done + chmod +x extensions/.IMQ-test* fi if use l7filter ; then EPATCH_OPTS="-p1" epatch "${WORKDIR}"/${L7_P}/${L7_PATCH} + EPATCH_OPTS="-d ${S}/extensions" epatch "${FILESDIR}"/${P}-l7-filter.patch chmod +x extensions/.layer7-test* + if kernel_is ge 2 6 20 + then + sed -i -e "s:_ipv4/ipt_layer7.h:/xt_layer7.h:" ./extensions/libipt_layer7.c + fi fi # the net directory is moving around so account for new/old locations