|
|
|
@ -1,13 +1,12 @@
|
|
|
|
|
# Copyright 1999-2016 Gentoo Foundation
|
|
|
|
|
# Copyright 1999-2018 Gentoo Foundation
|
|
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
# $Id$
|
|
|
|
|
|
|
|
|
|
EAPI="5"
|
|
|
|
|
EAPI=6
|
|
|
|
|
|
|
|
|
|
# Force users doing their own patches to install their own tools
|
|
|
|
|
AUTOTOOLS_AUTO_DEPEND=no
|
|
|
|
|
|
|
|
|
|
inherit eutils multilib systemd toolchain-funcs autotools flag-o-matic git-r3
|
|
|
|
|
inherit ltprune multilib systemd toolchain-funcs autotools flag-o-matic git-r3
|
|
|
|
|
|
|
|
|
|
DESCRIPTION="Linux kernel (2.4+) firewall, NAT and packet mangling tools"
|
|
|
|
|
HOMEPAGE="http://www.netfilter.org/projects/iptables/"
|
|
|
|
@ -20,16 +19,17 @@ SLOT="0/12"
|
|
|
|
|
KEYWORDS=""
|
|
|
|
|
IUSE="conntrack ipv6 netlink nftables pcap static-libs"
|
|
|
|
|
|
|
|
|
|
RDEPEND="
|
|
|
|
|
conntrack? ( net-libs/libnetfilter_conntrack )
|
|
|
|
|
COMMON_DEPEND="
|
|
|
|
|
conntrack? ( >=net-libs/libnetfilter_conntrack-1.0.6 )
|
|
|
|
|
netlink? ( net-libs/libnfnetlink )
|
|
|
|
|
nftables? (
|
|
|
|
|
>=net-libs/libmnl-1.0
|
|
|
|
|
>=net-libs/libnftnl-1.0.5
|
|
|
|
|
>=net-libs/libmnl-1.0:0=
|
|
|
|
|
>=net-libs/libnftnl-1.0.5:0=
|
|
|
|
|
)
|
|
|
|
|
pcap? ( net-libs/libpcap )
|
|
|
|
|
"
|
|
|
|
|
DEPEND="${RDEPEND}
|
|
|
|
|
|
|
|
|
|
DEPEND="${COMMON_DEPEND}
|
|
|
|
|
virtual/os-headers
|
|
|
|
|
virtual/pkgconfig
|
|
|
|
|
nftables? (
|
|
|
|
@ -37,6 +37,9 @@ DEPEND="${RDEPEND}
|
|
|
|
|
virtual/yacc
|
|
|
|
|
)
|
|
|
|
|
"
|
|
|
|
|
RDEPEND="${COMMON_DEPEND}
|
|
|
|
|
nftables? ( net-misc/ethertypes )
|
|
|
|
|
"
|
|
|
|
|
|
|
|
|
|
src_prepare() {
|
|
|
|
|
# use the saner headers from the kernel
|
|
|
|
@ -57,19 +60,23 @@ src_configure() {
|
|
|
|
|
-e "/nfconntrack=[01]/s:=[01]:=$(usex conntrack 1 0):" \
|
|
|
|
|
configure || die
|
|
|
|
|
|
|
|
|
|
econf \
|
|
|
|
|
--sbindir="${EPREFIX}/sbin" \
|
|
|
|
|
--libexecdir="${EPREFIX}/$(get_libdir)" \
|
|
|
|
|
--enable-devel \
|
|
|
|
|
--enable-shared \
|
|
|
|
|
$(use_enable nftables) \
|
|
|
|
|
$(use_enable pcap bpf-compiler) \
|
|
|
|
|
$(use_enable pcap nfsynproxy) \
|
|
|
|
|
$(use_enable static-libs static) \
|
|
|
|
|
local myeconfargs=(
|
|
|
|
|
--sbindir="${EPREFIX}/sbin"
|
|
|
|
|
--libexecdir="${EPREFIX}/$(get_libdir)"
|
|
|
|
|
--enable-devel
|
|
|
|
|
--enable-shared
|
|
|
|
|
$(use_enable nftables)
|
|
|
|
|
$(use_enable pcap bpf-compiler)
|
|
|
|
|
$(use_enable pcap nfsynproxy)
|
|
|
|
|
$(use_enable static-libs static)
|
|
|
|
|
$(use_enable ipv6)
|
|
|
|
|
)
|
|
|
|
|
econf "${myeconfargs[@]}"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
src_compile() {
|
|
|
|
|
# Deal with parallel build errors.
|
|
|
|
|
use nftables && emake -C iptables xtables-config-parser.h
|
|
|
|
|
emake V=1
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -98,6 +105,11 @@ src_install() {
|
|
|
|
|
newconfd "${FILESDIR}"/ip6tables-1.4.13.confd ip6tables
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if use nftables; then
|
|
|
|
|
# Bug 647458
|
|
|
|
|
rm "${ED%/}"/etc/ethertypes || die
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
systemd_dounit "${FILESDIR}"/systemd/iptables-{re,}store.service
|
|
|
|
|
if use ipv6 ; then
|
|
|
|
|
systemd_dounit "${FILESDIR}"/systemd/ip6tables-{re,}store.service
|
|
|
|
|