Patch update for wallet inclusion under the test environment

- Added the patch to allow the building of the test environment for which the wallet is required
This commit is contained in:
Chris Kleeschulte 2015-07-21 10:34:19 -04:00 committed by Braydon Fuller
parent cf6225c495
commit 66af5935b7
1 changed files with 52 additions and 60 deletions

View File

@ -1,18 +1,8 @@
From 05084f2a640b862132588b322461ec8e13058fc3 Mon Sep 17 00:00:00 2001
From: Chris Kleeschulte <chrisk@bitpay.com>
Date: Mon, 13 Jul 2015 12:49:30 -0400
Subject: [PATCH] libbitcoind
commit 29c1ca452ba6178d6b17be0a0b5a65567ba846af
Author: Chris Kleeschulte <chrisk@bitpay.com>
Date: Mon Jul 13 16:35:37 2015 -0400
---
config_me.sh | 1 +
configure.ac | 37 ++++++++++++++++++++++++++++++++-----
src/Makefile.am | 42 ++++++++++++++++++++++++++++++++++--------
src/bitcoind.cpp | 6 ++++++
src/init.h | 5 +++++
src/leveldb/Makefile | 6 +++++-
src/leveldbwrapper.h | 12 ++++++++++++
7 files changed, 95 insertions(+), 14 deletions(-)
create mode 100644 config_me.sh
allow compiling of libbitcoind.so.
diff --git a/config_me.sh b/config_me.sh
new file mode 100644
@ -22,7 +12,7 @@ index 0000000..19e9a1b
@@ -0,0 +1 @@
+./configure --enable-tests=no --enable-daemonlib --with-gui=no --without-qt --without-miniupnpc --without-bdb --enable-debug --disable-wallet --without-utils
diff --git a/configure.ac b/configure.ac
index 37fe47e..27a9b9a 100644
index 37fe47e..83cfe70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -119,6 +119,12 @@ AC_ARG_ENABLE([reduce-exports],
@ -96,18 +86,19 @@ index 37fe47e..27a9b9a 100644
LIBLEVELDB=
LIBMEMENV=
diff --git a/src/Makefile.am b/src/Makefile.am
index 1c2f770..632f608 100644
index 1c2f770..ddcae0f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,7 @@
@@ -1,6 +1,8 @@
DIST_SUBDIRS = secp256k1
AM_LDFLAGS = $(PTHREAD_CFLAGS) $(LIBTOOL_LDFLAGS)
+lib_LTLIBRARIES =
+libbitcoind_la_LIBADD =
if EMBEDDED_LEVELDB
LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/include
@@ -15,6 +16,10 @@ $(LIBLEVELDB) $(LIBMEMENV):
@@ -15,6 +17,10 @@ $(LIBLEVELDB) $(LIBMEMENV):
@echo "Building LevelDB ..." && $(MAKE) -C $(@D) $(@F) CXX="$(CXX)" \
CC="$(CC)" PLATFORM=$(TARGET_OS) AR="$(AR)" $(LEVELDB_TARGET_FLAGS) \
OPT="$(CXXFLAGS) $(CPPFLAGS) -D__STDC_LIMIT_MACROS"
@ -118,7 +109,7 @@ index 1c2f770..632f608 100644
endif
BITCOIN_CONFIG_INCLUDES=-I$(builddir)/config
@@ -49,16 +54,16 @@ BITCOIN_INCLUDES += $(BDB_CPPFLAGS)
@@ -49,16 +55,16 @@ BITCOIN_INCLUDES += $(BDB_CPPFLAGS)
EXTRA_LIBRARIES += libbitcoin_wallet.a
endif
@ -142,7 +133,7 @@ index 1c2f770..632f608 100644
if BUILD_BITCOIND
bin_PROGRAMS += bitcoind
endif
@@ -66,6 +71,9 @@ endif
@@ -66,6 +72,9 @@ endif
if BUILD_BITCOIN_UTILS
bin_PROGRAMS += bitcoin-cli bitcoin-tx
endif
@ -152,7 +143,7 @@ index 1c2f770..632f608 100644
.PHONY: FORCE
# bitcoin core #
@@ -169,8 +177,9 @@ obj/build.h: FORCE
@@ -169,8 +178,9 @@ obj/build.h: FORCE
@$(MKDIR_P) $(builddir)/obj
@$(top_srcdir)/share/genbuild.sh $(abs_top_builddir)/src/obj/build.h \
$(abs_top_srcdir)
@ -163,7 +154,7 @@ index 1c2f770..632f608 100644
# server: shared between bitcoind and bitcoin-qt
libbitcoin_server_a_CPPFLAGS = $(BITCOIN_INCLUDES) $(MINIUPNPC_CPPFLAGS)
libbitcoin_server_a_SOURCES = \
@@ -309,9 +318,18 @@ nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h
@@ -309,9 +319,18 @@ nodist_libbitcoin_util_a_SOURCES = $(srcdir)/obj/build.h
bitcoind_SOURCES = bitcoind.cpp
bitcoind_CPPFLAGS = $(BITCOIN_INCLUDES)
bitcoind_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
@ -182,8 +173,12 @@ index 1c2f770..632f608 100644
endif
bitcoind_LDADD = \
@@ -328,7 +346,15 @@ if ENABLE_WALLET
@@ -326,9 +345,19 @@ bitcoind_LDADD = \
if ENABLE_WALLET
bitcoind_LDADD += libbitcoin_wallet.a
+libbitcoind_la_LIBADD += $(BDB_LIBS)
+libbitcoind_la_SOURCES += $(libbitcoin_wallet_a_SOURCES)
endif
+MEMOBJ = helpers/memenv/memenv.lo
@ -191,7 +186,7 @@ index 1c2f770..632f608 100644
+ @echo "Building the Memenv shared library..." && $(MAKE) -C ./leveldb $@
+
bitcoind_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS)
+libbitcoind_la_LIBADD = $(BOOST_LIBS) $(SSL_LIBS) $(LIBSECP256K1) $(CRYPTO_LIBS) leveldb/$(MEMOBJ)
+libbitcoind_la_LIBADD += $(BOOST_LIBS) $(SSL_LIBS) $(LIBSECP256K1) $(CRYPTO_LIBS) leveldb/$(MEMOBJ)
+libbitcoind_la_CPPFLAGS = $(BITCOIN_INCLUDES)
+libbitcoind_la_LDFLAGS = -lleveldb -L./leveldb $(RELDFLAGS) -no-undefined
+libbitcoind_la_DEPENDENCIES = $(LIBSECP256K1) LIBLEVELDB_SHARED $(MEMOBJ)
@ -309,6 +304,3 @@ index c65e842..0e44bb5 100644
CLevelDBWrapper(const boost::filesystem::path& path, size_t nCacheSize, bool fMemory = false, bool fWipe = false);
~CLevelDBWrapper();
--
2.3.2 (Apple Git-55)