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
This commit is contained in:
Kubilay Kocak 2015-02-24 11:10:23 +00:00
parent 50434bc413
commit 24c1a3701d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=379779
9 changed files with 138 additions and 123 deletions

View file

@ -5,6 +5,14 @@ they are unavoidable.
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
20150224:
AFFECTS: Users of net-p2p/bitcoin (cli utilities)
The bitcoin-cli and bitcoin-tx utilities have been re-packaged into
a seperate port. If you require these programs, or use the bitcoin-cli
program to access the daemon or the GUI, install net-p2p/bitcoin-utils
to reinstall them.
20150220:
AFFECTS: users of PHP

View file

@ -7,6 +7,7 @@
SUBDIR += amule-devel
SUBDIR += bitcoin
SUBDIR += bitcoin-daemon
SUBDIR += bitcoin-utils
SUBDIR += bitflu
SUBDIR += bitmessage
SUBDIR += bnbt

View file

@ -1,9 +1,25 @@
# $FreeBSD$
PKGNAMESUFFIX= -daemon
COMMENT= Virtual Peer-to-Peer Currency Client
MASTERDIR= ${.CURDIR}/../bitcoin
DESCR= ${MASTERDIR}/pkg-descr
PKGNAMESUFFIX= -daemon
COMMENT= Virtual Peer-to-Peer Currency (Daemon)
SLAVE_PORT= yes
OPTIONS_EXCLUDE= GUI QRCODES
OPTIONS_DEFINE= DEBUG HARDENING TESTS UPNP WALLET
OPTIONS_DEFAULT= HARDENING TESTS WALLET
CONFIGURE_ARGS= --with-daemon \
--without-gui \
--without-libs \
--without-qrencode \
--without-utils \
--disable-reduce-exports
PLIST_FILES= bin/bitcoind
regression-test: build
@cd ${WRKSRC} && ${GMAKE} check
.include "${MASTERDIR}/Makefile"

View file

@ -0,0 +1,22 @@
# $FreeBSD$
MASTERDIR= ${.CURDIR}/../bitcoin
PKGNAMESUFFIX= -utils
COMMENT= Virtual Peer-to-Peer Currency (CLI and Utilities)
SLAVE_PORT= yes
OPTIONS_DEFINE= DEBUG HARDENING TESTS
OPTIONS_DEFAULT= HARDENING TESTS
CONFIGURE_ARGS= --without-daemon \
--without-gui \
--without-libs \
--without-qrencode \
--with-utils \
--disable-wallet \
--disable-reduce-exports
PLIST_FILES= bin/bitcoin-cli bin/bitcoin-tx
.include "${MASTERDIR}/Makefile"

View file

@ -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
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
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"
USES= autoreconf gmake libtool pkgconfig
USE_GITHUB= yes
USE_OPENSSL= yes
GNU_CONFIGURE= yes
SLAVE_PORT?= no
.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
BUILD_DEPENDS+= protoc:${PORTSDIR}/devel/protobuf
LIB_DEPENDS+= libprotobuf.so:${PORTSDIR}/devel/protobuf
TESTS_USE= QT4=testlib
TESTS_PLIST_FILES= %%QT_BINDIR%%/test_bitcoin-qt \
bin/test_bitcoin
.endif
OPTIONS_DEFINE?= DBUS DEBUG HARDENING QRCODES TESTS UPNP WALLET
OPTIONS_DEFAULT?= HARDENING QRCODES TESTS WALLET
OPTIONS_SUB= yes
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
DBUS_CONFIGURE_WITH= qtdbus
DBUS_USE= QT4=dbus
DEBUG_CONFIGURE_ENABLE= debug
DEBUG_INSTALL_TARGET_OFF= install-strip
HARDENING_CONFIGURE_ENABLE= hardening
TESTS_CONFIGURE_ENABLE= tests
.if defined(SLAVE_PORT) && ${SLAVE_PORT} == "yes"
TESTS_PLIST_FILES= bin/test_bitcoin
.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_PROJECT= bitcoin
GH_COMMIT= 30a7357
GH_COMMIT= 58810d2
GH_TAGNAME= v${PORTVERSION}
USES= gmake
USE_OPENSSL= yes
USE_BDB= yes
WANT_BDB_VER= 48
CONFIGURE_ARGS?= --without-daemon \
--with-gui \
--without-libs \
--without-utils \
--disable-reduce-exports
CXXFLAGS+= -I${LOCALBASE}/include -I${BDB_INCLUDE_DIR}
CXXFLAGS+= -L${LOCALBASE}/lib -L${BDB_LIB_DIR}
CXXFLAGS+= -Wno-invalid-offsetof
CONFIGURE_ENV= CRYPTO_CFLAGS="-I${OPENSSLINC}" CRYPTO_LIBS="-L${OPENSSLLIB} -lcrypto" \
SSL_CFLAGS="-I${OPENSSLINC}" SSL_LIBS="-L${OPENSSLLIB} -lssl"
MAKE_ENV+= V=1
.include <bsd.port.options.mk>
PLIST_FILES?= bin/bitcoin-qt share/applications/bitcoin-qt.desktop \
share/pixmaps/bitcoin128.png
CONFIGURE_ARGS+=--disable-tests
.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
.if ${PORT_OPTIONS:MQRCODES}
LIB_DEPENDS+= libqrencode.so:${PORTSDIR}/graphics/libqrencode
CONFIGURE_ARGS+=--with-qrencode
.else
CONFIGURE_ARGS+=--without-qrencode
.endif
.if ${PORT_OPTIONS:MUPNP}
LIB_DEPENDS+= libminiupnpc.so:${PORTSDIR}/net/miniupnpc
CONFIGURE_ARGS+=--with-miniupnpc
.else
CONFIGURE_ARGS+=--without-miniupnpc
.endif
.if ${PORT_OPTIONS:MWALLET}
CONFIGURE_ARGS+=--enable-wallet
.else
CONFIGURE_ARGS+=--disable-wallet
.endif
.include <bsd.port.pre.mk>
post-patch:
${MKDIR} ${WRKSRC}/src/build-aux
.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>

View file

@ -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

View file

@ -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)

View file

@ -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"

View file

@ -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