sys-apps/iproute2: make libelf usage optional
authorMike Frysinger <vapier@chromium.org>
Thu, 1 Feb 2018 22:35:03 +0000 (17:35 -0500)
committerMike Frysinger <vapier@gentoo.org>
Thu, 1 Feb 2018 22:35:03 +0000 (17:35 -0500)
This dep is only needed to load eBPF filters out of ELFs compiled
(usually) by LLVM's eBPF backend.  There's no need to make this a
hard dep on everyone's system.

sys-apps/iproute2/iproute2-4.15.0.ebuild
sys-apps/iproute2/metadata.xml

index f38e3db1ff8f367f11590163344f761fbade6250..15efa9acf6c9e71da1906052d3213de3a8a788bf 100644 (file)
@@ -18,12 +18,13 @@ HOMEPAGE="https://wiki.linuxfoundation.org/networking/iproute2"
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="atm berkdb +iptables ipv6 minimal selinux"
+IUSE="atm berkdb elf +iptables ipv6 minimal selinux"
 
 # We could make libmnl optional, but it's tiny, so eh
 RDEPEND="
        !net-misc/arpd
-       !minimal? ( net-libs/libmnl virtual/libelf )
+       !minimal? ( net-libs/libmnl )
+       elf? ( virtual/libelf )
        iptables? ( >=net-firewall/iptables-1.4.20:= )
        berkdb? ( sys-libs/db:= )
        atm? ( net-dialup/linux-atm )
@@ -101,7 +102,7 @@ src_configure() {
        TC_CONFIG_IPSET := y
        HAVE_BERKELEY_DB := $(usex berkdb y n)
        HAVE_MNL      := $(usex minimal n y)
-       HAVE_ELF      := $(usex minimal n y)
+       HAVE_ELF      := $(usex elf y n)
        HAVE_SELINUX  := $(usex selinux y n)
        IP_CONFIG_SETNS := ${setns}
        # Use correct iptables dir, #144265 #293709
index 2605d5fd7ce0f57a62336900dad177f3f31de72a..ad652efcf7e4a4df7df6031972704b8b54f8c9eb 100644 (file)
@@ -7,6 +7,7 @@
 </maintainer>
 <use>
        <flag name="berkdb">build programs that use berkdb (just arpd)</flag>
+       <flag name="elf">support loading eBPF programs from ELFs (e.g. LLVM's eBPF backend)</flag>
        <flag name="iptables">include support for iptables filtering</flag>
        <flag name="minimal">only install ip and tc programs, without eBPF support</flag>
 </use>