1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit autotools linux-info toolchain-funcs usr-ldscript
8 DESCRIPTION="Netlink API to the in-kernel nf_tables subsystem"
9 HOMEPAGE="https://netfilter.org/projects/nftables/"
10 SRC_URI="https://netfilter.org/projects/${PN}/files/${P}.tar.bz2"
13 SLOT="0/11" # libnftnl.so version
14 KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~sparc x86"
15 IUSE="examples static-libs test"
17 RESTRICT="!test? ( test )"
19 RDEPEND=">=net-libs/libmnl-1.0.3"
20 BDEPEND="virtual/pkgconfig"
23 PATCHES=( "${FILESDIR}"/${P}-fix-nft-flowtable-test.patch )
26 if kernel_is ge 3 13; then
27 CONFIG_CHECK="~NF_TABLES"
30 eerror "This package requires kernel version 3.13 or newer to work properly."
36 $(use_enable static-libs static)
38 econf "${myeconfargs[@]}"
43 gen_usr_ldscript -a nftnl
44 find "${ED}" -type f -name '*.la' -delete || die
47 find examples/ -name 'Makefile*' -delete || die "Could not rm examples"
49 docompress -x /usr/share/doc/${PF}/examples