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"
24 if kernel_is ge 3 13; then
25 CONFIG_CHECK="~NF_TABLES"
28 eerror "This package requires kernel version 3.13 or newer to work properly."
34 $(use_enable static-libs static)
36 econf "${myeconfargs[@]}"
41 gen_usr_ldscript -a nftnl
42 find "${ED}" -type f -name '*.la' -delete || die
45 find examples/ -name 'Makefile*' -delete || die "Could not rm examples"
47 docompress -x /usr/share/doc/${PF}/examples