summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2014-11-21 11:55:15 +0000
committerAnthony G. Basile <blueness@gentoo.org>2014-11-21 11:55:15 +0000
commitedd2b0a494163351f3456afdc4e6f0703bb7fd2d (patch)
tree9dd6c6b038200899ea583d774c4635ed985f7a7e /net-libs/libbitcoinconsensus
parentStable on alpha, bug 520860 (diff)
downloadgentoo-2-edd2b0a494163351f3456afdc4e6f0703bb7fd2d.tar.gz
gentoo-2-edd2b0a494163351f3456afdc4e6f0703bb7fd2d.tar.bz2
gentoo-2-edd2b0a494163351f3456afdc4e6f0703bb7fd2d.zip
Initial commit, needed for bitcoins
(Portage version: 2.2.8-r2/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)
Diffstat (limited to 'net-libs/libbitcoinconsensus')
-rw-r--r--net-libs/libbitcoinconsensus/ChangeLog4
-rw-r--r--net-libs/libbitcoinconsensus/files/0.9.0-sys_leveldb.patch34
-rw-r--r--net-libs/libbitcoinconsensus/files/9999-sys_libsecp256k1.patch80
-rw-r--r--net-libs/libbitcoinconsensus/libbitcoinconsensus-9999.ebuild62
-rw-r--r--net-libs/libbitcoinconsensus/metadata.xml8
5 files changed, 188 insertions, 0 deletions
diff --git a/net-libs/libbitcoinconsensus/ChangeLog b/net-libs/libbitcoinconsensus/ChangeLog
new file mode 100644
index 000000000000..58d0c299a018
--- /dev/null
+++ b/net-libs/libbitcoinconsensus/ChangeLog
@@ -0,0 +1,4 @@
+# ChangeLog for <CATEGORY>/<PACKAGE_NAME>
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-libs/libbitcoinconsensus/ChangeLog,v 1.1 2014/11/21 11:55:15 blueness Exp $
+
diff --git a/net-libs/libbitcoinconsensus/files/0.9.0-sys_leveldb.patch b/net-libs/libbitcoinconsensus/files/0.9.0-sys_leveldb.patch
new file mode 100644
index 000000000000..60e9f2b20941
--- /dev/null
+++ b/net-libs/libbitcoinconsensus/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-libs/libbitcoinconsensus/files/9999-sys_libsecp256k1.patch b/net-libs/libbitcoinconsensus/files/9999-sys_libsecp256k1.patch
new file mode 100644
index 000000000000..77ed10675e30
--- /dev/null
+++ b/net-libs/libbitcoinconsensus/files/9999-sys_libsecp256k1.patch
@@ -0,0 +1,80 @@
+diff --git a/configure.ac b/configure.ac
+index 6784521..3598bab 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -634,6 +634,12 @@ AC_ARG_WITH([daemon],
+
+ BITCOIN_QT_INIT
+
++PKG_CHECK_MODULES([libsecp256k1],[libsecp256k1],,[true])
++AC_ARG_WITH([libsecp256k1-verify],[],[use_libsecp256k1=$withval],[use_libsecp256k1=yes])
++if test "x$use_libsecp256k1" = "xyes"; then
++ AC_DEFINE(USE_SECP256K1,1,[USE_SECP256K1])
++fi
++
+ if test x$use_pkgconfig = xyes; then
+
+ if test x"$PKG_CONFIG" = "x"; then
+@@ -869,9 +875,6 @@ PKGCONFIG_LIBDIR_TEMP="$PKG_CONFIG_LIBDIR"
+ unset PKG_CONFIG_LIBDIR
+ PKG_CONFIG_LIBDIR="$PKGCONFIG_LIBDIR_TEMP"
+
+-ac_configure_args="${ac_configure_args} --disable-shared --with-pic"
+-AC_CONFIG_SUBDIRS([src/secp256k1])
+-
+ AC_OUTPUT
+
+ dnl Taken from https://wiki.debian.org/RpathIssue
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 0d45203..3a44a16 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -1,4 +1,3 @@
+-DIST_SUBDIRS = secp256k1
+ AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS)
+
+
+@@ -20,7 +19,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 +29,7 @@ LIBBITCOIN_UTIL=libbitcoin_util.a
+ LIBBITCOIN_CRYPTO=crypto/libbitcoin_crypto.a
+ LIBBITCOIN_UNIVALUE=univalue/libbitcoin_univalue.a
+ LIBBITCOINQT=qt/libbitcoinqt.a
+-LIBSECP256K1=secp256k1/libsecp256k1.la
+-
+-$(LIBSECP256K1): $(wildcard secp256k1/src/*) $(wildcard secp256k1/include/*)
+- $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
++LIBSECP256K1=$(libsecp256k1_LIBS)
+
+ # 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:
+@@ -364,7 +360,7 @@ libbitcoinconsensus_la_LDFLAGS = -no-undefined $(RELDFLAGS)
+ libbitcoinconsensus_la_LIBADD = $(CRYPTO_LIBS)
+ libbitcoinconsensus_la_CPPFLAGS = $(CRYPTO_CFLAGS) -I$(builddir)/obj -DBUILD_BITCOIN_INTERNAL
+ if USE_LIBSECP256K1
+-libbitcoinconsensus_la_LIBADD += secp256k1/libsecp256k1.la
++libbitcoinconsensus_la_LIBADD += $(LIBSECP256K1)
+ endif
+ endif
+
+diff --git a/src/Makefile.test.include b/src/Makefile.test.include
+index 5fd2afe..014092a 100644
+--- a/src/Makefile.test.include
++++ b/src/Makefile.test.include
+@@ -104,9 +104,6 @@ bitcoin_test_check: $(TEST_BINARY) FORCE
+ bitcoin_test_clean : FORCE
+ rm -f $(CLEAN_BITCOIN_TEST) $(test_test_bitcoin_OBJECTS) $(TEST_BINARY)
+
+-check-local:
+- $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C secp256k1 check
+-
+ %.json.h: %.json
+ @$(MKDIR_P) $(@D)
+ @echo "namespace json_tests{" > $@
diff --git a/net-libs/libbitcoinconsensus/libbitcoinconsensus-9999.ebuild b/net-libs/libbitcoinconsensus/libbitcoinconsensus-9999.ebuild
new file mode 100644
index 000000000000..b4a743edc7b4
--- /dev/null
+++ b/net-libs/libbitcoinconsensus/libbitcoinconsensus-9999.ebuild
@@ -0,0 +1,62 @@
+# Copyright 2010-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-libs/libbitcoinconsensus/libbitcoinconsensus-9999.ebuild,v 1.1 2014/11/21 11:55:15 blueness Exp $
+
+EAPI=5
+
+inherit autotools eutils git-2 user versionator
+
+MyPV="${PV/_/}"
+MyPN="bitcoin"
+MyP="${MyPN}-${MyPV}"
+
+DESCRIPTION="Bitcoin Core consensus library"
+HOMEPAGE="http://bitcoin.org/"
+SRC_URI="
+"
+EGIT_PROJECT='bitcoin'
+EGIT_REPO_URI="git://github.com/bitcoin/bitcoin.git https://github.com/bitcoin/bitcoin.git"
+
+LICENSE="MIT ISC GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE="test"
+
+RDEPEND="
+ >=dev-libs/boost-1.52.0[threads(+)]
+ dev-libs/openssl:0[-bindist]
+"
+DEPEND="${RDEPEND}
+ dev-libs/libsecp256k1
+"
+
+src_prepare() {
+ epatch "${FILESDIR}/0.9.0-sys_leveldb.patch"
+ epatch "${FILESDIR}/${PV}-sys_libsecp256k1.patch"
+ rm -r src/leveldb src/secp256k1
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-ccache \
+ --disable-static \
+ --without-miniupnpc \
+ $(use_enable test tests) \
+ --disable-wallet \
+ --with-system-leveldb \
+ --without-daemon \
+ --without-utils \
+ --without-gui
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ prune_libtool_files
+
+ dodoc doc/README.md doc/release-notes.md
+}
diff --git a/net-libs/libbitcoinconsensus/metadata.xml b/net-libs/libbitcoinconsensus/metadata.xml
new file mode 100644
index 000000000000..207caf2f3e82
--- /dev/null
+++ b/net-libs/libbitcoinconsensus/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>luke_gentoo_bitcoin@dashjr.org</email>
+ <name>Luke Dashjr</name>
+ </maintainer>
+</pkgmetadata>