aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net-p2p/namecoin-daemon/Makefile24
-rw-r--r--net-p2p/namecoin/Makefile158
-rw-r--r--net-p2p/namecoin/distinfo7
-rw-r--r--net-p2p/namecoin/files/makefile.unix76
-rw-r--r--net-p2p/namecoin/files/namecoind.in173
-rw-r--r--net-p2p/namecoin/files/patch-src__main.h10
-rw-r--r--net-p2p/namecoin/files/patch-src__qt__configurenamedialog.h12
-rw-r--r--net-p2p/namecoin/files/patch-src__qt__managenamespage.h12
-rw-r--r--net-p2p/namecoin/files/patch-src__strlcpy.h23
-rw-r--r--net-p2p/namecoin/files/patch-src_miner.h20
-rw-r--r--net-p2p/namecoin/files/patch-src_txmempool.h47
-rw-r--r--net-p2p/namecoin/pkg-descr2
12 files changed, 354 insertions, 210 deletions
diff --git a/net-p2p/namecoin-daemon/Makefile b/net-p2p/namecoin-daemon/Makefile
index 3ece9bcc3f36..f79bb5e968d5 100644
--- a/net-p2p/namecoin-daemon/Makefile
+++ b/net-p2p/namecoin-daemon/Makefile
@@ -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"
diff --git a/net-p2p/namecoin/Makefile b/net-p2p/namecoin/Makefile
index 94e87476270a..8a328cead214 100644
--- a/net-p2p/namecoin/Makefile
+++ b/net-p2p/namecoin/Makefile
@@ -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@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
-
-QRCODES_DESC= QR code display support
+USES= autoreconf compiler:c++11-lib gmake libtool pkgconfig shebangfix ssl
+SHEBANG_FILES= src/test/*.py
+GNU_CONFIGURE= yes
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
-
-CXXFLAGS+= -I${LOCALBASE}/include -I${BDB_INCLUDE_DIR}
-CXXFLAGS+= -L${LOCALBASE}/lib -L${BDB_LIB_DIR}
-CXXFLAGS+= -DCRYPTOPP_DISABLE_ASM
-
-.include <bsd.port.options.mk>
+SLAVE_PORT?= no
-.if ${PORT_OPTIONS:MX11}
-USE_QT= corelib network gui qmake_build linguist_build uic_build moc_build rcc_build
+.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
-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
+
+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
-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/
.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>
diff --git a/net-p2p/namecoin/distinfo b/net-p2p/namecoin/distinfo
index 4e663908fe4b..734bb1e56bbd 100644
--- a/net-p2p/namecoin/distinfo
+++ b/net-p2p/namecoin/distinfo
@@ -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
diff --git a/net-p2p/namecoin/files/makefile.unix b/net-p2p/namecoin/files/makefile.unix
deleted file mode 100644
index fcd9f2fd6a83..000000000000
--- a/net-p2p/namecoin/files/makefile.unix
+++ /dev/null
@@ -1,76 +0,0 @@
-CXX?=g++
-DEFS=-DNOPCH -DFOURWAYSSE2 -DUSE_SSL
-
-LIBS= \
- -Wl,-Bstatic \
- -l boost_system \
- -l boost_filesystem \
- -l boost_program_options \
- -l boost_thread \
- -l boost_chrono \
- -l db_cxx \
- -l ssl \
- -l crypto
-
-USE_UPNP:=0
-ifneq (${USE_UPNP}, -)
- LIBS += -l miniupnpc
- DEFS += -DUSE_UPNP=$(USE_UPNP)
-endif
-
-LIBS+= \
- -Wl,-Bdynamic \
- -l gthread-2.0 \
- -l z \
- -l pthread
-
-CXXFLAGS+=-O2 -Wno-invalid-offsetof -Wformat $(DEFS)
-HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
- script.h allocators.h db.h walletdb.h crypter.h net.h irc.h keystore.h main.h \
- wallet.h bitcoinrpc.h uibase.h ui.h noui.h init.h auxpow.h
-
-BASE_OBJS= \
- obj/auxpow.o \
- obj/util.o \
- obj/key.o \
- obj/script.o \
- obj/db.o \
- obj/walletdb.o \
- obj/crypter.o \
- obj/net.o \
- obj/irc.o \
- obj/keystore.o \
- obj/main.o \
- obj/wallet.o \
- obj/bitcoinrpc.o \
- obj/init.o \
- cryptopp/obj/sha.o \
- cryptopp/obj/cpu.o
-
-OBJS = \
- $(BASE_OBJS) \
- obj/hook.o
-
-all: namecoind
-
-cryptopp/obj/%.o: cryptopp/%.cpp
- $(CXX) -c $(CXXFLAGS) -O3 -o $@ $<
-
-obj/nogui/%.o: %.cpp $(HEADERS)
- $(CXX) -c $(CXXFLAGS) -o $@ $<
-
-obj/test/%.o: test/%.cpp $(HEADERS)
- $(CXX) -c $(CFLAGS) -o $@ $<
-
-obj/nogui/namecoin.o: namecoin.h
-
-namecoind: $(BASE_OBJS:obj/%=obj/nogui/%) obj/nogui/namecoin.o
- $(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
-
-clean:
- -rm -f namecoin namecoind
- -rm -f obj/*.o
- -rm -f obj/nogui/*.o
- -rm -f obj/test/*.o
- -rm -f cryptopp/obj/*.o
- -rm -f headers.h.gch
diff --git a/net-p2p/namecoin/files/namecoind.in b/net-p2p/namecoin/files/namecoind.in
new file mode 100644
index 000000000000..5d81e07b371c
--- /dev/null
+++ b/net-p2p/namecoin/files/namecoind.in
@@ -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"
diff --git a/net-p2p/namecoin/files/patch-src__main.h b/net-p2p/namecoin/files/patch-src__main.h
deleted file mode 100644
index 9abd575cb34a..000000000000
--- a/net-p2p/namecoin/files/patch-src__main.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/main.h.orig 2014-12-18 14:47:02 UTC
-+++ src/main.h
-@@ -17,7 +17,6 @@
- #ifdef __WXMSW__
- #include <io.h> /* for _commit */
- #elif !defined(MAC_OSX)
--#include <sys/prctl.h>
- #endif
-
- class CBlock;
diff --git a/net-p2p/namecoin/files/patch-src__qt__configurenamedialog.h b/net-p2p/namecoin/files/patch-src__qt__configurenamedialog.h
deleted file mode 100644
index 5bb77e1af82a..000000000000
--- a/net-p2p/namecoin/files/patch-src__qt__configurenamedialog.h
+++ /dev/null
@@ -1,12 +0,0 @@
---- src/qt/configurenamedialog.h.orig 2014-12-18 14:47:02 UTC
-+++ src/qt/configurenamedialog.h
-@@ -1,6 +1,9 @@
- #ifndef CONFIGURENAMEDIALOG_H
- #define CONFIGURENAMEDIALOG_H
-
-+#include <sys/socket.h>
-+#include <netinet/in.h>
-+
- #include <QDialog>
-
- namespace Ui {
diff --git a/net-p2p/namecoin/files/patch-src__qt__managenamespage.h b/net-p2p/namecoin/files/patch-src__qt__managenamespage.h
deleted file mode 100644
index d37fd4e44275..000000000000
--- a/net-p2p/namecoin/files/patch-src__qt__managenamespage.h
+++ /dev/null
@@ -1,12 +0,0 @@
---- src/qt/managenamespage.h.orig 2014-12-18 14:47:02 UTC
-+++ src/qt/managenamespage.h
-@@ -1,6 +1,9 @@
- #ifndef MANAGENAMESPAGE_H
- #define MANAGENAMESPAGE_H
-
-+#include <sys/socket.h>
-+#include <netinet/in.h>
-+
- #include <QDialog>
- #include <QSortFilterProxyModel>
-
diff --git a/net-p2p/namecoin/files/patch-src__strlcpy.h b/net-p2p/namecoin/files/patch-src__strlcpy.h
deleted file mode 100644
index 9ad0cddbb5d6..000000000000
--- a/net-p2p/namecoin/files/patch-src__strlcpy.h
+++ /dev/null
@@ -1,23 +0,0 @@
---- net-p2p/namecoin/files/patch-src__strlcpy.h (revision 0)
-+++ net-p2p/namecoin/files/patch-src__strlcpy.h (working copy)
-@@ -0,0 +1,20 @@
-+--- src/strlcpy.h.orig 2015-08-24 00:28:33 UTC
-++++ src/strlcpy.h
-+@@ -15,6 +15,10 @@
-+ */
-+ #ifndef BITCOIN_STRLCPY_H
-+ #define BITCOIN_STRLCPY_H
-++
-++#if defined(__FreeBSD__) && (__FreeBSD_version >= 330000)
-++#include <string.h>
-++#else
-+ /*
-+ * Copy src to string dst of size siz. At most siz-1 characters
-+ * will be copied. Always NUL terminates (unless siz == 0).
-+@@ -83,4 +87,6 @@ inline size_t strlcat(char *dst, const c
-+
-+ return(dlen + (s - src)); /* count does not include NUL */
-+ }
-++#endif /* FreeBSD */
-++
-+ #endif
diff --git a/net-p2p/namecoin/files/patch-src_miner.h b/net-p2p/namecoin/files/patch-src_miner.h
new file mode 100644
index 000000000000..aa7c24b5ec17
--- /dev/null
+++ b/net-p2p/namecoin/files/patch-src_miner.h
@@ -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();
diff --git a/net-p2p/namecoin/files/patch-src_txmempool.h b/net-p2p/namecoin/files/patch-src_txmempool.h
new file mode 100644
index 000000000000..ffa1e51d5c47
--- /dev/null
+++ b/net-p2p/namecoin/files/patch-src_txmempool.h
@@ -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();
diff --git a/net-p2p/namecoin/pkg-descr b/net-p2p/namecoin/pkg-descr
index 6ca3713c3518..e2bd459520b6 100644
--- a/net-p2p/namecoin/pkg-descr
+++ b/net-p2p/namecoin/pkg-descr
@@ -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/