aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Brewer <tomboy64@sina.cn>2016-03-31 23:58:25 +0200
committerMatthew Brewer <tomboy64@sina.cn>2016-03-31 23:58:25 +0200
commitf97fc124c8b7a73536e84ea95bcca9b2e93a028a (patch)
tree7f73385643ebb21366414a4fa042927efbec9b96
parentdev-libs/actor-framework: (diff)
downloadtbc-f97fc124c8b7a73536e84ea95bcca9b2e93a028a.tar.gz
tbc-f97fc124c8b7a73536e84ea95bcca9b2e93a028a.tar.bz2
tbc-f97fc124c8b7a73536e84ea95bcca9b2e93a028a.zip
bla
-rw-r--r--app-cdr/burn-cd/burn-cd-1.8.1.ebuild30
-rw-r--r--dev-libs/actor-framework/Manifest1
-rw-r--r--dev-libs/actor-framework/actor-framework-0.14.4.ebuild75
-rw-r--r--dev-libs/actor-framework/metadata.xml27
-rw-r--r--dev-libs/libsecp256k1/Manifest3
-rw-r--r--dev-libs/libsecp256k1/files/20141212-fixes.patch289
-rw-r--r--dev-libs/libsecp256k1/libsecp256k1-0.0.0_pre20141212.ebuild74
-rw-r--r--dev-libs/libsecp256k1/libsecp256k1-0.0.0_pre20150423.ebuild54
-rw-r--r--dev-libs/libsecp256k1/libsecp256k1-0.0.0_pre20151118.ebuild59
-rw-r--r--dev-libs/libsecp256k1/libsecp256k1-9999.ebuild57
-rw-r--r--dev-libs/libsecp256k1/metadata.xml24
-rw-r--r--dev-libs/univalue/Manifest1
-rw-r--r--dev-libs/univalue/metadata.xml16
-rw-r--r--dev-libs/univalue/univalue-1.0.2.ebuild34
-rw-r--r--eclass/bitcoincore.eclass431
-rw-r--r--games-arcade/blackvoxel/Manifest1
-rw-r--r--games-arcade/blackvoxel/blackvoxel-1.38.ebuild38
-rw-r--r--games-arcade/tsc/tsc-2.0.0.ebuild53
-rw-r--r--metadata/layout.conf1
-rw-r--r--net-p2p/bitcoin-qt/Manifest19
-rw-r--r--net-p2p/bitcoin-qt/bitcoin-qt-0.12.0.ebuild136
-rw-r--r--net-p2p/bitcoin-qt/files/0.10.0-openrc-compat.patch24
-rw-r--r--net-p2p/bitcoin-qt/files/0.8-openssl-101k.patch31
-rw-r--r--net-p2p/bitcoin-qt/files/0.8.2-sys_leveldb.patch185
-rw-r--r--net-p2p/bitcoin-qt/files/0.9-openssl-101k.patch31
-rw-r--r--net-p2p/bitcoin-qt/files/0.9.0-sys_leveldb.patch34
-rw-r--r--net-p2p/bitcoin-qt/files/0.9.5-sys_leveldb.patch63
-rw-r--r--net-p2p/bitcoin-qt/files/0.9.x-ljr_noblacklist.patch12
-rw-r--r--net-p2p/bitcoin-qt/files/9999-syslibs.patch243
-rw-r--r--net-p2p/bitcoin-qt/files/bitcoin.conf8
-rw-r--r--net-p2p/bitcoin-qt/files/bitcoin.confd10
-rw-r--r--net-p2p/bitcoin-qt/files/bitcoin.initd-r1104
-rw-r--r--net-p2p/bitcoin-qt/files/bitcoind.logrotate7
-rw-r--r--net-p2p/bitcoin-qt/files/bitcoind.logrotate-r18
-rw-r--r--net-p2p/bitcoin-qt/files/bitcoind.service30
-rw-r--r--net-p2p/bitcoin-qt/files/miniupnpc-14.patch28
-rw-r--r--net-p2p/bitcoin-qt/metadata.xml30
-rw-r--r--perl-gcpan/constant-defer/Manifest1
-rw-r--r--perl-gcpan/constant-defer/constant-defer-6.ebuild21
-rw-r--r--perl-gcpan/lib/Manifest1
-rw-r--r--perl-gcpan/lib/lib-0.63.ebuild20
-rw-r--r--profiles/use.local.desc31
42 files changed, 2230 insertions, 115 deletions
diff --git a/app-cdr/burn-cd/burn-cd-1.8.1.ebuild b/app-cdr/burn-cd/burn-cd-1.8.1.ebuild
new file mode 100644
index 0000000..a553d23
--- /dev/null
+++ b/app-cdr/burn-cd/burn-cd-1.8.1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+inherit python-single-r1
+
+
+DESCRIPTION="Smart console frontend for the cdrkit/cdrtools & dvd+rw-tools"
+HOMEPAGE="https://github.com/aglyzov/burn-cd/"
+EGIT_REPO_URI="git://github.com/aglyzov/burn-cd.git"
+inherit git-2
+SRC_URI=""
+
+LICENSE="LGPL-2"
+IUSE=""
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="${PYTHON_DEPS}
+ virtual/cdrtools
+ app-cdr/dvd+rw-tools"
+
+src_install() {
+ newbin ${P} ${PN}
+ insinto /etc
+ newins dotburn-cd.conf burn-cd.conf
+}
diff --git a/dev-libs/actor-framework/Manifest b/dev-libs/actor-framework/Manifest
deleted file mode 100644
index 8a648ae..0000000
--- a/dev-libs/actor-framework/Manifest
+++ /dev/null
@@ -1 +0,0 @@
-DIST 0.14.4.tar.gz 1239230 SHA256 7e77b1edc708ac66be3ab2ba29506681458422e59a2e1b3cd801152ba345fb00 SHA512 9f7c7876576f5716cc7cec4603b90521cdc1a89631aa7c85eb00e1b49c911b7c24116b8b23d2d342cc01b1e3dfb28436b59e4323b97b973bda6b20652449ff05 WHIRLPOOL 0a31661a8531ccedc39a24777fa1f5285c8acafebd0a8bc58d974ab0e10547257107adfa173550d9b88e21d6f136c93542db83b1ed922b5f1b7a680753621726
diff --git a/dev-libs/actor-framework/actor-framework-0.14.4.ebuild b/dev-libs/actor-framework/actor-framework-0.14.4.ebuild
deleted file mode 100644
index 832cb44..0000000
--- a/dev-libs/actor-framework/actor-framework-0.14.4.ebuild
+++ /dev/null
@@ -1,75 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=6
-
-inherit eutils cmake-multilib flag-o-matic
-
-DESCRIPTION="An Open Source Implementation of the Actor Model in C++"
-HOMEPAGE="http://actor-framework.org/"
-SRC_URI="https://github.com/actor-framework/actor-framework/archive/${PV}.tar.gz"
-
-LICENSE="Boost-1.0 BSD-3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="boost debug doc examples +mem_management opencl +riac static test"
-
-DEPEND="${RDEPEND}
- app-doc/doxygen
- doc? ( dev-texlive/texlive-latex
- dev-tex/hevea )
-"
-RDEPEND="boost? ( dev-libs/boost[${MULTILIB_USEDEP}] )
- net-misc/curl[${MULTILIB_USEDEP}]
- opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
-"
-
-CXXFLAGS="${CXXFLAGS} -std=c++11 -Wextra -Wall -pedantic"
-CFLAGS="${CFLAGS} -std=c11 -Wextra -Wall -pedantic"
-
-src_prepare() {
- find "${S}" -name CMakeLists.txt \
- -exec sed -i 's#\(install(.* DESTINATION \)lib#\1${LIBRARY_OUTPUT_PATH}#g' \{\} \; \
- || die
- rm examples/CMakeLists.txt || die
-
- cmake-utils_src_prepare
-}
-
-multilib_src_configure() {
- mycmakeargs+=(
- -DCAF_NO_EXAMPLES=ON
- -DCAF_USE_ASIO=$(usex boost)
- -DCAF_LOG_LEVEL=$(usex debug 3 0)
- -DCAF_ENABLE_RUNTIME_CHECKS=$(usex debug)
- -DCAF_ENABLE_ADDRESS_SANITIZER=$(usex debug)
- -DCAF_NO_MEM_MANAGEMENT=$(usex mem_management OFF ON)
- -DCAF_NO_OPENCL=$(usex opencl OFF ON)
- -DCAF_BUILD_STATIC=$(usex static)
- -DCAF_NO_UNIT_TESTS=$(usex test OFF ON )
- -DLIBRARY_OUTPUT_PATH="$(get_libdir)"
- )
-
- cmake-utils_src_configure
-}
-
-multilib_src_compile() {
- cmake-utils_src_compile
-
- if use doc; then
- cd "${S}/manual/build-pdf"
- make
- cd "${S}/manual/build-html"
- make
- fi
-}
-
-multilib_src_install() {
- DOCS=( README.md )
- use examples && DOCS+=( "${S}/examples" )
- use doc && HTML_DOCS+=( "${S}/manual/build-html/manual.html" )
- use doc && DOCS+=( "${S}/manual/build-pdf/manual.pdf" )
-
- cmake-utils_src_install
-}
diff --git a/dev-libs/actor-framework/metadata.xml b/dev-libs/actor-framework/metadata.xml
deleted file mode 100644
index 19fdcb8..0000000
--- a/dev-libs/actor-framework/metadata.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
-<pkgmetadata>
- <maintainer type="person">
- <email>tomboy64@sina.cn</email>
- <name>M.B.</name>
- <description>Maintainer, assign bugs to him</description>
- </maintainer>
- <maintainer type="project">
- <email>proxy-maint@gentoo.org</email>
- <name>Proxy Maintainers</name>
- </maintainer>
- <use>
- <flag name="boost">Make use os Boost's ASIO functionality</flag>
- <flag name="debug">Raises log-level to DEBUG, enables runtime checks and address sanitizer</flag>
- <flag name="doc">Compiles and installs the documentation as PDF and HTML</flag>
- <flag name="examples">Installs the provided example source files</flag>
- <flag name="mem_management">Enables built-in memory management</flag>
- <flag name="opencl">Compiles against the provided opencl implementation</flag>
- <flag name="riac">TBD</flag>
- <flag name="static">Provides a static build</flag>
- <flag name="test">Builds the provided unit tests</flag>
- </use>
- <upstream>
- <remote-id type="github">actor-framework/actor-framework</remote-id>
- </upstream>
-</pkgmetadata>
diff --git a/dev-libs/libsecp256k1/Manifest b/dev-libs/libsecp256k1/Manifest
new file mode 100644
index 0000000..86c170d
--- /dev/null
+++ b/dev-libs/libsecp256k1/Manifest
@@ -0,0 +1,3 @@
+DIST secp256k1-v0.0.0_pre20141212.tgz 60007 SHA256 f5d3a7cac425caf64040395d99c1a91ab2ca1c973b228a66772ba4a290f355ce SHA512 ab2a211c1bf882ebb62e78891e4e12c3ed7244d46d532e37ff2a669ba08db8dcafec7b4c57c073310e463957fd2fa0dffb940c4f35b61890cb8ce86d4283f0f6 WHIRLPOOL 3aa8b7545ca24028ceb17e770fdbf997e2895212ec25a193fcd926660e78f16d704bf27a5b1aa7cf3cabe643c33b128bf0b0568172c15833eb82fcc58e5941c1
+DIST secp256k1-v0.0.0_pre20150423.tgz 77451 SHA256 7e4e78d5ded245b59dbe8abc9804fdf7ba41d9030936fb39766d5f2bd7e29b2e SHA512 a640188d83e9aa5a4292900c211e29815f2f1b57db4fbccfb8a3bf770bb52f0232d405044f317a3b6b6ea4d5a5107180dc4e374cf7ab06eb79676c270061c3b7 WHIRLPOOL 5796d32cd8f578ef28f6e79ced53fa505519273af39bdeaa413e9b48669ce7945d12437c6093f3aa0b3db9412dac50638c335a3f4f8cf0d4ffa8c94665a85f72
+DIST secp256k1-v0.0.0_pre20151118.tgz 125884 SHA256 75549cea9b22affda02d6731385a7184b60703f1ca0a4f098fec8c702a20f7b0 SHA512 3cc0a4973acf7936a7c6dc0abc37ee43ecd69e835069ed40765595d36ca597b43837b5d6f90499455599de03abfc775d7c9d019d26216b79b03dd6dc53a73e19 WHIRLPOOL 61eb9a709e8986db9113d305a989d44700f5e53143471485935bed0f79d18c745cb78f2b4b5e55614b6ca80a6bd29830b52108797bc21bc792789a7590597fed
diff --git a/dev-libs/libsecp256k1/files/20141212-fixes.patch b/dev-libs/libsecp256k1/files/20141212-fixes.patch
new file mode 100644
index 0000000..f8cb274
--- /dev/null
+++ b/dev-libs/libsecp256k1/files/20141212-fixes.patch
@@ -0,0 +1,289 @@
+diff --git a/build-aux/m4/bitcoin_secp.m4 b/build-aux/m4/bitcoin_secp.m4
+index 1373478..4a398d6 100644
+--- a/build-aux/m4/bitcoin_secp.m4
++++ b/build-aux/m4/bitcoin_secp.m4
+@@ -1,12 +1,6 @@
+ dnl libsecp25k1 helper checks
+ AC_DEFUN([SECP_INT128_CHECK],[
+ has_int128=$ac_cv_type___int128
+-if test x"$has_int128" != x"yes" && test x"$set_field" = x"64bit"; then
+- AC_MSG_ERROR([$set_field field support explicitly requested but is not compatible with this host])
+-fi
+-if test x"$has_int128" != x"yes" && test x"$set_scalar" = x"64bit"; then
+- AC_MSG_ERROR([$set_scalar scalar support explicitly requested but is not compatible with this host])
+-fi
+ ])
+
+ dnl
+@@ -18,11 +12,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ __asm__ __volatile__("movq $0x100000000,%1; mulq %%rsi" : "+a"(a) : "S"(tmp) : "cc", "%rdx");
+ ]])],[has_64bit_asm=yes],[has_64bit_asm=no])
+ AC_MSG_RESULT([$has_64bit_asm])
+-if test x"$set_field" == x"64bit_asm"; then
+- if test x"$has_64bit_asm" == x"no"; then
+- AC_MSG_ERROR([$set_field field support explicitly requested but no x86_64 assembly available])
+- fi
+-fi
+ ])
+
+ dnl
+@@ -43,7 +32,7 @@ else
+ )])
+ LIBS=
+ fi
+-if test x"$has_libcrypto" == x"yes" && test x"$has_openssl_ec" = x; then
++if test x"$has_libcrypto" = x"yes" && test x"$has_openssl_ec" = x; then
+ AC_MSG_CHECKING(for EC functions in libcrypto)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #include <openssl/ec.h>
+@@ -69,11 +58,4 @@ if test x"$has_gmp" != x"yes"; then
+ CPPFLAGS="$CPPFLAGS_TEMP"
+ LIBS="$LIBS_TEMP"
+ fi
+-if test x"$set_field" = x"gmp" && test x"$has_gmp" != x"yes"; then
+- AC_MSG_ERROR([$set_field field support explicitly requested but libgmp was not found])
+-fi
+-if test x"$set_bignum" = x"gmp" && test x"$has_gmp" != x"yes"; then
+- AC_MSG_ERROR([$set_bignum field support explicitly requested but libgmp was not found])
+-fi
+ ])
+-
+diff --git a/configure.ac b/configure.ac
+index 40e121e..bd99013 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -23,7 +23,7 @@ if test "x$CFLAGS" = "x"; then
+ fi
+
+ AC_PROG_CC_C99
+-if test x"$ac_cv_prog_cc_c99" == x"no"; then
++if test x"$ac_cv_prog_cc_c99" = x"no"; then
+ AC_MSG_ERROR([c99 compiler support required])
+ fi
+
+@@ -96,15 +96,18 @@ AC_ARG_ENABLE(endomorphism,
+ [use_endomorphism=$enableval],
+ [use_endomorphism=no])
+
+-AC_ARG_WITH([field], [AS_HELP_STRING([--with-field=gmp|64bit|64bit_asm|32bit|auto],
++AC_ARG_WITH([field], [AS_HELP_STRING([--with-field=gmp|64bit|32bit|auto],
+ [Specify Field Implementation. Default is auto])],[req_field=$withval], [req_field=auto])
+
+-AC_ARG_WITH([bignum], [AS_HELP_STRING([--with-bignum=gmp|none|auto],
++AC_ARG_WITH([bignum], [AS_HELP_STRING([--with-bignum=gmp|no|auto],
+ [Specify Bignum Implementation. Default is auto])],[req_bignum=$withval], [req_bignum=auto])
+
+ AC_ARG_WITH([scalar], [AS_HELP_STRING([--with-scalar=64bit|32bit|auto],
+ [Specify scalar implementation. Default is auto])],[req_scalar=$withval], [req_scalar=auto])
+
++AC_ARG_WITH([asm], [AS_HELP_STRING([--with-asm=x86_64|no|auto]
++[Specify assembly optimizations to use. Default is auto])],[req_asm=$withval], [req_asm=auto])
++
+ AC_CHECK_TYPES([__int128])
+
+ AC_MSG_CHECKING([for __builtin_expect])
+@@ -113,40 +116,66 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[void myfunc() {__builtin_expect(0,0);}]])],
+ [ AC_MSG_RESULT([no])
+ ])
+
+-if test x"$req_field" = x"auto"; then
++if test x"$req_asm" = x"auto"; then
+ SECP_64BIT_ASM_CHECK
+ if test x"$has_64bit_asm" = x"yes"; then
+- set_field=64bit_asm
++ set_asm=x86_64
++ fi
++ if test x"$set_asm" = x; then
++ set_asm=no
+ fi
++else
++ set_asm=$req_asm
++ case $set_asm in
++ x86_64)
++ SECP_64BIT_ASM_CHECK
++ if test x"$has_64bit_asm" != x"yes"; then
++ AC_MSG_ERROR([x86_64 assembly optimization requested but not available])
++ fi
++ ;;
++ no)
++ ;;
++ *)
++ AC_MSG_ERROR([invalid assembly optimization selection])
++ ;;
++ esac
++fi
+
++if test x"$req_field" = x"auto"; then
++ if test x"set_asm" = x"x86_64"; then
++ set_field=64bit
++ fi
+ if test x"$set_field" = x; then
+ SECP_INT128_CHECK
+ if test x"$has_int128" = x"yes"; then
+ set_field=64bit
+ fi
+ fi
+-
+ if test x"$set_field" = x; then
+ SECP_GMP_CHECK
+ if test x"$has_gmp" = x"yes"; then
+ set_field=gmp
+ fi
+ fi
+-
+ if test x"$set_field" = x; then
+ set_field=32bit
+ fi
+ else
+ set_field=$req_field
+ case $set_field in
+- 64bit_asm)
+- SECP_64BIT_ASM_CHECK
+- ;;
+ 64bit)
+- SECP_INT128_CHECK
++ if test x"$set_asm" != x"x86_64"; then
++ SECP_INT128_CHECK
++ if test x"$has_int128" != x"yes"; then
++ AC_MSG_ERROR([64bit field explicitly requested but neither __int128 support or x86_64 assembly available])
++ fi
++ fi
+ ;;
+ gmp)
+ SECP_GMP_CHECK
++ if test x"$has_gmp" != x"yes"; then
++ AC_MSG_ERROR([gmp field explicitly requested but libgmp not available])
++ fi
+ ;;
+ 32bit)
+ ;;
+@@ -157,11 +186,9 @@ else
+ fi
+
+ if test x"$req_scalar" = x"auto"; then
+- if test x"$set_scalar" = x; then
+- SECP_INT128_CHECK
+- if test x"$has_int128" = x"yes"; then
+- set_scalar=64bit
+- fi
++ SECP_INT128_CHECK
++ if test x"$has_int128" = x"yes"; then
++ set_scalar=64bit
+ fi
+ if test x"$set_scalar" = x; then
+ set_scalar=32bit
+@@ -171,6 +198,9 @@ else
+ case $set_scalar in
+ 64bit)
+ SECP_INT128_CHECK
++ if test x"$has_int128" != x"yes"; then
++ AC_MSG_ERROR([64bit scalar explicitly requested but __int128 support not available])
++ fi
+ ;;
+ 32bit)
+ ;;
+@@ -187,15 +217,18 @@ if test x"$req_bignum" = x"auto"; then
+ fi
+
+ if test x"$set_bignum" = x; then
+- set_bignum=none
++ set_bignum=no
+ fi
+ else
+ set_bignum=$req_bignum
+ case $set_bignum in
+ gmp)
+ SECP_GMP_CHECK
++ if test x"$has_gmp" != x"yes"; then
++ AC_MSG_ERROR([gmp bignum explicitly requested but libgmp not available])
++ fi
+ ;;
+- none)
++ no)
+ ;;
+ *)
+ AC_MSG_ERROR([invalid bignum implementation selection])
+@@ -203,14 +236,21 @@ else
+ esac
+ fi
+
++# select assembly optimization
++case $set_asm in
++x86_64)
++ AC_DEFINE(USE_ASM_X86_64, 1, [Define this symbol to enable x86_64 assembly optimizations])
++ ;;
++no)
++ ;;
++*)
++ AC_MSG_ERROR([invalid assembly optimizations])
++ ;;
++esac
++
+ # select field implementation
+ case $set_field in
+-64bit_asm)
+- AC_DEFINE(USE_FIELD_5X52_ASM, 1, [Define this symbol to use the assembly version for the 5x52 field implementation])
+- AC_DEFINE(USE_FIELD_5X52, 1, [Define this symbol to use the FIELD_5X52 implementation])
+- ;;
+ 64bit)
+- AC_DEFINE(USE_FIELD_5X52_INT128, 1, [Define this symbol to use the __int128 version for the 5x52 field implementation])
+ AC_DEFINE(USE_FIELD_5X52, 1, [Define this symbol to use the FIELD_5X52 implementation])
+ ;;
+ gmp)
+@@ -233,7 +273,7 @@ gmp)
+ AC_DEFINE(USE_FIELD_INV_NUM, 1, [Define this symbol to use the num-based field inverse implementation])
+ AC_DEFINE(USE_SCALAR_INV_NUM, 1, [Define this symbol to use the num-based scalar inverse implementation])
+ ;;
+-none)
++no)
+ AC_DEFINE(USE_NUM_NONE, 1, [Define this symbol to use no num implementation])
+ AC_DEFINE(USE_FIELD_INV_BUILTIN, 1, [Define this symbol to use the native field inverse implementation])
+ AC_DEFINE(USE_SCALAR_INV_BUILTIN, 1, [Define this symbol to use the native scalar inverse implementation])
+@@ -258,7 +298,7 @@ esac
+
+ if test x"$use_tests" = x"yes"; then
+ SECP_OPENSSL_CHECK
+- if test x"$has_openssl_ec" == x"yes"; then
++ if test x"$has_openssl_ec" = x"yes"; then
+ AC_DEFINE(ENABLE_OPENSSL_TESTS, 1, [Define this symbol if OpenSSL EC functions are available])
+ SECP_TEST_INCLUDES="$SSL_CFLAGS $CRYPTO_CFLAGS"
+ SECP_TEST_LIBS="$CRYPTO_LIBS"
+@@ -281,9 +321,11 @@ if test x"$use_endomorphism" = x"yes"; then
+ AC_DEFINE(USE_ENDOMORPHISM, 1, [Define this symbol to use endomorphism optimization])
+ fi
+
++AC_MSG_NOTICE([Using assembly optimizations: $set_asm])
+ AC_MSG_NOTICE([Using field implementation: $set_field])
+ AC_MSG_NOTICE([Using bignum implementation: $set_bignum])
+ AC_MSG_NOTICE([Using scalar implementation: $set_scalar])
++AC_MSG_NOTICE([Using endomorphism optimizations: $use_endomorphism])
+
+ AC_CONFIG_HEADERS([src/libsecp256k1-config.h])
+ AC_CONFIG_FILES([Makefile libsecp256k1.pc])
+@@ -291,7 +333,6 @@ AC_SUBST(SECP_INCLUDES)
+ AC_SUBST(SECP_LIBS)
+ AC_SUBST(SECP_TEST_LIBS)
+ AC_SUBST(SECP_TEST_INCLUDES)
+-AM_CONDITIONAL([USE_ASM], [test x"$set_field" == x"64bit_asm"])
+ AM_CONDITIONAL([USE_TESTS], [test x"$use_tests" != x"no"])
+ AM_CONDITIONAL([USE_BENCHMARK], [test x"$use_benchmark" != x"no"])
+
+diff --git a/src/field_5x52_impl.h b/src/field_5x52_impl.h
+index 63176d6..a045db3 100644
+--- a/src/field_5x52_impl.h
++++ b/src/field_5x52_impl.h
+@@ -16,12 +16,10 @@
+ #include "num.h"
+ #include "field.h"
+
+-#if defined(USE_FIELD_5X52_ASM)
++#if defined(USE_ASM_X86_64)
+ #include "field_5x52_asm_impl.h"
+-#elif defined(USE_FIELD_5X52_INT128)
+-#include "field_5x52_int128_impl.h"
+ #else
+-#error "Please select field_5x52 implementation"
++#include "field_5x52_int128_impl.h"
+ #endif
+
+ /** Implements arithmetic modulo FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFE FFFFFC2F,
diff --git a/dev-libs/libsecp256k1/libsecp256k1-0.0.0_pre20141212.ebuild b/dev-libs/libsecp256k1/libsecp256k1-0.0.0_pre20141212.ebuild
new file mode 100644
index 0000000..f466f13
--- /dev/null
+++ b/dev-libs/libsecp256k1/libsecp256k1-0.0.0_pre20141212.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit autotools eutils
+
+MyPN=secp256k1
+DESCRIPTION="Optimized C library for EC operations on curve secp256k1"
+HOMEPAGE="https://github.com/bitcoin/${MyPN}"
+COMMITHASH="2a53a472f24acd9ff10878b5bf21b5b27ab8060a"
+SRC_URI="https://github.com/bitcoin/${MyPN}/archive/${COMMITHASH}.tar.gz -> ${MyPN}-v${PV}.tgz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 arm x86"
+IUSE="asm doc endomorphism gmp test"
+
+REQUIRED_USE="
+ asm? ( amd64 )
+"
+RDEPEND="
+ gmp? ( dev-libs/gmp:0 )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ >=sys-devel/gcc-4.7
+ test? ( dev-libs/openssl:0 )
+"
+
+S="${WORKDIR}/${MyPN}-${COMMITHASH}"
+
+src_prepare() {
+ epatch "${FILESDIR}/20141212-fixes.patch"
+ eautoreconf
+}
+
+src_configure() {
+ local field
+ if use gmp && ! use asm; then
+ field=gmp
+ elif use amd64; then
+ field=64bit
+ else
+ field=32bit
+ fi
+
+ econf \
+ --disable-benchmark \
+ $(use_enable test tests) \
+ $(use_enable endomorphism) \
+ --with-asm=$(usex asm auto no) \
+ --with-bignum=$(usex gmp gmp no) \
+ --with-field=${field} \
+ --disable-static
+}
+
+src_compile() {
+ emake
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ if use doc; then
+ dodoc README.md
+ fi
+
+ emake DESTDIR="${D}" install
+ prune_libtool_files
+}
diff --git a/dev-libs/libsecp256k1/libsecp256k1-0.0.0_pre20150423.ebuild b/dev-libs/libsecp256k1/libsecp256k1-0.0.0_pre20150423.ebuild
new file mode 100644
index 0000000..b4084c5
--- /dev/null
+++ b/dev-libs/libsecp256k1/libsecp256k1-0.0.0_pre20150423.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit autotools eutils
+
+MyPN=secp256k1
+DESCRIPTION="Optimized C library for EC operations on curve secp256k1"
+HOMEPAGE="https://github.com/bitcoin/${MyPN}"
+COMMITHASH="22f60a62801a8a49ecd049e7a563f69a41affd8d"
+SRC_URI="https://github.com/bitcoin/${MyPN}/archive/${COMMITHASH}.tar.gz -> ${MyPN}-v${PV}.tgz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="asm doc endomorphism gmp test"
+
+REQUIRED_USE="
+ asm? ( amd64 )
+"
+RDEPEND="
+ gmp? ( dev-libs/gmp:0 )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? ( dev-libs/openssl:0 )
+"
+
+S="${WORKDIR}/${MyPN}-${COMMITHASH}"
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-benchmark \
+ $(use_enable test tests) \
+ $(use_enable endomorphism) \
+ --with-asm=$(usex asm auto no) \
+ --with-bignum=$(usex gmp gmp no) \
+ --disable-static
+}
+
+src_install() {
+ if use doc; then
+ dodoc README.md
+ fi
+
+ emake DESTDIR="${D}" install
+ prune_libtool_files
+}
diff --git a/dev-libs/libsecp256k1/libsecp256k1-0.0.0_pre20151118.ebuild b/dev-libs/libsecp256k1/libsecp256k1-0.0.0_pre20151118.ebuild
new file mode 100644
index 0000000..d635ef0
--- /dev/null
+++ b/dev-libs/libsecp256k1/libsecp256k1-0.0.0_pre20151118.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+inherit autotools eutils
+
+MyPN=secp256k1
+DESCRIPTION="Optimized C library for EC operations on curve secp256k1"
+HOMEPAGE="https://github.com/bitcoin/${MyPN}"
+COMMITHASH="6c527eceee7f5105c33c98dfae24ffeffd71f7cf"
+SRC_URI="https://github.com/bitcoin/${MyPN}/archive/${COMMITHASH}.tar.gz -> ${MyPN}-v${PV}.tgz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="asm doc ecdh endomorphism experimental gmp +recovery schnorr test"
+
+REQUIRED_USE="
+ asm? ( amd64 )
+ ecdh? ( experimental )
+ schnorr? ( experimental )
+"
+RDEPEND="
+ gmp? ( dev-libs/gmp:0 )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? ( dev-libs/openssl:0 )
+"
+
+S="${WORKDIR}/${MyPN}-${COMMITHASH}"
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-benchmark \
+ $(use_enable test tests) \
+ $(use_enable ecdh module-ecdh) \
+ $(use_enable endomorphism) \
+ --with-asm=$(usex asm auto no) \
+ --with-bignum=$(usex gmp gmp no) \
+ $(use_enable recovery module-recovery) \
+ $(use_enable schnorr module-schnorr) \
+ --disable-static
+}
+
+src_install() {
+ if use doc; then
+ dodoc README.md
+ fi
+
+ emake DESTDIR="${D}" install
+ prune_libtool_files
+}
diff --git a/dev-libs/libsecp256k1/libsecp256k1-9999.ebuild b/dev-libs/libsecp256k1/libsecp256k1-9999.ebuild
new file mode 100644
index 0000000..cd2d9a8
--- /dev/null
+++ b/dev-libs/libsecp256k1/libsecp256k1-9999.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+
+EGIT_REPO_URI="https://github.com/bitcoin/secp256k1.git"
+inherit git-2 autotools eutils
+
+MyPN=secp256k1
+DESCRIPTION="Optimized C library for EC operations on curve secp256k1"
+HOMEPAGE="https://github.com/bitcoin/${MyPN}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS=""
+IUSE="asm doc ecdh endomorphism experimental gmp +recovery schnorr test"
+
+REQUIRED_USE="
+ asm? ( amd64 )
+ ecdh? ( experimental )
+ schnorr? ( experimental )
+"
+RDEPEND="
+ gmp? ( dev-libs/gmp:0 )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ test? ( dev-libs/openssl:0 )
+"
+
+src_prepare() {
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-benchmark \
+ $(use_enable experimental) \
+ $(use_enable test tests) \
+ $(use_enable ecdh module-ecdh) \
+ $(use_enable endomorphism) \
+ --with-asm=$(usex asm auto no) \
+ --with-bignum=$(usex gmp gmp no) \
+ $(use_enable recovery module-recovery) \
+ $(use_enable schnorr module-schnorr) \
+ --disable-static
+}
+
+src_install() {
+ if use doc; then
+ dodoc README.md
+ fi
+
+ emake DESTDIR="${D}" install
+ prune_libtool_files
+}
diff --git a/dev-libs/libsecp256k1/metadata.xml b/dev-libs/libsecp256k1/metadata.xml
new file mode 100644
index 0000000..d5c0710
--- /dev/null
+++ b/dev-libs/libsecp256k1/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <maintainer>
+ <email>luke-jr+gentoobugs@utopios.org</email>
+ <name>Luke Dashjr</name>
+ </maintainer>
+ <use>
+ <flag name="asm">Enable x86_64 assembly optimisation</flag>
+ <flag name="ecdh">Enable ECDH shared secret computation</flag>
+ <flag name="endomorphism">Enable endomorphism</flag>
+ <flag name="experimental">Allow experimental USE flags</flag>
+ <flag name="recovery">Enable ECDSA pubkey recovery module</flag>
+ <flag name="schnorr">Enable Schnorr signature module</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">bitcoin/secp256k1</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-libs/univalue/Manifest b/dev-libs/univalue/Manifest
new file mode 100644
index 0000000..5bb6673
--- /dev/null
+++ b/dev-libs/univalue/Manifest
@@ -0,0 +1 @@
+DIST univalue-1.0.2.tgz 14201 SHA256 685ca5d2db9c0475d88bfd0a444a90ade770f7e98dacfed55921775c36d28e51 SHA512 727096735dbad082741fb863c9066936a80d7337b1d7c4c289107d240b7f695756a8720f5db320f0c7521b523e299829bd49833b6a31969d8aa43267653a4f2f WHIRLPOOL a801c578c8ac48ebb8febf22b5c808b5728a7af7eff2af4717d7c6fa5208d2d2758b07eee7acc56d153cf98ddd0aa1b350a4b66155dd49cf87d515644054a0f3
diff --git a/dev-libs/univalue/metadata.xml b/dev-libs/univalue/metadata.xml
new file mode 100644
index 0000000..b0fb784
--- /dev/null
+++ b/dev-libs/univalue/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <maintainer>
+ <email>luke-jr+gentoobugs@utopios.org</email>
+ <name>Luke Dashjr</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">jgarzik/univalue</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-libs/univalue/univalue-1.0.2.ebuild b/dev-libs/univalue/univalue-1.0.2.ebuild
new file mode 100644
index 0000000..29eec35
--- /dev/null
+++ b/dev-libs/univalue/univalue-1.0.2.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="C++ universal value object and JSON library"
+HOMEPAGE="https://github.com/jgarzik/univalue"
+LICENSE="MIT"
+
+SRC_URI="https://codeload.github.com/jgarzik/${PN}/tar.gz/v${PV} -> ${P}.tgz"
+SLOT="0/0"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86 ~amd64-linux ~x86-linux"
+
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ ./autogen.sh || die
+}
+
+src_configure() {
+ econf --disable-static
+}
+
+src_install() {
+ default_src_install
+ prune_libtool_files
+} \ No newline at end of file
diff --git a/eclass/bitcoincore.eclass b/eclass/bitcoincore.eclass
new file mode 100644
index 0000000..3d39827
--- /dev/null
+++ b/eclass/bitcoincore.eclass
@@ -0,0 +1,431 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+#
+# @ECLASS: bitcoincore.eclass
+# @MAINTAINER:
+# Luke Dashjr <luke_gentoo_bitcoin@dashjr.org>
+# @BLURB: common code for Bitcoin Core ebuilds
+# @DESCRIPTION:
+# This eclass is used in Bitcoin Core ebuilds (bitcoin-qt, bitcoind,
+# libbitcoinconsensus) to provide a single common place for the common ebuild
+# stuff.
+#
+# The eclass provides all common dependencies as well as common use flags.
+
+has "${EAPI:-0}" 5 || die "EAPI=${EAPI} not supported"
+
+if [[ ! ${_BITCOINCORE_ECLASS} ]]; then
+
+in_bcc_iuse() {
+ local liuse=( ${BITCOINCORE_IUSE} )
+ has "${1}" "${liuse[@]#[+-]}"
+}
+
+in_bcc_policy() {
+ local liuse=( ${BITCOINCORE_POLICY_PATCHES} )
+ has "${1}" "${liuse[@]#[+-]}"
+}
+
+DB_VER="4.8"
+inherit autotools db-use eutils
+
+if [ -z "$BITCOINCORE_COMMITHASH" ]; then
+ inherit git-2
+fi
+
+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
+ EXPORT_FUNCTIONS pkg_pretend
+fi
+
+if [[ ! ${_BITCOINCORE_ECLASS} ]]; then
+
+# @ECLASS-VARIABLE: BITCOINCORE_COMMITHASH
+# @DESCRIPTION:
+# Set this variable before the inherit line, to the upstream commit hash.
+
+# @ECLASS-VARIABLE: BITCOINCORE_IUSE
+# @DESCRIPTION:
+# Set this variable before the inherit line, to the USE flags supported.
+
+# @ECLASS-VARIABLE: BITCOINCORE_LJR_DATE
+# @DESCRIPTION:
+# Set this variable before the inherit line, to the datestamp of the ljr
+# patchset.
+
+# @ECLASS-VARIABLE: BITCOINCORE_POLICY_PATCHES
+# @DESCRIPTION:
+# Set this variable before the inherit line, to a space-delimited list of
+# supported policies.
+
+MyPV="${PV/_/}"
+MyPN="bitcoin"
+MyP="${MyPN}-${MyPV}"
+
+# These are expected to change in future versions
+DOCS="${DOCS} doc/README.md doc/release-notes.md"
+OPENSSL_DEPEND="dev-libs/openssl:0[-bindist]"
+WALLET_DEPEND="sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]"
+LIBEVENT_DEPEND=""
+UNIVALUE_DEPEND=""
+BITCOINCORE_LJR_NAME=ljr
+[ -n "${BITCOINCORE_LJR_PV}" ] || BITCOINCORE_LJR_PV="${PV}"
+
+case "${PV}" in
+0.10*)
+ BITCOINCORE_MINOR=10
+ LIBSECP256K1_DEPEND="=dev-libs/libsecp256k1-0.0.0_pre20141212"
+ case "${PVR}" in
+ 0.10.2)
+ BITCOINCORE_RBF_DIFF="16f45600c8c372a738ffef544292864256382601...a23678edc70204599299459a206709a00e039db7"
+ BITCOINCORE_RBF_PATCHFILE="${MyPN}-rbf-v0.10.2.patch"
+ ;;
+ *)
+ BITCOINCORE_RBF_DIFF="16f45600c8c372a738ffef544292864256382601...4890416cde655559eba09d3fd6f79db7d0d6314a"
+ BITCOINCORE_RBF_PATCHFILE="${MyPN}-rbf-v0.10.2-r1.patch"
+ ;;
+ esac
+ BITCOINCORE_XT_DIFF="047a89831760ff124740fe9f58411d57ee087078...d4084b62c42c38bfe302d712b98909ab26ecce2f"
+ ;;
+0.11*)
+ BITCOINCORE_MINOR=11
+ LIBSECP256K1_DEPEND="=dev-libs/libsecp256k1-0.0.0_pre20150423"
+ # RBF is bundled with ljr patchset since 0.11.1
+ if [ "${PVR}" = "0.11.0" ]; then
+ BITCOINCORE_RBF_DIFF="5f032c75eefb0fe8ff79ed9595da1112c05f5c4a...660b96d24916b8ef4e0677e5d6162e24e2db447e"
+ BITCOINCORE_RBF_PATCHFILE="${MyPN}-rbf-v0.11.0rc3.patch"
+ fi
+ ;;
+0.12*)
+ BITCOINCORE_MINOR=12
+ IUSE="${IUSE} libressl"
+ OPENSSL_DEPEND="!libressl? ( dev-libs/openssl:0[-bindist] ) libressl? ( dev-libs/libressl )"
+ if in_bcc_iuse libevent; then
+ LIBEVENT_DEPEND="libevent? ( dev-libs/libevent )"
+ else
+ LIBEVENT_DEPEND="dev-libs/libevent"
+ fi
+ LIBSECP256K1_DEPEND="=dev-libs/libsecp256k1-0.0.0_pre20151118[recovery]"
+ UNIVALUE_DEPEND="dev-libs/univalue"
+ BITCOINCORE_LJR_NAME=knots
+ if in_bcc_policy spamfilter; then
+ REQUIRED_USE="${REQUIRED_USE} bitcoin_policy_spamfilter? ( ljr )"
+ fi
+ ;;
+9999*)
+ BITCOINCORE_MINOR=9999
+ BITCOINCORE_SERIES="9999"
+ LIBEVENT_DEPEND="dev-libs/libevent"
+ LIBSECP256K1_DEPEND=">dev-libs/libsecp256k1-0.0.0_pre20150422"
+ UNIVALUE_DEPEND="dev-libs/univalue"
+ ;;
+*)
+ die "Unrecognised version"
+ ;;
+esac
+
+[ -n "${BITCOINCORE_SERIES}" ] || BITCOINCORE_SERIES="0.${BITCOINCORE_MINOR}.x"
+
+LJR_PV() {
+ local testsfx=
+ if [ -n "${BITCOINCORE_LJR_PREV}" ]; then
+ if [ "$1" = "dir" ]; then
+ testsfx="/test/${BITCOINCORE_LJR_PREV}"
+ else
+ testsfx=".${BITCOINCORE_LJR_PREV}"
+ fi
+ fi
+ echo "${BITCOINCORE_LJR_PV}.${BITCOINCORE_LJR_NAME}${BITCOINCORE_LJR_DATE}${testsfx}"
+}
+LJR_PATCHDIR="${MyPN}-$(LJR_PV ljr).patches"
+LJR_PATCH() { echo "${WORKDIR}/${LJR_PATCHDIR}/${MyPN}-$(LJR_PV ljr).$@.patch"; }
+LJR_PATCH_DESC="http://luke.dashjr.org/programs/${MyPN}/files/${MyPN}d/luke-jr/${BITCOINCORE_SERIES}/$(LJR_PV ljr)/${MyPN}-$(LJR_PV ljr).desc.txt"
+if [ "$BITCOINCORE_MINOR" -ge 12 ]; then
+ LJR_PATCH_DESC="http://bitcoinknots.org/files/${BITCOINCORE_SERIES}/$(LJR_PV dir)/${MyPN}-$(LJR_PV).desc.txt"
+fi
+
+HOMEPAGE="http://bitcoincore.org/"
+
+if [ -z "$BITCOINCORE_COMMITHASH" ]; then
+ EGIT_PROJECT='bitcoin'
+ EGIT_REPO_URI="git://github.com/bitcoin/bitcoin.git https://github.com/bitcoin/bitcoin.git"
+else
+ SRC_URI="https://github.com/${MyPN}/${MyPN}/archive/${BITCOINCORE_COMMITHASH}.tar.gz -> ${MyPN}-v${PV}${BITCOINCORE_SRC_SUFFIX}.tgz"
+ if [ -z "${BITCOINCORE_NO_SYSLIBS}" ]; then
+ SRC_URI="${SRC_URI} http://bitcoinknots.org/files/${BITCOINCORE_SERIES}/$(LJR_PV dir)/${LJR_PATCHDIR}.txz -> ${LJR_PATCHDIR}.tar.xz"
+ fi
+ if in_bcc_iuse addrindex; then
+ SRC_URI="${SRC_URI} addrindex? ( https://github.com/btcdrak/bitcoin/compare/${BITCOINCORE_ADDRINDEX_DIFF}.diff -> ${BITCOINCORE_ADDRINDEX_PATCHFILE} )"
+ fi
+ if in_bcc_iuse xt; then
+ BITCOINXT_PATCHFILE="${MyPN}xt-v${PV}.patch"
+ SRC_URI="${SRC_URI} xt? ( https://github.com/bitcoinxt/bitcoinxt/compare/${BITCOINCORE_XT_DIFF}.diff -> ${BITCOINXT_PATCHFILE} )"
+ fi
+ if in_bcc_policy rbf && [ -n "${BITCOINCORE_RBF_DIFF}" ]; then
+ SRC_URI="${SRC_URI} bitcoin_policy_rbf? ( https://github.com/petertodd/bitcoin/compare/${BITCOINCORE_RBF_DIFF}.diff -> ${BITCOINCORE_RBF_PATCHFILE} )"
+ fi
+ S="${WORKDIR}/${MyPN}-${BITCOINCORE_COMMITHASH}"
+fi
+
+bitcoincore_policy_iuse() {
+ local mypolicy iuse_def new_BITCOINCORE_IUSE=
+ for mypolicy in ${BITCOINCORE_POLICY_PATCHES}; do
+ if [[ "${mypolicy:0:1}" =~ ^[+-] ]]; then
+ iuse_def=${mypolicy:0:1}
+ mypolicy="${mypolicy:1}"
+ else
+ iuse_def=
+ fi
+ new_BITCOINCORE_IUSE="$new_BITCOINCORE_IUSE ${iuse_def}bitcoin_policy_${mypolicy}"
+ done
+ echo $new_BITCOINCORE_IUSE
+}
+IUSE="$IUSE $BITCOINCORE_IUSE $(bitcoincore_policy_iuse)"
+if in_bcc_policy rbf && in_bcc_iuse xt; then
+ REQUIRED_USE="${REQUIRED_USE} bitcoin_policy_rbf? ( !xt )"
+fi
+
+BITCOINCORE_COMMON_DEPEND="
+ ${OPENSSL_DEPEND}
+"
+if ! has libevent ${BITCOINCORE_NO_DEPEND}; then
+ BITCOINCORE_COMMON_DEPEND="${BITCOINCORE_COMMON_DEPEND} ${LIBEVENT_DEPEND}"
+fi
+if [ "${BITCOINCORE_NEED_LIBSECP256K1}" = "1" ]; then
+ BITCOINCORE_COMMON_DEPEND="${BITCOINCORE_COMMON_DEPEND} $LIBSECP256K1_DEPEND"
+fi
+if [ "${PN}" != "libbitcoinconsensus" ] && ! use_if_iuse test; then
+ BITCOINCORE_COMMON_DEPEND="${BITCOINCORE_COMMON_DEPEND}
+ ${UNIVALUE_DEPEND}
+ >=dev-libs/boost-1.52.0[threads(+)]
+ "
+fi
+bitcoincore_common_depend_use() {
+ in_bcc_iuse "$1" || return
+ BITCOINCORE_COMMON_DEPEND="${BITCOINCORE_COMMON_DEPEND} $1? ( $2 )"
+}
+bitcoincore_common_depend_use upnp '>net-libs/miniupnpc-1.9.20150915'
+bitcoincore_common_depend_use wallet "${WALLET_DEPEND}"
+bitcoincore_common_depend_use zeromq net-libs/zeromq
+RDEPEND="${RDEPEND} ${BITCOINCORE_COMMON_DEPEND}"
+DEPEND="${DEPEND} ${BITCOINCORE_COMMON_DEPEND}
+ >=app-shells/bash-4.1
+ sys-apps/sed
+"
+if [ "${BITCOINCORE_NEED_LEVELDB}" = "1" ]; then
+ RDEPEND="${RDEPEND} virtual/bitcoin-leveldb"
+fi
+if in_bcc_iuse ljr; then
+ if [ "$BITCOINCORE_SERIES" = "0.10.x" ]; then
+ DEPEND="${DEPEND} ljr? ( dev-vcs/git )"
+ elif [ "${BITCOINCORE_LJR_NAME}" = "knots" ]; then
+ DEPEND="${DEPEND} ljr? ( dev-lang/perl )"
+ fi
+fi
+
+bitcoincore_policymsg() {
+ local USEFlag="bitcoin_policy_$1"
+ in_iuse "${USEFlag}" || return
+ if use "${USEFlag}"; then
+ [ -n "$2" ] && einfo "$2"
+ else
+ [ -n "$3" ] && einfo "$3"
+ fi
+ bitcoincore_policymsg_flag=true
+}
+
+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
+ einfo "Extra functionality improvements to Bitcoin Core are enabled."
+ bitcoincore_policymsg_flag=true
+ if use_if_iuse addrindex addrindex; then
+ einfo "Please be aware that the addrindex functionality is known to be unreliable."
+ fi
+ fi
+ bitcoincore_policymsg cltv \
+ "CLTV policy is enabled: Your node will recognise and assist OP_CHECKLOCKTIMEVERIFY (BIP65) transactions." \
+ "CLTV policy is disabled: Your node will not recognise OP_CHECKLOCKTIMEVERIFY (BIP65) transactions."
+ bitcoincore_policymsg cpfp \
+ "CPFP policy is enabled: If you mine, you will give consideration to child transaction fees to pay for their parents." \
+ "CPFP policy is disabled: If you mine, you will ignore transactions unless they have sufficient fee themselves, even if child transactions offer a fee to cover their cost."
+ bitcoincore_policymsg dcmp \
+ "Data Carrier Multi-Push policy is enabled: Your node will assist transactions with at most a single multiple-'push' data carrier output." \
+ "Data Carrier Multi-Push policy is disabled: Your node will assist transactions with at most a single data carrier output with only a single 'push'."
+ bitcoincore_policymsg rbf \
+ "Replace By Fee policy is enabled: Your node will preferentially mine and relay transactions paying the highest fee, regardless of receive order." \
+ "Replace By Fee policy is disabled: Your node will only accept the first transaction seen consuming a conflicting input, regardless of fee offered by later ones."
+ bitcoincore_policymsg spamfilter \
+ "Enhanced spam filter policy is enabled: Your node will identify notorious spam scripts and avoid assisting them. This may impact your ability to use some services (see link for a list)." \
+ "Enhanced spam filter policy is disabled: Your node will not be checking for notorious spam scripts, and may assist them."
+ $bitcoincore_policymsg_flag && einfo "For more information on any of the above, see ${LJR_PATCH_DESC}"
+}
+
+bitcoincore_git_apply() {
+ local patchfile="$1"
+ einfo "Applying ${patchfile##*/} ..."
+ git apply --whitespace=nowarn "${patchfile}" || die
+}
+
+bitcoincore_predelete_patch() {
+ local patchfile="$1"
+ mkdir -p "${WORKDIR}/pdp"
+ local tmpfile="${WORKDIR}/pdp/${patchfile##*/}"
+ perl -ne '
+ newline:
+ if (m[(^diff .* b/(.*)$)]) {
+ $a = "$1\n";
+ $f = $2;
+ $_ = <>;
+ if (m[^deleted file]) {
+ unlink($f) || die;
+ while (!m[^diff ]) {
+ $_ = <>
+ }
+ goto newline
+ } else {
+ print($a)
+ }
+ }
+ print
+ ' <"${patchfile}" >"${tmpfile}" || die
+ epatch "${tmpfile}"
+}
+
+bitcoincore_prepare() {
+ local mypolicy
+ if [ -n "${BITCOINCORE_NO_SYSLIBS}" ]; then
+ true
+ elif [ "${PV}" = "9999" ]; then
+ epatch "${FILESDIR}/${PV}-syslibs.patch"
+ else
+ epatch "$(LJR_PATCH syslibs)"
+ fi
+ if use_if_iuse ljr; then
+ if [ "${BITCOINCORE_LJR_NAME}" = "knots" ]; then
+ epatch "$(LJR_PATCH f)"
+ bitcoincore_predelete_patch "$(LJR_PATCH branding)"
+ epatch "$(LJR_PATCH ts)"
+ elif [ "${BITCOINCORE_SERIES}" = "0.10.x" ]; then
+ # Regular epatch won't work with binary files
+ bitcoincore_git_apply "$(LJR_PATCH ljrF)"
+ else
+ epatch "$(LJR_PATCH ljrF)"
+ fi
+ fi
+ if use_if_iuse 1stclassmsg; then
+ epatch "$(LJR_PATCH 1stclassmsg)"
+ fi
+ if use_if_iuse addrindex; then
+ epatch "${DISTDIR}/${BITCOINCORE_ADDRINDEX_PATCHFILE}"
+ fi
+ if use_if_iuse xt; then
+ epatch "${DISTDIR}/${BITCOINXT_PATCHFILE}"
+ fi
+ { use_if_iuse zeromq && [ "${BITCOINCORE_MINOR}" -lt 12 ]; } && epatch "$(LJR_PATCH zeromq)"
+ for mypolicy in ${BITCOINCORE_POLICY_PATCHES}; do
+ mypolicy="${mypolicy#[-+]}"
+
+ if [ "${BITCOINCORE_MINOR}" -ge 12 ]; then
+ case "${mypolicy}" in
+ rbf)
+ use bitcoin_policy_rbf || sed -i 's/\(DEFAULT_ENABLE_REPLACEMENT = \)true/\1false/' src/main.h
+ ;;
+ spamfilter)
+ use bitcoin_policy_spamfilter || sed -i 's/\(DEFAULT_SPAMFILTER = \)true/\1false/' src/main.h
+ ;;
+ *)
+ die "Unknown policy ${mypolicy}"
+ esac
+ continue
+ fi
+
+ use bitcoin_policy_${mypolicy} || continue
+ case "${mypolicy}" in
+ rbf)
+ if [ -n "${BITCOINCORE_RBF_PATCHFILE}" ]; then
+ epatch "${DISTDIR}/${BITCOINCORE_RBF_PATCHFILE}"
+ else
+ epatch "$(LJR_PATCH ${mypolicy})"
+ fi
+ ;;
+ *)
+ epatch "$(LJR_PATCH ${mypolicy})"
+ ;;
+ esac
+ done
+}
+
+bitcoincore_autoreconf() {
+ eautoreconf
+ rm -r src/leveldb || die
+ rm -r src/secp256k1 || die
+}
+
+bitcoincore_src_prepare() {
+ bitcoincore_prepare
+ bitcoincore_autoreconf
+}
+
+bitcoincore_conf() {
+ local my_econf=
+ if use_if_iuse upnp; then
+ my_econf="${my_econf} --with-miniupnpc --enable-upnp-default"
+ else
+ my_econf="${my_econf} --without-miniupnpc --disable-upnp-default"
+ fi
+ if use_if_iuse test; then
+ my_econf="${my_econf} --enable-tests"
+ else
+ my_econf="${my_econf} --disable-tests"
+ fi
+ if use_if_iuse wallet; then
+ my_econf="${my_econf} --enable-wallet"
+ else
+ my_econf="${my_econf} --disable-wallet"
+ fi
+ if ! use_if_iuse zeromq; then
+ # NOTE: Older (pre-0.12) patches would disable ZMQ if --enable-zmq was passed
+ my_econf="${my_econf} --disable-zmq"
+ fi
+ if [ -z "${BITCOINCORE_NO_SYSLIBS}" ]; then
+ my_econf="${my_econf} --disable-util-cli --disable-util-tx"
+ else
+ my_econf="${my_econf} --without-utils"
+ fi
+ # Knots 0.12.0 errors if --with-libevent used for bitcoin{d,-cli}, so only disable it when not wanted
+ if has libevent ${BITCOINCORE_NO_DEPEND} || { in_bcc_iuse libevent && ! use libevent; }; then
+ my_econf="${my_econf} --without-libevent"
+ fi
+ if [ "${BITCOINCORE_NEED_LEVELDB}" = "1" ]; then
+ # Passing --with-system-leveldb fails if leveldb is not installed, so only use it for targets that use LevelDB
+ my_econf="${my_econf} --with-system-leveldb"
+ fi
+ econf \
+ --disable-bench \
+ --disable-ccache \
+ --disable-static \
+ --with-system-libsecp256k1 \
+ --with-system-univalue \
+ --without-libs \
+ --without-daemon \
+ --without-gui \
+ ${my_econf} \
+ "$@"
+}
+
+bitcoincore_src_test() {
+ emake check
+}
+
+bitcoincore_src_install() {
+ default
+ [ "${PN}" = "libbitcoinconsensus" ] || rm "${D}/usr/bin/test_bitcoin"
+}
+
+_BITCOINCORE_ECLASS=1
+fi
diff --git a/games-arcade/blackvoxel/Manifest b/games-arcade/blackvoxel/Manifest
new file mode 100644
index 0000000..be73ebd
--- /dev/null
+++ b/games-arcade/blackvoxel/Manifest
@@ -0,0 +1 @@
+DIST blackvoxel-1.38.tar.gz 20141324 SHA256 f4c2472e43ebdb8b0648b07b21a9cfb491a00300d9c2917b6b09f3751ead117c SHA512 d8901f7312986f35ab210b019497ffde74fd46b03561dc79a85ba676e70f375adc07e38f315c1ad5ca936bb2ae895ce6cc60e91c1d66677316e33c23758cc8a7 WHIRLPOOL beee8c571f445f369f3ade3be1e4532cb04c746a181a5cc99c50b51e0189d7d62664e41bc5876b47657032c376444f9920cdb1c6d7788522d093243054126044
diff --git a/games-arcade/blackvoxel/blackvoxel-1.38.ebuild b/games-arcade/blackvoxel/blackvoxel-1.38.ebuild
new file mode 100644
index 0000000..78bb107
--- /dev/null
+++ b/games-arcade/blackvoxel/blackvoxel-1.38.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit games
+
+DESCRIPTION="a"
+HOMEPAGE="b"
+SRC_URI="https://github.com/Blackvoxel/Blackvoxel/archive/v${PV}.tar.gz -> ${PF}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/Blackvoxel-${PV}"
+
+src_prepare() {
+ sed -i 's/\(CFLAGS\)=\(.*\)/\1+=\2/g' Makefile || die
+ sed -i 's/\(CFLAGS.*\)-O3/\1/g' Makefile || die
+ sed -i '/Licence/d' Makefile || die
+}
+
+src_install() {
+ emake specialinstall=1 \
+ DESTDIR="${D}" \
+ bindir="${D}/usr/bin/" \
+ icondir="${D}/usr/share/icons/" \
+ icondir2="${D}/usr/share/icons/" \
+ desktopdir="${D}/usr/share/applications/" \
+ blackvoxeldatadir="${D}/usr/share/${PF}/"
+ install
+}
diff --git a/games-arcade/tsc/tsc-2.0.0.ebuild b/games-arcade/tsc/tsc-2.0.0.ebuild
new file mode 100644
index 0000000..332d7d0
--- /dev/null
+++ b/games-arcade/tsc/tsc-2.0.0.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="The secret chronicles of Dr. M."
+HOMEPAGE="TSC"
+SRC_URI="https://github.com/Secretchronicles/${PN}/archive/v${PV}.tar.gz -> ${PF}.tar.gz"
+
+LICENSE="custom"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc nls"
+
+DEPEND="dev-ruby/rake
+ doc? ( media-gfx/graphviz
+ dev-ruby/kramdown
+ dev-ruby/coderay
+ app-doc/doxygen
+ dev-ruby/rdoc )
+ ${RDEPEND}"
+RDEPEND="
+ >=dev-games/cegui-0.7
+ media-libs/devil
+ nls? ( sys-devel/gettext )
+ dev-libs/libpng:0
+ media-libs/sdl-image
+ media-libs/sdl-mixer
+ media-libs/sdl-ttf
+ dev-libs/libpcre
+ dev-cpp/libxmlpp:2.6
+ media-libs/freetype
+ dev-libs/boost[threads]
+ media-libs/glew
+ virtual/opengl
+ x11-libs/libX11
+ "
+
+S="${WORKDIR}/TSC-${PV}/tsc"
+
+src_configure() {
+ local mycmakeargs=(
+ -DFIXED_DATA_DIR="${EPREFIX}/usr/share/tsc/"
+ -DBINARY_DIR="${EPREFIX}/usr/bin/"
+ -DPREFIX="${EPREFIX}/usr"
+ $(cmake-utils_use_enable nls)
+ )
+
+ cmake-utils_src_configure
+}
diff --git a/metadata/layout.conf b/metadata/layout.conf
index d43e61c..ca9fee1 100644
--- a/metadata/layout.conf
+++ b/metadata/layout.conf
@@ -1 +1,2 @@
masters = gentoo
+thin-manifests = true
diff --git a/net-p2p/bitcoin-qt/Manifest b/net-p2p/bitcoin-qt/Manifest
new file mode 100644
index 0000000..099715c
--- /dev/null
+++ b/net-p2p/bitcoin-qt/Manifest
@@ -0,0 +1,19 @@
+AUX 0.10.0-openrc-compat.patch 949 SHA256 5cbea89dd672b5fd6c56431d3ba5a792c9ffa37676d759eae03bb98db1536336 SHA512 3af1c031cbfa6d27e1128f864ef51ad34ce241360481a69217abb04774552b06a0a8e1c07cf187c39bf09c0e9ecfc51d9a9a45e23c4bee4b7233e67cfcad4eeb WHIRLPOOL ba476a679cfb5e88aced3bed1f0f59e5aa4402f84440b4225ad2e326666bc2b54095abb304db28e073eaa6f9210648b862afdac9e88467b2931c78f711e24684
+AUX 0.8-openssl-101k.patch 1185 SHA256 b983630d22847ea2aa41674ab2317363e48788b01a4157818a2a9cb78e671a2f SHA512 e54a742467d922892a332f786f2a29b1901fc2c8c0e316a69bdc6492977d649c4d57d09ae51f43ba01e2bfc2f4bb19db3f1cddfbe0ee093b3daed4493385d836 WHIRLPOOL 30876d679e4ebb38b6db6524fa3a22be42a2cbe0f2b50458ac7dfbebd74e1d16be6a19f4e369c30ad65c528dcbcff9d79077aad5b8d971a15dceb0339de18c21
+AUX 0.8.2-sys_leveldb.patch 6726 SHA256 11322fc7715b9b552075babf60c8261e0343e5ec834188013fb7d77cacf3b4d9 SHA512 e371b6da685c916c5941cfc094d01237f18502597e778b35e1c31cbf93cda1118a97272b56605f7c6da1f2873190415974ebdb4e7ce08a5d04e94dac675a4112 WHIRLPOOL 8579c73d18281b3910c260ef0708842380f8c5001982c94ea51e6b8f99111b11959ffb04fc7812e0c90ba8a919071b13e975ed95ec207017e34bef5844f65068
+AUX 0.9-openssl-101k.patch 1192 SHA256 198318943cd1eaff2ce5e94b5b9aea40a2c99c46c459f2f2049eb15c52721566 SHA512 471dd9a581a07f859bb5f7b8d9489995c6e137bec0e3afcf91903135f4dd259f7f56d734749fd5acba0d744d6b8b23688570371656be5af9e960d63bbe3659f0 WHIRLPOOL abc6596e349acb34c2fb657c302b20fa74c545f2c2fbb4062bc1041f4944285ab3a5ff63dfc7ef7a724abb95a1742ac1e9ee05c9e9dbabcba4a5cbf500d4e368
+AUX 0.9.0-sys_leveldb.patch 1040 SHA256 1355674ba82966b31fd001b12e7bd1bffbfd7f1c6d8dc1679cedba032e6df642 SHA512 26b1b6f8c4fdc228c08982a3172de57e09d963745726c99e1e274f381e242467f84d23c718f8e07675c2fc938f2d6db6b50a05dbb944702238d7b0eb6205cff7 WHIRLPOOL 7d39d39f846f03ffbf3e4c9655c42f298c8196dde8ee621862483a49f386c13cfdd13221ff265745f504a33422aaafac3657b72552f55784c9296daffc248f31
+AUX 0.9.5-sys_leveldb.patch 2562 SHA256 35f29e9849846cdf716036337e00138b5ee56202a22e689163b9ec0ef2f85c88 SHA512 5da00d33d29fb5d0bd0f7f7d3dc379b625f6db9d5c9b2eba6b750e259909a495d33603ee4022b12359838d4e66a5cc2c91ce914d8f823cf2f47c160dec5b04f7 WHIRLPOOL 112511ac7a16d40650d7222799f53cdc09785385084a233826d4c1c20284c35a4091f49990d21a21cc0a0734baf5952a7457579515fd5365f888af4db409e9c8
+AUX 0.9.x-ljr_noblacklist.patch 330 SHA256 b20c934540748cd42405bfca305a61bf05a76cd9b54f20e57e5fba84bb742f6a SHA512 13e727d6e1324542f7097c310e2f2a869d39acf6288593661b81715858ee95d1ca0566aa9892e5a8e34e4c45edc28faff6938728f1b97e9561460ea99838834a WHIRLPOOL 851fe606c02da5d8f778d56aea83d5a55a427c7a83610755cdd35fdc67a02a4628c1c480bea5d8d862968416ff3cb3e78d56ece498055f86e4d138e5997db674
+AUX 9999-syslibs.patch 9143 SHA256 a91cb64a820e2e0eaa573fc3c7e408d68f344f9f0d25a4ba110d0443cb622bc6 SHA512 595717f059b6ad11dc790a7c2f343ca66fcf237311cbf5f60cd9569624755295d5efb57127cc82bf3e0bb972ee432e0d2211155b26c71546808faa68c78d55df WHIRLPOOL 805ebe3de20d9a417ead593274297d2b074af55cccf63bc73b4a8884f5c27bd0c27d0f8c92636769bce88637677924149ef8b8520e907c64486f7c666f2e1a04
+AUX bitcoin.conf 80 SHA256 541ae10cc2246b620de3e7efa97eee59efacf83d28ea5f1297a121d0708226d2 SHA512 43bef890505a1fac88887bb39e9fdd4ec673ae8838a40279b33711e970551f5a75ac25171c41f8c83de2c953b157f7a3f57171e868fd9f626007d9909331a19f WHIRLPOOL 728e38b62da2c7c3a1149ac511b92d156f7b3c51dacfadd7ce74d9e6f915a6547c4cc8d34159243f50eee333c63b35949b311ea5a7f48a6c3bf17a5d4d47c123
+AUX bitcoin.confd 238 SHA256 72300b41d57325de5a5f2ddea449d5f414f278549fb665d60746707ee5de2549 SHA512 2b010d8c773a76868a11626ba0552f122cd51293cb39e06b7ed7e17be47f9e3790cc090f8311b32d441d3ff1eb4db266a4b2cd08693f7edbe2dde178254838d1 WHIRLPOOL f51d97b828b4b096d1ca924cb7256f648b94ae098a4f10dcfbac7d6045cf84da0c203b1e2d5569f3b304ba193501c9b9239c5ee1a1c11fbdb62bb9909c384358
+AUX bitcoin.initd-r1 2478 SHA256 0dd08d606683195ba638311bf50036d64fc91446c7963e48833aca391da10db4 SHA512 df5a9b30426f4fb3a12b2e0b21c3f865df8229e7583f0dba34860bd40f2cb35aff061e5940febf6f9382b6d23e729024a28ca55897fed9c9b4ce337f32fb4814 WHIRLPOOL 8aca6b746ed6a73a4ab79892f1b5c9ea533039ebb0d0e06d5134217b5d5b876b82d92ad16382c0144d0fa3f5f01f00bbdd2d86385dc6675abdac4e7af7230efb
+AUX bitcoind.logrotate 110 SHA256 9b469c67e7af914199d699ac76279f194010f154be91f8136eddeeddf623a475 SHA512 b0e0634fc33979695fc0f37057f76b264ff3eb2655a8828d505a38621a5bba9fd4eafe47b012e5cb3863d607146b5a2d1a995787ed55cb6d5e6147ab795e1949 WHIRLPOOL 5ebd73178d3228b9477b5eae51ee783857d3a88a765c6802923f2a1d682c00cd4cefbf39e1f2d5192704ff2c72e8b91a38755cece6e139371ea2e75cab461e32
+AUX bitcoind.logrotate-r1 121 SHA256 71b195013cd2fe3091eb03a3b8c18d1f021fa91a2e2c02cc3d50384545580b84 SHA512 a4783a310ea6b77f607bcc45d86d25ffd72794983bd1854b77eb057e86377e067f666ca38073c8efcb06256e1202918c77c8e09382cd8462832dee769017dde1 WHIRLPOOL c2879092a8a60d5e485d0540426c1b2bed0d2d4c230540f7716c193393d68792e75ba39f261ac94e24ccfb9f35a806a8b301c131059f32fce3c55d579d840318
+AUX bitcoind.service 869 SHA256 c24332570f8ac155847372a4f9019a47a2e3c8c15435584dac4153b8eb300bc7 SHA512 d0e23b98bc9109e7e4d8a6459f73d1f9a06a3da71593613e22c5d0f31a8ad7473242b07690c6f22f35358ed869ffa7160d0daa65937462442bfc9028794321ea WHIRLPOOL 7992f776ac36277ce83898920ed5a8abc6b031f1d88214150c362c6f5befc869eb9901bd346da74da9fb56bda500fe9d3d9ff8dd46f1b3f257691cb106754a93
+AUX miniupnpc-14.patch 882 SHA256 fe4c62c1848a841e546f67db4017dca85e09c31763e6287374a881725e3e155f SHA512 80d09d74e4efe16e1d8467f1b8e4cc454bf6b1228e024cc6f6ab890db71eb6f259765662ecd3ac7441beb6496c3cb411ec0d5ee02193e2d998a28ccca202873e WHIRLPOOL 732f1c9d7c4255ad5ca912ac73b77a9ce23778c260c4ca6878b5dc7cef0dfc7b774aa4935768f99ee4e7404d94285e15f352731273b542badc5b1699b7697c7b
+DIST bitcoin-0.12.0.knots20160226.rc1.patches.tar.xz 145776 SHA256 93431aa2c1d66c41d52bbf8810df27228f5a0823db2416312d6e07a20dc78dea SHA512 042c02dc64591f4edbad1cc421ee90e84d628f93292fd42b190728960a65eb76d0234d821ce2df92a3a66328a5368b5b42670ebf130045d92d74d74287a90990 WHIRLPOOL b4543468936c6e16a8636c2eaed1d6f76a20958c2f2fda6f9c6a389cc79111369d906c08878e3eb7b2d6bad8299e3e16ad38a190dab80996f63adfda8c1c93f2
+DIST bitcoin-v0.12.0.tgz 6708553 SHA256 a5bac23b087c183821f06c19947cba2399ced09ee2b02c751ecbda9f808d8e33 SHA512 2c6bec18eed7b8145ee711ae143b425e08ed3243454083a1a91eb2a1f16abcac2a5e053f83c9ae840cbbdea3960856b613ba17d269d8b60706379744a4cf9f4b WHIRLPOOL bd159d52567a84a577c0581cdd8df02030c25b32ee44df26e1081b588cbddde0d951226c1c46e69077d2e2887c98874455f340bb3fe01bede85d044ef1bb02e8
+EBUILD bitcoin-qt-0.12.0.ebuild 3336 SHA256 5d22ce02d96996ddb7ebf5b71e8db2101f8b54c385daed70334ea78067bb4d88 SHA512 78d292f88da6d2b42c5634100d58f5fa5c9c296cf0d816275fed11d6515d916e80f02412d75562fcde247d9866db7f9562c81f266a384376c7f1db3c79ac630b WHIRLPOOL a6ec5bfcf48e82888d9d2eb8f989ca3f56f8b900b7dd9b4a68addb49bda644ac3d707e1e4f1d5a380bc526cc2f16e9935a6850c683c2c42e6d8a12c374297ef6
+MISC metadata.xml 1756 SHA256 99fd159ad0cb70d24c00d25cfc329a5dd83fdd82e44ca6dfb9591b57f7cbfee5 SHA512 d8fc739e9ce0d095b55b31b2a0e022b9f99737b4e15f18fcf66c4bfa9ac4421d6979a55da9c432d6a4c994bc35e5a90ddc6cbf51680f6b15e91d5673dd56a9d9 WHIRLPOOL 27d4f50d19fe9f425883761cd7f0fb15de10750ccc012133496f19ddfd1b333de9b35da3f85a3fdd2c2c0d98233e73de0f01fa8f3c1e8be0a156d8cdb7da475c
diff --git a/net-p2p/bitcoin-qt/bitcoin-qt-0.12.0.ebuild b/net-p2p/bitcoin-qt/bitcoin-qt-0.12.0.ebuild
new file mode 100644
index 0000000..b3ebf49
--- /dev/null
+++ b/net-p2p/bitcoin-qt/bitcoin-qt-0.12.0.ebuild
@@ -0,0 +1,136 @@
+# Copyright 2010-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+BITCOINCORE_COMMITHASH="188ca9c305d3dd0fb462b9d6a44048b1d99a05f3"
+BITCOINCORE_LJR_DATE="20160226"
+BITCOINCORE_LJR_PREV="rc1"
+BITCOINCORE_IUSE="dbus kde +libevent +ljr +qrcode qt4 qt5 +rpc test +tor upnp +wallet zeromq"
+BITCOINCORE_POLICY_PATCHES="+rbf spamfilter"
+LANGS="af_ZA ar be_BY bg bg_BG bs ca ca@valencia ca_ES cs cs_CZ cy da de el el_GR en en_GB eo es es_AR es_CL es_CO es_DO es_ES es_MX es_UY es_VE et eu_ES fa fa_IR fi fr fr_CA fr_FR gl he hi_IN hr hu id_ID it ja ka kk_KZ ko_KR ky la lt lv_LV mk_MK mn ms_MY nb nl pam pl pt_BR pt_PT ro_RO ru ru_RU sk sl_SI sq sr sv ta th_TH tr tr_TR uk ur_PK uz@Cyrl vi vi_VN zh zh_CN zh_TW"
+KNOTS_LANGS="es_AR es_CO ta"
+BITCOINCORE_NEED_LEVELDB=1
+BITCOINCORE_NEED_LIBSECP256K1=1
+inherit bitcoincore eutils fdo-mime gnome2-utils kde4-functions qt4-r2
+
+DESCRIPTION="An end-user Qt GUI for the Bitcoin crypto-currency"
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ dev-libs/protobuf
+ qrcode? (
+ media-gfx/qrencode
+ )
+ qt4? ( dev-qt/qtgui:4 )
+ qt5? ( dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtwidgets:5 )
+ dbus? (
+ qt4? ( dev-qt/qtdbus:4 )
+ qt5? ( dev-qt/qtdbus:5 )
+ )
+"
+DEPEND="${RDEPEND}
+ qt5? ( dev-qt/linguist-tools:5 )
+ ljr? (
+ gnome-base/librsvg
+ media-gfx/imagemagick
+ )
+"
+REQUIRED_USE="^^ ( qt4 qt5 )
+ rpc? ( libevent ) tor? ( libevent ) libevent? ( rpc tor )
+ !libevent? ( ljr )
+"
+
+for lang in ${KNOTS_LANGS}; do
+ REQUIRED_USE="${REQUIRED_USE} linguas_${lang}? ( ljr )"
+done
+
+src_prepare() {
+ bitcoincore_prepare
+
+ local filt= yeslang= nolang= lan ts x
+
+ for lan in $LANGS; do
+ if [ ! -e src/qt/locale/bitcoin_$lan.ts ]; then
+ if has $lan $KNOTS_LANGS && ! use ljr; then
+ # Expected
+ continue
+ fi
+ die "Language '$lan' no longer supported. Ebuild needs update."
+ fi
+ done
+
+ for ts in src/qt/locale/*.ts
+ do
+ x="${ts/*bitcoin_/}"
+ x="${x/.ts/}"
+ if ! use "linguas_$x"; then
+ nolang="$nolang $x"
+ rm "$ts" || die
+ filt="$filt\\|$x"
+ else
+ yeslang="$yeslang $x"
+ fi
+ done
+ filt="bitcoin_\\(${filt:2}\\)\\.\(qm\|ts\)"
+ sed "/${filt}/d" -i 'src/qt/bitcoin_locale.qrc' || die
+ sed "s/locale\/${filt}/bitcoin.qrc/" -i 'src/Makefile.qt.include' || die
+ einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang"
+
+ bitcoincore_autoreconf
+}
+
+src_configure() {
+ unset DISPLAY
+ bitcoincore_conf \
+ $(use_with dbus qtdbus) \
+ $(use_with qrcode qrencode) \
+ --with-gui=$(usex qt5 qt5 qt4)
+}
+
+src_compile() {
+ unset DISPLAY
+ emake
+}
+
+src_install() {
+ bitcoincore_src_install
+
+ insinto /usr/share/pixmaps
+ if use ljr; then
+ newins "src/qt/res/rendered_icons/bitcoin.ico" "${PN}.ico"
+ else
+ newins "share/pixmaps/bitcoin.ico" "${PN}.ico"
+ fi
+ make_desktop_entry "${PN} %u" "Bitcoin-Qt" "/usr/share/pixmaps/${PN}.ico" "Qt;Network;P2P;Office;Finance;" "MimeType=x-scheme-handler/bitcoin;\nTerminal=false"
+
+ dodoc doc/assets-attribution.md doc/bips.md doc/tor.md
+ doman contrib/debian/manpages/bitcoin-qt.1
+
+ use zeromq && dodoc doc/zmq.md
+
+ if use kde; then
+ insinto /usr/share/kde4/services
+ doins contrib/debian/bitcoin-qt.protocol
+ fi
+}
+
+pkg_preinst() {
+ gnome2_icon_savelist
+}
+
+update_caches() {
+ gnome2_icon_cache_update
+ fdo-mime_desktop_database_update
+ buildsycoca
+}
+
+pkg_postinst() {
+ update_caches
+}
+
+pkg_postrm() {
+ update_caches
+}
diff --git a/net-p2p/bitcoin-qt/files/0.10.0-openrc-compat.patch b/net-p2p/bitcoin-qt/files/0.10.0-openrc-compat.patch
new file mode 100644
index 0000000..a7c31d6
--- /dev/null
+++ b/net-p2p/bitcoin-qt/files/0.10.0-openrc-compat.patch
@@ -0,0 +1,24 @@
+--- contrib/init/bitcoind.openrc 2015-03-03 09:37:59.919728713 +0000
++++ contrib/init/bitcoind.openrc 2015-03-03 09:38:08.109757531 +0000
+@@ -12,9 +12,11 @@
+ BITCOIND_PIDDIR=${BITCOIND_PIDDIR:-/var/run/bitcoind}
+ BITCOIND_PIDFILE=${BITCOIND_PIDFILE:-${BITCOIND_PIDDIR}/bitcoind.pid}
+ BITCOIND_DATADIR=${BITCOIND_DATADIR:-${BITCOIND_DEFAULT_DATADIR}}
+-BITCOIND_USER=${BITCOIND_USER:-bitcoin}
++BITCOIND_USER=${BITCOIND_USER:-${BITCOIN_USER:-bitcoin}}
+ BITCOIND_GROUP=${BITCOIND_GROUP:-bitcoin}
+ BITCOIND_BIN=${BITCOIND_BIN:-/usr/bin/bitcoind}
++BITCOIND_NICE=${BITCOIND_NICE:-${NICELEVEL:-0}}
++BITCOIND_OPTS="${BITCOIND_OPTS:-${BITCOIN_OPTS}}"
+
+ name="Bitcoin Core Daemon"
+ description="Bitcoin crypto-currency p2p network daemon"
+@@ -28,7 +30,7 @@
+
+ required_files="${BITCOIND_CONFIGFILE}"
+ start_stop_daemon_args="-u ${BITCOIND_USER} \
+- -N ${BITCOIND_NICE:-0} -w 2000"
++ -N ${BITCOIND_NICE} -w 2000"
+ pidfile="${BITCOIND_PIDFILE}"
+ retry=60
+
diff --git a/net-p2p/bitcoin-qt/files/0.8-openssl-101k.patch b/net-p2p/bitcoin-qt/files/0.8-openssl-101k.patch
new file mode 100644
index 0000000..5eaaba9
--- /dev/null
+++ b/net-p2p/bitcoin-qt/files/0.8-openssl-101k.patch
@@ -0,0 +1,31 @@
+diff --git a/src/key.cpp b/src/key.cpp
+index 75114c6..7fcb17d 100644
+--- a/src/key.cpp
++++ b/src/key.cpp
+@@ -376,11 +376,23 @@ bool CKey::SetCompactSignature(uint256 hash, const std::vector<unsigned char>& v
+
+ bool CKey::Verify(uint256 hash, const std::vector<unsigned char>& vchSig)
+ {
+- // -1 = error, 0 = bad sig, 1 = good
+- if (ECDSA_verify(0, (unsigned char*)&hash, sizeof(hash), &vchSig[0], vchSig.size(), pkey) != 1)
++ if (vchSig.empty())
+ return false;
+
+- return true;
++ // New versions of OpenSSL will reject non-canonical DER signatures. de/re-serialize first.
++ unsigned char *norm_der = NULL;
++ ECDSA_SIG *norm_sig = ECDSA_SIG_new();
++ const unsigned char* sigptr = &vchSig[0];
++ d2i_ECDSA_SIG(&norm_sig, &sigptr, vchSig.size());
++ int derlen = i2d_ECDSA_SIG(norm_sig, &norm_der);
++ ECDSA_SIG_free(norm_sig);
++ if (derlen <= 0)
++ return false;
++
++ // -1 = error, 0 = bad sig, 1 = good
++ bool ret = ECDSA_verify(0, (unsigned char*)&hash, sizeof(hash), norm_der, derlen, pkey) == 1;
++ OPENSSL_free(norm_der);
++ return ret;
+ }
+
+ bool CKey::VerifyCompact(uint256 hash, const std::vector<unsigned char>& vchSig)
diff --git a/net-p2p/bitcoin-qt/files/0.8.2-sys_leveldb.patch b/net-p2p/bitcoin-qt/files/0.8.2-sys_leveldb.patch
new file mode 100644
index 0000000..2b9ab1a
--- /dev/null
+++ b/net-p2p/bitcoin-qt/files/0.8.2-sys_leveldb.patch
@@ -0,0 +1,185 @@
+diff --git a/bitcoin-qt.pro b/bitcoin-qt.pro
+index cf80986..520b5df 100644
+--- a/bitcoin-qt.pro
++++ b/bitcoin-qt.pro
+@@ -4,7 +4,7 @@ macx:TARGET = "Bitcoin-Qt"
+ VERSION = 0.8.0
+ INCLUDEPATH += src src/json src/qt
+ QT += network
+-DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE
++DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE LEVELDB_WITHOUT_MEMENV
+ CONFIG += no_include_pwd
+ CONFIG += thread
+
+@@ -98,25 +98,29 @@ contains(BITCOIN_NEED_QT_PLUGINS, 1) {
+ QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets
+ }
+
++contains(USE_SYSTEM_LEVELDB, 1) {
++ LIBS += -lleveldb
++} else {
+ INCLUDEPATH += src/leveldb/include src/leveldb/helpers
+-LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a
++LIBS += $$PWD/src/leveldb/libleveldb.a
+ !win32 {
+ # we use QMAKE_CXXFLAGS_RELEASE even without RELEASE=1 because we use RELEASE to indicate linking preferences not -O preferences
+- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a
++ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a
+ } else {
+ # make an educated guess about what the ranlib command is called
+ isEmpty(QMAKE_RANLIB) {
+ QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib)
+ }
+ LIBS += -lshlwapi
+- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a
++ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a
+ }
+ genleveldb.target = $$PWD/src/leveldb/libleveldb.a
+ genleveldb.depends = FORCE
+ PRE_TARGETDEPS += $$PWD/src/leveldb/libleveldb.a
+ QMAKE_EXTRA_TARGETS += genleveldb
++}
+ # Gross ugly hack that depends on qmake internals, unfortunately there is no other way to do it.
+-QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; $(MAKE) clean
++QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb && $(MAKE) clean || true
+
+ # regenerate src/build.h
+ !win32|contains(USE_BUILD_INFO, 1) {
+diff --git a/src/leveldb.cpp b/src/leveldb.cpp
+index b41764f..30c524d 100644
+--- a/src/leveldb.cpp
++++ b/src/leveldb.cpp
+@@ -8,7 +8,9 @@
+ #include <leveldb/env.h>
+ #include <leveldb/cache.h>
+ #include <leveldb/filter_policy.h>
+-#include <memenv/memenv.h>
++#ifndef LEVELDB_WITHOUT_MEMENV
++#include <memenv.h>
++#endif
+
+ #include <boost/filesystem.hpp>
+
+@@ -42,8 +44,12 @@ CLevelDB::CLevelDB(const boost::filesystem::path &path, size_t nCacheSize, bool
+ options = GetOptions(nCacheSize);
+ options.create_if_missing = true;
+ if (fMemory) {
++#ifndef LEVELDB_WITHOUT_MEMENV
+ penv = leveldb::NewMemEnv(leveldb::Env::Default());
+ options.env = penv;
++#else
++ throw std::runtime_error("CLevelDB(): compiled without memenv support");
++#endif
+ } else {
+ if (fWipe) {
+ printf("Wiping LevelDB in %s\n", path.string().c_str());
+diff --git a/src/makefile.unix b/src/makefile.unix
+index 081edaf..27f2199 100644
+--- a/src/makefile.unix
++++ b/src/makefile.unix
+@@ -104,8 +104,7 @@ xCXXFLAGS=-O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-para
+ # adds some defaults in front. Unfortunately, LDFLAGS=... $(LDFLAGS) does not work.
+ xLDFLAGS=$(LDHARDENING) $(LDFLAGS)
+
+-OBJS= \
+- leveldb/libleveldb.a \
++BASEOBJS := \
+ obj/alert.o \
+ obj/version.o \
+ obj/checkpoints.o \
+@@ -114,7 +113,6 @@ OBJS= \
+ obj/crypter.o \
+ obj/key.o \
+ obj/db.o \
+- obj/init.o \
+ obj/keystore.o \
+ obj/main.o \
+ obj/net.o \
+@@ -134,24 +132,43 @@ OBJS= \
+ obj/hash.o \
+ obj/bloom.o \
+ obj/noui.o \
+- obj/leveldb.o \
+ obj/txdb.o
+
++OBJS := \
++ obj/leveldb.o \
++ obj/init.o \
++ $(BASEOBJS)
++
++TESTOBJS := \
++ obj-test/leveldb.o \
++ $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) \
++ $(BASEOBJS)
++
+
+ all: bitcoind
+
+ test check: test_bitcoin FORCE
+ ./test_bitcoin
+
++ifdef USE_SYSTEM_LEVELDB
++ LIBS += -lleveldb
++ TESTLIBS += -lmemenv
++else
+ #
+ # LevelDB support
+ #
+ MAKEOVERRIDES =
+-LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a
++LIBS += $(CURDIR)/leveldb/libleveldb.a
++TESTLIBS += $(CURDIR)/leveldb/libmemenv.a
+ DEFS += $(addprefix -I,$(CURDIR)/leveldb/include)
+-DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers)
++DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers/memenv)
+ leveldb/libleveldb.a:
+- @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a libmemenv.a && cd ..
++ @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a && cd ..
++leveldb/libmemenv.a:
++ @echo "Building LevelDB memenv ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libmemenv.a && cd ..
++OBJS += leveldb/libleveldb.a
++TESTOBJS += leveldb/libmemenv.a
++endif
+
+ # auto-generated dependencies:
+ -include obj/*.P
+@@ -162,26 +179,28 @@ obj/build.h: FORCE
+ version.cpp: obj/build.h
+ DEFS += -DHAVE_BUILD_INFO
+
+-obj/%.o: %.cpp
+- $(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
++P_TO_D = \
+ @cp $(@:%.o=%.d) $(@:%.o=%.P); \
+- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
++ sed -e 's/\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+ -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
+ rm -f $(@:%.o=%.d)
+
+-bitcoind: $(OBJS:obj/%=obj/%)
+- $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS)
++obj/%.o: %.cpp
++ $(CXX) -c $(xCXXFLAGS) -DLEVELDB_WITHOUT_MEMENV -MMD -MF $(@:%.o=%.d) -o $@ $<
++ $(P_TO_D)
+
+-TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
++bitcoind: $(OBJS)
++ $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS)
+
+ obj-test/%.o: test/%.cpp
+ $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
+- @cp $(@:%.o=%.d) $(@:%.o=%.P); \
+- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
+- -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
+- rm -f $(@:%.o=%.d)
++ $(P_TO_D)
++
++obj-test/leveldb.o: leveldb.cpp
++ $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
++ $(P_TO_D)
+
+-test_bitcoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%))
++test_bitcoin: $(TESTOBJS)
+ $(LINK) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ $(TESTLIBS) $(xLDFLAGS) $(LIBS)
+
+ clean:
diff --git a/net-p2p/bitcoin-qt/files/0.9-openssl-101k.patch b/net-p2p/bitcoin-qt/files/0.9-openssl-101k.patch
new file mode 100644
index 0000000..80f6488
--- /dev/null
+++ b/net-p2p/bitcoin-qt/files/0.9-openssl-101k.patch
@@ -0,0 +1,31 @@
+diff --git a/src/key.cpp b/src/key.cpp
+index 5b261bb..a845ba1 100644
+--- a/src/key.cpp
++++ b/src/key.cpp
+@@ -227,10 +227,23 @@ public:
+ }
+
+ bool Verify(const uint256 &hash, const std::vector<unsigned char>& vchSig) {
+- // -1 = error, 0 = bad sig, 1 = good
+- if (ECDSA_verify(0, (unsigned char*)&hash, sizeof(hash), &vchSig[0], vchSig.size(), pkey) != 1)
++ if (vchSig.empty())
+ return false;
+- return true;
++
++ // New versions of OpenSSL will reject non-canonical DER signatures. de/re-serialize first.
++ unsigned char *norm_der = NULL;
++ ECDSA_SIG *norm_sig = ECDSA_SIG_new();
++ const unsigned char* sigptr = &vchSig[0];
++ d2i_ECDSA_SIG(&norm_sig, &sigptr, vchSig.size());
++ int derlen = i2d_ECDSA_SIG(norm_sig, &norm_der);
++ ECDSA_SIG_free(norm_sig);
++ if (derlen <= 0)
++ return false;
++
++ // -1 = error, 0 = bad sig, 1 = good
++ bool ret = ECDSA_verify(0, (unsigned char*)&hash, sizeof(hash), norm_der, derlen, pkey) == 1;
++ OPENSSL_free(norm_der);
++ return ret;
+ }
+
+ bool SignCompact(const uint256 &hash, unsigned char *p64, int &rec) {
diff --git a/net-p2p/bitcoin-qt/files/0.9.0-sys_leveldb.patch b/net-p2p/bitcoin-qt/files/0.9.0-sys_leveldb.patch
new file mode 100644
index 0000000..60e9f2b
--- /dev/null
+++ b/net-p2p/bitcoin-qt/files/0.9.0-sys_leveldb.patch
@@ -0,0 +1,34 @@
+commit c38e0af3e021eb0b2aba846c77b06ca71de06b11 (personal-github/sys_leveldb, sys_leveldb)
+Author: Luke Dashjr <luke-jr+git@utopios.org>
+Date: Mon Sep 9 03:06:17 2013 +0000
+
+ configure: Add unsupported --with-system-leveldb configure flag
+
+diff --git a/configure.ac b/configure.ac
+index 3ed4549..5a5852d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -332,10 +332,22 @@ AC_TRY_COMPILE([#include <sys/socket.h>],
+ [ AC_MSG_RESULT(no)]
+ )
+
++dnl Check for leveldb, only if explicitly requested
+ LEVELDB_CPPFLAGS=
+ LIBLEVELDB=
+ LIBMEMENV=
+-AM_CONDITIONAL([EMBEDDED_LEVELDB],[true])
++AC_ARG_WITH([system-leveldb],
++ [AS_HELP_STRING([--with-system-leveldb],
++ [Build with system LevelDB (default is no; DANGEROUS; NOT SUPPORTED)])],
++ [system_leveldb=$withval],
++ [system_leveldb=no]
++)
++if test x$system_leveldb != xno; then
++ LEVELDB_CPPFLAGS=
++ LIBLEVELDB=-lleveldb
++ LIBMEMENV=-lmemenv
++fi
++AM_CONDITIONAL([EMBEDDED_LEVELDB],[test x$system_leveldb = xno])
+ AC_SUBST(LEVELDB_CPPFLAGS)
+ AC_SUBST(LIBLEVELDB)
+ AC_SUBST(LIBMEMENV)
diff --git a/net-p2p/bitcoin-qt/files/0.9.5-sys_leveldb.patch b/net-p2p/bitcoin-qt/files/0.9.5-sys_leveldb.patch
new file mode 100644
index 0000000..0987adb
--- /dev/null
+++ b/net-p2p/bitcoin-qt/files/0.9.5-sys_leveldb.patch
@@ -0,0 +1,63 @@
+diff --git a/configure.ac b/configure.ac
+index 7924105..a899b3c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -394,10 +394,44 @@ AC_TRY_COMPILE([#include <sys/socket.h>],
+ [ AC_MSG_RESULT(no)]
+ )
+
++dnl Check for leveldb, only if explicitly requested
+ LEVELDB_CPPFLAGS=
+ LIBLEVELDB=
+ LIBMEMENV=
+-AM_CONDITIONAL([EMBEDDED_LEVELDB],[true])
++AC_ARG_WITH([system-leveldb],
++ [AS_HELP_STRING([--with-system-leveldb],
++ [Build with system LevelDB (default is no; DANGEROUS; NOT SUPPORTED)])],
++ [system_leveldb=$withval],
++ [system_leveldb=no]
++)
++if test x$system_leveldb != xno; then
++ LEVELDB_CPPFLAGS=
++ AC_CHECK_LIB([leveldb],[main],[
++ LIBLEVELDB=-lleveldb
++ ],[
++ AC_MSG_ERROR([leveldb library not found; using --with-system-leveldb is not supported anyway])
++ ])
++ TEMP_LIBS="$LIBS"
++ LIBS="$LIBS $LIBLEVELDB"
++ AC_CHECK_LIB([memenv],[main],[
++ LIBMEMENV=-lmemenv
++ ],[
++ AC_MSG_ERROR([LevelDB's memenv library not found; using --with-system-leveldb is not supported anyway])
++ ])
++ LIBS="$TEMP_LIBS"
++ AC_CHECK_HEADER([leveldb/filter_policy.h],[],[
++ AC_MSG_ERROR([LevelDB headers not found; using --with-system-leveldb is not supported anyway])
++ ])
++ AC_CHECK_HEADER([leveldb/helpers/memenv.h],[
++ AC_MSG_CHECKING([for memenv.h path])
++ BITCOIN_SUBDIR_TO_INCLUDE([LEVELDB_CPPFLAGS],[leveldb/helpers/],[memenv])
++ ],[
++ AC_CHECK_HEADER([memenv.h],[],[
++ AC_MSG_ERROR([LevelDB headers not found; using --with-system-leveldb is not supported anyway])
++ ])
++ ])
++fi
++AM_CONDITIONAL([EMBEDDED_LEVELDB],[test x$system_leveldb = xno])
+ AC_SUBST(LEVELDB_CPPFLAGS)
+ AC_SUBST(LIBLEVELDB)
+ AC_SUBST(LIBMEMENV)
+diff --git a/src/m4/bitcoin_subdir_to_include.m4 b/src/m4/bitcoin_subdir_to_include.m4
+index 66f106c..5f0a3b1 100644
+--- a/src/m4/bitcoin_subdir_to_include.m4
++++ b/src/m4/bitcoin_subdir_to_include.m4
+@@ -5,7 +5,7 @@ AC_DEFUN([BITCOIN_SUBDIR_TO_INCLUDE],[
+ AC_MSG_RESULT([default])
+ else
+ echo "#include <$2$3.h>" >conftest.cpp
+- newinclpath=`${CXXCPP} ${CPPFLAGS} -M conftest.cpp 2>/dev/null | [ tr -d '\\n\\r\\\\' | sed -e 's/^.*[[:space:]:]\(\/[^[:space:]]*\)]$3[\.h[[:space:]].*$/\1/' -e t -e d`]
++ newinclpath=$(${CXXCPP} ${CPPFLAGS} -M conftest.cpp 2>/dev/null | sed [-E -e ':a' -e '/\\$/!b b' -e N -e 's/\\\n/ /' -e 't a' -e ':b' -e 's/^[^:]*:[[:space:]]*(([^[:space:]\]|\\.)*[[:space:]])*(([^[:space:]\]|\\.)*)]$3\.h[([[:space:]].*)?$/\3/' -e 't' -e d])
+ AC_MSG_RESULT([${newinclpath}])
+ if test "x${newinclpath}" != "x"; then
+ eval "$1=\"\$$1\"' -I${newinclpath}'"
diff --git a/net-p2p/bitcoin-qt/files/0.9.x-ljr_noblacklist.patch b/net-p2p/bitcoin-qt/files/0.9.x-ljr_noblacklist.patch
new file mode 100644
index 0000000..3519466
--- /dev/null
+++ b/net-p2p/bitcoin-qt/files/0.9.x-ljr_noblacklist.patch
@@ -0,0 +1,12 @@
+diff --git a/src/script.cpp b/src/script.cpp
+index 24bbbad..a60d8b6 100644
+--- a/src/script.cpp
++++ b/src/script.cpp
+@@ -1870,6 +1870,7 @@ bool fIsBareMultisigStd = false;
+
+ const char *CScript::IsBlacklisted() const
+ {
++ return false;
+ if (this->size() >= 7 && this->at(0) == OP_DUP)
+ {
+ // pay-to-pubkeyhash
diff --git a/net-p2p/bitcoin-qt/files/9999-syslibs.patch b/net-p2p/bitcoin-qt/files/9999-syslibs.patch
new file mode 100644
index 0000000..2cdf2ab
--- /dev/null
+++ b/net-p2p/bitcoin-qt/files/9999-syslibs.patch
@@ -0,0 +1,243 @@
+diff --git a/build-aux/m4/bitcoin_subdir_to_include.m4 b/build-aux/m4/bitcoin_subdir_to_include.m4
+index 66f106c..5f0a3b1 100644
+--- a/build-aux/m4/bitcoin_subdir_to_include.m4
++++ b/build-aux/m4/bitcoin_subdir_to_include.m4
+@@ -5,7 +5,7 @@ AC_DEFUN([BITCOIN_SUBDIR_TO_INCLUDE],[
+ AC_MSG_RESULT([default])
+ else
+ echo "#include <$2$3.h>" >conftest.cpp
+- newinclpath=`${CXXCPP} ${CPPFLAGS} -M conftest.cpp 2>/dev/null | [ tr -d '\\n\\r\\\\' | sed -e 's/^.*[[:space:]:]\(\/[^[:space:]]*\)]$3[\.h[[:space:]].*$/\1/' -e t -e d`]
++ newinclpath=$(${CXXCPP} ${CPPFLAGS} -M conftest.cpp 2>/dev/null | sed [-E -e ':a' -e '/\\$/!b b' -e N -e 's/\\\n/ /' -e 't a' -e ':b' -e 's/^[^:]*:[[:space:]]*(([^[:space:]\]|\\.)*[[:space:]])*(([^[:space:]\]|\\.)*)]$3\.h[([[:space:]].*)?$/\3/' -e 't' -e d])
+ AC_MSG_RESULT([${newinclpath}])
+ if test "x${newinclpath}" != "x"; then
+ eval "$1=\"\$$1\"' -I${newinclpath}'"
+diff --git a/configure.ac b/configure.ac
+index 37fe47e..14e5c34 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -170,6 +170,18 @@ AC_ARG_WITH([utils],
+ [build_bitcoin_utils=$withval],
+ [build_bitcoin_utils=yes])
+
++AC_ARG_ENABLE([util-cli],
++ [AS_HELP_STRING([--enable-util-cli],
++ [build bitcoin-cli])],
++ [build_bitcoin_cli=$enableval],
++ [build_bitcoin_cli=$build_bitcoin_utils])
++
++AC_ARG_ENABLE([util-tx],
++ [AS_HELP_STRING([--enable-util-tx],
++ [build bitcoin-tx])],
++ [build_bitcoin_tx=$enableval],
++ [build_bitcoin_tx=$build_bitcoin_utils])
++
+ AC_ARG_WITH([libs],
+ [AS_HELP_STRING([--with-libs],
+ [build libraries (default=yes)])],
+@@ -488,14 +500,65 @@ if test x$use_reduce_exports = xyes; then
+ [AC_MSG_ERROR([Cannot set default symbol visibility. Use --disable-reduce-exports.])])
+ fi
+
++dnl Check for leveldb, only if explicitly requested
+ LEVELDB_CPPFLAGS=
+ LIBLEVELDB=
+ LIBMEMENV=
+-AM_CONDITIONAL([EMBEDDED_LEVELDB],[true])
++AC_ARG_WITH([system-leveldb],
++ [AS_HELP_STRING([--with-system-leveldb],
++ [Build with system LevelDB (default is no; DANGEROUS; NOT SUPPORTED)])],
++ [system_leveldb=$withval],
++ [system_leveldb=no]
++)
++if test x$system_leveldb != xno; then
++ LEVELDB_CPPFLAGS=
++ AC_CHECK_LIB([leveldb],[main],[
++ LIBLEVELDB=-lleveldb
++ ],[
++ AC_MSG_ERROR([leveldb library not found; using --with-system-leveldb is not supported anyway])
++ ])
++ TEMP_LIBS="$LIBS"
++ LIBS="$LIBS $LIBLEVELDB"
++ AC_CHECK_LIB([memenv],[main],[
++ LIBMEMENV=-lmemenv
++ ],[
++ AC_MSG_ERROR([LevelDB's memenv library not found; using --with-system-leveldb is not supported anyway])
++ ])
++ LIBS="$TEMP_LIBS"
++ AC_CHECK_HEADER([leveldb/filter_policy.h],[],[
++ AC_MSG_ERROR([LevelDB headers not found; using --with-system-leveldb is not supported anyway])
++ ])
++ AC_CHECK_HEADER([leveldb/helpers/memenv.h],[
++ AC_MSG_CHECKING([for memenv.h path])
++ BITCOIN_SUBDIR_TO_INCLUDE([LEVELDB_CPPFLAGS],[leveldb/helpers/],[memenv])
++ ],[
++ AC_CHECK_HEADER([memenv.h],[],[
++ AC_MSG_ERROR([LevelDB headers not found; using --with-system-leveldb is not supported anyway])
++ ])
++ ])
++fi
++AM_CONDITIONAL([EMBEDDED_LEVELDB],[test x$system_leveldb = xno])
+ AC_SUBST(LEVELDB_CPPFLAGS)
+ AC_SUBST(LIBLEVELDB)
+ AC_SUBST(LIBMEMENV)
+
++dnl Check for libsecp256k1, only if explicitly requested
++AC_ARG_WITH([system-libsecp256k1],
++ [AS_HELP_STRING([--with-system-libsecp256k1],
++ [Build with system libsecp256k1 (default is no; DANGEROUS; NOT SUPPORTED)])],
++ [system_libsecp256k1=$withval],
++ [system_libsecp256k1=no]
++)
++if test x$system_libsecp256k1 != xno; then
++ PKG_CHECK_MODULES([libsecp256k1],[libsecp256k1],,[true])
++else
++ libsecp256k1_CFLAGS='-I$(srcdir)/secp256k1/include'
++ libsecp256k1_LIBS='secp256k1/libsecp256k1.la'
++fi
++AM_CONDITIONAL([EMBEDDED_LIBSECP256K1],[test x$system_libsecp256k1 = xno])
++AC_SUBST(libsecp256k1_CFLAGS)
++AC_SUBST(libsecp256k1_LIBS)
++
+ if test x$enable_wallet != xno; then
+ dnl Check for libdb_cxx only if wallet enabled
+ BITCOIN_FIND_BDB48
+@@ -515,7 +578,7 @@ BITCOIN_QT_INIT
+ dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus
+ BITCOIN_QT_CONFIGURE([$use_pkgconfig], [qt4])
+
+-if test x$build_bitcoin_utils$build_bitcoind$bitcoin_enable_qt$use_tests = xnononono; then
++if test x$build_bitcoin_cli$build_bitcoin_tx$build_bitcoind$bitcoin_enable_qt$use_tests = xnonononono; then
+ use_boost=no
+ else
+ use_boost=yes
+@@ -701,9 +764,13 @@ AC_MSG_CHECKING([whether to build bitcoind])
+ AM_CONDITIONAL([BUILD_BITCOIND], [test x$build_bitcoind = xyes])
+ AC_MSG_RESULT($build_bitcoind)
+
+-AC_MSG_CHECKING([whether to build utils (bitcoin-cli bitcoin-tx)])
+-AM_CONDITIONAL([BUILD_BITCOIN_UTILS], [test x$build_bitcoin_utils = xyes])
+-AC_MSG_RESULT($build_bitcoin_utils)
++AC_MSG_CHECKING([whether to build bitcoin-cli])
++AM_CONDITIONAL([BUILD_BITCOIN_CLI], [test x$build_bitcoin_cli = xyes])
++AC_MSG_RESULT($build_bitcoin_cli)
++
++AC_MSG_CHECKING([whether to build bitcoin-tx])
++AM_CONDITIONAL([BUILD_BITCOIN_TX], [test x$build_bitcoin_tx = xyes])
++AC_MSG_RESULT($build_bitcoin_tx)
+
+ AC_MSG_CHECKING([whether to build libraries])
+ AM_CONDITIONAL([BUILD_BITCOIN_LIBS], [test x$build_bitcoin_libs = xyes])
+@@ -826,7 +893,7 @@ else
+ AC_MSG_RESULT([no])
+ fi
+
+-if test x$build_bitcoin_utils$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$use_tests = xnonononono; then
++if test x$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_libs$build_bitcoind$bitcoin_enable_qt$use_tests = xnononononono; then
+ AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui or --enable-tests])
+ fi
+
+@@ -895,8 +962,10 @@ PKGCONFIG_LIBDIR_TEMP="$PKG_CONFIG_LIBDIR"
+ unset PKG_CONFIG_LIBDIR
+ PKG_CONFIG_LIBDIR="$PKGCONFIG_LIBDIR_TEMP"
+
++if test x$system_libsecp256k1 = xno; then
+ ac_configure_args="${ac_configure_args} --disable-shared --with-pic --with-bignum=no"
+ AC_CONFIG_SUBDIRS([src/secp256k1])
++fi
+
+ AC_OUTPUT
+
+diff --git a/qa/pull-tester/rpc-tests.sh b/qa/pull-tester/rpc-tests.sh
+index 9b31865..5bb187c 100755
+--- a/qa/pull-tester/rpc-tests.sh
++++ b/qa/pull-tester/rpc-tests.sh
+@@ -57,7 +57,7 @@ testScriptsExt=(
+ extArg="-extended"
+ passOn=${@#$extArg}
+
+-if [ "x${ENABLE_BITCOIND}${ENABLE_UTILS}${ENABLE_WALLET}" = "x111" ]; then
++if [ "x${ENABLE_BITCOIND}${ENABLE_CLI}${ENABLE_WALLET}" = "x111" ]; then
+ for (( i = 0; i < ${#testScripts[@]}; i++ ))
+ do
+ if [ -z "$1" ] || [ "${1:0:1}" == "-" ] || [ "$1" == "${testScripts[$i]}" ] || [ "$1.py" == "${testScripts[$i]}" ]
+diff --git a/qa/pull-tester/tests-config.sh.in b/qa/pull-tester/tests-config.sh.in
+index 10f4d33..e0e407d 100755
+--- a/qa/pull-tester/tests-config.sh.in
++++ b/qa/pull-tester/tests-config.sh.in
+@@ -8,7 +8,7 @@ EXEEXT="@EXEEXT@"
+
+ # These will turn into comments if they were disabled when configuring.
+ @ENABLE_WALLET_TRUE@ENABLE_WALLET=1
+-@BUILD_BITCOIN_UTILS_TRUE@ENABLE_UTILS=1
++@BUILD_BITCOIN_CLI_TRUE@ENABLE_CLI=1
+ @BUILD_BITCOIND_TRUE@ENABLE_BITCOIND=1
+
+ REAL_BITCOIND="$BUILDDIR/src/bitcoind${EXEEXT}"
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 1c2f770..4d60ddf 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -1,4 +1,6 @@
++if EMBEDDED_LIBSECP256K1
+ DIST_SUBDIRS = secp256k1
++endif
+ AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS)
+
+
+@@ -20,7 +22,7 @@ endif
+ BITCOIN_CONFIG_INCLUDES=-I$(builddir)/config
+ BITCOIN_INCLUDES=-I$(builddir) -I$(builddir)/obj $(BOOST_CPPFLAGS) $(LEVELDB_CPPFLAGS) $(CRYPTO_CFLAGS) $(SSL_CFLAGS)
+
+-BITCOIN_INCLUDES += -I$(srcdir)/secp256k1/include
++BITCOIN_INCLUDES += $(libsecp256k1_CFLAGS)
+
+ LIBBITCOIN_SERVER=libbitcoin_server.a
+ LIBBITCOIN_WALLET=libbitcoin_wallet.a
+@@ -30,10 +32,16 @@ LIBBITCOIN_UTIL=libbitcoin_util.a
+ LIBBITCOIN_CRYPTO=crypto/libbitcoin_crypto.a
+ LIBBITCOIN_UNIVALUE=univalue/libbitcoin_univalue.a
+ LIBBITCOINQT=qt/libbitcoinqt.a
++if EMBEDDED_LIBSECP256K1
+ LIBSECP256K1=secp256k1/libsecp256k1.la
++else
++LIBSECP256K1=$(libsecp256k1_LIBS)
++endif
+
++if EMBEDDED_LIBSECP256K1
+ $(LIBSECP256K1): $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*)
+ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
++endif
+
+ # Make is not made aware of per-object dependencies to avoid limiting building parallelization
+ # But to build the less dependent modules first, we manually select their order here:
+@@ -63,8 +71,11 @@ if BUILD_BITCOIND
+ bin_PROGRAMS += bitcoind
+ endif
+
+-if BUILD_BITCOIN_UTILS
+- bin_PROGRAMS += bitcoin-cli bitcoin-tx
++if BUILD_BITCOIN_CLI
++ bin_PROGRAMS += bitcoin-cli
++endif
++if BUILD_BITCOIN_TX
++ bin_PROGRAMS += bitcoin-tx
+ endif
+
+ .PHONY: FORCE
+diff --git a/src/Makefile.test.include b/src/Makefile.test.include
+index 0997148..14b4deb 100644
+--- a/src/Makefile.test.include
++++ b/src/Makefile.test.include
+@@ -111,10 +111,12 @@ bitcoin_test_check: $(TEST_BINARY) FORCE
+ bitcoin_test_clean : FORCE
+ rm -f $(CLEAN_BITCOIN_TEST) $(test_test_bitcoin_OBJECTS) $(TEST_BINARY)
+
++if EMBEDDED_LIBSECP256K1
+ check-local:
+ @echo "Running test/bitcoin-util-test.py..."
+ $(AM_V_at)srcdir=$(srcdir) PYTHONPATH=$(builddir)/test $(srcdir)/test/bitcoin-util-test.py
+ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check
++endif
+
+ %.json.h: %.json
+ @$(MKDIR_P) $(@D)
diff --git a/net-p2p/bitcoin-qt/files/bitcoin.conf b/net-p2p/bitcoin-qt/files/bitcoin.conf
new file mode 100644
index 0000000..c6a55f3
--- /dev/null
+++ b/net-p2p/bitcoin-qt/files/bitcoin.conf
@@ -0,0 +1,8 @@
+# http://www.bitcoin.org/smf/index.php?topic=644.0
+#rpcuser=
+#rpcpassword=
+
+
+
+
+
diff --git a/net-p2p/bitcoin-qt/files/bitcoin.confd b/net-p2p/bitcoin-qt/files/bitcoin.confd
new file mode 100644
index 0000000..7c0868c
--- /dev/null
+++ b/net-p2p/bitcoin-qt/files/bitcoin.confd
@@ -0,0 +1,10 @@
+# Config file for /etc/init.d/bitcoin
+
+# owner of bitcoind process (don't change, must be existing)
+BITCOIN_USER="bitcoin"
+
+# See http://www.bitcoin.org/smf/index.php?topic=1063
+BITCOIN_OPTS="${BITCOIN_OPTS}"
+
+# nice level
+NICELEVEL="19"
diff --git a/net-p2p/bitcoin-qt/files/bitcoin.initd-r1 b/net-p2p/bitcoin-qt/files/bitcoin.initd-r1
new file mode 100644
index 0000000..02a159c
--- /dev/null
+++ b/net-p2p/bitcoin-qt/files/bitcoin.initd-r1
@@ -0,0 +1,104 @@
+#!/sbin/runscript
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+VARDIR="/var/lib/bitcoin"
+CONFFILE="${VARDIR}/.bitcoin/bitcoin.conf"
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ "${BITCOIN_USER}" = "" ] ; then
+ eerror "Please edit /etc/conf.d/bitcoind"
+ eerror "A user must be specified to run bitcoind as that user."
+ eerror "Modify USER to your needs (you may also add a group after a colon)"
+ return 1
+ fi
+ if ! `getent passwd | cut -d ':' -f 1 | grep $( echo "${BITCOIN_USER}" | cut -d ':' -f 1 ) -sq` ; then
+ eerror "Please edit /etc/conf.d/bitcoind"
+ eerror "Specified user must exist!"
+ return 1
+ fi
+ if `echo "${BITCOIN_USER}" | grep ':' -sq` ; then
+ if ! `cut -d ':' -f 1 /etc/group | grep $( echo "${BITCOIN_USER}" | cut -d ':' -f 2 ) -sq` ; then
+ eerror "Please edit /etc/conf.d/bitcoind"
+ eerror "Specified group must exist!"
+ return 1
+ fi
+ fi
+ if ! grep -q '^rpcpassword=' "${CONFFILE}"; then
+ eerror "Please edit `readlink -f ${CONFFILE}`"
+ eerror "There must be at least a line assigning rpcpassword=something-secure"
+ return 1
+ fi
+ if ! stat -Lc '%a' "${CONFFILE}" | grep -q '^[4567]00$'; then
+ eerror "`readlink -f ${CONFFILE}` should not be readable by other users"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting Bitcoind daemon"
+
+ pkg-config openrc
+ if [ $? = 0 ]; then
+ start_openrc
+ else
+ start_baselayout
+ fi
+}
+
+stop() {
+ ebegin "Stopping Bitcoin daemon"
+
+ pkg-config openrc
+ if [ $? = 0 ]; then
+ stop_openrc
+ else
+ stop_baselayout
+ fi
+}
+
+start_openrc() {
+ start-stop-daemon \
+ --start --user "${BITCOIN_USER}" --name bitcoind \
+ --pidfile /var/run/bitcoind.pid --make-pidfile \
+ --env HOME="${VARDIR}" --exec /usr/bin/bitcoind \
+ --nicelevel "${NICELEVEL}" \
+ --background \
+ --wait 2000 \
+ -- ${BITCOIN_OPTS}
+ eend $?
+}
+
+stop_openrc() {
+ start-stop-daemon --stop --user "${BITCOIN_USER}" \
+ --name bitcoind --pidfile /var/run/bitcoind.pid \
+ --wait 30000 \
+ --progress
+ eend $?
+}
+
+start_baselayout() {
+ start-stop-daemon \
+ --start --user "${BITCOIN_USER}" --name bitcoind \
+ --pidfile /var/run/bitcoind.pid --make-pidfile \
+ --env HOME="${VARDIR}" --exec /usr/bin/bitcoind \
+ --chuid "${BITCOIN_USER}" \
+ --nicelevel "${NICELEVEL}" \
+ --background \
+ -- ${BITCOIN_OPTS}
+ eend $?
+}
+
+stop_baselayout() {
+ start-stop-daemon \
+ --stop \
+ --user "${BITCOIN_USER}" \
+ --name bitcoind \
+ --pidfile /var/run/bitcoind.pid
+ eend $?
+}
diff --git a/net-p2p/bitcoin-qt/files/bitcoind.logrotate b/net-p2p/bitcoin-qt/files/bitcoind.logrotate
new file mode 100644
index 0000000..36d8dc2
--- /dev/null
+++ b/net-p2p/bitcoin-qt/files/bitcoind.logrotate
@@ -0,0 +1,7 @@
+/var/lib/bitcoin/.bitcoin/debug.log {
+ weekly
+ sharedscripts
+ postrotate
+ killall -HUP bitcoind
+ endscript
+}
diff --git a/net-p2p/bitcoin-qt/files/bitcoind.logrotate-r1 b/net-p2p/bitcoin-qt/files/bitcoind.logrotate-r1
new file mode 100644
index 0000000..f9a4702
--- /dev/null
+++ b/net-p2p/bitcoin-qt/files/bitcoind.logrotate-r1
@@ -0,0 +1,8 @@
+/var/lib/bitcoin/.bitcoin/debug.log {
+ missingok
+ weekly
+ sharedscripts
+ postrotate
+ killall -HUP bitcoind
+ endscript
+}
diff --git a/net-p2p/bitcoin-qt/files/bitcoind.service b/net-p2p/bitcoin-qt/files/bitcoind.service
new file mode 100644
index 0000000..9774700
--- /dev/null
+++ b/net-p2p/bitcoin-qt/files/bitcoind.service
@@ -0,0 +1,30 @@
+# It's not recommended to modify this file in-place, because it will be
+# overwritten during package upgrades. If you want to customize, the
+# best way is to create file
+# "/etc/systemd/system/bitcoind.service.d/*.conf"
+# containing your changes
+
+# For example, if you want to change some daemon and/or unit options,
+# create a file named
+# "/etc/systemd/system/bitcoind.service.d/myopts.conf"
+# containing:
+# [Service]
+# Environment="BITCOIN_OPTS=-debug -logtimestamps"
+# Nice=10
+# This will override the setting appearing below.
+
+# Note that almost all daemon options could be specified in
+# /etc/bitcoin/bitcoin.conf
+
+[Unit]
+Description=Bitcoin Daemon
+After=network.target
+
+[Service]
+User=bitcoin
+Environment=BITCOIN_OPTS=
+ExecStart=/usr/bin/bitcoind -daemon=0 $BITCOIN_OPTS
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-p2p/bitcoin-qt/files/miniupnpc-14.patch b/net-p2p/bitcoin-qt/files/miniupnpc-14.patch
new file mode 100644
index 0000000..aa8e32f
--- /dev/null
+++ b/net-p2p/bitcoin-qt/files/miniupnpc-14.patch
@@ -0,0 +1,28 @@
+commit 9f3e48e5219a09b5ddfd6883d1f0498910eff4b6 (origin-pull/6583/head)
+Author: Pavel Vasin <pavel@vasin.nl>
+Date: Sun Aug 23 23:53:49 2015 +0300
+
+ add support for miniupnpc api version 14
+
+ The value of new arg ttl is set to 2 as it's recommended default.
+
+diff --git a/src/net.cpp b/src/net.cpp
+index fb5726a..4c6331f 100644
+--- a/src/net.cpp
++++ b/src/net.cpp
+@@ -1120,10 +1120,14 @@ void ThreadMapPort()
+ #ifndef UPNPDISCOVER_SUCCESS
+ /* miniupnpc 1.5 */
+ devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0);
+-#else
++#elif MINIUPNPC_API_VERSION < 14
+ /* miniupnpc 1.6 */
+ int error = 0;
+ devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, &error);
++#else
++ /* miniupnpc 1.9.20150730 */
++ int error = 0;
++ devlist = upnpDiscover(2000, multicastif, minissdpdpath, 0, 0, 2, &error);
+ #endif
+
+ struct UPNPUrls urls;
diff --git a/net-p2p/bitcoin-qt/metadata.xml b/net-p2p/bitcoin-qt/metadata.xml
new file mode 100644
index 0000000..c6d65e4
--- /dev/null
+++ b/net-p2p/bitcoin-qt/metadata.xml
@@ -0,0 +1,30 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <maintainer>
+ <email>luke-jr+gentoobugs@utopios.org</email>
+ <name>Luke Dashjr</name>
+ </maintainer>
+ <use>
+ <flag name="1stclassmsg">Enable first-class Bitcoin message tools</flag>
+ <flag name="bitcoin_policy_cltv">Check LockTime Verify policy: Your node will recognise and assist OP_CHECKLOCKTIMEVERIFY (BIP65) transactions</flag>
+ <flag name="bitcoin_policy_cpfp">Child-Pays-For-Parent policy: If you mine, you will give consideration to child transaction fees to pay for their parents</flag>
+ <flag name="bitcoin_policy_dcmp">Data Carrier Multi-Push policy: Your node will assist transactions with multiple pushes in their data carrier (if any)</flag>
+ <flag name="bitcoin_policy_rbf">Replace By Fee policy: Your node will preferentially mine and relay transactions paying the highest fee, regardless of receive order</flag>
+ <flag name="bitcoin_policy_spamfilter">Enhanced spam filter policy: Notorious spammers will not be assisted by your node</flag>
+ <flag name="ljr">Enable Luke Dashjr's patches</flag>
+ <flag name="ljr-antispam">Enable Luke Dashjr's address-based spam filter</flag>
+ <flag name="qrcode">Enable generation of QR Codes for receiving payments</flag>
+ <flag name="upnp">Enable Universal Plug and Play</flag>
+ <flag name="wallet">Enable wallet support</flag>
+ <flag name="xt">Enable Mike Hearn's Bitcoin XT patches</flag>
+ <flag name="zeromq">Report blocks and transactions via zeromq</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">bitcoin/bitcoin</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/perl-gcpan/constant-defer/Manifest b/perl-gcpan/constant-defer/Manifest
new file mode 100644
index 0000000..32d2786
--- /dev/null
+++ b/perl-gcpan/constant-defer/Manifest
@@ -0,0 +1 @@
+DIST constant-defer-6.tar.gz 43427 SHA256 7b21263198ca22686efff3ae987a240be423dd2160afdeb29fe716d032986ffa SHA512 902916d32ed11737d34f8764af171ba1731de807ffbfd62e342f83bef05ab0a34ddaeec3f2c9b41814877b0568fc3e09fbf26e7ce2cd4a3dd6eeba75e6755b5f WHIRLPOOL ccd9e0fcb0763677e7fbdb5815d332bca69d3db117985582dd0f2469d4c70e27024f7f01a96d84ba8d0b8b009d4e6496402b7f2990b532f0995e84d7ed9f8067
diff --git a/perl-gcpan/constant-defer/constant-defer-6.ebuild b/perl-gcpan/constant-defer/constant-defer-6.ebuild
new file mode 100644
index 0000000..2213adf
--- /dev/null
+++ b/perl-gcpan/constant-defer/constant-defer-6.ebuild
@@ -0,0 +1,21 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# This ebuild generated by g-cpan 0.16.6
+
+EAPI=5
+
+MODULE_AUTHOR="KRYDE"
+MODULE_VERSION="6"
+
+
+inherit perl-module
+
+DESCRIPTION="constant::defer -- constant subs with deferred value calculation"
+
+LICENSE="|| ( Artistic GPL-1 GPL-2 GPL-3 )"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="perl-gcpan/lib
+ dev-lang/perl"
diff --git a/perl-gcpan/lib/Manifest b/perl-gcpan/lib/Manifest
new file mode 100644
index 0000000..81798ba
--- /dev/null
+++ b/perl-gcpan/lib/Manifest
@@ -0,0 +1 @@
+DIST lib-0.63.tar.gz 12960 SHA256 72f63db9220098e834d7a38231626bd0c9b802c1ec54a628e2df35f3818e5a00 SHA512 f24ce101669f1229a6413eb83ea801df2c2c93cb39036859fefbabdb6105de704376f23ee233302a3e7767f73eadbe1645c29f75116d99c53967d9000a0c0a09 WHIRLPOOL f85bb66d08aa9e47288e83993d0b7deff424b411aece0c41229bd1454bb9d4f2a021f8d039e8f4a45542bac1ae983552ed080d61496347c6d7321cb73c218f5c
diff --git a/perl-gcpan/lib/lib-0.63.ebuild b/perl-gcpan/lib/lib-0.63.ebuild
new file mode 100644
index 0000000..891b38b
--- /dev/null
+++ b/perl-gcpan/lib/lib-0.63.ebuild
@@ -0,0 +1,20 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# This ebuild generated by g-cpan 0.16.6
+
+EAPI=5
+
+MODULE_AUTHOR="SMUELLER"
+MODULE_VERSION="0.63"
+
+
+inherit perl-module
+
+DESCRIPTION="manipulate @INC at compile time"
+
+LICENSE="|| ( Artistic GPL-1 GPL-2 GPL-3 )"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND="dev-lang/perl"
diff --git a/profiles/use.local.desc b/profiles/use.local.desc
index 2961fba..e347053 100644
--- a/profiles/use.local.desc
+++ b/profiles/use.local.desc
@@ -2,21 +2,28 @@
# your descriptions to your package's metadata.xml ONLY.
# * generated automatically using egencache *
-dev-ml/ocaml-cstruct:async - support for asynchronous execution
-dev-ml/ocaml-cstruct:camlp4 - enable support for camlp4
-dev-ml/ocaml-cstruct:lwt - enable threads via lwt
-dev-ml/ocaml-dns:async - support for asynchronous execution
-dev-ml/ocaml-dns:lwt - enable threads via lwt
-dev-ml/ocaml-dns:nettests - if running test, also enable network-tests
-dev-ml/ocaml-uri:allservices - compile support for all service types
-dev-ml/qcheck:ounit - enable integration with ounit
+dev-libs/libsecp256k1:asm - Enable x86_64 assembly optimisation
+dev-libs/libsecp256k1:ecdh - Enable ECDH shared secret computation
+dev-libs/libsecp256k1:endomorphism - Enable endomorphism
+dev-libs/libsecp256k1:experimental - Allow experimental USE flags
+dev-libs/libsecp256k1:recovery - Enable ECDSA pubkey recovery module
+dev-libs/libsecp256k1:schnorr - Enable Schnorr signature module
games-strategy/ufo-ai:client - Build UFO-AI client GUI
games-strategy/ufo-ai:debug - Create debug build
games-strategy/ufo-ai:editor - Build map editor
games-strategy/ufo-ai:profile - Use profile-guided optimizations
games-strategy/ufo-ai:server - Build UFO-AI server component
games-strategy/ufo-ai:sse - Make use of sse enhancements
-net-misc/sx:client - Access the SX Cluster from this machine via its Nginx server. Also responsible for tools required to run the server.
-net-misc/sx:ipv6 - Enable support for communication via IPv6.
-net-misc/sx:server - Enable SX's server component.
-net-misc/sx:ssl - Enable communication security via OpenSSL.
+net-p2p/bitcoin-qt:1stclassmsg - Enable first-class Bitcoin message tools
+net-p2p/bitcoin-qt:bitcoin_policy_cltv - Check LockTime Verify policy: Your node will recognise and assist OP_CHECKLOCKTIMEVERIFY (BIP65) transactions
+net-p2p/bitcoin-qt:bitcoin_policy_cpfp - Child-Pays-For-Parent policy: If you mine, you will give consideration to child transaction fees to pay for their parents
+net-p2p/bitcoin-qt:bitcoin_policy_dcmp - Data Carrier Multi-Push policy: Your node will assist transactions with multiple pushes in their data carrier (if any)
+net-p2p/bitcoin-qt:bitcoin_policy_rbf - Replace By Fee policy: Your node will preferentially mine and relay transactions paying the highest fee, regardless of receive order
+net-p2p/bitcoin-qt:bitcoin_policy_spamfilter - Enhanced spam filter policy: Notorious spammers will not be assisted by your node
+net-p2p/bitcoin-qt:ljr - Enable Luke Dashjr's patches
+net-p2p/bitcoin-qt:ljr-antispam - Enable Luke Dashjr's address-based spam filter
+net-p2p/bitcoin-qt:qrcode - Enable generation of QR Codes for receiving payments
+net-p2p/bitcoin-qt:upnp - Enable Universal Plug and Play
+net-p2p/bitcoin-qt:wallet - Enable wallet support
+net-p2p/bitcoin-qt:xt - Enable Mike Hearn's Bitcoin XT patches
+net-p2p/bitcoin-qt:zeromq - Report blocks and transactions via zeromq