summaryrefslogtreecommitdiff
path: root/net-p2p/bitcoin
diff options
context:
space:
mode:
authorKubilay Kocak <koobs@FreeBSD.org>2015-02-24 11:10:23 +0000
committerKubilay Kocak <koobs@FreeBSD.org>2015-02-24 11:10:23 +0000
commit24c1a3701d7cbbe58070f2eebae7bf5b62030fc7 (patch)
tree197932b4c88ae6fc4b34669c98ac790b97ce6c2f /net-p2p/bitcoin
parent50434bc41363f5d60027532ba03a3142e379eb14 (diff)
downloadfreebsd-ports-24c1a3701d7cbbe58070f2eebae7bf5b62030fc7.zip
net-p2p/bitcoin: Update to 0.10.0, split bitcoin-utils, LOTS MORE
- Update to 0.10.0 - Split out bitcoin-cli and bitcoin-tx into net-p2p/bitcoin-utils - Slave out bitcoin-utils and bitcoin-daemon properly - Canonicalize MASTER_SITES to what USE_GITHUB uses - Update COMMENT so each port is unique - protobuf/protoc is GUI-only dependency, remove it from unconditional {BUILD,LIB}_DEPENDS. - Group and sort USES/USE_* - Deprecate USE_AUTOTOOLS in favour of USES=autoreconf - Remove {AUTOMAKE,ACLOCAL}_ARGS accordingly - Remove unconditional *FLAGS and replace then with OPTIONS-conditional ones. - Remove unnecessary CXXFLAGS - Add HARDENING and TESTS options, add them to OPTIONS_DEFAULT - Add DBUS and DEBUG options - Define OPTIONS only where they're relevant for each port - Rejig OPTIONS descriptions for greater clarity - Replace hard-coded SSL inc/lib flags with USE_OPENSSL variables to allow for switching between Base and Ports OpenSSL's. - Use OPTIONS helpers - Remove post-patch target - Canonicalize CONFIGURE_ARGS, with slave port specific overrides. - Verbosify builds (V=1) - Remove upstreamed patches - Add regression-test targets (requires TESTS option) - Add --disable-reduce-exports to CONFIGURE_ARGS until upstream PR #5819 lands, which caused sanity test failure at run-time [1] P.S We now pass the test suite (not including python test, which has an error) Based on patch Submitted by: - Andriy Voskoboinyk <s3erios gmail.com> - Robert Backhaus <robbak gmail.com> [1] https://github.com/bitcoin/bitcoin/pull/5819 PR: 193424 Reviewed by: maintainer Approved by: maintainer
Diffstat (limited to 'net-p2p/bitcoin')
-rw-r--r--net-p2p/bitcoin/Makefile134
-rw-r--r--net-p2p/bitcoin/distinfo4
-rw-r--r--net-p2p/bitcoin/files/patch-Makefile_include_editSedCommands.patch29
-rw-r--r--net-p2p/bitcoin/files/patch-memenv.cc_enable_limit_macros11
-rw-r--r--net-p2p/bitcoin/files/patch-qt_makefile_am_editSedCommands.patch14
5 files changed, 80 insertions, 112 deletions
diff --git a/net-p2p/bitcoin/Makefile b/net-p2p/bitcoin/Makefile
index 8041534b6f74..212bf1391394 100644
--- a/net-p2p/bitcoin/Makefile
+++ b/net-p2p/bitcoin/Makefile
@@ -2,96 +2,96 @@
# $FreeBSD$
PORTNAME= bitcoin
-PORTVERSION= 0.9.2
-PORTREVISION= 3
+PORTVERSION= 0.10.0
CATEGORIES= net-p2p finance
-MASTER_SITES= http://vps.robbak.com/distfiles/ \
- ${MASTER_SITE_LOCAL} \
- http://people.freebsd.org/~swills/ \
- GH
MAINTAINER= robbak@robbak.com
-COMMENT= Virtual Peer-to-Peer Currency Client
+COMMENT?= Virtual Peer-to-Peer Currency Client (QT)
LICENSE= MIT
-BUILD_DEPENDS= protoc:${PORTSDIR}/devel/protobuf \
- pkg-config:${PORTSDIR}/devel/pkgconf
LIB_DEPENDS= libboost_date_time.so:${PORTSDIR}/devel/boost-libs
-OPTIONS_DEFINE= GUI WALLET UPNP QRCODES
-OPTIONS_DEFAULT= GUI WALLET QRCODES
+USES= autoreconf gmake libtool pkgconfig
+USE_GITHUB= yes
+USE_OPENSSL= yes
+GNU_CONFIGURE= yes
-GUI_DESC= Build and install the QT4 binary
-WALLET_DESC= Build with support to create and manage a wallet
-UPNP_DESC= Build with UPNP support
-QRCODES_DESC= Build with QR code display
+SLAVE_PORT?= no
-AUTOMAKE_ARGS+= --add-missing
-USE_AUTOTOOLS= aclocal autoheader automake autoconf
-#ACLOCAL_ARGS= -I ${LOCALBASE}/share/aclocal
-CONFIGURE_ENV= SSL_LIBS="-lssl" CRYPTO_LIBS="-lcrypto" SSL_CFLAGS="-I/usr/include" CRYPTO_CFLAGS="-I/usr/include"
+.if defined(SLAVE_PORT) && ${SLAVE_PORT} == "no"
+USES+= desktop-file-utils
+USE_QT4= corelib gui moc_build linguist_build network qmake_build \
+ rcc_build uic_build
-USE_GITHUB= yes
-GH_ACCOUNT= bitcoin
-GH_PROJECT= bitcoin
-GH_COMMIT= 30a7357
-GH_TAGNAME= v${PORTVERSION}
+BUILD_DEPENDS+= protoc:${PORTSDIR}/devel/protobuf
+LIB_DEPENDS+= libprotobuf.so:${PORTSDIR}/devel/protobuf
-USES= gmake
-USE_OPENSSL= yes
-USE_BDB= yes
-WANT_BDB_VER= 48
+TESTS_USE= QT4=testlib
+TESTS_PLIST_FILES= %%QT_BINDIR%%/test_bitcoin-qt \
+ bin/test_bitcoin
+.endif
-CXXFLAGS+= -I${LOCALBASE}/include -I${BDB_INCLUDE_DIR}
-CXXFLAGS+= -L${LOCALBASE}/lib -L${BDB_LIB_DIR}
-CXXFLAGS+= -Wno-invalid-offsetof
+OPTIONS_DEFINE?= DBUS DEBUG HARDENING QRCODES TESTS UPNP WALLET
+OPTIONS_DEFAULT?= HARDENING QRCODES TESTS WALLET
+OPTIONS_SUB= yes
-.include <bsd.port.options.mk>
+HARDENING_DESC= Attempt to harden binaries (PIE for ASLR, NX Stack)
+QRCODES_DESC= Display QR Codes
+TESTS_DESC= Build test binary and unit tests
+WALLET_DESC= Wallet Management Support
-CONFIGURE_ARGS+=--disable-tests
+DBUS_CONFIGURE_WITH= qtdbus
+DBUS_USE= QT4=dbus
-.if ${PORT_OPTIONS:MGUI} && !defined(WITHOUT_X11)
-USE_QT4= corelib gui qmake_build linguist uic moc rcc qtestlib_build
-USES+= desktop-file-utils
-PLIST_FILES= %%QT_BINDIR%%/bitcoin-qt %%QT_BINDIR%%/bitcoind %%QT_BINDIR%%/bitcoin-cli
-PLIST_FILES+= share/applications/bitcoin-qt.desktop share/pixmaps/bitcoin128.png
-CONFIGURE_ARGS+=--with-gui
-.else
-PLIST_FILES= bin/bitcoind bin/bitcoin-cli
-CONFIGURE_ARGS+=--without-gui
-.endif
+DEBUG_CONFIGURE_ENABLE= debug
+DEBUG_INSTALL_TARGET_OFF= install-strip
-.if ${PORT_OPTIONS:MQRCODES}
-LIB_DEPENDS+= libqrencode.so:${PORTSDIR}/graphics/libqrencode
-CONFIGURE_ARGS+=--with-qrencode
-.else
-CONFIGURE_ARGS+=--without-qrencode
-.endif
+HARDENING_CONFIGURE_ENABLE= hardening
-.if ${PORT_OPTIONS:MUPNP}
-LIB_DEPENDS+= libminiupnpc.so:${PORTSDIR}/net/miniupnpc
-CONFIGURE_ARGS+=--with-miniupnpc
-.else
-CONFIGURE_ARGS+=--without-miniupnpc
+TESTS_CONFIGURE_ENABLE= tests
+.if defined(SLAVE_PORT) && ${SLAVE_PORT} == "yes"
+TESTS_PLIST_FILES= bin/test_bitcoin
.endif
-.if ${PORT_OPTIONS:MWALLET}
-CONFIGURE_ARGS+=--enable-wallet
-.else
-CONFIGURE_ARGS+=--disable-wallet
-.endif
+UPNP_CONFIGURE_WITH= miniupnpc
+UPNP_LIB_DEPENDS= libminiupnpc.so:${PORTSDIR}/net/miniupnpc
+UPNP_CPPFLAGS= -I${LOCALBASE}/include
+UPNP_LIBS= -L${LOCALBASE}/lib
+
+QRCODES_CONFIGURE_WITH= qrencode
+QRCODES_LIB_DEPENDS= libqrencode.so:${PORTSDIR}/graphics/libqrencode
+
+WALLET_CONFIGURE_ENABLE= wallet
+WALLET_USE= BDB=48
+
+GH_ACCOUNT= bitcoin
+GH_COMMIT= 58810d2
+GH_TAGNAME= v${PORTVERSION}
+
+CONFIGURE_ARGS?= --without-daemon \
+ --with-gui \
+ --without-libs \
+ --without-utils \
+ --disable-reduce-exports
-.include <bsd.port.pre.mk>
+CONFIGURE_ENV= CRYPTO_CFLAGS="-I${OPENSSLINC}" CRYPTO_LIBS="-L${OPENSSLLIB} -lcrypto" \
+ SSL_CFLAGS="-I${OPENSSLINC}" SSL_LIBS="-L${OPENSSLLIB} -lssl"
+MAKE_ENV+= V=1
-post-patch:
- ${MKDIR} ${WRKSRC}/src/build-aux
+PLIST_FILES?= bin/bitcoin-qt share/applications/bitcoin-qt.desktop \
+ share/pixmaps/bitcoin128.png
+
+.if defined(SLAVE_PORT) && ${SLAVE_PORT} == "no"
post-install:
-.if ${PORT_OPTIONS:MGUI} && !defined(WITHOUT_X11)
- ${REINPLACE_CMD} -e 's,=/usr,=${PREFIX},' ${WRKSRC}/contrib/debian/bitcoin-qt.desktop
- ${INSTALL} ${WRKSRC}/contrib/debian/bitcoin-qt.desktop ${STAGEDIR}${PREFIX}/share/applications
- ${INSTALL} ${WRKSRC}/share/pixmaps/bitcoin128.png ${STAGEDIR}${PREFIX}/share/pixmaps/
+ ${REINPLACE_CMD} -e 's,=/usr,=${PREFIX},' \
+ ${WRKSRC}/contrib/debian/bitcoin-qt.desktop
+ ${INSTALL} ${WRKSRC}/contrib/debian/bitcoin-qt.desktop \
+ ${STAGEDIR}${PREFIX}/share/applications
+ ${INSTALL} ${WRKSRC}/share/pixmaps/bitcoin128.png \
+ ${STAGEDIR}${PREFIX}/share/pixmaps/
+
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/net-p2p/bitcoin/distinfo b/net-p2p/bitcoin/distinfo
index cb8c3813d216..563182bfe939 100644
--- a/net-p2p/bitcoin/distinfo
+++ b/net-p2p/bitcoin/distinfo
@@ -1,2 +1,2 @@
-SHA256 (bitcoin-0.9.2.tar.gz) = bb54f72f53498883ea9c8bdb9ae340c45fea8d4530f12fbaf34225839c439915
-SIZE (bitcoin-0.9.2.tar.gz) = 5242752
+SHA256 (bitcoin-0.10.0.tar.gz) = 8723a955fa0f86dc35d5e8bd37484b37fdb3a3977dad50947fa334ac80ee7df7
+SIZE (bitcoin-0.10.0.tar.gz) = 5018463
diff --git a/net-p2p/bitcoin/files/patch-Makefile_include_editSedCommands.patch b/net-p2p/bitcoin/files/patch-Makefile_include_editSedCommands.patch
deleted file mode 100644
index 4727e95faeef..000000000000
--- a/net-p2p/bitcoin/files/patch-Makefile_include_editSedCommands.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-diff --git a/src/Makefile.include b/src/Makefile.include
-index 2fc6cd7..cdd16f5 100644
---- a/src/Makefile.include
-+++ src/Makefile.include
-@@ -40,18 +40,18 @@ $(LIBBITCOINQT):
- ui_%.h: %.ui
- @test -d $(abs_builddir)/$(@D) || $(MKDIR_P) $(abs_builddir)/$(@D)
- @test -f $(UIC) && QT_SELECT=$(QT_SELECT) $(UIC) -o $(abs_builddir)/$@ $(abs_srcdir)/$< || echo error: could not build $(abs_builddir)/$@
-- $(SED) -e '/^\*\*.*Created:/d' $(abs_builddir)/$@ > $(abs_builddir)/$@.n && mv $(abs_builddir)/$@{.n,}
-- $(SED) -e '/^\*\*.*by:/d' $(abs_builddir)/$@ > $(abs_builddir)/$@.n && mv $(abs_builddir)/$@{.n,}
-+ $(SED) -e '/^\*\*.*Created:/d' $(abs_builddir)/$@ > $(abs_builddir)/$@.n && mv $(abs_builddir)/$@.n $(abs_builddir)/$@
-+ $(SED) -e '/^\*\*.*by:/d' $(abs_builddir)/$@ > $(abs_builddir)/$@.n && mv $(abs_builddir)/$@.n $(abs_builddir)/$@
-
- %.moc: %.cpp
- QT_SELECT=$(QT_SELECT) $(MOC) $(QT_INCLUDES) $(MOC_DEFS) -o $@ $<
-- $(SED) -e '/^\*\*.*Created:/d' $@ > $@.n && mv $@{.n,}
-- $(SED) -e '/^\*\*.*by:/d' $@ > $@.n && mv $@{.n,}
-+ $(SED) -e '/^\*\*.*Created:/d' $@ > $@.n && mv $@.n $(abs_builddir)/$@
-+ $(SED) -e '/^\*\*.*by:/d' $@ > $@.n && mv $@.n $(abs_builddir)/$@
-
- moc_%.cpp: %.h
- QT_SELECT=$(QT_SELECT) $(MOC) $(QT_INCLUDES) $(MOC_DEFS) -o $@ $<
-- $(SED) -e '/^\*\*.*Created:/d' $@ > $@.n && mv $@{.n,}
-- $(SED) -e '/^\*\*.*by:/d' $@ > $@.n && mv $@{.n,}
-+ $(SED) -e '/^\*\*.*Created:/d' $@ > $@.n && mv $@.n $(abs_builddir)/$@
-+ $(SED) -e '/^\*\*.*by:/d' $@ > $@.n && mv $@.n $(abs_builddir)/$@
-
- %.qm: %.ts
- @test -d $(abs_builddir)/$(@D) || $(MKDIR_P) $(abs_builddir)/$(@D)
diff --git a/net-p2p/bitcoin/files/patch-memenv.cc_enable_limit_macros b/net-p2p/bitcoin/files/patch-memenv.cc_enable_limit_macros
new file mode 100644
index 000000000000..911eee18ac6a
--- /dev/null
+++ b/net-p2p/bitcoin/files/patch-memenv.cc_enable_limit_macros
@@ -0,0 +1,11 @@
+--- src/leveldb/helpers/memenv/memenv.cc.orig 2014-12-28 23:05:26.000000000 +1000
++++ src/leveldb/helpers/memenv/memenv.cc 2014-12-29 17:12:58.000000000 +1000
+@@ -2,6 +2,8 @@
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file. See the AUTHORS file for names of contributors.
+
++#define __STDC_LIMIT_MACROS
++
+ #include "helpers/memenv/memenv.h"
+
+ #include "leveldb/env.h"
diff --git a/net-p2p/bitcoin/files/patch-qt_makefile_am_editSedCommands.patch b/net-p2p/bitcoin/files/patch-qt_makefile_am_editSedCommands.patch
deleted file mode 100644
index 8a72618f8aec..000000000000
--- a/net-p2p/bitcoin/files/patch-qt_makefile_am_editSedCommands.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/src/qt/Makefile.am b/src/qt/Makefile.am
-index 648971b..97b2ec4 100644
---- a/src/qt/Makefile.am
-+++ src/qt/Makefile.am
-@@ -373,7 +373,7 @@ translate: bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_CPP) $(
- $(QT_QRC_CPP): $(QT_QRC) $(QT_QM) $(QT_FORMS_H) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES) $(PROTOBUF_H)
- @cd $(abs_srcdir); test -f $(RCC) && QT_SELECT=$(QT_SELECT) $(RCC) -name bitcoin -o $(abs_builddir)/$@ $< || \
- echo error: could not build $@
-- $(SED) -e '/^\*\*.*Created:/d' $@ > $@.n && mv $@{.n,}
-- $(SED) -e '/^\*\*.*by:/d' $@ > $@.n && mv $@{.n,}
-+ $(SED) -e '/^\*\*.*Created:/d' $@ > $@.n && mv $@.n $@
-+ $(SED) -e '/^\*\*.*by:/d' $@ > $@.n && mv $@.n $@
-
- CLEANFILES = $(BUILT_SOURCES) $(QT_QM) $(QT_FORMS_H) *.gcda *.gcno