svn commit: r478891 - in head/net-p2p: namecoin namecoin-daemon namecoin/files
Rene Ladan
rene at FreeBSD.org
Mon Sep 3 18:39:53 UTC 2018
Author: rene
Date: Mon Sep 3 18:39:51 2018
New Revision: 478891
URL: https://svnweb.freebsd.org/changeset/ports/478891
Log:
net-p2p/namecoin[-daemon]: unbreak, unexpire, update to 0.13.2
This is part one of the PR.
PR: 218961
Submitted by: maintainer
Added:
head/net-p2p/namecoin/files/namecoind.in (contents, props changed)
head/net-p2p/namecoin/files/patch-src_miner.h (contents, props changed)
head/net-p2p/namecoin/files/patch-src_txmempool.h (contents, props changed)
Deleted:
head/net-p2p/namecoin/files/makefile.unix
head/net-p2p/namecoin/files/patch-src__main.h
head/net-p2p/namecoin/files/patch-src__qt__configurenamedialog.h
head/net-p2p/namecoin/files/patch-src__qt__managenamespage.h
head/net-p2p/namecoin/files/patch-src__strlcpy.h
Modified:
head/net-p2p/namecoin-daemon/Makefile
head/net-p2p/namecoin/Makefile
head/net-p2p/namecoin/distinfo
head/net-p2p/namecoin/pkg-descr
Modified: head/net-p2p/namecoin-daemon/Makefile
==============================================================================
--- head/net-p2p/namecoin-daemon/Makefile Mon Sep 3 18:36:32 2018 (r478890)
+++ head/net-p2p/namecoin-daemon/Makefile Mon Sep 3 18:39:51 2018 (r478891)
@@ -1,13 +1,29 @@
# $FreeBSD$
-PKGNAMESUFFIX= -daemon
-
MASTERDIR= ${.CURDIR}/../namecoin
-DESCR= ${MASTERDIR}/pkg-descr
+PKGNAMESUFFIX= -daemon
+COMMENT= Decentralized, open DNS and more (Daemon)
SLAVE_PORT= yes
-OPTIONS_EXCLUDE= X11 DBUS QRCODES
+ONLY_FOR_ARCHS= amd64 i386 ia64
+ONLY_FOR_ARCHS_REASON= does not support big-endian architectures
+
+CONFLICTS_INSTALL= namecoin-stable-[0-9]* namecoin-stable-daemon-[0-9]* namecoin-stable-utils-[0-9]* \
+ namecoin-beta-[0-9]* namecoin-beta-daemon-[0-9]* namecoin-beta-utils-[0-9]*
+
+OPTIONS_DEFINE= DEBUG HARDENING TESTS UPNP WALLET ZMQ
+OPTIONS_DEFAULT= HARDENING UPNP WALLET
+
+CONFIGURE_ARGS= --with-daemon \
+ --without-gui \
+ --without-libs \
+ --without-qrencode \
+ --without-utils
+
+PLIST_FILES= bin/namecoind
+
+USE_RC_SUBR= namecoind
.include "${MASTERDIR}/Makefile"
Modified: head/net-p2p/namecoin/Makefile
==============================================================================
--- head/net-p2p/namecoin/Makefile Mon Sep 3 18:36:32 2018 (r478890)
+++ head/net-p2p/namecoin/Makefile Mon Sep 3 18:39:51 2018 (r478891)
@@ -2,100 +2,118 @@
# $FreeBSD$
PORTNAME= namecoin
-PORTVERSION= 0.3.80
-DISTVERSIONPREFIX= nc
-PORTREVISION= 20
+PORTVERSION= 0.13.2
PORTEPOCH= 1
CATEGORIES= net-p2p dns
MAINTAINER= milios at ccsys.com
-COMMENT= Decentralized, open DNS and general purpose key/value store
+COMMENT?= Decentralized, open DNS and general purpose key/value store
LICENSE= MIT
-LICENSE_FILE= ${WRKSRC}/COPYING
-LIB_DEPENDS= libboost_date_time.so:devel/boost-libs
+LIB_DEPENDS= libboost_date_time.so:devel/boost-libs \
+ libevent.so:devel/libevent
-BROKEN= fails to build with boost 1.66, see bug 224186
-DEPRECATED= Broken for more than 5 months
-EXPIRATION_DATE= 2018-08-20
-BROKEN_powerpc64= fails to build: util.cpp: undefined reference to boost::program_options::to_internal
+CONFLICTS_INSTALL= namecoin-beta-[0-9]* namecoin-beta-daemon-[0-9]* namecoin-beta-utils-[0-9]* \
+ namecoin-stable-[0-9]* namecoin-stable-daemon-[0-9]* namecoin-stable-utils-[0-9]*
-OPTIONS_DEFINE= X11 UPNP QRCODES DBUS
-OPTIONS_DEFAULT= X11 QRCODES
+USES= autoreconf compiler:c++11-lib gmake libtool pkgconfig shebangfix ssl
+SHEBANG_FILES= src/test/*.py
+GNU_CONFIGURE= yes
-QRCODES_DESC= QR code display support
-
USE_GITHUB= yes
+GH_ACCOUNT= indolering:graphics
+GH_PROJECT= namecoin-core namecoin-graphics:graphics
+GH_TAGNAME= ab08f76 a13a73b:graphics
-USES= bdb:48 gmake compiler:c++11-lib qt:4 ssl
-MAKE_JOBS_UNSAFE=yes
+SLAVE_PORT?= no
-CXXFLAGS+= -I${LOCALBASE}/include -I${BDB_INCLUDE_DIR}
-CXXFLAGS+= -L${LOCALBASE}/lib -L${BDB_LIB_DIR}
-CXXFLAGS+= -DCRYPTOPP_DISABLE_ASM
+.if defined(SLAVE_PORT) && ${SLAVE_PORT} == "no"
+USES+= desktop-file-utils qt:4
+USE_QT= corelib gui moc_build linguisttools_build network qmake_build \
+ rcc_build uic_build
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MX11}
-USE_QT= corelib network gui qmake_build linguist_build uic_build moc_build rcc_build
-
-BINARY= namecoin-qt
+BUILD_DEPENDS+= protoc:devel/protobuf \
+ svg2png:graphics/svg2png
LIB_DEPENDS+= libprotobuf.so:devel/protobuf
-.else
-BINARY= namecoind
-MAKE_ARGS+= -C ${WRKSRC}/src
-USE_GNOME= glib20
-.endif
-.if ${PORT_OPTIONS:MQRCODES}
-LIB_DEPENDS+= libqrencode.so:graphics/libqrencode
-QMAKE_USE_QRCODE=1
-.else
-QMAKE_USE_QRCODE=0
+TESTS_USES= qt:4
+TESTS_USE= QT=testlib
+TESTS_PLIST_FILES= bin/test_namecoin-qt \
+ bin/test_namecoin
.endif
-.if ${PORT_OPTIONS:MDBUS}
-USE_QT+= dbus
-QMAKE_USE_DBUS= 1
-.else
-QMAKE_USE_DBUS= 0
-.endif
+OPTIONS_DEFINE?= DBUS DEBUG HARDENING QRCODES TESTS UPNP WALLET ZMQ
+OPTIONS_DEFAULT?= DBUS HARDENING QRCODES UPNP WALLET
+OPTIONS_SUB= yes
-PLIST_FILES+= bin/${BINARY}
+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
+ZMQ_DESC= Block and transaction broadcasting with ZeroMQ
-.if ${PORT_OPTIONS:MUPNP}
-LIB_DEPENDS+= libminiupnpc.so:net/miniupnpc
-CXXFLAGS+= -I${LOCALBASE}/include/miniupnpc
-QMAKE_USE_UPNP= 1
-.else
-QMAKE_USE_UPNP= -
-.endif
+DBUS_CONFIGURE_WITH= qtdbus
+DBUS_USES= qt:4
+DBUS_USE= QT=dbus
-.include <bsd.port.pre.mk>
+DEBUG_CONFIGURE_ENABLE= debug
+DEBUG_INSTALL_TARGET_OFF= install-strip
-post-patch:
-.if !${PORT_OPTIONS:MX11}
- @cd ${WRKSRC}/src && ${CP} ${FILESDIR}/makefile.unix Makefile
- @${REINPLACE_CMD} \
- -e 's|^USE_UPNP.*$$|USE_UPNP=${QMAKE_USE_UPNP}|' \
- ${WRKSRC}/src/Makefile
-.endif
+HARDENING_CONFIGURE_ENABLE= hardening
-do-configure:
-.if ${PORT_OPTIONS:MX11}
- cd ${WRKSRC} && ${SETENV} ${QMAKE_ENV} \
- ${QMAKE} ${QMAKE_ARGS} USE_UPNP=${QMAKE_USE_UPNP} USE_QRCODE=${QMAKE_USE_QRCODE} \
- QMAKE_LRELEASE=${LRELEASE} INCLUDEPATH+=${BDB_INCLUDE_DIR} \
- QMAKE_LIBDIR+=${BDB_LIB_DIR} ${BINARY}.pro
+TESTS_CONFIGURE_ENABLE= tests bench
+.if defined(SLAVE_PORT) && ${SLAVE_PORT} == "yes"
+TESTS_PLIST_FILES= bin/test_namecoin
.endif
+TESTS_PLIST_FILES+= bin/bench_namecoin
-do-install:
- @${MKDIR} ${STAGEDIR}${PREFIX}/bin
-.if ${PORT_OPTIONS:MX11}
- ${INSTALL_PROGRAM} ${WRKSRC}/${BINARY} ${STAGEDIR}${PREFIX}/bin/
-.else
- ${INSTALL_PROGRAM} ${WRKSRC}/src/${BINARY} ${STAGEDIR}${PREFIX}/bin/
+UPNP_CONFIGURE_WITH= miniupnpc
+UPNP_LIB_DEPENDS= libminiupnpc.so:net/miniupnpc
+UPNP_CPPFLAGS= -I${LOCALBASE}/include
+UPNP_LIBS= -L${LOCALBASE}/lib
+
+QRCODES_CONFIGURE_WITH= qrencode
+QRCODES_LIB_DEPENDS= libqrencode.so:graphics/libqrencode
+
+WALLET_CONFIGURE_ENABLE= wallet
+WALLET_CXXFLAGS= -I${BDB_INCLUDE_DIR}
+WALLET_LIBS= -L${BDB_LIB_DIR}
+WALLET_USES= bdb:48
+
+ZMQ_CONFIGURE_ENABLE= zmq
+ZMQ_BUILD_DEPENDS= libzmq4>0:net/libzmq4
+ZMQ_RUN_DEPENDS= libzmq4>0:net/libzmq4
+
+CONFIGURE_ARGS?= --without-libs \
+ --with-gui=qt4 \
+ --without-daemon \
+ --without-utils
+
+CONFIGURE_ENV= CRYPTO_CFLAGS="-I${OPENSSLINC}" CRYPTO_LIBS="-L${OPENSSLLIB} -lcrypto" \
+ SSL_CFLAGS="-I${OPENSSLINC}" SSL_LIBS="-L${OPENSSLLIB} -lssl" \
+ OBJCXX="${CXX}" OBJCXXFLAGS="${CXXFLAGS}"
+MAKE_ENV+= V=1
+
+PLIST_FILES?= bin/namecoin-qt share/applications/namecoin-qt.desktop \
+ share/pixmaps/namecoin128.png
+
+.if defined(SLAVE_PORT) && ${SLAVE_PORT} == "no"
+
+post-install:
+ ${REINPLACE_CMD} -e 's/bitcoin/namecoin/g;s/Bitcoin/Namecoin/g' \
+ ${WRKSRC}/contrib/debian/bitcoin-qt.desktop
+ ${INSTALL} ${WRKSRC}/contrib/debian/bitcoin-qt.desktop \
+ ${STAGEDIR}${PREFIX}/share/applications/namecoin-qt.desktop
+ ${LOCALBASE}/bin/svg2png -w128 -h128 ${WRKSRC_graphics}/svg/namecoin-logo.svg \
+ ${STAGEDIR}${PREFIX}/share/pixmaps/namecoin128.png
+
.endif
-.include <bsd.port.post.mk>
+regression-test: build
+ # To use this sucessfully, remove --without-daemon and --without-utils
+ # from CONFIGURE_ARGS above.
+
+ @cd ${WRKSRC} && ${GMAKE} check
+
+.include <bsd.port.mk>
Modified: head/net-p2p/namecoin/distinfo
==============================================================================
--- head/net-p2p/namecoin/distinfo Mon Sep 3 18:36:32 2018 (r478890)
+++ head/net-p2p/namecoin/distinfo Mon Sep 3 18:39:51 2018 (r478891)
@@ -1,2 +1,5 @@
-SHA256 (namecoin-namecoin-nc0.3.80_GH0.tar.gz) = 3f5e5af95cea46111d3cf1663f0e84d5fda653917745e0607a3ca4773baea59c
-SIZE (namecoin-namecoin-nc0.3.80_GH0.tar.gz) = 1471777
+TIMESTAMP = 1500647782
+SHA256 (namecoin-namecoin-core-0.13.2-ab08f76_GH0.tar.gz) = 27ee9f0fca2f9d98bfc298848ad2b899a895c0c7c8e63caca2ee317c927cd178
+SIZE (namecoin-namecoin-core-0.13.2-ab08f76_GH0.tar.gz) = 5917889
+SHA256 (indolering-namecoin-graphics-a13a73b_GH0.tar.gz) = 82f308a3527d96a202099feb96a754d036bbdaa875156ad002ba2747d75000c7
+SIZE (indolering-namecoin-graphics-a13a73b_GH0.tar.gz) = 7364908
Added: head/net-p2p/namecoin/files/namecoind.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net-p2p/namecoin/files/namecoind.in Mon Sep 3 18:39:51 2018 (r478891)
@@ -0,0 +1,173 @@
+#!/bin/sh
+# $FreeBSD$
+
+# PROVIDE: namecoind
+# REQUIRE: LOGIN cleanvar
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable :
+# namecoind_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable namecoind
+# namecoind_user (str) Set to "namecoin" by default.
+# namecoind_group (str) Set to "namecoin" by default.
+# namecoind_conf (str) Set to "%%PREFIX%%/etc/namecoind.conf" by default.
+# namecoind_data (str) Set to "/var/lib/namecoind" by default.
+# namecoindlimits_enable (bool) Set to "NO" by default.
+# Set it to "YES" to enable namecoindlimits
+# namecoindlimits_args Set to "-e -U ${namecoind_user}" by default
+
+
+. /etc/rc.subr
+
+name="namecoind"
+rcvar=namecoind_enable
+
+start_precmd="namecoind_precmd"
+start_cmd="namecoind_start"
+restart_precmd="namecoind_checkconfig"
+reload_precmd="namecoind_checkconfig"
+configtest_cmd="namecoind_checkconfig"
+status_cmd="namecoind_status"
+stop_cmd="namecoind_stop"
+stop_postcmd="namecoind_wait"
+command="%%PREFIX%%/bin/namecoind"
+cli_command="%%PREFIX%%/bin/namecoin-cli"
+daemon_command="/usr/sbin/daemon"
+#pidfile="/var/run/${name}.pid"
+extra_commands="configtest"
+
+
+: ${namecoind_enable:="NO"}
+: ${namecoindlimits_enable:="NO"}
+
+load_rc_config ${name}
+
+: ${namecoind_user:="namecoin"}
+: ${namecoind_group:="namecoin"}
+: ${namecoind_data_dir:="/var/db/namecoind"}
+: ${namecoind_config_file:="%%PREFIX%%/etc/namecoin.conf"}
+: ${namecoindlimits_args:="-e -U ${namecoind_user}"}
+
+# set up dependant variables
+procname="${command}"
+pidfile="${namecoind_data_dir}/namecoind.pid"
+required_files="${namecoind_config_file}"
+
+
+namecoind_checkconfig()
+{
+ echo "Performing sanity check on namecoind configuration:"
+ if [ ! -d "${namecoind_data_dir}" ]
+ then
+ echo "Missing data directory: ${namecoind_data_dir}"
+ exit 1
+ fi
+ chown -R "${namecoind_user}:${namecoind_group}" "${namecoind_data_dir}"
+
+ if [ ! -f "${namecoind_config_file}" ]
+ then
+ echo "Missing configuration file: ${namecoind_config_file}"
+ exit 1
+ fi
+ if [ ! -x "${command}" ]
+ then
+ echo "Missing executable: ${command}"
+ exit 1
+ fi
+ return 0
+}
+
+namecoind_cleanup()
+{
+ rm -f "${pidfile}"
+}
+
+namecoind_precmd()
+{
+ namecoind_checkconfig
+
+ pid=$(check_pidfile "${pidfile}" "${procname}")
+ if [ -z "${pid}" ]
+ then
+ echo "Namecoind is not running"
+ rm -f "${pidfile}"
+ fi
+
+ if checkyesno namecoindlimits_enable
+ then
+ eval $(/usr/bin/limits ${namecoindlimits_args}) 2>/dev/null
+ else
+ return 0
+ fi
+}
+
+namecoind_status()
+{
+ local pid
+ pid=$(check_pidfile "${pidfile}" "${procname}")
+ if [ -z "${pid}" ]
+ then
+ echo "Namecoind is not running"
+ return 1
+ else
+ echo "Namecoind running, pid: ${pid}"
+ fi
+}
+
+namecoind_start()
+{
+ echo "Starting namecoind:"
+ cd "${namecoind_data_dir}" || return 1
+ ${daemon_command} -u "${namecoind_user}" -p "${pidfile}" \
+ ${command} \
+ -conf="${namecoind_config_file}" \
+ -datadir="${namecoind_data_dir}" 2> /tmp/namecoind.stderr > /tmp/namecoind.stdout
+}
+
+namecoind_stop()
+{
+ echo "Stopping namecoind:"
+ pid=$(check_pidfile "${pidfile}" "${procname}")
+ if [ -z "${pid}" ]
+ then
+ echo "Namecoind is not running"
+ return 1
+ else
+ ${cli_command} -conf="${namecoind_config_file}" -datadir="${namecoind_data_dir}" stop
+ fi
+}
+
+namecoind_wait()
+{
+ local n=60
+ echo "Waiting for namecoind shutdown:"
+ while :
+ do
+ printf '.'
+ pid=$(check_pidfile "${pidfile}" "${procname}")
+ if [ -z "${pid}" ]
+ then
+ printf '\n'
+ break
+ fi
+ sleep 1
+ n=$((${n} - 1))
+ if [ ${n} -eq 0 -a -f "${pidfile}" ]
+ then
+ printf "\nForce shutdown"
+ kill -9 $(cat "${pidfile}")
+ for n in 1 2 3
+ do
+ printf '.'
+ sleep 1
+ done
+ printf '\n'
+ break
+ fi
+ done
+ rm -f "${pidfile}"
+ echo "Shutdown complete"
+}
+
+run_rc_command "$1"
Added: head/net-p2p/namecoin/files/patch-src_miner.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net-p2p/namecoin/files/patch-src_miner.h Mon Sep 3 18:39:51 2018 (r478891)
@@ -0,0 +1,20 @@
+--- src/miner.h.orig 2017-02-05 10:17:27 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();
Added: head/net-p2p/namecoin/files/patch-src_txmempool.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net-p2p/namecoin/files/patch-src_txmempool.h Mon Sep 3 18:39:51 2018 (r478891)
@@ -0,0 +1,47 @@
+--- src/txmempool.h.orig 2017-02-05 10:17:27 UTC
++++ src/txmempool.h
+@@ -255,7 +255,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);
+@@ -277,7 +277,7 @@ 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();
+@@ -292,7 +292,7 @@ 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();
+@@ -306,7 +306,7 @@ 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();
+ }
+@@ -315,7 +315,7 @@ 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();
Modified: head/net-p2p/namecoin/pkg-descr
==============================================================================
--- head/net-p2p/namecoin/pkg-descr Mon Sep 3 18:36:32 2018 (r478890)
+++ head/net-p2p/namecoin/pkg-descr Mon Sep 3 18:39:51 2018 (r478891)
@@ -12,4 +12,4 @@ It allows you to:
To register a name, you must own some namecoins (NMC, the internal
cryptocurrency used by the software).
-WWW: http://namecoin.info/
+WWW: https://namecoin.org/
More information about the svn-ports-head
mailing list