net-p2p/zetacoin: fix build with current boost.

Resurrect -nox11 slave port as -daemon slave port.
Split off cli and tx utilities from main port into -utils slave port.

PR:		237017
Submitted by:	Daniel Morante
Reported by:	jbeich
This commit is contained in:
Rene Ladan 2019-09-14 14:26:31 +00:00
parent 0a39e00b12
commit 63008e23ae
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=512017
17 changed files with 341 additions and 140 deletions

2
MOVED
View File

@ -12799,7 +12799,6 @@ www/rubygem-lograge-rails50|www/rubygem-lograge-rails5|2019-06-21|Obsolete by gi
devel/rubygem-batch-loader12|devel/rubygem-batch-loader|2019-06-21|Obsolete by gitlab-ce upgrade, use devel/rubygem-batch-loader instead
security/easy-rsa2|security/easy-rsa|2019-06-23|Has expired: Use easy-rsa 3 instead
devel/py-robotframework-selenium2library|devel/py-robotframework-seleniumlibrary|2019-06-25|Renamed to match upstream
net-p2p/zetacoin-nox11|net-p2p/zetacoin|2019-06-26|Slave port folded back into now text-only master port
net/tigervnc||2019-06-29|Removed: Non-essential meta port
sysutils/cfengine33|sysutils/cfengine313|2019-06-30|Has expired: No longer supported upstream
sysutils/cfengine-masterfiles38|sysutils/cfengine-masterfiles313|2019-06-30|Has expired: No longer supported upstream
@ -12840,6 +12839,7 @@ misc/tcb||2019-07-13|Has expired: Abandonware that uses sys/dir.h
editors/xed||2019-07-13|Has expired: Abandonware using sys/dir.h
databases/gtksql||2019-07-13|Has expired: Abandonware using sys/dir.h
security/snortreport||2019-07-16|Has expired: Abandonware
net-p2p/zetacoin-nox11|net-p2p/zetacoin-daemon|2019-07-17|Renamed to better align with net-p2p/bitcoin port
databases/pecl-redis3|databases/pecl-redis|2019-07-19|No longer needed after PHP 5 removal
www/weblint||2019-07-20|Broken, uses nonexistant perl libraries, and upstream disappeared. Use www/p5-HTML-Lint instead
www/august||2019-07-20|Uses removed weblint

View File

@ -170,6 +170,21 @@ you update your ports collection, before attempting any port upgrades.
should switch to a newer Python version, e.g. 3.6, which is the default
Python version since April 2019.
20190717:
AFFECTS: users of net-p2p/zetacoin and net-p2p/zetacoin-nox11
AUTHOR: daniel@morante.net
Zetacoin will default to using modern versions of BDB (5.x or 6.x) when
the WALLET option is selected. See pkg-help for explanation.
The zetacoin-nox11 slave port was renamed to zetacoin-daemon to align
with the net-p2p/bitcoin format.
The zetacoin-cli and zetacoin-tx utilities have been re-packaged into
a separate port. If you require these programs, or use the zetacoin-cli
program to access the daemon or the GUI, install net-p2p/zetacoin-utils
to reinstall them.
20190717:
AFFECTS: users of sysutils/py-borgmatic
AUTHOR: egypcio@FreeBSD.org

View File

@ -93,5 +93,7 @@
SUBDIR += vuze
SUBDIR += xmrig
SUBDIR += zetacoin
SUBDIR += zetacoin-daemon
SUBDIR += zetacoin-utils
.include <bsd.port.subdir.mk>

View File

@ -0,0 +1,37 @@
# Created by: Daniel Morante <daniel@morante.net>
# $FreeBSD$
MASTERDIR= ${.CURDIR}/../zetacoin
PKGNAMESUFFIX= -daemon
COMMENT= Peer-to-Peer crypto currency with quick transactions (Daemon)
SLAVE_PORT= yes
RUN_DEPENDS+= zetacoin-cli:net-p2p/zetacoin-utils
OPTIONS_DEFINE= DEBUG HARDENING TESTS UPNP ZMQ
# WALLET_BDBMODERN is a choice for WALLET, introduced via OPTIONS_RADIO=WALLET
# from ${MASTERDIR}/Makefile
OPTIONS_DEFAULT= HARDENING UPNP WALLET_BDBMODERN ZMQ
USERS= ${PORTNAME}
GROUPS= ${PORTNAME}
CONFIGURE_ARGS= --with-daemon \
--without-gui \
--without-libs \
--without-qrencode \
--without-utils
PLIST_FILES= bin/${PORTNAME}d \
"@sample %%ETCDIR%%.conf.sample"
USE_RC_SUBR= ${PORTNAME}
SUB_LIST+= PORTNAME=${PORTNAME}
SUB_FILES= pkg-message
post-install:
${INSTALL_DATA} ${FILESDIR}/${PORTNAME}.conf ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
.include "${MASTERDIR}/Makefile"

View File

@ -0,0 +1,25 @@
# $FreeBSD$
MASTERDIR= ${.CURDIR}/../zetacoin
PKGNAMESUFFIX= -utils
COMMENT= Peer-to-Peer crypto currency with quick transactions (CLI and Utilities)
SLAVE_PORT= yes
OPTIONS_DEFINE= DEBUG HARDENING TESTS
OPTIONS_RADIO=
OPTIONS_DEFAULT= HARDENING
PKGHELP= ${NONEXISTENT}
CONFIGURE_ARGS= --without-daemon \
--without-gui \
--without-libs \
--without-qrencode \
--without-miniupnpc \
--with-utils \
--disable-wallet
PLIST_FILES= bin/${PORTNAME}-cli bin/${PORTNAME}-tx
.include "${MASTERDIR}/Makefile"

View File

@ -2,9 +2,8 @@
# $FreeBSD$
PORTNAME= zetacoin
PORTVERSION= 0.11.2.3
PORTVERSION= 0.13.2.1
DISTVERSIONPREFIX= v
PORTREVISION= 29
CATEGORIES= net-p2p finance
MAINTAINER= daniel@morante.net
@ -12,91 +11,121 @@ COMMENT= Peer-to-Peer crypto currency with quick transactions
LICENSE= MIT
BROKEN= fails to build with boost 1.70, see bug 237017
NOT_FOR_ARCHS= powerpc powerpc64 sparc64
NOT_FOR_ARCHS_REASON= does not support big-endian architectures
LIB_DEPENDS= libboost_date_time.so:devel/boost-libs
LIB_DEPENDS= libboost_date_time.so:devel/boost-libs \
libevent.so:devel/libevent
USES+= autoreconf compiler:c++11-lang gmake libtool pkgconfig:build ssl
USE_CXXSTD= c++11
CFLAGS+= -I${OPENSSLINC}
LDFLAGS+= -L${OPENSSLLIB}
BROKEN_armv6= AtomicPointer not implemented
BROKEN_powerpc64= fails to configure: No working boost sleep implementation found
USES= autoreconf compiler:c++11-lib gmake libtool pkgconfig shebangfix ssl
USE_GITHUB= yes
OPTIONS_DEFINE= UPNP WALLET CLI TEST
OPTIONS_SUB= yes
GNU_CONFIGURE= yes
WALLET_DESC= Build wallet or P2P server node only
CLI_DESC= Build command line RPC client
SLAVE_PORT?= no
OPTIONS_DEFAULT= WALLET
.if defined(SLAVE_PORT) && ${SLAVE_PORT} == "no"
USES+= desktop-file-utils qt:5
USE_QT= core gui network widgets \
buildtools_build linguisttools_build qmake_build
BUILD_DEPENDS+= protoc:devel/protobuf
LIB_DEPENDS+= libprotobuf.so:devel/protobuf
TESTS_USES= qt:5
TESTS_USE= QT=testlib
TESTS_PLIST_FILES= bin/test_${PORTNAME}-qt \
bin/test_${PORTNAME}
.endif
OPTIONS_DEFINE?= DBUS DEBUG HARDENING QRCODES TESTS UPNP ZMQ
OPTIONS_RADIO?= WALLET
OPTIONS_RADIO_WALLET?= WALLET_BDB48 WALLET_BDBMODERN
OPTIONS_DEFAULT?= DBUS HARDENING QRCODES UPNP WALLET_BDBMODERN ZMQ
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
WALLET_BDB48_DESC= Wallet using BDB 4.8
WALLET_BDBMODERN_DESC= Wallet using modern BDB 5.x or 6.x
ZMQ_DESC= Block and transaction broadcasting with ZeroMQ
DBUS_CONFIGURE_WITH= dbus
DBUS_USES= qt:5
DBUS_USE= QT=dbus
DEBUG_CONFIGURE_ENABLE= debug
DEBUG_INSTALL_TARGET_OFF= install-strip
HARDENING_CONFIGURE_ENABLE= hardening
TESTS_CONFIGURE_ENABLE= tests bench
.if defined(SLAVE_PORT) && ${SLAVE_PORT} == "yes"
TESTS_PLIST_FILES= bin/test_${PORTNAME}
.endif
TESTS_PLIST_FILES+= bin/bench_${PORTNAME}
UPNP_CONFIGURE_WITH= miniupnpc
UPNP_LIB_DEPENDS= libminiupnpc.so:net/miniupnpc
UPNP_CPPFLAGS= -I${LOCALBASE}/include
UPNP_LIBS= -L${LOCALBASE}/lib
WALLET_CONFIGURE_ENABLE=wallet
WALLET_CXXFLAGS= -I${BDB_INCLUDE_DIR}
WALLET_LIBS= -L${BDB_LIB_DIR}
WALLET_USES= bdb:48
QRCODES_CONFIGURE_WITH= qrencode
QRCODES_LIB_DEPENDS= libqrencode.so:graphics/libqrencode
CLI_CONFIGURE_WITH= cli
ZMQ_CONFIGURE_ENABLE= zmq
ZMQ_BUILD_DEPENDS= libzmq4>0:net/libzmq4
ZMQ_RUN_DEPENDS= libzmq4>0:net/libzmq4
TEST_CONFIGURE_ENABLE= tests
TEST_ALL_TARGET= check
CONFIGURE_ARGS?= --without-libs \
--with-gui=qt5 \
--without-daemon \
--without-utils
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-daemon
CONFIGURE_ENV= CRYPTO_CFLAGS="-I${OPENSSLINC}" CRYPTO_LIBS="-L${OPENSSLLIB} -lcrypto" \
SSL_CFLAGS="-I${OPENSSLINC}" SSL_LIBS="-L${OPENSSLLIB} -lssl" \
OBJC="${CC}" OBJCFLAGS="${CFLAGS}" OBJCXX="${CXX}" OBJCXXFLAGS="${CXXFLAGS}"
OBJCXX="${CXX}" OBJCXXFLAGS="${CXXFLAGS}"
MAKE_ENV+= V=1
QT_BINARY= ${PORTNAME}-qt
CLI_BINARY= ${PORTNAME}-cli
DAEMON= ${PORTNAME}d
PLIST_SUB+= EXECUTABLE_QT=bin/${QT_BINARY} \
EXECUTABLE_CLI=bin/${CLI_BINARY} \
EXECUTABLE_DAEMON=bin/${DAEMON} \
PORTNAME=${PORTNAME}
PLIST_FILES?= bin/${PORTNAME}-qt share/applications/${PORTNAME}-qt.desktop \
share/pixmaps/${PORTNAME}256.png
.include <bsd.port.options.mk>
# tests will currently fail
.if ${PORT_OPTIONS:MTEST}
BROKEN= automated testing fails
.if ${PORT_OPTIONS:MWALLET_BDB48}
CONFIGURE_ARGS+= --enable-wallet
USES+= bdb:48
.elif ${PORT_OPTIONS:MWALLET_BDBMODERN}
CONFIGURE_ARGS+= --enable-wallet --with-incompatible-bdb
USES+= bdb:5+
.else
CONFIGURE_ARGS+= --disable-wallet
.endif
USE_RC_SUBR= ${PORTNAME}
SUB_LIST+= PORTNAME=${PORTNAME}
SUB_FILES= pkg-message
USERS= ${PORTNAME}
GROUPS= ${PORTNAME}
.include <bsd.port.pre.mk>
.if ${SSL_DEFAULT} == base
BROKEN_FreeBSD_12= checking for RAND_egd in -lcrypto... no
BROKEN_FreeBSD_13= checking for RAND_egd in -lcrypto... no
.if ${PORT_OPTIONS:MWALLET_BDB48} || ${PORT_OPTIONS:MWALLET_BDBMODERN}
CPPFLAGS+= -I${BDB_INCLUDE_DIR}
LIBS+= -L${BDB_LIB_DIR}
.endif
.if ${SSL_DEFAULT:Mlibressl*}
# The configure script will output this message, so save the user the trouble
IGNORE= detected LibreSSL: This is NOT supported, and may break consensus compatibility!
.if defined(SLAVE_PORT) && ${SLAVE_PORT} == "no"
post-install:
${INSTALL} ${FILESDIR}/${PORTNAME}-qt.desktop \
${STAGEDIR}${PREFIX}/share/applications
${INSTALL} ${WRKSRC}/src/qt/res/icons/bitcoin.png \
${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}256.png
.endif
post-patch:
${MKDIR} ${WRKSRC}/src/build-aux
regression-test: build
# To use this sucessfully, remove --without-daemon and --without-utils
# from CONFIGURE_ARGS above.
do-install:
${INSTALL_PROGRAM} -s ${WRKSRC}/src/${DAEMON} ${STAGEDIR}${PREFIX}/bin/${DAEMON}
${INSTALL_DATA} ${FILESDIR}/${PORTNAME}.conf.sample ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.conf.sample
do-install-CLI-on:
${INSTALL_PROGRAM} -s ${WRKSRC}/src/${CLI_BINARY} ${STAGEDIR}${PREFIX}/bin/${CLI_BINARY}
@cd ${WRKSRC} && ${GMAKE} check
.include <bsd.port.post.mk>

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1466446290
SHA256 (zetacoin-zetacoin-v0.11.2.3_GH0.tar.gz) = 581195ee6616f47c12cbd2b76cf0d61e152bbe659a349b5010d6ad3a51da80f9
SIZE (zetacoin-zetacoin-v0.11.2.3_GH0.tar.gz) = 5735186
TIMESTAMP = 1563356382
SHA256 (zetacoin-zetacoin-v0.13.2.1_GH0.tar.gz) = 4169a81abb3ded551bf8f8d10e2a7d51ee2b5b2b87e7b4005cce19d584e6378d
SIZE (zetacoin-zetacoin-v0.13.2.1_GH0.tar.gz) = 5156393

View File

@ -0,0 +1,57 @@
--- src/Makefile.bench.include.orig 2018-07-31 20:08:28 UTC
+++ src/Makefile.bench.include
@@ -2,12 +2,12 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-bin_PROGRAMS += bench/bench_bitcoin
+bin_PROGRAMS += bench/bench_zetacoin
BENCH_SRCDIR = bench
-BENCH_BINARY = bench/bench_bitcoin$(EXEEXT)
+BENCH_BINARY = bench/bench_zetacoin$(EXEEXT)
-bench_bench_bitcoin_SOURCES = \
+bench_bench_zetacoin_SOURCES = \
bench/bench_bitcoin.cpp \
bench/bench.cpp \
bench/bench.h \
@@ -16,9 +16,9 @@ bench_bench_bitcoin_SOURCES = \
bench/crypto_hash.cpp \
bench/base58.cpp
-bench_bench_bitcoin_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CLFAGS) $(EVENT_PTHREADS_CFLAGS) -I$(builddir)/bench/
-bench_bench_bitcoin_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
-bench_bench_bitcoin_LDADD = \
+bench_bench_zetacoin_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CLFAGS) $(EVENT_PTHREADS_CFLAGS) -I$(builddir)/bench/
+bench_bench_zetacoin_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
+bench_bench_zetacoin_LDADD = \
$(LIBBITCOIN_SERVER) \
$(LIBBITCOIN_COMMON) \
$(LIBBITCOIN_UTIL) \
@@ -30,15 +30,15 @@ bench_bench_bitcoin_LDADD = \
$(LIBUNIVALUE)
if ENABLE_ZMQ
-bench_bench_bitcoin_LDADD += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS)
+bench_bench_zetacoin_LDADD += $(LIBBITCOIN_ZMQ) $(ZMQ_LIBS)
endif
if ENABLE_WALLET
-bench_bench_bitcoin_LDADD += $(LIBBITCOIN_WALLET)
+bench_bench_zetacoin_LDADD += $(LIBBITCOIN_WALLET)
endif
-bench_bench_bitcoin_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS)
-bench_bench_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
+bench_bench_zetacoin_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS)
+bench_bench_zetacoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
CLEAN_BITCOIN_BENCH = bench/*.gcda bench/*.gcno
@@ -50,4 +50,4 @@ bench: $(BENCH_BINARY) FORCE
$(BENCH_BINARY)
bitcoin_bench_clean : FORCE
- rm -f $(CLEAN_BITCOIN_BENCH) $(bench_bench_bitcoin_OBJECTS) $(BENCH_BINARY)
+ rm -f $(CLEAN_BITCOIN_BENCH) $(bench_bench_zetacoin_OBJECTS) $(BENCH_BINARY)

View File

@ -1,11 +0,0 @@
--- src/bitcoin-cli.cpp.orig 2018-01-13 04:55:52 UTC
+++ src/bitcoin-cli.cpp
@@ -105,7 +105,7 @@ Object CallRPC(const string& strMethod,
// Connect to localhost
bool fUseSSL = GetBoolArg("-rpcssl", false);
boost::asio::io_service io_service;
- boost::asio::ssl::context context(io_service, boost::asio::ssl::context::sslv23);
+ boost::asio::ssl::context context(boost::asio::ssl::context::sslv23);
context.set_options(boost::asio::ssl::context::no_sslv2 | boost::asio::ssl::context::no_sslv3);
boost::asio::ssl::stream<boost::asio::ip::tcp::socket> sslStream(io_service, context);
SSLIOStreamDevice<boost::asio::ip::tcp> d(sslStream, fUseSSL);

View File

@ -0,0 +1,20 @@
--- src/miner.h.orig 2018-07-31 20:08:28 UTC
+++ src/miner.h
@@ -73,7 +73,7 @@ struct modifiedentry_iter {
// except operating on CTxMemPoolModifiedEntry.
// TODO: refactor to avoid duplication of this logic.
struct CompareModifiedEntry {
- bool operator()(const CTxMemPoolModifiedEntry &a, const CTxMemPoolModifiedEntry &b)
+ bool operator()(const CTxMemPoolModifiedEntry &a, const CTxMemPoolModifiedEntry &b) const
{
double f1 = (double)a.nModFeesWithAncestors * b.nSizeWithAncestors;
double f2 = (double)b.nModFeesWithAncestors * a.nSizeWithAncestors;
@@ -88,7 +88,7 @@ struct CompareModifiedEntry {
// This is sufficient to sort an ancestor package in an order that is valid
// to appear in a block.
struct CompareTxIterByAncestorCount {
- bool operator()(const CTxMemPool::txiter &a, const CTxMemPool::txiter &b)
+ bool operator()(const CTxMemPool::txiter &a, const CTxMemPool::txiter &b) const
{
if (a->GetCountWithAncestors() != b->GetCountWithAncestors())
return a->GetCountWithAncestors() < b->GetCountWithAncestors();

View File

@ -1,62 +0,0 @@
--- src/rpcserver.cpp.orig 2018-01-10 23:24:05 UTC
+++ src/rpcserver.cpp
@@ -492,8 +492,8 @@ private:
void ServiceConnection(AcceptedConnection *conn);
//! Forward declaration required for RPCListen
-template <typename Protocol, typename SocketAcceptorService>
-static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
+template <typename Protocol>
+static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol> > acceptor,
ssl::context& context,
bool fUseSSL,
boost::shared_ptr< AcceptedConnection > conn,
@@ -502,8 +502,8 @@ static void RPCAcceptHandler(boost::shar
/**
* Sets up I/O resources to accept and handle a new connection.
*/
-template <typename Protocol, typename SocketAcceptorService>
-static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
+template <typename Protocol>
+static void RPCListen(boost::shared_ptr< basic_socket_acceptor<Protocol> > acceptor,
ssl::context& context,
const bool fUseSSL)
{
@@ -513,7 +513,7 @@ static void RPCListen(boost::shared_ptr<
acceptor->async_accept(
conn->sslStream.lowest_layer(),
conn->peer,
- boost::bind(&RPCAcceptHandler<Protocol, SocketAcceptorService>,
+ boost::bind(&RPCAcceptHandler<Protocol>,
acceptor,
boost::ref(context),
fUseSSL,
@@ -525,8 +525,8 @@ static void RPCListen(boost::shared_ptr<
/**
* Accept and handle incoming connection.
*/
-template <typename Protocol, typename SocketAcceptorService>
-static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol, SocketAcceptorService> > acceptor,
+template <typename Protocol>
+static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptor<Protocol> > acceptor,
ssl::context& context,
const bool fUseSSL,
boost::shared_ptr< AcceptedConnection > conn,
@@ -620,7 +620,7 @@ void StartRPCThreads()
assert(rpc_io_service == NULL);
rpc_io_service = new boost::asio::io_service();
- rpc_ssl_context = new ssl::context(*rpc_io_service, ssl::context::sslv23);
+ rpc_ssl_context = new ssl::context(ssl::context::sslv23);
const bool fUseSSL = GetBoolArg("-rpcssl", false);
@@ -639,7 +639,7 @@ void StartRPCThreads()
else LogPrintf("ThreadRPCServer ERROR: missing server private key file %s\n", pathPKFile.string());
string strCiphers = GetArg("-rpcsslciphers", "TLSv1.2+HIGH:TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!3DES:@STRENGTH");
- SSL_CTX_set_cipher_list(rpc_ssl_context->impl(), strCiphers.c_str());
+ SSL_CTX_set_cipher_list(rpc_ssl_context->native_handle(), strCiphers.c_str());
}
std::vector<ip::tcp::endpoint> vEndpoints;

View File

@ -0,0 +1,47 @@
--- src/txmempool.h.orig 2018-07-31 20:08:28 UTC
+++ src/txmempool.h
@@ -224,7 +224,7 @@ struct mempoolentry_txid
class CompareTxMemPoolEntryByDescendantScore
{
public:
- bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
+ bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
{
bool fUseADescendants = UseDescendantScore(a);
bool fUseBDescendants = UseDescendantScore(b);
@@ -246,7 +246,7 @@ class CompareTxMemPoolEntryByDescendantScore (public)
}
// Calculate which score to use for an entry (avoiding division).
- bool UseDescendantScore(const CTxMemPoolEntry &a)
+ bool UseDescendantScore(const CTxMemPoolEntry &a) const
{
double f1 = (double)a.GetModifiedFee() * a.GetSizeWithDescendants();
double f2 = (double)a.GetModFeesWithDescendants() * a.GetTxSize();
@@ -261,7 +261,7 @@ class CompareTxMemPoolEntryByDescendantScore (public)
class CompareTxMemPoolEntryByScore
{
public:
- bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
+ bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
{
double f1 = (double)a.GetModifiedFee() * b.GetTxSize();
double f2 = (double)b.GetModifiedFee() * a.GetTxSize();
@@ -275,7 +275,7 @@ class CompareTxMemPoolEntryByScore (public)
class CompareTxMemPoolEntryByEntryTime
{
public:
- bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
+ bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
{
return a.GetTime() < b.GetTime();
}
@@ -284,7 +284,7 @@ class CompareTxMemPoolEntryByEntryTime (public)
class CompareTxMemPoolEntryByAncestorFee
{
public:
- bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
+ bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
{
double aFees = a.GetModFeesWithAncestors();
double aSize = a.GetSizeWithAncestors();

View File

@ -0,0 +1,14 @@
[Desktop Entry]
Version=1.0
Name=Zetacoin Core
Comment=Connect to the Zetacoin P2P Network
Comment[de]=Verbinde mit dem Zetacoin peer-to-peer Netzwerk
Comment[fr]=Zetacoin, monnaie virtuelle cryptographique pair à pair
Comment[tr]=Zetacoin, eşten eşe kriptografik sanal para birimi
Exec=zetacoin-qt %u
Terminal=false
Type=Application
Icon=zetacoin256
MimeType=x-scheme-handler/zetacoin;
Categories=Office;Finance;
StartupWMClass=Zetacoin-qt

View File

@ -37,13 +37,15 @@ load_rc_config $name
required_files=${%%PORTNAME%%_config}
command=%%PREFIX%%/bin/%%PORTNAME%%d
cli_command=%%PREFIX%%/bin/%%PORTNAME%%-cli
%%PORTNAME%%_chdir=${%%PORTNAME%%_datadir}
pidfile="${%%PORTNAME%%_datadir}/%%PORTNAME%%d.pid"
stop_cmd=%%PORTNAME%%_stop
command_args="-conf=${%%PORTNAME%%_config} -datadir=${%%PORTNAME%%_datadir} -noupnp -daemon -pid=${pidfile}"
start_precmd="${name}_prestart"
reindex_cmd=%%PORTNAME%%_reindex
extra_commands="reindex"
reindex_cmd="${name}_reindex"
salvage_cmd="${name}_salvage"
extra_commands="reindex salvage"
%%PORTNAME%%_create_datadir()
{
@ -72,7 +74,7 @@ extra_commands="reindex"
%%PORTNAME%%_requirepidfile
echo "Stopping ${name}."
eval ${command} -conf=${%%PORTNAME%%_config} -datadir=${%%PORTNAME%%_datadir} stop
eval ${cli_command} -conf=${%%PORTNAME%%_config} -datadir=${%%PORTNAME%%_datadir} stop
wait_for_pids ${rc_pid}
}
@ -87,4 +89,15 @@ extra_commands="reindex"
eval ${command} ${command_args}
}
%%PORTNAME%%_salvage()
{
if [ -z "$rc_fast" -a -n "$rc_pid" ]; then
%%PORTNAME%%_stop
fi
echo "Attempting to salvage ${name} walllet."
command_args="${command_args} -salvagewallet"
eval ${command} ${command_args}
}
run_rc_command "$1"

18
net-p2p/zetacoin/pkg-help Normal file
View File

@ -0,0 +1,18 @@
The wallet is stored in a Berkeley database file (BDB) (usually
~/.zetacoin/wallets/wallet.dat).
Zetacoin Core can use either BDB 4.8, 5.x or 6.x to create and access the
wallet file.
Wallets created using BDB 4.8 are also accessible by BDB 5.x and 6.x.
Wallets created using BDB 5.x or 6.x are not accessible by BDB 4.8.
Opening and using a wallet created by 4.8 with a higher major version (5.x
or 6.x) does not change its format, so it will still be accessible to 4.8
afterwards. But encrypting an unencrypted wallet recreates it, so encrypting
a 4.8 wallet with Zetacoin Core linked against BDB 5.x or 6.x will render it
unreadable for Zetacoin Core linked against BDB 4.8.
If you do not plan on copying the wallet file to another machine that uses
BDB 4.8 then it is recommended to use the modern versions of BDB 5.x or 6.x.

View File

@ -1,3 +0,0 @@
%%EXECUTABLE_DAEMON%%
@sample etc/%%PORTNAME%%.conf.sample
%%CLI%%%%EXECUTABLE_CLI%%