commit:     25ed7b7f7db8f153e58fe5c4ed8be892ea1487b3
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 14 18:07:06 2018 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Sep 14 22:03:44 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25ed7b7f

net-dns/unbound: add USE=redis to enable cache db backend

Package-Manager: Portage-2.3.49, Repoman-2.3.10

 net-dns/unbound/metadata.xml            | 1 +
 net-dns/unbound/unbound-1.8.0-r1.ebuild | 8 +++++---
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/net-dns/unbound/metadata.xml b/net-dns/unbound/metadata.xml
index 58f5ae80fe7..01e8dfa9bcc 100644
--- a/net-dns/unbound/metadata.xml
+++ b/net-dns/unbound/metadata.xml
@@ -24,5 +24,6 @@
     <flag name="dnstap">Enable dnstap support</flag>
     <flag name="ecdsa">Enable ECDSA support</flag>
     <flag name="gost">Enable GOST support</flag>
+    <flag name="redis">Enable cache db backend which uses 
<pkg>dev-libs/hiredis</pkg></flag>
   </use>
 </pkgmetadata>

diff --git a/net-dns/unbound/unbound-1.8.0-r1.ebuild 
b/net-dns/unbound/unbound-1.8.0-r1.ebuild
index fe9085aac35..f544060754e 100644
--- a/net-dns/unbound/unbound-1.8.0-r1.ebuild
+++ b/net-dns/unbound/unbound-1.8.0-r1.ebuild
@@ -14,7 +14,7 @@ 
SRC_URI="https://nlnetlabs.nl/downloads/unbound/${MY_P}.tar.gz";
 LICENSE="BSD GPL-2"
 SLOT="0/8" # ABI version of libunbound.so
 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86"
-IUSE="debug dnscrypt dnstap +ecdsa gost libressl python selinux static-libs 
systemd test threads"
+IUSE="debug dnscrypt dnstap +ecdsa gost libressl python redis selinux 
static-libs systemd test threads"
 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
 
 # Note: expat is needed by executable only but the Makefile is custom
@@ -34,7 +34,8 @@ CDEPEND=">=dev-libs/expat-2.1.0-r3[${MULTILIB_USEDEP}]
        ecdsa? (
                !libressl? ( dev-libs/openssl:0[-bindist] )
        )
-       python? ( ${PYTHON_DEPS} )"
+       python? ( ${PYTHON_DEPS} )
+       redis? ( dev-libs/hiredis:= )"
 
 BDEPEND="virtual/pkgconfig"
 
@@ -89,13 +90,13 @@ src_configure() {
 }
 
 multilib_src_configure() {
-       # TODO: cachedb
        econf \
                $(use_enable debug) \
                $(use_enable gost) \
                $(use_enable dnscrypt) \
                $(use_enable dnstap) \
                $(use_enable ecdsa) \
+               $(multilib_native_use_enable redis cachedb) \
                $(use_enable static-libs static) \
                $(use_enable systemd) \
                $(multilib_native_use_with python pythonmodule) \
@@ -108,6 +109,7 @@ multilib_src_configure() {
                --enable-tfo-client \
                --enable-tfo-server \
                --with-libevent="${EPREFIX%/}"/usr \
+               $(multilib_native_usex redis 
--with-libhiredis="${EPREFIX%/}/usr" --without-libhiredis) \
                --with-pidfile="${EPREFIX%/}"/var/run/unbound.pid \
                --with-rootkey-file="${EPREFIX%/}"/etc/dnssec/root-anchors.txt \
                --with-ssl="${EPREFIX%/}"/usr \

Reply via email to