commit:     3c4624aec145476efcb4ee04eab239d7dc45710a
Author:     Francisco Blas (klondike) Izquierdo Riera <klondike <AT> gentoo 
<DOT> org>
AuthorDate: Sat Jun 29 23:08:30 2019 +0000
Commit:     Matthew Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Sun Jun 30 01:56:59 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c4624ae

net-firewall/nftables: add doc and xtables USE flags

This commit adds some fixes on the 0.9.1 package:
* Adds the doc USE flag to control building of the man pages
* Adds the app-text/asciidoc when building the man pages
* Adds the xtables USE flag for better compatibility with iptables-compat
* Adds the net-firewall/iptables dependency when using the xtables flag

I have chosen +doc, xtables for better compatibility with prior versions.
Also whilst man pages generally make sense, the xtables USE isn't needed
on pure nftables setups which are the recommended approach.

Closes: https://bugs.gentoo.org/688952
Signed-off-by: Francisco Blas Izquierdo Riera (klondike) <klondike <AT> 
gentoo.org>
Package-Manager: Portage-2.3.66, Repoman-2.3.11
Signed-off-by: Matthew Thode <prometheanfire <AT> gentoo.org>

 net-firewall/nftables/metadata.xml          | 2 ++
 net-firewall/nftables/nftables-0.9.1.ebuild | 9 +++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/net-firewall/nftables/metadata.xml 
b/net-firewall/nftables/metadata.xml
index dcc71d66d6f..0984d13e0f0 100644
--- a/net-firewall/nftables/metadata.xml
+++ b/net-firewall/nftables/metadata.xml
@@ -14,7 +14,9 @@
                <name>Francisco Blas Izquierdo Riera</name>
        </maintainer>
        <use>
+               <flag name="doc">Create man pages for the package (requires 
<pkg>app-text/asciidoc</pkg>)</flag>
                <flag name="json">Enable JSON support via 
<pkg>dev-libs/jansson</pkg></flag>
                <flag name="modern_kernel">Install init scripts for 3.18 or 
higher kernels with atomic rule updates</flag>
+               <flag name="xtables">Add libxtables support to try to 
automatically translate rules added by iptables-compat</flag>
        </use>
 </pkgmetadata>

diff --git a/net-firewall/nftables/nftables-0.9.1.ebuild 
b/net-firewall/nftables/nftables-0.9.1.ebuild
index addd91fa7a8..db6f707d58c 100644
--- a/net-firewall/nftables/nftables-0.9.1.ebuild
+++ b/net-firewall/nftables/nftables-0.9.1.ebuild
@@ -15,7 +15,7 @@ 
SRC_URI="https://netfilter.org/projects/nftables/files/${P}.tar.bz2";
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~x86"
-IUSE="debug +gmp json +modern_kernel python +readline static-libs"
+IUSE="debug +doc +gmp json +modern_kernel python +readline static-libs xtables"
 
 RDEPEND="
        >=net-libs/libmnl-1.0.3:0=
@@ -23,11 +23,14 @@ RDEPEND="
        json? ( dev-libs/jansson )
        python? ( ${PYTHON_DEPS} )
        readline? ( sys-libs/readline:0= )
-       >=net-libs/libnftnl-1.1.3:0="
+       >=net-libs/libnftnl-1.1.3:0=
+       xtables? ( >=net-firewall/iptables-1.6.1 )
+"
 
 DEPEND="${RDEPEND}"
 
 BDEPEND="
+       doc? ( app-text/asciidoc )
        >=app-text/docbook2X-0.8.8-r4
        sys-devel/bison
        sys-devel/flex
@@ -82,10 +85,12 @@ src_configure() {
                --disable-python
                --sbindir="${EPREFIX}"/sbin
                $(use_enable debug)
+               $(use_enable doc man-doc)
                $(use_with !gmp mini_gmp)
                $(use_with json)
                $(use_with readline cli)
                $(use_enable static-libs static)
+               $(use_with xtables)
        )
        econf "${myeconfargs[@]}"
 }

Reply via email to