commit:     6246de732d3c2c8c947ed1cb97e7c2e95a4ae71d
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 11 18:27:49 2017 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Mar 11 18:33:02 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6246de73

bitcoincore.eclass: add USE=knots

 eclass/bitcoincore.eclass | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/eclass/bitcoincore.eclass b/eclass/bitcoincore.eclass
index 74cb2a31a46..6144fb8ee68 100644
--- a/eclass/bitcoincore.eclass
+++ b/eclass/bitcoincore.eclass
@@ -37,7 +37,7 @@ fi
 
 EXPORT_FUNCTIONS src_prepare src_test src_install
 
-if in_bcc_iuse ljr || in_bcc_iuse 1stclassmsg || in_bcc_iuse zeromq || [ -n 
"$BITCOINCORE_POLICY_PATCHES" ]; then
+if in_bcc_iuse ljr || in_bcc_iuse knots || in_bcc_iuse 1stclassmsg || 
in_bcc_iuse zeromq || [ -n "$BITCOINCORE_POLICY_PATCHES" ]; then
        EXPORT_FUNCTIONS pkg_pretend
 fi
 
@@ -53,7 +53,7 @@ if [[ ! ${_BITCOINCORE_ECLASS} ]]; then
 
 # @ECLASS-VARIABLE: BITCOINCORE_LJR_DATE
 # @DESCRIPTION:
-# Set this variable before the inherit line, to the datestamp of the ljr
+# Set this variable before the inherit line, to the datestamp of the Knots
 # patchset.
 
 # @ECLASS-VARIABLE: BITCOINCORE_POLICY_PATCHES
@@ -72,6 +72,7 @@ WALLET_DEPEND="sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]"
 LIBEVENT_DEPEND=""
 UNIVALUE_DEPEND=""
 BITCOINCORE_LJR_NAME=ljr
+BITCOINCORE_KNOTS_USE=knots
 [ -n "${BITCOINCORE_LJR_PV}" ] || BITCOINCORE_LJR_PV="${PV}"
 
 case "${PV}" in
@@ -87,8 +88,11 @@ case "${PV}" in
        LIBSECP256K1_DEPEND="=dev-libs/libsecp256k1-0.0.0_pre20151118[recovery]"
        UNIVALUE_DEPEND="dev-libs/univalue"
        BITCOINCORE_LJR_NAME=knots
+       if in_bcc_iuse ljr; then
+               BITCOINCORE_KNOTS_USE=ljr
+       fi
        if in_bcc_policy spamfilter; then
-               REQUIRED_USE="${REQUIRED_USE} bitcoin_policy_spamfilter? ( ljr 
)"
+               REQUIRED_USE="${REQUIRED_USE} bitcoin_policy_spamfilter? ( 
${BITCOINCORE_KNOTS_USE} )"
        fi
        ;;
 9999*)
@@ -201,9 +205,9 @@ DEPEND="${DEPEND} ${BITCOINCORE_COMMON_DEPEND}
 if [ "${BITCOINCORE_NEED_LEVELDB}" = "1" ]; then
        RDEPEND="${RDEPEND} virtual/bitcoin-leveldb"
 fi
-if in_bcc_iuse ljr; then
+if in_bcc_iuse ${BITCOINCORE_KNOTS_USE}; then
        if [ "${BITCOINCORE_LJR_NAME}" = "knots" ]; then
-               DEPEND="${DEPEND} ljr? ( dev-lang/perl )"
+               DEPEND="${DEPEND} ${BITCOINCORE_KNOTS_USE}? ( dev-lang/perl )"
        fi
 fi
 
@@ -220,7 +224,7 @@ bitcoincore_policymsg() {
 
 bitcoincore_pkg_pretend() {
        bitcoincore_policymsg_flag=false
-       if use_if_iuse ljr || use_if_iuse 1stclassmsg || use_if_iuse addrindex 
|| use_if_iuse xt || { use_if_iuse zeromq && [ "${BITCOINCORE_MINOR}" -lt 12 ]; 
}; then
+       if use_if_iuse ${BITCOINCORE_KNOTS_USE} || use_if_iuse 1stclassmsg || 
use_if_iuse addrindex || use_if_iuse xt || { use_if_iuse zeromq && [ 
"${BITCOINCORE_MINOR}" -lt 12 ]; }; then
                einfo "Extra functionality improvements to Bitcoin Core are 
enabled."
                bitcoincore_policymsg_flag=true
                if use_if_iuse addrindex addrindex; then
@@ -279,7 +283,7 @@ bitcoincore_prepare() {
        else
                epatch "$(LJR_PATCH syslibs)"
        fi
-       if use_if_iuse ljr; then
+       if use_if_iuse ${BITCOINCORE_KNOTS_USE}; then
                if [ "${BITCOINCORE_LJR_NAME}" = "knots" ]; then
                        bitcoincore_predelete_patch "$(LJR_PATCH f)"
                        bitcoincore_predelete_patch "$(LJR_PATCH branding)"

Reply via email to