sys-process/glances: revbump 3.1.4.1, add missing doc dep
[gentoo.git] / net-libs / libnftnl / libnftnl-1.1.3.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit autotools linux-info toolchain-funcs usr-ldscript
7
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"
11
12 LICENSE="GPL-2"
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"
16
17 RESTRICT="!test? ( test )"
18
19 RDEPEND=">=net-libs/libmnl-1.0.3"
20 BDEPEND="virtual/pkgconfig"
21 DEPEND="${RDEPEND}"
22
23 pkg_setup() {
24         if kernel_is ge 3 13; then
25                 CONFIG_CHECK="~NF_TABLES"
26                 linux-info_pkg_setup
27         else
28                 eerror "This package requires kernel version 3.13 or newer to work properly."
29         fi
30 }
31
32 src_configure() {
33         local myeconfargs=(
34                 $(use_enable static-libs static)
35         )
36         econf "${myeconfargs[@]}"
37 }
38
39 src_install() {
40         default
41         gen_usr_ldscript -a nftnl
42         find "${ED}" -type f -name '*.la' -delete || die
43
44         if use examples; then
45                 find examples/ -name 'Makefile*' -delete || die "Could not rm examples"
46                 dodoc -r examples
47                 docompress -x /usr/share/doc/${PF}/examples
48         fi
49 }