pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Update: bitcoin, darkcoin, dogecoin, feathercoin, litecoin, peercoin, primecoin, quarkcoin, zetacoin



Module Name:	pkgsrc-wip
Committed By:	Kethzer Docteur <kethzer.dr%gmail.com@localhost>
Pushed By:	kethzer.dr
Date:		Thu Oct 20 12:58:21 2016 -0400
Changeset:	a54250ae81a4e3cfb6ae127494a9e71ab19608b8

Modified Files:
	bitcoin/MESSAGE
	bitcoin/Makefile
	bitcoin/PLIST
	bitcoin/distinfo
	bitcoin/files/bitcoind.sh
	bitcoin/options.mk
	bitcoin/patches/patch-src_leveldb_port_port__posix.h
	bitcoin/patches/patch-src_netbase.cpp
	darkcoin/Makefile
	darkcoin/PLIST
	darkcoin/distinfo
	darkcoin/options.mk
	darkcoin/patches/patch-src_db.h
	darkcoin/patches/patch-src_netbase.cpp
	darkcoin/patches/patch-src_walletdb.cpp
	dogecoin/MESSAGE
	dogecoin/Makefile
	dogecoin/PLIST
	dogecoin/distinfo
	dogecoin/files/dogecoind.sh
	dogecoin/options.mk
	dogecoin/patches/patch-src_leveldb_port_port__posix.h
	feathercoin/MESSAGE
	feathercoin/Makefile
	feathercoin/PLIST
	feathercoin/distinfo
	feathercoin/files/feathercoind.sh
	feathercoin/options.mk
	feathercoin/patches/patch-feathercoin-qt.pro
	feathercoin/patches/patch-src_db.h
	feathercoin/patches/patch-src_makefile.unix
	feathercoin/patches/patch-src_netbase.cpp
	feathercoin/patches/patch-src_walletdb.cpp
	litecoin/Makefile
	litecoin/PLIST
	litecoin/distinfo
	litecoin/files/litecoind.sh
	litecoin/options.mk
	litecoin/patches/patch-src_db.h
	litecoin/patches/patch-src_netbase.cpp
	litecoin/patches/patch-src_walletdb.cpp
	peercoin/MESSAGE
	peercoin/Makefile
	peercoin/PLIST
	peercoin/distinfo
	peercoin/files/peercoind.sh
	peercoin/options.mk
	peercoin/patches/patch-bitcoin-qt.pro
	peercoin/patches/patch-src_db.h
	peercoin/patches/patch-src_makefile.unix
	peercoin/patches/patch-src_netbase.cpp
	peercoin/patches/patch-src_walletdb.cpp
	primecoin/Makefile
	primecoin/PLIST
	primecoin/distinfo
	primecoin/files/primecoind.sh
	primecoin/options.mk
	primecoin/patches/patch-bitcoin-qt.pro
	primecoin/patches/patch-src_db.h
	primecoin/patches/patch-src_makefile.unix
	primecoin/patches/patch-src_netbase.cpp
	quarkcoin/MESSAGE
	quarkcoin/Makefile
	quarkcoin/PLIST
	quarkcoin/distinfo
	quarkcoin/files/quarkcoind.sh
	quarkcoin/options.mk
	quarkcoin/patches/patch-src_db.h
	quarkcoin/patches/patch-src_netbase.cpp
	zetacoin/MESSAGE
	zetacoin/Makefile
	zetacoin/PLIST
	zetacoin/distinfo
	zetacoin/files/zetacoind.sh
	zetacoin/options.mk
	zetacoin/patches/patch-src_db.h
	zetacoin/patches/patch-src_leveldb_port_port__posix.h
	zetacoin/patches/patch-src_netbase.cpp
	zetacoin/patches/patch-src_walletdb.cpp
Added Files:
	darkcoin/files/dash.conf
	darkcoin/files/dashd.sh
	darkcoin/patches/patch-src_chainparams.cpp
	darkcoin/patches/patch-src_init.cpp
	dogecoin/patches/patch-src_crypto_scrypt-sse2.cpp
	dogecoin/patches/patch-src_crypto_scrypt.cpp
	dogecoin/patches/patch-src_crypto_scrypt.h
	feathercoin/has_binary_operator.hpp
	feathercoin/patches/patch-src_rpcrawtransaction.cpp
	litecoin/patches/patch-src_chainparams.cpp
	litecoin/patches/patch-src_crypto_scrypt-sse2.cpp
	litecoin/patches/patch-src_crypto_scrypt.cpp
	litecoin/patches/patch-src_crypto_scrypt.h
	litecoin/patches/patch-src_utilstrencodings.cpp
	peercoin/patches/patch-src_qt_transactiondesc.cpp
	peercoin/patches/patch-src_serialize.h
	primecoin/patches/patch-src_init.cpp
	primecoin/patches/patch-src_serialize.h
	quarkcoin/patches/patch-src_chainparams.cpp
	zetacoin/patches/patch-src_rpcrawtransaction.cpp
Removed Files:
	bitcoin/patches/patch-bitcoin-qt.pro
	bitcoin/patches/patch-src_db.h
	bitcoin/patches/patch-src_makefile.unix
	darkcoin/files/darkcoin.conf
	darkcoin/files/darkcoind.sh
	darkcoin/patches/patch-bitcoin-qt.pro
	darkcoin/patches/patch-src_makefile.unix
	dogecoin/patches/patch-src_db.h
	dogecoin/patches/patch-src_netbase.cpp
	dogecoin/patches/patch-src_walletdb.cpp
	litecoin/patches/patch-bitcoin-qt.pro
	litecoin/patches/patch-src_makefile.unix
	quarkcoin/patches/patch-quarkcoin-qt.pro
	quarkcoin/patches/patch-src_makefile.unix
	quarkcoin/patches/patch-src_walletdb.cpp

Log Message:
Update: bitcoin, darkcoin, dogecoin, feathercoin, litecoin, peercoin, primecoin, quarkcoin, zetacoin

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=a54250ae81a4e3cfb6ae127494a9e71ab19608b8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 bitcoin/MESSAGE                                    |   2 +-
 bitcoin/Makefile                                   |  89 ++++++--
 bitcoin/PLIST                                      |   7 +-
 bitcoin/distinfo                                   |  15 +-
 bitcoin/files/bitcoind.sh                          |   2 +-
 bitcoin/options.mk                                 |   2 +-
 bitcoin/patches/patch-bitcoin-qt.pro               |  43 ----
 bitcoin/patches/patch-src_db.h                     |  15 --
 .../patches/patch-src_leveldb_port_port__posix.h   |   8 +-
 bitcoin/patches/patch-src_makefile.unix            |  98 ---------
 bitcoin/patches/patch-src_netbase.cpp              |  12 +-
 darkcoin/Makefile                                  |  73 +++++--
 darkcoin/PLIST                                     |  14 +-
 darkcoin/distinfo                                  |  19 +-
 darkcoin/files/darkcoin.conf                       | 111 ----------
 darkcoin/files/darkcoind.sh                        |  27 ---
 darkcoin/files/dash.conf                           | 111 ++++++++++
 darkcoin/files/dashd.sh                            |  27 +++
 darkcoin/options.mk                                |   2 +-
 darkcoin/patches/patch-bitcoin-qt.pro              |  43 ----
 darkcoin/patches/patch-src_chainparams.cpp         |  42 ++++
 darkcoin/patches/patch-src_db.h                    |  14 +-
 darkcoin/patches/patch-src_init.cpp                |  23 +++
 darkcoin/patches/patch-src_makefile.unix           |  71 -------
 darkcoin/patches/patch-src_netbase.cpp             |  16 +-
 darkcoin/patches/patch-src_walletdb.cpp            |  10 +-
 dogecoin/MESSAGE                                   |   2 +-
 dogecoin/Makefile                                  |  20 +-
 dogecoin/PLIST                                     |   2 +-
 dogecoin/distinfo                                  |  16 +-
 dogecoin/files/dogecoind.sh                        |   2 +-
 dogecoin/options.mk                                |  11 +-
 dogecoin/patches/patch-src_crypto_scrypt-sse2.cpp  |  22 ++
 dogecoin/patches/patch-src_crypto_scrypt.cpp       |  48 +++++
 dogecoin/patches/patch-src_crypto_scrypt.h         |  21 ++
 dogecoin/patches/patch-src_db.h                    |  15 --
 .../patches/patch-src_leveldb_port_port__posix.h   |  13 +-
 dogecoin/patches/patch-src_netbase.cpp             |  19 --
 dogecoin/patches/patch-src_walletdb.cpp            |  15 --
 feathercoin/MESSAGE                                |   2 +-
 feathercoin/Makefile                               |  26 ++-
 feathercoin/PLIST                                  |   3 +-
 feathercoin/distinfo                               |  19 +-
 feathercoin/files/feathercoind.sh                  |   2 +-
 feathercoin/has_binary_operator.hpp                | 229 +++++++++++++++++++++
 feathercoin/options.mk                             |   2 +-
 feathercoin/patches/patch-feathercoin-qt.pro       |   8 +-
 feathercoin/patches/patch-src_db.h                 |   4 +-
 feathercoin/patches/patch-src_makefile.unix        |  37 ++--
 feathercoin/patches/patch-src_netbase.cpp          |   4 +-
 .../patches/patch-src_rpcrawtransaction.cpp        |  13 ++
 feathercoin/patches/patch-src_walletdb.cpp         |   2 +-
 litecoin/Makefile                                  |  63 ++++--
 litecoin/PLIST                                     |   8 +-
 litecoin/distinfo                                  |  21 +-
 litecoin/files/litecoind.sh                        |   2 +-
 litecoin/options.mk                                |   2 +-
 litecoin/patches/patch-bitcoin-qt.pro              |  43 ----
 litecoin/patches/patch-src_chainparams.cpp         |  38 ++++
 litecoin/patches/patch-src_crypto_scrypt-sse2.cpp  |  22 ++
 litecoin/patches/patch-src_crypto_scrypt.cpp       |  48 +++++
 litecoin/patches/patch-src_crypto_scrypt.h         |  21 ++
 litecoin/patches/patch-src_db.h                    |  16 +-
 litecoin/patches/patch-src_makefile.unix           |  69 -------
 litecoin/patches/patch-src_netbase.cpp             |  16 +-
 litecoin/patches/patch-src_utilstrencodings.cpp    |  16 ++
 litecoin/patches/patch-src_walletdb.cpp            |  10 +-
 peercoin/MESSAGE                                   |   2 +-
 peercoin/Makefile                                  |  30 ++-
 peercoin/PLIST                                     |   2 +-
 peercoin/distinfo                                  |  20 +-
 peercoin/files/peercoind.sh                        |   2 +-
 peercoin/options.mk                                |   2 +-
 peercoin/patches/patch-bitcoin-qt.pro              |   4 +-
 peercoin/patches/patch-src_db.h                    |   4 +-
 peercoin/patches/patch-src_makefile.unix           |   6 +-
 peercoin/patches/patch-src_netbase.cpp             |   4 +-
 peercoin/patches/patch-src_qt_transactiondesc.cpp  |  13 ++
 peercoin/patches/patch-src_serialize.h             |  23 +++
 peercoin/patches/patch-src_walletdb.cpp            |   2 +-
 primecoin/Makefile                                 |   6 +-
 primecoin/PLIST                                    |   3 +-
 primecoin/distinfo                                 |   4 +-
 primecoin/files/primecoind.sh                      |   2 +-
 primecoin/options.mk                               |   2 +-
 primecoin/patches/patch-bitcoin-qt.pro             |   2 +-
 primecoin/patches/patch-src_db.h                   |   2 +-
 primecoin/patches/patch-src_init.cpp               |  13 ++
 primecoin/patches/patch-src_makefile.unix          |   2 +-
 primecoin/patches/patch-src_netbase.cpp            |   2 +-
 primecoin/patches/patch-src_serialize.h            |  24 +++
 quarkcoin/MESSAGE                                  |   2 +-
 quarkcoin/Makefile                                 |  51 +++--
 quarkcoin/PLIST                                    |   4 +-
 quarkcoin/distinfo                                 |  16 +-
 quarkcoin/files/quarkcoind.sh                      |   2 +-
 quarkcoin/options.mk                               |   2 +-
 quarkcoin/patches/patch-quarkcoin-qt.pro           |  43 ----
 quarkcoin/patches/patch-src_chainparams.cpp        |  38 ++++
 quarkcoin/patches/patch-src_db.h                   |  12 +-
 quarkcoin/patches/patch-src_makefile.unix          |  84 --------
 quarkcoin/patches/patch-src_netbase.cpp            |  14 +-
 quarkcoin/patches/patch-src_walletdb.cpp           |  17 --
 zetacoin/MESSAGE                                   |   2 +-
 zetacoin/Makefile                                  |   5 +-
 zetacoin/PLIST                                     |   2 +-
 zetacoin/distinfo                                  |  17 +-
 zetacoin/files/zetacoind.sh                        |   2 +-
 zetacoin/options.mk                                |  11 +-
 zetacoin/patches/patch-src_db.h                    |   4 +-
 .../patches/patch-src_leveldb_port_port__posix.h   |   4 +-
 zetacoin/patches/patch-src_netbase.cpp             |   4 +-
 zetacoin/patches/patch-src_rpcrawtransaction.cpp   |  13 ++
 zetacoin/patches/patch-src_walletdb.cpp            |   4 +-
 114 files changed, 1328 insertions(+), 1049 deletions(-)

diffs:
diff --git a/bitcoin/MESSAGE b/bitcoin/MESSAGE
index 9bc4df0..1d1fbf4 100644
--- a/bitcoin/MESSAGE
+++ b/bitcoin/MESSAGE
@@ -1,5 +1,5 @@
 ===========================================================================
-$NetBSD: MESSAGE,v 1.1 2013/12/22 22:25:59 noud4 Exp $
+$NetBSD$
 
 To use bitcoind, you must set a rpcpassword in the configuration file:
 ${PKG_SYSCONFDIR}/bitcoin.conf
diff --git a/bitcoin/Makefile b/bitcoin/Makefile
index 17403e6..8b94454 100644
--- a/bitcoin/Makefile
+++ b/bitcoin/Makefile
@@ -1,10 +1,12 @@
-# $NetBSD: Makefile,v 1.10 2014/10/21 11:32:02 noud4 Exp $
+# $NetBSD$
 
-DISTNAME=	bitcoin-0.8.6-linux
-PKGREVISION=	2
-PKGNAME=	${DISTNAME:S|-linux||}
+DISTNAME=       bitcoin-0.11.2
+PKGREVISION=    rc1
+PKGNAME=        ${DISTNAME}
 CATEGORIES=	finance
-MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=bitcoin/}
+MASTER_SITES=   ${MASTER_SITE_GITHUB:=bitcoin/}
+GITHUB_TAG=     v${PKGVERSION_NOREV}
+
 
 MAINTAINER=	noud4%users.sourceforge.net@localhost
 HOMEPAGE=	http://bitcoin.sourceforge.net/
@@ -12,12 +14,30 @@ COMMENT=	P2P electronic cash system
 LICENSE=	mit
 
 USE_LIBTOOL=	yes
-USE_TOOLS+=	gmake pkg-config
-USE_LANGUAGES=	c++
-WRKSRC=		${WRKDIR}/${DISTNAME}/src
-AUTO_MKDIRS=	yes	# XXX
+USE_TOOLS+=	gmake pkg-config autoconf aclocal autoheader automake libtoolize
+USE_LANGUAGES=	c c++
+WRKSRC=		${WRKDIR}/${DISTNAME}
+AUTO_MKDIRS=	yes
+HAS_CONFIGURE=	yes
+GNU_CONFIGURE=  yes
+
+CXXFLAGS+=	-std=c++0x -I${BUILDLINK_PREFIX.boost-libs}/include/boost
+CXXFLAGS+=	-Wl,-R${BUILDLINK_PREFIX.boost-libs}/lib/bitcoin -L${BUILDLINK_PREFIX.boost-libs}/lib/bitcoin
+CFLAGS+=        -fPIC -Wl,-R${BUILDLINK_PREFIX.boost-libs}/lib/bitcoin -L${BUILDLINK_PREFIX.boost-libs}/lib/bitcoin
+BOOST_LDFLAGS=  -L${BUILDLINK_PREFIX.boost-libs}/lib
+BOOST_CPPFLAGS= -I${BUILDLINK_PREFIX.boost-libs}/include
+
+BUILDLINK_TRANSFORM+=   l:db_cxx:db4_cxx
 
-CXXFLAGS+=	-std=c++0x
+CPPFLAGS+=-I${BUILDLINK_PREFIX.boost-headers}/include/boost, -Wl,-R${BUILDLINK_PREFIX.boost-libs}/lib/bitcoin
+CPPFLAGS+=-L${BUILDLINK_PREFIX.boost-libs}/lib/bitcoin
+CONFIGURE_ARGS+=  --with-boost=${BUILDLINK_PREFIX.boost-libs}
+#CONFIGURE_ARGS+=  --with-boost=${PREFIX}/include/boost
+#CONFIGURE_ARGS+=  --with-boost-libdir=${PREFIX}/lib
+CONFIGURE_ARGS+=  --enable-hardening
+CONFIGURE_ARGS+=  ${PREFIX}/include/db4
+
+LIBTOOLIZE=     ${PREFIX}/bin/libtoolize
 
 QMAKE_OPTIONS+=	BOOST_INCLUDE_PATH=${PREFIX}/include/boost
 QMAKE_OPTIONS+=	BDB_INCLUDE_PATH=${PREFIX}/include/db4
@@ -36,23 +56,48 @@ CONF_FILES_PERMS=	${EGDIR}/bitcoin.conf ${PKG_SYSCONFDIR}/bitcoin.conf ${ROOT_US
 
 SUBST_CLASSES+= 	pkg
 SUBST_STAGE.pkg= 	post-patch
-SUBST_FILES.pkg+=	contrib/debian/bitcoin-qt.desktop
+#SUBST_FILES.pkg+=	contrib/debian/bitcoin-qt.desktop
 SUBST_SED.pkg=		-e "s|/usr/|${PREFIX}/|g"
 SUBST_MESSAGE.pkg=	"Fixing dirs."
 
-do-configure:
-	(cd ${WRKSRC} && env ${CONFIGURE_ENV} ${QTDIR}/bin/qmake "PREFIX=${PREFIX}" "QMAKE_CXXFLAGS=${CXXFLAGS}" ${QMAKE_OPTIONS} bitcoin-qt.pro)
-
-do-build:
-	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${QMAKE_OPTIONS} ${GMAKE};	\
-	cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} CFLAGS+=-Iobj ${QMAKE_OPTIONS} ${GMAKE} -f makefile.unix
+pre-configure:
+#	cd ${WRKDIR}/${DISTNAME}/src && \
+#	${SETENV} ${CONFIGURE_ENV} ${CONFIG_SHELL} ../autogen.sh;
+#	cd ${WRKDIR}/${DISTNAME}/src;             \
+#	${SETENV} ${CONFIGURE_ENV} ${CONFIG_SHELL} ../configure;
+	cd ${WRKSRC};             \
+        ${LIBTOOLIZE} --force;    \
+        ${PREFIX}/bin/aclocal;    \
+        ${PREFIX}/bin/autoheader; \
+        ${PREFIX}/bin/automake -a --foreign -i  --add-missing; \
+        ${PREFIX}/bin/autoconf; \
+        ${PREFIX}/bin/autoreconf -i
 
+#do-configure:
+#	(cd ${WRKSRC} && env ${CONFIGURE_ENV} ${QTDIR}/bin/qmake "PREFIX=${PREFIX}" "QMAKE_CXXFLAGS=${CXXFLAGS}" ${QMAKE_OPTIONS} bitcoin-qt.pro)
+#
+#do-build:
+#	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${QMAKE_OPTIONS} ${GMAKE};	\
+#	cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} CFLAGS+=-Iobj ${QMAKE_OPTIONS} ${GMAKE} -f makefile.unix
+#
+#do-install:
+#	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/bin
+#	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/sbin
+#	${INSTALL_PROGRAM} ${WRKSRC}/bitcoin-qt ${DESTDIR}${PREFIX}/bin
+#	${INSTALL_PROGRAM} ${WRKSRC}/src/bitcoind ${DESTDIR}${PREFIX}/sbin
+#	${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR}
+#	${INSTALL_DATA} -m 600 ${FILESDIR}/bitcoin.conf ${DESTDIR}${EGDIR}
+#	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/pixmaps
+#	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/applications
+#	${INSTALL_DATA} ${WRKSRC}/share/pixmaps/bitcoin128.png ${DESTDIR}${PREFIX}/share/pixmaps
+#	${INSTALL_DATA} ${WRKSRC}/contrib/debian/bitcoin-qt.desktop ${DESTDIR}${PREFIX}/share/applications/
 do-install:
-	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/bin
-	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/sbin
-	${INSTALL_PROGRAM} ${WRKSRC}/bitcoin-qt ${DESTDIR}${PREFIX}/bin
-	${INSTALL_PROGRAM} ${WRKSRC}/src/bitcoind ${DESTDIR}${PREFIX}/sbin
-	${INSTALL_DATA_DIR} ${DESTDIR}${EGDIR}
+#       ${INSTALL_PROGRAM} ${WRKSRC}/bitcoin-qt ${DESTDIR}${PREFIX}/bin
+	${INSTALL_PROGRAM} ${WRKSRC}/src/bitcoin-cli ${DESTDIR}${PREFIX}/bin
+	${INSTALL_PROGRAM} ${WRKSRC}/src/.libs/bitcoind ${DESTDIR}${PREFIX}/sbin
+	${INSTALL_LIB} -m 644 ${WRKSRC}/src/secp256k1/libsecp256k1.la ${DESTDIR}${PREFIX}/lib/bitcoin
+	${INSTALL_LIB} ${WRKSRC}/src/secp256k1/.libs/libsecp256k1.so.0 ${DESTDIR}${PREFIX}/lib/bitcoin
+	${LN} -fs ${DESTDIR}${PREFIX}/lib/bitcoin/libsecp256k1.so.0 ${DESTDIR}${PREFIX}/lib/bitcoin/libsecp256k1.so
 	${INSTALL_DATA} -m 600 ${FILESDIR}/bitcoin.conf ${DESTDIR}${EGDIR}
 	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/pixmaps
 	${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/share/applications
diff --git a/bitcoin/PLIST b/bitcoin/PLIST
index b2dd81b..e58ee0c 100644
--- a/bitcoin/PLIST
+++ b/bitcoin/PLIST
@@ -1,6 +1,9 @@
-@comment $NetBSD: PLIST,v 1.4 2014/10/20 09:49:29 noud4 Exp $
-bin/bitcoin-qt
+@comment $NetBSD$
 sbin/bitcoind
+bin/bitcoin-cli
+lib/bitcoin/libsecp256k1.la
+lib/bitcoin/libsecp256k1.so
+lib/bitcoin/libsecp256k1.so.0
 share/applications/bitcoin-qt.desktop
 share/examples/bitcoin/bitcoin.conf
 share/examples/rc.d/bitcoind
diff --git a/bitcoin/distinfo b/bitcoin/distinfo
index 05e6f7b..b982d61 100644
--- a/bitcoin/distinfo
+++ b/bitcoin/distinfo
@@ -1,10 +1,7 @@
-$NetBSD: distinfo,v 1.3 2013/12/22 03:19:46 noud4 Exp $
+$NetBSD$
 
-SHA1 (bitcoin-0.8.6-linux.tar.gz) = a95b20338a14bb6aa379285828fb0a13b9f6c0e4
-RMD160 (bitcoin-0.8.6-linux.tar.gz) = 7a1e4055a6e77cfaafab2f92ea0400238ea8a256
-Size (bitcoin-0.8.6-linux.tar.gz) = 15531258 bytes
-SHA1 (patch-bitcoin-qt.pro) = 62f7c8e61cc7c85c4f00710319ee5d5ffa795652
-SHA1 (patch-src_db.h) = d7cd7d356ed3a8b3105b105647f089830eefd27f
-SHA1 (patch-src_leveldb_port_port__posix.h) = d483545cd766e60207ac58ac2c5a9b2f48194856
-SHA1 (patch-src_makefile.unix) = 3dc5d36372154f8a3affc1a5b879000fd9ee8cc3
-SHA1 (patch-src_netbase.cpp) = 2aefd38d0bd41f227d278eef310c8c71c044a0a2
+SHA1 (bitcoin-0.11.2.tar.gz) = 1cb785a2dcd4a714159f7fa9f90cc830a93168c3
+RMD160 (bitcoin-0.11.2.tar.gz) = 5f340415560fdd85400afec3d0dc532d5c9f24cb
+Size (bitcoin-0.11.2.tar.gz) = 5955398 bytes
+SHA1 (patch-src_leveldb_port_port__posix.h) = 3830a90f36375c6c4d0412b28553969121efec64
+SHA1 (patch-src_netbase.cpp) = 513f7ad208d3b0d131fe68674ee00b8c94919a05
diff --git a/bitcoin/files/bitcoind.sh b/bitcoin/files/bitcoind.sh
index edbd9ce..9b1eb0a 100644
--- a/bitcoin/files/bitcoind.sh
+++ b/bitcoin/files/bitcoind.sh
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: bitcoind.sh,v 1.2 2013/12/22 22:25:59 noud4 Exp $
+# $NetBSD$
 #
 
 # PROVIDE: bitcoind
diff --git a/bitcoin/options.mk b/bitcoin/options.mk
index 3a50321..1d2a184 100644
--- a/bitcoin/options.mk
+++ b/bitcoin/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.1 2013/12/12 20:45:11 noud4 Exp $
+# $NetBSD$
 
 PKG_OPTIONS_VAR=		PKG_OPTIONS.bitcoin
 PKG_SUPPORTED_OPTIONS+=		miniupnpc dbus qrcode
diff --git a/bitcoin/patches/patch-bitcoin-qt.pro b/bitcoin/patches/patch-bitcoin-qt.pro
deleted file mode 100644
index 9d6ae6f..0000000
--- a/bitcoin/patches/patch-bitcoin-qt.pro
+++ /dev/null
@@ -1,43 +0,0 @@
-$NetBSD: patch-bitcoin-qt.pro,v 1.2 2013/12/21 14:53:09 noud4 Exp $
-
-Use pkgsrc databases/db4.
-
---- bitcoin-qt.pro.orig	2013-12-09 10:20:52.000000000 +0000
-+++ bitcoin-qt.pro
-@@ -353,22 +353,26 @@ isEmpty(BOOST_THREAD_LIB_SUFFIX) {
- 
- isEmpty(BDB_LIB_PATH) {
-     macx:BDB_LIB_PATH = /opt/local/lib/db48
-+    unix:BDB_LIB_PATH = $$PREFIX/lib
- }
- 
- isEmpty(BDB_LIB_SUFFIX) {
--    macx:BDB_LIB_SUFFIX = -4.8
-+    macx|unix:BDB_LIB_SUFFIX = -4.8
- }
- 
- isEmpty(BDB_INCLUDE_PATH) {
-     macx:BDB_INCLUDE_PATH = /opt/local/include/db48
-+    unix:BDB_INCLUDE_PATH = $$PREFIX/include/db4
- }
- 
- isEmpty(BOOST_LIB_PATH) {
-     macx:BOOST_LIB_PATH = /opt/local/lib
-+    unix:BOOST_LIB_PATH = $$PREFIX/lib
- }
- 
- isEmpty(BOOST_INCLUDE_PATH) {
-     macx:BOOST_INCLUDE_PATH = /opt/local/include
-+    unix:BOOST_INCLUDE_PATH = $$PREFIX/include/boost
- }
- 
- win32:DEFINES += WIN32
-@@ -405,7 +419,7 @@ macx:QMAKE_INFO_PLIST = share/qt/Info.pl
- # Set libraries and includes at end, to use platform-defined defaults if not overridden
- INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH
- LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
--LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX
-+LIBS += -lssl -lcrypto -ldb4_cxx$$BDB_LIB_SUFFIX
- # -lgdi32 has to happen after -lcrypto (see  #681)
- win32:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32
- LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX
diff --git a/bitcoin/patches/patch-src_db.h b/bitcoin/patches/patch-src_db.h
deleted file mode 100644
index 4e04e1a..0000000
--- a/bitcoin/patches/patch-src_db.h
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-src_db.h,v 1.1 2013/12/12 20:45:11 noud4 Exp $
-
-Use pkgsrc databases/db4.
-
---- src/db.h.orig	2013-09-12 10:43:31.000000000 +0000
-+++ src/db.h
-@@ -11,7 +11,7 @@
- #include <string>
- #include <vector>
- 
--#include <db_cxx.h>
-+#include <db4/db_cxx.h>
- 
- class CAddress;
- class CAddrMan;
diff --git a/bitcoin/patches/patch-src_leveldb_port_port__posix.h b/bitcoin/patches/patch-src_leveldb_port_port__posix.h
index 811b83f..9d72cd3 100644
--- a/bitcoin/patches/patch-src_leveldb_port_port__posix.h
+++ b/bitcoin/patches/patch-src_leveldb_port_port__posix.h
@@ -1,10 +1,8 @@
-$NetBSD: patch-src_leveldb_port_port__posix.h,v 1.1 2013/12/12 20:45:11 noud4 Exp $
+$NetBSD$
 
-Be nbsd specific.
-
---- src/leveldb/port/port_posix.h.orig	2013-09-12 10:43:31.000000000 +0000
+--- src/leveldb/port/port_posix.h.orig	2015-07-10 17:23:55.000000000 +0000
 +++ src/leveldb/port/port_posix.h
-@@ -50,8 +50,12 @@
+@@ -47,8 +47,12 @@
  #include "port/atomic_pointer.h"
  
  #ifndef PLATFORM_IS_LITTLE_ENDIAN
diff --git a/bitcoin/patches/patch-src_makefile.unix b/bitcoin/patches/patch-src_makefile.unix
deleted file mode 100644
index 1019f79..0000000
--- a/bitcoin/patches/patch-src_makefile.unix
+++ /dev/null
@@ -1,98 +0,0 @@
-$NetBSD: patch-src_makefile.unix,v 1.2 2013/12/21 14:53:09 noud4 Exp $
-
-miniupnp doesn't build at the moment.
-libs.
-
---- src/makefile.unix.orig	2013-12-09 10:20:53.000000000 +0000
-+++ src/makefile.unix
-@@ -5,7 +5,7 @@
- # :=0 --> UPnP support turned off by default at runtime
- # :=1 --> UPnP support turned on by default at runtime
- # :=- --> No UPnP support - miniupnp not required
--USE_UPNP:=0
-+USE_UPNP:=-
- 
- # :=1 --> Enable IPv6 support
- # :=0 --> Disable IPv6 support
-@@ -15,8 +15,8 @@ LINK:=$(CXX)
- 
- DEFS=-DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64
- 
--DEFS += $(addprefix -I,$(CURDIR) $(CURDIR)/obj $(BOOST_INCLUDE_PATH) $(BDB_INCLUDE_PATH) $(OPENSSL_INCLUDE_PATH))
--LIBS = $(addprefix -L,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH))
-+DEFS += $(addprefix -I,$(CURDIR) $(CURDIR)/obj,$(BOOST_INCLUDE_PATH),$(BDB_INCLUDE_PATH),$(OPENSSL_INCLUDE_PATH))
-+LIBS = $(addprefix -L,$(BOOST_LIB_PATH),$(BDB_LIB_PATH),$(OPENSSL_LIB_PATH))
- 
- TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data)
- 
-@@ -33,24 +33,25 @@ endif
- 
- # for boost 1.37, add -mt to the boost libraries
- LIBS += \
-+ -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib \
-  -Wl,-B$(LMODE) \
--   -l boost_system$(BOOST_LIB_SUFFIX) \
--   -l boost_filesystem$(BOOST_LIB_SUFFIX) \
--   -l boost_program_options$(BOOST_LIB_SUFFIX) \
--   -l boost_thread$(BOOST_LIB_SUFFIX) \
--   -l db_cxx$(BDB_LIB_SUFFIX) \
--   -l ssl \
--   -l crypto
-+   -lboost_system$(BOOST_LIB_SUFFIX) \
-+   -lboost_filesystem$(BOOST_LIB_SUFFIX) \
-+   -lboost_program_options$(BOOST_LIB_SUFFIX) \
-+   -lboost_thread$(BOOST_LIB_SUFFIX) \
-+   -ldb4_cxx$(BDB_LIB_SUFFIX) \
-+   -lssl \
-+   -lcrypto
- 
- TESTLIBS += \
-  -Wl,-B$(LMODE) \
--   -l boost_unit_test_framework$(BOOST_LIB_SUFFIX)
-+   -lboost_unit_test_framework$(BOOST_LIB_SUFFIX)
- 
- ifndef USE_UPNP
- 	override USE_UPNP = -
- endif
- ifneq (${USE_UPNP}, -)
--	LIBS += -l miniupnpc
-+	LIBS += -lminiupnpc
- 	DEFS += -DUSE_UPNP=$(USE_UPNP)
- endif
- 
-@@ -59,10 +60,10 @@ ifneq (${USE_IPV6}, -)
- endif
- 
- LIBS+= \
-+ -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib \
-  -Wl,-B$(LMODE2) \
--   -l z \
--   -l dl \
--   -l pthread
-+   -lz \
-+   -lpthread
- 
- 
- # Hardening
-@@ -166,17 +167,19 @@ leveldb/libleveldb.a:
- obj/build.h: FORCE
- 	/bin/sh ../share/genbuild.sh obj/build.h
- version.cpp: obj/build.h
-+ifeq ($(wildcard obj/build.h),)
- DEFS += -DHAVE_BUILD_INFO
-+endif
- 
- obj/%.o: %.cpp
--	$(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
-+	$(CXX) -c $(xCXXFLAGS) -Iobj -MMD -MF $(@:%.o=%.d) -o $@ $<
- 	@cp $(@:%.o=%.d) $(@:%.o=%.P); \
- 	  sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
- 	      -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
- 	  rm -f $(@:%.o=%.d)
- 
- bitcoind: $(OBJS:obj/%=obj/%)
--	$(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS)
-+	$(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS) -Wl,-rpath=$(LIB_RPATH)
- 
- TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp))
- 
diff --git a/bitcoin/patches/patch-src_netbase.cpp b/bitcoin/patches/patch-src_netbase.cpp
index 2798884..f8c449e 100644
--- a/bitcoin/patches/patch-src_netbase.cpp
+++ b/bitcoin/patches/patch-src_netbase.cpp
@@ -1,10 +1,8 @@
-$NetBSD: patch-src_netbase.cpp,v 1.1 2013/12/12 20:45:11 noud4 Exp $
+$NetBSD$
 
-be nbsd specific.
-
---- src/netbase.cpp.orig	2013-09-12 10:43:31.000000000 +0000
+--- src/netbase.cpp.orig	2015-07-10 17:23:55.000000000 +0000
 +++ src/netbase.cpp
-@@ -80,8 +80,12 @@ bool static LookupIntern(const char *psz
+@@ -126,8 +126,12 @@ bool static LookupIntern(const char *psz
  #ifdef WIN32
      aiHint.ai_flags = fAllowLookup ? 0 : AI_NUMERICHOST;
  #else
@@ -14,6 +12,6 @@ be nbsd specific.
      aiHint.ai_flags = fAllowLookup ? AI_ADDRCONFIG : AI_NUMERICHOST;
  #endif
 +#endif
+ 
      struct addrinfo *aiRes = NULL;
-     int nErr = getaddrinfo(pszName, NULL, &aiHint, &aiRes);
-     if (nErr)
+ #ifdef HAVE_GETADDRINFO_A
diff --git a/darkcoin/Makefile b/darkcoin/Makefile
index 0719a65..4e78124 100644
--- a/darkcoin/Makefile
+++ b/darkcoin/Makefile
@@ -1,9 +1,11 @@
-# $NetBSD: Makefile,v 1.1 2014/09/22 11:17:11 othyro Exp $
+# $NetBSD$
 
-DISTNAME=	darkcoin-0.9.12.32
+#DISTNAME=	v0.9.12.32
+DISTNAME=       v0.12.0.55
+#PKGNAME=	darkcoin-${DISTNAME:S/v//1}
+PKGNAME=	dash-${DISTNAME:S/v//1}
 CATEGORIES=	finance
-MASTER_SITES=	${MASTER_SITE_GITHUB:=darkcoinproject/}
-GITHUB_TAG=	v${PKGVERSION_NOREV}
+MASTER_SITES=	https://github.com/darkcoinproject/darkcoin/archive/
 
 MAINTAINER=	pkgsrc-users%users.sourceforge.net@localhost
 HOMEPAGE=	http://www.darkcoin.io/
@@ -11,12 +13,22 @@ COMMENT=	Secure, decentralized, and anonymous digital currency
 LICENSE=	mit
 
 USE_LIBTOOL=	yes
-USE_TOOLS+=	gmake pkg-config
+USE_TOOLS+=	gmake pkg-config autoconf aclocal autoheader automake libtoolize
 USE_LANGUAGES=	c c++
 WRKSRC=		${WRKDIR}/${PKGNAME_NOREV}
 AUTO_MKDIRS=	yes
+HAS_CONFIGURE=  yes
+GNU_CONFIGURE=  yes
 
-CXXFLAGS+=	-std=c++0x
+#CXXFLAGS+=	-std=c++0x
+CXXFLAGS+=      -Wl,-R${BUILDLINK_PREFIX.boost-libs}/lib/dash -L${BUILDLINK_PREFIX.boost-libs}/lib/dash
+CXXFLAGS+=      -I${BUILDLINK_PREFIX.boost-libs}/include/boost
+CFLAGS+=                -fPIC
+BUILDLINK_TRANSFORM+=   l:db_cxx:db4_cxx
+
+CONFIGURE_ARGS+=  --with-boost=${BUILDLINK_PREFIX.boost-libs}
+CONFIGURE_ARGS+=  --enable-hardening
+CONFIGURE_ARGS+=  ${PREFIX}/include/db4
 
 QMAKE_OPTIONS+=	BOOST_INCLUDE_PATH=${PREFIX}/include/boost
 QMAKE_OPTIONS+=	BDB_INCLUDE_PATH=${PREFIX}/include/db4
@@ -27,24 +39,43 @@ QMAKE_OPTIONS+=	BDB_LIB_PATH=${PREFIX}/lib
 QMAKE_OPTIONS+=	OPENSSL_LIB_PATH=${PREFIX}/lib
 QMAKE_OPTIONS+=	LIB_RPATH=${PREFIX}/lib
 
-RCD_SCRIPTS=	darkcoind
-OWN_DIRS=	${VARBASE}/darkcoin
-EGDIR=		${PREFIX}/share/examples/darkcoin
-CONF_FILES=	${EGDIR}/darkcoin.conf ${PKG_SYSCONFDIR}/darkcoin.conf
-CONF_FILES_PERMS=	${EGDIR}/darkcoin.conf ${PKG_SYSCONFDIR}/darkcoin.conf ${ROOT_USER} ${ROOT_GROUP} 0600
-INSTALLATION_DIRS+=	share/examples/darkcoin
-
-do-configure:
-	(cd ${WRKSRC} && env ${CONFIGURE_ENV} ${QTDIR}/bin/qmake "PREFIX=${PREFIX}" "QMAKE_CXXFLAGS=${CXXFLAGS}" ${QMAKE_OPTIONS} bitcoin-qt.pro)
+RCD_SCRIPTS=	dashd
+OWN_DIRS=	${VARBASE}/dash
+EGDIR=		${PREFIX}/share/examples/dash
+CONF_FILES=	${EGDIR}/dash.conf ${PKG_SYSCONFDIR}/dash.conf
+CONF_FILES_PERMS=	${EGDIR}/dash.conf ${PKG_SYSCONFDIR}/dash.conf ${ROOT_USER} ${ROOT_GROUP} 0600
+INSTALLATION_DIRS+=	share/examples/dash
 
-do-build:
-	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${QMAKE_OPTIONS} ${GMAKE};	\
-	cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} CFLAGS+=-Iobj ${QMAKE_OPTIONS} ${GMAKE} -f makefile.unix
+pre-configure:
+	cd ${WRKSRC};             \
+        ${LIBTOOLIZE} --force;    \
+        ${PREFIX}/bin/aclocal;    \
+        ${PREFIX}/bin/autoheader; \
+        ${PREFIX}/bin/automake -a --foreign -i  --add-missing; \
+        ${PREFIX}/bin/autoconf; \
+        ${PREFIX}/bin/autoreconf -i
 
+#do-configure:
+#	(cd ${WRKSRC} && env ${CONFIGURE_ENV} ${QTDIR}/bin/qmake "PREFIX=${PREFIX}" "QMAKE_CXXFLAGS=${CXXFLAGS}" ${QMAKE_OPTIONS} bitcoin-qt.pro)
+#
+#do-build:
+#	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${QMAKE_OPTIONS} ${GMAKE};	\
+#	cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} CFLAGS+=-Iobj ${QMAKE_OPTIONS} ${GMAKE} -f makefile.unix
+#
+#do-install:
+#	${INSTALL_PROGRAM} ${WRKSRC}/darkcoin-qt ${DESTDIR}${PREFIX}/bin
+#	${INSTALL_PROGRAM} ${WRKSRC}/src/darkcoind ${DESTDIR}${PREFIX}/sbin
+#	${INSTALL_DATA} -m 600 ${FILESDIR}/darkcoin.conf ${DESTDIR}${EGDIR}
+#
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/darkcoin-qt ${DESTDIR}${PREFIX}/bin
-	${INSTALL_PROGRAM} ${WRKSRC}/src/darkcoind ${DESTDIR}${PREFIX}/sbin
-	${INSTALL_DATA} -m 600 ${FILESDIR}/darkcoin.conf ${DESTDIR}${EGDIR}
+	${INSTALL_PROGRAM} ${WRKSRC}/src/.libs/dashd ${DESTDIR}${PREFIX}/sbin/dashd
+	${INSTALL_PROGRAM} ${WRKSRC}/src/.libs/dash-tx ${DESTDIR}${PREFIX}/bin/dash-tx
+	${INSTALL_PROGRAM} ${WRKSRC}/src/dash-cli ${DESTDIR}${PREFIX}/bin/dash-cli
+	${INSTALL_LIB} -m 644 ${WRKSRC}/src/secp256k1/libsecp256k1.la ${DESTDIR}${PREFIX}/lib/dash
+	${INSTALL_LIB} ${WRKSRC}/src/secp256k1/.libs/libsecp256k1.so.0 ${DESTDIR}${PREFIX}/lib/dash
+	${LN} -fs ${DESTDIR}${PREFIX}/lib/dash/libsecp256k1.so.0 ${DESTDIR}${PREFIX}/lib/dash/libsecp256k1.so
+	${INSTALL_DATA} -m 600 ${FILESDIR}/dash.conf ${DESTDIR}${EGDIR}
+
 
 .include "options.mk"
 
diff --git a/darkcoin/PLIST b/darkcoin/PLIST
index 4d22c3b..84a9a27 100644
--- a/darkcoin/PLIST
+++ b/darkcoin/PLIST
@@ -1,5 +1,9 @@
-@comment $NetBSD: PLIST,v 1.1 2014/09/22 11:17:11 othyro Exp $
-bin/darkcoin-qt
-sbin/darkcoind
-share/examples/darkcoin/darkcoin.conf
-share/examples/rc.d/darkcoind
+@comment $NetBSD$
+lib/dash/libsecp256k1.la
+lib/dash/libsecp256k1.so
+lib/dash/libsecp256k1.so.0
+bin/dash-tx
+bin/dash-cli
+sbin/dashd
+share/examples/dash/dash.conf
+share/examples/rc.d/dashd
diff --git a/darkcoin/distinfo b/darkcoin/distinfo
index 5d2b9ca..e563e36 100644
--- a/darkcoin/distinfo
+++ b/darkcoin/distinfo
@@ -1,11 +1,10 @@
-$NetBSD: distinfo,v 1.1 2014/09/22 11:17:11 othyro Exp $
+$NetBSD$
 
-SHA1 (darkcoin-0.9.12.32.tar.gz) = 7de52ecd8ae24a2f3552eb27a9c9a69887bc9274
-RMD160 (darkcoin-0.9.12.32.tar.gz) = 6528abbbfd3e737f20cd9444fb91216cbd12a63d
-SHA512 (darkcoin-0.9.12.32.tar.gz) = 001e40d9140d8a96af50d20e03f72607afdd5875dd165c0a2e2ae3b73ff415b180a64511d5599b10082aa8ac8f4be3e214598c64138e9588cf36ca3ebefcf7b0
-Size (darkcoin-0.9.12.32.tar.gz) = 2774229 bytes
-SHA1 (patch-bitcoin-qt.pro) = 3b6d692739101e16667103deffa45bed36a0eaaf
-SHA1 (patch-src_db.h) = fffef4f31cd8b68757210062d0a2e78dafa8870a
-SHA1 (patch-src_makefile.unix) = d3f16280a597f288568eb8055cb0b9e898ea5498
-SHA1 (patch-src_netbase.cpp) = fe74d1e96d4ba8da34d6e9639a91de187c468f51
-SHA1 (patch-src_walletdb.cpp) = 43021fe5e90e0700af7a211aa699a9d29188aa01
+SHA1 (v0.12.0.55.tar.gz) = 827bc26d80d2d2c54f3ef00f8653d2d5b47b69d6
+RMD160 (v0.12.0.55.tar.gz) = e59d82d7456976b2f339c68d854e1c318153973b
+Size (v0.12.0.55.tar.gz) = 4175442 bytes
+SHA1 (patch-src_chainparams.cpp) = ca4e007f56359b45e63c29d5c27ccdfe5e3af237
+SHA1 (patch-src_db.h) = a106889a9d395f9bb2eba05ba7580fa3080ad868
+SHA1 (patch-src_init.cpp) = b7d13c7e884cb9f68728889bb4753fec7f83b543
+SHA1 (patch-src_netbase.cpp) = 5d06b13108039f6b93b30721b9d76ed5fee88166
+SHA1 (patch-src_walletdb.cpp) = 02ea08796aea80e550602c616b9fe4ffea86f325
diff --git a/darkcoin/files/darkcoin.conf b/darkcoin/files/darkcoin.conf
deleted file mode 100644
index 8c271c8..0000000
--- a/darkcoin/files/darkcoin.conf
+++ /dev/null
@@ -1,111 +0,0 @@
-# darkcoin.conf configuration file. Lines beginning with # are comments.
-
-
-# Network-related settings:
-
-# Run on the test network instead of the real darkcoin network.
-#testnet=0
-
-# Connect via a socks4 proxy
-#proxy=127.0.0.1:9050
-
-##############################################################
-##            Quick Primer on addnode vs connect            ##
-##  Let's say for instance you use addnode=4.2.2.4          ##
-##  addnode will connect you to and tell you about the      ##
-##    nodes connected to 4.2.2.4.  In addition it will tell ##
-##    the other nodes connected to it that you exist so     ##
-##    they can connect to you.                              ##
-##  connect will not do the above when you 'connect' to it. ##
-##    It will *only* connect you to 4.2.2.4 and no one else.##
-##                                                          ##
-##  So if you're behind a firewall, or have other problems  ##
-##  finding nodes, add some using 'addnode'.                ##
-##                                                          ##
-##  If you want to stay private, use 'connect' to only      ##
-##  connect to "trusted" nodes.                             ##
-##                                                          ##
-##  If you run multiple nodes on a LAN, there's no need for ##
-##  all of them to open lots of connections.  Instead       ##
-##  'connect' them all to one node that is port forwarded   ##
-##  and has lots of connections.                            ##
-##       Thanks goes to [Noodle] on Freenode.               ##
-##############################################################
-
-# Use as many addnode= settings as you like to connect to specific primes
-#addnode=69.164.218.197
-#addnode=10.0.0.2:8333
-
-# ... or use as many connect= settings as you like to connect ONLY
-# to specific primes:
-#connect=69.164.218.197
-#connect=10.0.0.1:8333
-
-
-# Maximum number of inbound+outbound connections.
-#maxconnections=
-
-
-# JSON-RPC options (for controlling a running Darkcoin/darkcoind process)
-
-# server=1 tells Darkcoin-QT to accept JSON-RPC commands.
-#server=0
-
-# You must set rpcuser and rpcpassword to secure the JSON-RPC api
-#rpcuser=Ulysseys
-#rpcpassword=YourSuperGreatPasswordNumber_DO_NOT_USE_THIS_OR_YOU_WILL_GET_ROBBED_385593
-
-# How many seconds darkcoin will wait for a complete RPC HTTP request.
-# after the HTTP connection is established. 
-#rpctimeout=30
-
-# By default, only RPC connections from localhost are allowed.  Specify
-# as many rpcallowip= settings as you like to allow connections from
-# other hosts (and you may use * as a wildcard character).
-# NOTE: opening up the RPC port to hosts outside your local
-# trusted network is NOT RECOMMENDED, because the rpcpassword
-# is transmitted over the network unencrypted.
-#rpcallowip=10.1.1.34
-#rpcallowip=192.168.1.*
-
-# Listen for RPC connections on this TCP port:
-#rpcport=8332
-
-# You can use Darkcoin or darkcoind to send commands to Darkcoin/darkcoind
-# running on another host using this option:
-#rpcconnect=127.0.0.1
-
-# Use Secure Sockets Layer (also known as TLS or HTTPS) to communicate
-# with Darkcoin -server or darkcoind
-#rpcssl=1
-
-# OpenSSL settings used when rpcssl=1
-#rpcsslciphers=TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH
-#rpcsslcertificatechainfile=server.cert
-#rpcsslprivatekeyfile=server.pem
-
-
-# Miscellaneous options
-
-# Set gen=1 to attempt to generate darkcoins
-#gen=0
- 
-# Pre-generate this many public/private key pairs, so wallet backups will be valid for
-# both prior transactions and several dozen future transactions.
-#keypool=100
-
-# Pay an optional transaction fee every time you send darkcoins.  Transactions with fees
-# are more likely than free transactions to be included in generated blocks, so may
-# be validated sooner.
-#paytxfee=0.00
-
-# Allow direct connections for the 'pay via IP address' feature.
-#allowreceivebyip=1
-  
-# User interface options
-
-# Start Darkcoin minimized
-#min=1
-
-# Minimize to the system tray
-#minimizetotray=1
diff --git a/darkcoin/files/darkcoind.sh b/darkcoin/files/darkcoind.sh
deleted file mode 100644
index a04ec0a..0000000
--- a/darkcoin/files/darkcoind.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!@RCD_SCRIPTS_SHELL@
-#
-# $NetBSD: darkcoind.sh,v 1.1 2014/09/22 11:17:11 othyro Exp $
-#
-
-# PROVIDE: darkcoind
-# REQUIRE: DAEMON LOGIN wscons
-# KEYWORD: shutdown
-
-if [ -f /etc/rc.subr ]; then
-	. /etc/rc.subr
-fi
-
-name="darkcoind"
-rcvar=$name
-command="@PREFIX@/sbin/darkcoind"
-pidfile="@VARBASE@/run/darkcoind.pid"
-required_directory="@VARBASE@/darkcoin"
-command_args="-daemon -conf=@PREFIX@/etc/darkcoin.conf -pid=${pidfile} -datadir=${required_directory}"
-
-if [ -f /etc/rc.subr ]; then
-	load_rc_config $name
-	run_rc_command "$1"
-else
-	echo -n " ${name}"
-	${command} ${darkcoin_flags} ${command_args}
-fi
diff --git a/darkcoin/files/dash.conf b/darkcoin/files/dash.conf
new file mode 100644
index 0000000..8c271c8
--- /dev/null
+++ b/darkcoin/files/dash.conf
@@ -0,0 +1,111 @@
+# darkcoin.conf configuration file. Lines beginning with # are comments.
+
+
+# Network-related settings:
+
+# Run on the test network instead of the real darkcoin network.
+#testnet=0
+
+# Connect via a socks4 proxy
+#proxy=127.0.0.1:9050
+
+##############################################################
+##            Quick Primer on addnode vs connect            ##
+##  Let's say for instance you use addnode=4.2.2.4          ##
+##  addnode will connect you to and tell you about the      ##
+##    nodes connected to 4.2.2.4.  In addition it will tell ##
+##    the other nodes connected to it that you exist so     ##
+##    they can connect to you.                              ##
+##  connect will not do the above when you 'connect' to it. ##
+##    It will *only* connect you to 4.2.2.4 and no one else.##
+##                                                          ##
+##  So if you're behind a firewall, or have other problems  ##
+##  finding nodes, add some using 'addnode'.                ##
+##                                                          ##
+##  If you want to stay private, use 'connect' to only      ##
+##  connect to "trusted" nodes.                             ##
+##                                                          ##
+##  If you run multiple nodes on a LAN, there's no need for ##
+##  all of them to open lots of connections.  Instead       ##
+##  'connect' them all to one node that is port forwarded   ##
+##  and has lots of connections.                            ##
+##       Thanks goes to [Noodle] on Freenode.               ##
+##############################################################
+
+# Use as many addnode= settings as you like to connect to specific primes
+#addnode=69.164.218.197
+#addnode=10.0.0.2:8333
+
+# ... or use as many connect= settings as you like to connect ONLY
+# to specific primes:
+#connect=69.164.218.197
+#connect=10.0.0.1:8333
+
+
+# Maximum number of inbound+outbound connections.
+#maxconnections=
+
+
+# JSON-RPC options (for controlling a running Darkcoin/darkcoind process)
+
+# server=1 tells Darkcoin-QT to accept JSON-RPC commands.
+#server=0
+
+# You must set rpcuser and rpcpassword to secure the JSON-RPC api
+#rpcuser=Ulysseys
+#rpcpassword=YourSuperGreatPasswordNumber_DO_NOT_USE_THIS_OR_YOU_WILL_GET_ROBBED_385593
+
+# How many seconds darkcoin will wait for a complete RPC HTTP request.
+# after the HTTP connection is established. 
+#rpctimeout=30
+
+# By default, only RPC connections from localhost are allowed.  Specify
+# as many rpcallowip= settings as you like to allow connections from
+# other hosts (and you may use * as a wildcard character).
+# NOTE: opening up the RPC port to hosts outside your local
+# trusted network is NOT RECOMMENDED, because the rpcpassword
+# is transmitted over the network unencrypted.
+#rpcallowip=10.1.1.34
+#rpcallowip=192.168.1.*
+
+# Listen for RPC connections on this TCP port:
+#rpcport=8332
+
+# You can use Darkcoin or darkcoind to send commands to Darkcoin/darkcoind
+# running on another host using this option:
+#rpcconnect=127.0.0.1
+
+# Use Secure Sockets Layer (also known as TLS or HTTPS) to communicate
+# with Darkcoin -server or darkcoind
+#rpcssl=1
+
+# OpenSSL settings used when rpcssl=1
+#rpcsslciphers=TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH
+#rpcsslcertificatechainfile=server.cert
+#rpcsslprivatekeyfile=server.pem
+
+
+# Miscellaneous options
+
+# Set gen=1 to attempt to generate darkcoins
+#gen=0
+ 
+# Pre-generate this many public/private key pairs, so wallet backups will be valid for
+# both prior transactions and several dozen future transactions.
+#keypool=100
+
+# Pay an optional transaction fee every time you send darkcoins.  Transactions with fees
+# are more likely than free transactions to be included in generated blocks, so may
+# be validated sooner.
+#paytxfee=0.00
+
+# Allow direct connections for the 'pay via IP address' feature.
+#allowreceivebyip=1
+  
+# User interface options
+
+# Start Darkcoin minimized
+#min=1
+
+# Minimize to the system tray
+#minimizetotray=1
diff --git a/darkcoin/files/dashd.sh b/darkcoin/files/dashd.sh
new file mode 100644
index 0000000..e2c5c8d
--- /dev/null
+++ b/darkcoin/files/dashd.sh
@@ -0,0 +1,27 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD$
+#
+
+# PROVIDE: dashd
+# REQUIRE: DAEMON LOGIN wscons
+# KEYWORD: shutdown
+
+if [ -f /etc/rc.subr ]; then
+	. /etc/rc.subr
+fi
+
+name="dashd"
+rcvar=$name
+command="@PREFIX@/sbin/dashd"
+pidfile="@VARBASE@/run/dashd.pid"
+required_directory="@VARBASE@/dash"
+command_args="-daemon -conf=@PREFIX@/etc/dash.conf -pid=${pidfile} -datadir=${required_directory}"
+
+if [ -f /etc/rc.subr ]; then
+	load_rc_config $name
+	run_rc_command "$1"
+else
+	echo -n " ${name}"
+	${command} ${dash_flags} ${command_args}
+fi
diff --git a/darkcoin/options.mk b/darkcoin/options.mk
index 1d3941c..0cbad5d 100644
--- a/darkcoin/options.mk
+++ b/darkcoin/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.1 2014/09/22 11:17:11 othyro Exp $
+# $NetBSD$
 
 PKG_OPTIONS_VAR=		PKG_OPTIONS.darkcoin
 PKG_SUPPORTED_OPTIONS+=		miniupnpc dbus qrcode
diff --git a/darkcoin/patches/patch-bitcoin-qt.pro b/darkcoin/patches/patch-bitcoin-qt.pro
deleted file mode 100644
index a65f2ae..0000000
--- a/darkcoin/patches/patch-bitcoin-qt.pro
+++ /dev/null
@@ -1,43 +0,0 @@
-$NetBSD: patch-bitcoin-qt.pro,v 1.1 2014/09/22 11:17:11 othyro Exp $
-
-Use pkgsrc databases/db4.
-
---- bitcoin-qt.pro.orig	2014-08-21 20:26:09.000000000 +0000
-+++ bitcoin-qt.pro
-@@ -396,22 +396,26 @@ isEmpty(BOOST_THREAD_LIB_SUFFIX) {
- 
- isEmpty(BDB_LIB_PATH) {
-     macx:BDB_LIB_PATH = /usr/local/opt/berkeley-db4/lib
-+    unix:BDB_LIB_PATH = $$PREFIX/lib
- }
- 
- isEmpty(BDB_LIB_SUFFIX) {
--    macx:BDB_LIB_SUFFIX = -4.8
-+    macx|unix:BDB_LIB_SUFFIX = -4.8
- }
- 
- isEmpty(BDB_INCLUDE_PATH) {
-     macx:BDB_INCLUDE_PATH = /usr/local/opt/berkeley-db4/include
-+    unix:BDB_INCLUDE_PATH = $$PREFIX/include/db4
- }
- 
- isEmpty(BOOST_LIB_PATH) {
-     macx:BOOST_LIB_PATH = /usr/local/opt/boost/lib
-+    unix:BOOST_LIB_PATH = $$PREFIX/lib
- }
- 
- isEmpty(BOOST_INCLUDE_PATH) {
-     macx:BOOST_INCLUDE_PATH = /usr/local/opt/boost/include
-+    unix:BOOST_INCLUDE_PATH = $$PREFIX/include/boost
- }
- 
- isEmpty(OPENSSL_LIB_PATH) {
-@@ -456,7 +460,7 @@ macx:QMAKE_INFO_PLIST = share/qt/Info.pl
- # Set libraries and includes at end, to use platform-defined defaults if not overridden
- INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH
- LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
--LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX
-+LIBS += -lssl -lcrypto -ldb4_cxx$$BDB_LIB_SUFFIX
- # -lgdi32 has to happen after -lcrypto (see  #681)
- win32:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32
- LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX
diff --git a/darkcoin/patches/patch-src_chainparams.cpp b/darkcoin/patches/patch-src_chainparams.cpp
new file mode 100644
index 0000000..326c581
--- /dev/null
+++ b/darkcoin/patches/patch-src_chainparams.cpp
@@ -0,0 +1,42 @@
+$NetBSD$
+
+--- src/chainparams.cpp.orig	2015-09-28 15:49:30.000000000 +0000
++++ src/chainparams.cpp
+@@ -165,12 +165,12 @@ public:
+         vSeeds.push_back(CDNSSeedData("masternode.io", "dnsseed.masternode.io"));
+         vSeeds.push_back(CDNSSeedData("dashpay.io", "dnsseed.dashpay.io"));
+ 
+-        base58Prefixes[PUBKEY_ADDRESS] = list_of( 76);                    // Dash addresses start with 'X'
+-        base58Prefixes[SCRIPT_ADDRESS] = list_of( 16);                    // Dash script addresses start with '7'
+-        base58Prefixes[SECRET_KEY] =     list_of(204);                    // Dash private keys start with '7' or 'X'
+-        base58Prefixes[EXT_PUBLIC_KEY] = list_of(0x02)(0xFE)(0x52)(0xF8); // Dash BIP32 pubkeys start with 'drkv'
+-        base58Prefixes[EXT_SECRET_KEY] = list_of(0x02)(0xFE)(0x52)(0xCC); // Dash BIP32 prvkeys start with 'drkp'
+-        base58Prefixes[EXT_COIN_TYPE]  = list_of(0x80000005);             // Dash BIP44 coin type is '5'
++        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1, 76);                    // Dash addresses start with 'X'
++        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1, 16);                    // Dash script addresses start with '7'
++        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1, 204);                    // Dash private keys start with '7' or 'X'
++        base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x02)(0xFE)(0x52)(0xF8).convert_to_container<std::vector<unsigned char> >();
++        base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x02)(0xFE)(0x52)(0xCC).convert_to_container<std::vector<unsigned char> >();
++        base58Prefixes[EXT_COIN_TYPE]  = boost::assign::list_of(0x80000005).convert_to_container<std::vector<unsigned char> >();
+ 
+         convertSeed6(vFixedSeeds, pnSeed6_main, ARRAYLEN(pnSeed6_main));
+ 
+@@ -234,12 +234,12 @@ public:
+         vSeeds.push_back(CDNSSeedData("darkcoin.qa", "testnet-seed.darkcoin.qa"));
+         vSeeds.push_back(CDNSSeedData("masternode.io", "test.dnsseed.masternode.io"));
+ 
+-        base58Prefixes[PUBKEY_ADDRESS] = list_of(139);                    // Testnet dash addresses start with 'x' or 'y'
+-        base58Prefixes[SCRIPT_ADDRESS] = list_of( 19);                    // Testnet dash script addresses start with '8' or '9'
+-        base58Prefixes[SECRET_KEY]     = list_of(239);                    // Testnet private keys start with '9' or 'c' (Bitcoin defaults)
+-        base58Prefixes[EXT_PUBLIC_KEY] = list_of(0x3a)(0x80)(0x61)(0xa0); // Testnet dash BIP32 pubkeys start with 'DRKV'
+-        base58Prefixes[EXT_SECRET_KEY] = list_of(0x3a)(0x80)(0x58)(0x37); // Testnet dash BIP32 prvkeys start with 'DRKP'
+-        base58Prefixes[EXT_COIN_TYPE]  = list_of(0x80000001);             // Testnet dash BIP44 coin type is '5' (All coin's testnet default)
++        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1, 139);                    // Testnet dash addresses start with 'x' or 'y'
++        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1, 19);                    // Testnet dash script addresses start with '8' or '9'
++        base58Prefixes[SECRET_KEY]     = std::vector<unsigned char>(1, 239);                  // Testnet private keys start with '9' or 'c' (Bitcoin defaults)
++        base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x3a)(0x80)(0x61)(0xa0).convert_to_container<std::vector<unsigned char> >();
++        base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x3a)(0x80)(0x58)(0x37).convert_to_container<std::vector<unsigned char> >();
++        base58Prefixes[EXT_COIN_TYPE]  = boost::assign::list_of(0x80000001).convert_to_container<std::vector<unsigned char> >();
+ 
+         convertSeed6(vFixedSeeds, pnSeed6_test, ARRAYLEN(pnSeed6_test));
+ 
diff --git a/darkcoin/patches/patch-src_db.h b/darkcoin/patches/patch-src_db.h
index 280048e..b83fdc3 100644
--- a/darkcoin/patches/patch-src_db.h
+++ b/darkcoin/patches/patch-src_db.h
@@ -1,15 +1,15 @@
-$NetBSD: patch-src_db.h,v 1.1 2014/09/22 11:17:11 othyro Exp $
+$NetBSD$
 
 Use pkgsrc databases/db4.
 
---- src/db.h.orig	2014-08-21 20:26:09.000000000 +0000
+--- src/db.h.orig	2015-09-28 15:49:30.000000000 +0000
 +++ src/db.h
-@@ -11,7 +11,7 @@
- #include <string>
- #include <vector>
+@@ -18,7 +18,7 @@
+ 
+ #include <boost/filesystem/path.hpp>
  
 -#include <db_cxx.h>
 +#include <db4/db_cxx.h>
  
- class CAddress;
- class CAddrMan;
+ class CDiskBlockIndex;
+ class COutPoint;
diff --git a/darkcoin/patches/patch-src_init.cpp b/darkcoin/patches/patch-src_init.cpp
new file mode 100644
index 0000000..49bd12e
--- /dev/null
+++ b/darkcoin/patches/patch-src_init.cpp
@@ -0,0 +1,23 @@
+$NetBSD$
+
+--- src/init.cpp.orig	2015-09-28 15:49:30.000000000 +0000
++++ src/init.cpp
+@@ -914,11 +914,13 @@ bool AppInit2(boost::thread_group& threa
+                 boost::filesystem::path backupFile = backupPathStr + dateTimeStr;
+                 sourceFile.make_preferred();
+                 backupFile.make_preferred();
+-                try {
+-                    boost::filesystem::copy_file(sourceFile, backupFile);
+-                    LogPrintf("Creating backup of %s -> %s\n", sourceFile, backupFile);
+-                } catch(boost::filesystem::filesystem_error &error) {
+-                    LogPrintf("Failed to create backup %s\n", error.what());
++		if(boost::filesystem::exists(sourceFile)) {
++                    try {
++                        boost::filesystem::copy_file(sourceFile, backupFile);
++                        LogPrintf("Creating backup of %s -> %s\n", sourceFile, backupFile);
++                    } catch(boost::filesystem::filesystem_error &error) {
++                        LogPrintf("Failed to create backup %s\n", error.what());
++                    }
+                 }
+                 // Keep only the last 10 backups, including the new one of course
+                 typedef std::multimap<std::time_t, boost::filesystem::path> folder_set_t;
diff --git a/darkcoin/patches/patch-src_makefile.unix b/darkcoin/patches/patch-src_makefile.unix
deleted file mode 100644
index b0d1fd9..0000000
--- a/darkcoin/patches/patch-src_makefile.unix
+++ /dev/null
@@ -1,71 +0,0 @@
-$NetBSD: patch-src_makefile.unix,v 1.1 2014/09/22 11:17:11 othyro Exp $
-
-miniupnp doesn't build at the moment.
-libs.
-
---- src/makefile.unix.orig	2014-08-21 20:26:09.000000000 +0000
-+++ src/makefile.unix
-@@ -5,7 +5,7 @@
- # :=0 --> UPnP support turned off by default at runtime
- # :=1 --> UPnP support turned on by default at runtime
- # :=- --> No UPnP support - miniupnp not required
--USE_UPNP:=0
-+USE_UPNP:=-
- 
- # :=1 --> Enable IPv6 support
- # :=0 --> Disable IPv6 support
-@@ -36,14 +36,15 @@ endif
- 
- # for boost 1.37, add -mt to the boost libraries
- LIBS += \
-+ -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib \
-  -Wl,-B$(LMODE) \
--   -l boost_system$(BOOST_LIB_SUFFIX) \
--   -l boost_filesystem$(BOOST_LIB_SUFFIX) \
--   -l boost_program_options$(BOOST_LIB_SUFFIX) \
--   -l boost_thread$(BOOST_LIB_SUFFIX) \
--   -l db_cxx$(BDB_LIB_SUFFIX) \
--   -l ssl \
--   -l crypto
-+   -lboost_system$(BOOST_LIB_SUFFIX) \
-+   -lboost_filesystem$(BOOST_LIB_SUFFIX) \
-+   -lboost_program_options$(BOOST_LIB_SUFFIX) \
-+   -lboost_thread$(BOOST_LIB_SUFFIX) \
-+   -ldb4_cxx$(BDB_LIB_SUFFIX) \
-+   -lssl \
-+   -lcrypto
- 
- TESTLIBS += \
-  -Wl,-B$(LMODE) \
-@@ -53,7 +54,7 @@ ifndef USE_UPNP
- 	override USE_UPNP = -
- endif
- ifneq (${USE_UPNP}, -)
--	LIBS += -l miniupnpc
-+	LIBS += -lminiupnpc
- 	DEFS += -DUSE_UPNP=$(USE_UPNP)
- endif
- 
-@@ -63,10 +64,10 @@ endif
- 
- LIBS+= \
-  -Wl,-B$(LMODE2) \
--   -l z \
--   -l rt \
--   -l dl \
--   -l pthread
-+   -lz \
-+   -lrt \
-+   ${DL_LIBS} \
-+   -lpthread
- 
- 
- # Hardening
-@@ -194,6 +195,7 @@ obj/%-sse2.o: %-sse2.cpp
- 
- obj/%.o: %.cpp
- 	$(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
-+	$(CXX) -c $(xCXXFLAGS) -Iobj -MMD -MF $(@:%.o=%.d) -o $@ $<
- 	@cp $(@:%.o=%.d) $(@:%.o=%.P); \
- 	  sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
- 	      -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
diff --git a/darkcoin/patches/patch-src_netbase.cpp b/darkcoin/patches/patch-src_netbase.cpp
index dcd012a..b77c6b3 100644
--- a/darkcoin/patches/patch-src_netbase.cpp
+++ b/darkcoin/patches/patch-src_netbase.cpp
@@ -1,15 +1,13 @@
-$NetBSD: patch-src_netbase.cpp,v 1.1 2014/09/22 11:17:11 othyro Exp $
+$NetBSD$
 
-be nbsd specific.
-
---- src/netbase.cpp.orig	2014-08-21 20:26:09.000000000 +0000
+--- src/netbase.cpp.orig	2015-09-28 15:49:30.000000000 +0000
 +++ src/netbase.cpp
-@@ -78,7 +78,7 @@ bool static LookupIntern(const char *psz
- #else
-     aiHint.ai_family = AF_INET;
- #endif
+@@ -124,7 +124,7 @@ bool static LookupIntern(const char *psz
+     aiHint.ai_socktype = SOCK_STREAM;
+     aiHint.ai_protocol = IPPROTO_TCP;
+     aiHint.ai_family = AF_UNSPEC;
 -#ifdef WIN32
-+#if defined(WIN32) || defined(__NetBSD__)
++#ifdef WIN32 || defined(__NetBSD__)
      aiHint.ai_flags = fAllowLookup ? 0 : AI_NUMERICHOST;
  #else
      aiHint.ai_flags = fAllowLookup ? AI_ADDRCONFIG : AI_NUMERICHOST;
diff --git a/darkcoin/patches/patch-src_walletdb.cpp b/darkcoin/patches/patch-src_walletdb.cpp
index 5921826..9ef763f 100644
--- a/darkcoin/patches/patch-src_walletdb.cpp
+++ b/darkcoin/patches/patch-src_walletdb.cpp
@@ -1,8 +1,8 @@
---- src/walletdb.cpp~	2014-06-19 00:51:15.000000000 -0700
-+++ src/walletdb.cpp	2014-08-19 03:50:42.757367359 -0700
---- src/walletdb.cpp.orig	2014-08-21 20:26:09.000000000 +0000
+$NetBSD$
+
+--- src/walletdb.cpp.orig	2015-09-28 15:49:30.000000000 +0000
 +++ src/walletdb.cpp
-@@ -550,11 +550,7 @@ bool BackupWallet(const CWallet& wallet,
+@@ -872,11 +872,7 @@ bool BackupWallet(const CWallet& wallet,
                      pathDest /= wallet.strWalletFile;
  
                  try {
@@ -12,6 +12,6 @@
 -                    filesystem::copy_file(pathSrc, pathDest);
 -#endif
 +                    filesystem::copy(pathSrc, pathDest);
-                     LogPrintf("copied wallet.dat to %s\n", pathDest.string().c_str());
+                     LogPrintf("copied wallet.dat to %s\n", pathDest.string());
                      return true;
                  } catch(const filesystem::filesystem_error &e) {
diff --git a/dogecoin/MESSAGE b/dogecoin/MESSAGE
index 4a670b6..4a71b60 100644
--- a/dogecoin/MESSAGE
+++ b/dogecoin/MESSAGE
@@ -1,5 +1,5 @@
 ===========================================================================
-$NetBSD: MESSAGE,v 1.1 2014/09/22 11:18:54 othyro Exp $
+$NetBSD$
 
 To use dogecoind, you must set a rpcpassword in the configuration file:
 ${PKG_SYSCONFDIR}/dogecoin.conf
diff --git a/dogecoin/Makefile b/dogecoin/Makefile
index b061ca0..39bf5de 100644
--- a/dogecoin/Makefile
+++ b/dogecoin/Makefile
@@ -1,6 +1,8 @@
-# $NetBSD: Makefile,v 1.1 2014/09/22 11:18:54 othyro Exp $
+# $NetBSD$
 
-DISTNAME=	v1.8.0
+#DISTNAME=	v1.8.3
+DISTNAME=       v1.10.0
+PKGREVISION=    RC-1
 PKGNAME=	dogecoin-${DISTNAME:S/v//1}
 CATEGORIES=	finance
 MASTER_SITES=	https://github.com/dogecoin/dogecoin/archive/
@@ -15,8 +17,20 @@ GNU_CONFIGURE=	yes
 USE_LIBTOOL=	yes
 USE_TOOLS+=	aclocal autoconf autoheader automake gmake libtoolize pkg-config
 USE_LANGUAGES=	c c++
+AUTO_MKDIRS=    yes
+HAS_CONFIGURE=  yes
+
 WRKSRC=		${WRKDIR}/${PKGNAME_NOREV}
 #CXXFLAGS+=	-std=c++0x
+CXXFLAGS+=      -DBOOST_VARIANT_USE_RELAXED_GET_BY_DEFAULT=1
+CXXFLAGS+=      -std=c++0x -I${BUILDLINK_PREFIX.boost-libs}/include/boost
+CXXFLAGS+=      -Wl,-R${BUILDLINK_PREFIX.boost-libs}/lib/dogecoin -L${BUILDLINK_PREFIX.boost-libs}/lib/dogecoin
+CFLAGS+=        -fPIC -Wl,-R${BUILDLINK_PREFIX.boost-libs}/lib/dogecoin -L${BUILDLINK_PREFIX.boost-libs}/lib/dogecoin
+BOOST_LDFLAGS=  -L${BUILDLINK_PREFIX.boost-libs}/lib
+BOOST_CPPFLAGS= -I${BUILDLINK_PREFIX.boost-libs}/include
+CPPFLAGS+=-I${BUILDLINK_PREFIX.boost-headers}/include/boost, -Wl,-R${BUILDLINK_PREFIX.boost-libs}/lib/dogecoin
+CPPFLAGS+=-L${BUILDLINK_PREFIX.boost-libs}/lib/dogecoin
+
 LIBTOOLIZE=	${PREFIX}/bin/libtoolize
 
 SUBST_CLASSES+=			autotools
@@ -29,6 +43,7 @@ CONFIGURE_ARGS+=		--enable-hardening --enable-debug
 CONFIGURE_ARGS+=		--with-boost=${BUILDLINK_PREFIX.boost-libs}
 CONFIGURE_ARGS+=		--with-incompatible-bdb
 BUILDLINK_TRANSFORM+=		l:db_cxx:db5_cxx
+CONFIGURE_ARGS+=  		${PREFIX}/include/db5
 INSTALLATION_DIRS+=		bin sbin share/examples/dogecoin
 
 #CHECK_PORTABILITY_SKIP=configure
@@ -60,3 +75,4 @@ post-install:
 .include "../../security/openssl/buildlink3.mk"
 .include "../../mk/dlopen.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
+
diff --git a/dogecoin/PLIST b/dogecoin/PLIST
index b573695..ef252ed 100644
--- a/dogecoin/PLIST
+++ b/dogecoin/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2014/09/22 11:18:54 othyro Exp $
+@comment $NetBSD$
 bin/dogecoin-cli
 ${PLIST.qt}bin/dogecoin-qt
 sbin/dogecoind
diff --git a/dogecoin/distinfo b/dogecoin/distinfo
index 29487a0..4604655 100644
--- a/dogecoin/distinfo
+++ b/dogecoin/distinfo
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.1 2014/09/22 11:18:54 othyro Exp $
+$NetBSD$
 
-SHA1 (dogecoin/v1.8.0.tar.gz) = 06db28717d2c74da576143311c61031f25bc9a78
-RMD160 (dogecoin/v1.8.0.tar.gz) = 202163ca4d272006cedff2c27d1c63a04f1623e2
-Size (dogecoin/v1.8.0.tar.gz) = 8049653 bytes
-SHA1 (patch-src_db.h) = 2ade59e27b6e2a7fee271e5d2846e0b0986c85ec
-SHA1 (patch-src_leveldb_port_port__posix.h) = 7bef0b13dd861ecf0d5514572f97b622f93573fa
-SHA1 (patch-src_netbase.cpp) = 32cd4d131667cf706cafa9808f607cd6f697161e
-SHA1 (patch-src_walletdb.cpp) = c5b0d528a5ec5c9ada13b218139164e76861ba74
+SHA1 (dogecoin-1.10.0nbRC/v1.10.0.tar.gz) = 86900940084a78e731aeae37979913de007225fd
+RMD160 (dogecoin-1.10.0nbRC/v1.10.0.tar.gz) = bbd969f7d8fc5995200408230eeb4bd283cd4811
+Size (dogecoin-1.10.0nbRC/v1.10.0.tar.gz) = 6537704 bytes
+SHA1 (patch-src_crypto_scrypt-sse2.cpp) = 2106a27ec7a9b3fcda9e50dacd049ebdc065034e
+SHA1 (patch-src_crypto_scrypt.cpp) = 66b2531c2a6500ea02cf32ea910605ceb02cfead
+SHA1 (patch-src_crypto_scrypt.h) = 1bea0f186c9465bd467c09756ef6bb815daf6007
+SHA1 (patch-src_leveldb_port_port__posix.h) = 783fecbb583731f96dc261030e48eb499451ab1b
diff --git a/dogecoin/files/dogecoind.sh b/dogecoin/files/dogecoind.sh
index 6b83c1c..000ec57 100644
--- a/dogecoin/files/dogecoind.sh
+++ b/dogecoin/files/dogecoind.sh
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: dogecoind.sh,v 1.1 2014/09/22 11:18:54 othyro Exp $
+# $NetBSD$
 #
 
 # PROVIDE: dogecoind
diff --git a/dogecoin/options.mk b/dogecoin/options.mk
index bb38c6b..4602032 100644
--- a/dogecoin/options.mk
+++ b/dogecoin/options.mk
@@ -1,7 +1,7 @@
-# $NetBSD: options.mk,v 1.1 2014/09/22 11:18:54 othyro Exp $
+# $NetBSD$
 
 PKG_OPTIONS_VAR=	PKG_OPTIONS.dogecoin
-PKG_SUPPORTED_OPTIONS+=	miniupnpc qrcode qt tests
+PKG_SUPPORTED_OPTIONS+=	miniupnpc qrcode qt qtdbus tests
 PKG_SUGGESTED_OPTIONS=	qt # blank
 PLIST_VARS+=		qt tests
 
@@ -24,10 +24,13 @@ QMAKE_OPTIONS+=	USE_QRCODE=1
 QMAKE_OPTIONS+=	USE_IPV6=0
 .endif
 
-.if !empty(PKG_OPTIONS:Mqt)
+.if !empty(PKG_OPTIONS:Mqt) || !empty(PKG_OPTIONS:Mqtdbus)
 PLIST.qt=	yes
 .include "../../x11/qt5-qtbase/buildlink3.mk"
-QMAKE_OPTIONS+=	USE_DBUS=1 # XXX still needed?
+.if !empty(PKG_OPTIONS:Mqtdbus)
+QMAKE_OPTIONS+=	USE_DBUS=1
+.include "../../x11/qt5-dbus/buildlink3.mk"
+.endif
 .endif
 
 .if empty(PKG_OPTIONS:Mqt)
diff --git a/dogecoin/patches/patch-src_crypto_scrypt-sse2.cpp b/dogecoin/patches/patch-src_crypto_scrypt-sse2.cpp
new file mode 100644
index 0000000..a84713f
--- /dev/null
+++ b/dogecoin/patches/patch-src_crypto_scrypt-sse2.cpp
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- src/crypto/scrypt-sse2.cpp.orig	2015-10-31 14:49:41.000000000 +0000
++++ src/crypto/scrypt-sse2.cpp
+@@ -108,7 +108,7 @@ void scrypt_1024_1_1_256_sp_sse2(const c
+ 
+ 	for (k = 0; k < 2; k++) {
+ 		for (i = 0; i < 16; i++) {
+-			X.u32[k * 16 + i] = le32dec(&B[(k * 16 + (i * 5 % 16)) * 4]);
++			X.u32[k * 16 + i] = scrypt_le32dec(&B[(k * 16 + (i * 5 % 16)) * 4]);
+ 		}
+ 	}
+ 
+@@ -128,7 +128,7 @@ void scrypt_1024_1_1_256_sp_sse2(const c
+ 
+ 	for (k = 0; k < 2; k++) {
+ 		for (i = 0; i < 16; i++) {
+-			le32enc(&B[(k * 16 + (i * 5 % 16)) * 4], X.u32[k * 16 + i]);
++			scrypt_le32enc(&B[(k * 16 + (i * 5 % 16)) * 4], X.u32[k * 16 + i]);
+ 		}
+ 	}
+ 
diff --git a/dogecoin/patches/patch-src_crypto_scrypt.cpp b/dogecoin/patches/patch-src_crypto_scrypt.cpp
new file mode 100644
index 0000000..af16c32
--- /dev/null
+++ b/dogecoin/patches/patch-src_crypto_scrypt.cpp
@@ -0,0 +1,48 @@
+$NetBSD$
+
+--- src/crypto/scrypt.cpp.orig	2015-10-31 14:49:41.000000000 +0000
++++ src/crypto/scrypt.cpp
+@@ -44,14 +44,14 @@
+ #endif
+ #endif
+ 
+-static inline uint32_t be32dec(const void *pp)
++static inline uint32_t scrypt_be32dec(const void *pp)
+ {
+ 	const uint8_t *p = (uint8_t const *)pp;
+ 	return ((uint32_t)(p[3]) + ((uint32_t)(p[2]) << 8) +
+ 	    ((uint32_t)(p[1]) << 16) + ((uint32_t)(p[0]) << 24));
+ }
+ 
+-static inline void be32enc(void *pp, uint32_t x)
++static inline void scrypt_be32enc(void *pp, uint32_t x)
+ {
+ 	uint8_t *p = (uint8_t *)pp;
+ 	p[3] = x & 0xff;
+@@ -153,7 +153,7 @@ PBKDF2_SHA256(const uint8_t *passwd, siz
+ 	/* Iterate through the blocks. */
+ 	for (i = 0; i * 32 < dkLen; i++) {
+ 		/* Generate INT(i + 1). */
+-		be32enc(ivec, (uint32_t)(i + 1));
++		scrypt_be32enc(ivec, (uint32_t)(i + 1));
+ 
+ 		/* Compute U_1 = PRF(P, S || INT(i)). */
+ 		memcpy(&hctx, &PShctx, sizeof(HMAC_SHA256_CTX));
+@@ -265,7 +265,7 @@ void scrypt_1024_1_1_256_sp_generic(cons
+ 	PBKDF2_SHA256((const uint8_t *)input, 80, (const uint8_t *)input, 80, 1, B, 128);
+ 
+ 	for (k = 0; k < 32; k++)
+-		X[k] = le32dec(&B[4 * k]);
++		X[k] = scrypt_le32dec(&B[4 * k]);
+ 
+ 	for (i = 0; i < 1024; i++) {
+ 		memcpy(&V[i * 32], X, 128);
+@@ -281,7 +281,7 @@ void scrypt_1024_1_1_256_sp_generic(cons
+ 	}
+ 
+ 	for (k = 0; k < 32; k++)
+-		le32enc(&B[4 * k], X[k]);
++		scrypt_le32enc(&B[4 * k], X[k]);
+ 
+ 	PBKDF2_SHA256((const uint8_t *)input, 80, B, 128, 1, (uint8_t *)output, 32);
+ }
diff --git a/dogecoin/patches/patch-src_crypto_scrypt.h b/dogecoin/patches/patch-src_crypto_scrypt.h
new file mode 100644
index 0000000..89fd738
--- /dev/null
+++ b/dogecoin/patches/patch-src_crypto_scrypt.h
@@ -0,0 +1,21 @@
+$NetBSD$
+
+--- src/crypto/scrypt.h.orig	2015-10-31 14:49:41.000000000 +0000
++++ src/crypto/scrypt.h
+@@ -27,14 +27,14 @@ void
+ PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt,
+     size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen);
+ 
+-static inline uint32_t le32dec(const void *pp)
++static inline uint32_t scrypt_le32dec(const void *pp)
+ {
+         const uint8_t *p = (uint8_t const *)pp;
+         return ((uint32_t)(p[0]) + ((uint32_t)(p[1]) << 8) +
+             ((uint32_t)(p[2]) << 16) + ((uint32_t)(p[3]) << 24));
+ }
+ 
+-static inline void le32enc(void *pp, uint32_t x)
++static inline void scrypt_le32enc(void *pp, uint32_t x)
+ {
+         uint8_t *p = (uint8_t *)pp;
+         p[0] = x & 0xff;
diff --git a/dogecoin/patches/patch-src_db.h b/dogecoin/patches/patch-src_db.h
deleted file mode 100644
index dccb827..0000000
--- a/dogecoin/patches/patch-src_db.h
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-src_db.h,v 1.1 2014/09/22 11:18:54 othyro Exp $
-
-Use pkgsrc databases/db4.
-
---- src/db.h.orig	2014-06-19 07:51:15.000000000 +0000
-+++ src/db.h
-@@ -15,7 +15,7 @@
- #include <vector>
- 
- #include <boost/filesystem/path.hpp>
--#include <db_cxx.h>
-+#include <db5/db_cxx.h>
- 
- class CAddrMan;
- struct CBlockLocator;
diff --git a/dogecoin/patches/patch-src_leveldb_port_port__posix.h b/dogecoin/patches/patch-src_leveldb_port_port__posix.h
index c018847..4c54bd2 100644
--- a/dogecoin/patches/patch-src_leveldb_port_port__posix.h
+++ b/dogecoin/patches/patch-src_leveldb_port_port__posix.h
@@ -1,19 +1,18 @@
-$NetBSD: patch-src_leveldb_port_port__posix.h,v 1.1 2014/09/22 11:18:54 othyro Exp $
+$NetBSD$
 
 Be nbsd specific.
 
---- src/leveldb/port/port_posix.h.orig	2014-06-19 07:51:15.000000000 +0000
+--- src/leveldb/port/port_posix.h.orig	2015-10-31 14:49:41.000000000 +0000
 +++ src/leveldb/port/port_posix.h
-@@ -50,8 +50,12 @@
+@@ -47,7 +47,11 @@
  #include "port/atomic_pointer.h"
  
  #ifndef PLATFORM_IS_LITTLE_ENDIAN
 +#if defined(OS_NETBSD)
-+#define PLATFORM_IS_LITTLE_ENDIAN (BYTE_ORDER == LITTLE_ENDIAN)
-+#else
  #define PLATFORM_IS_LITTLE_ENDIAN (__BYTE_ORDER == __LITTLE_ENDIAN)
- #endif
++#else
++#define PLATFORM_IS_LITTLE_ENDIAN (__BYTE_ORDER == __LITTLE_ENDIAN)
 +#endif
+ #endif
  
  #if defined(OS_MACOSX) || defined(OS_SOLARIS) || defined(OS_FREEBSD) ||\
-     defined(OS_NETBSD) || defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD) ||\
diff --git a/dogecoin/patches/patch-src_netbase.cpp b/dogecoin/patches/patch-src_netbase.cpp
deleted file mode 100644
index a51c723..0000000
--- a/dogecoin/patches/patch-src_netbase.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD: patch-src_netbase.cpp,v 1.1 2014/09/22 11:18:54 othyro Exp $
-
-be nbsd specific.
-
---- src/netbase.cpp.orig	2014-06-19 07:51:15.000000000 +0000
-+++ src/netbase.cpp
-@@ -82,8 +82,12 @@ bool static LookupIntern(const char *psz
- #ifdef WIN32
-     aiHint.ai_flags = fAllowLookup ? 0 : AI_NUMERICHOST;
- #else
-+#if defined(__NetBSD__)
-+    aiHint.ai_flags = fAllowLookup ? 0 : AI_NUMERICHOST;
-+#else
-     aiHint.ai_flags = fAllowLookup ? AI_ADDRCONFIG : AI_NUMERICHOST;
- #endif
-+#endif
-     struct addrinfo *aiRes = NULL;
-     int nErr = getaddrinfo(pszName, NULL, &aiHint, &aiRes);
-     if (nErr)
diff --git a/dogecoin/patches/patch-src_walletdb.cpp b/dogecoin/patches/patch-src_walletdb.cpp
deleted file mode 100644
index f5440de..0000000
--- a/dogecoin/patches/patch-src_walletdb.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
---- src/walletdb.cpp~	2014-06-19 00:51:15.000000000 -0700
-+++ src/walletdb.cpp	2014-08-19 03:50:42.757367359 -0700
-@@ -844,11 +844,7 @@
-                     pathDest /= wallet.strWalletFile;
- 
-                 try {
--#if BOOST_VERSION >= 104000
--                    filesystem::copy_file(pathSrc, pathDest, filesystem::copy_option::overwrite_if_exists);
--#else
--                    filesystem::copy_file(pathSrc, pathDest);
--#endif
-+                    filesystem::copy(pathSrc, pathDest);
-                     LogPrintf("copied wallet.dat to %s\n", pathDest.string());
-                     return true;
-                 } catch(const filesystem::filesystem_error &e) {
diff --git a/feathercoin/MESSAGE b/feathercoin/MESSAGE
index 8a7bb8e..a7eb397 100644
--- a/feathercoin/MESSAGE
+++ b/feathercoin/MESSAGE
@@ -1,5 +1,5 @@
 ===========================================================================
-$NetBSD: MESSAGE,v 1.1 2014/09/22 11:19:42 othyro Exp $
+$NetBSD$
 
 To use feathercoind, you must set a rpcpassword in the configuration file:
 ${PKG_SYSCONFDIR}/feathercoin.conf
diff --git a/feathercoin/Makefile b/feathercoin/Makefile
index c8e58bb..06a0b63 100644
--- a/feathercoin/Makefile
+++ b/feathercoin/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.1 2014/09/22 11:19:42 othyro Exp $
+# $NetBSD$
 
-DISTNAME=	v0.8.6.2
+#DISTNAME=	v0.8.6.2
+DISTNAME=	v0.8.7.1
 PKGNAME=	feathercoin-${DISTNAME:S/v//1}
 CATEGORIES=	finance
 MASTER_SITES=	https://github.com/FeatherCoin/Feathercoin/archive/
@@ -13,11 +14,15 @@ LICENSE=	mit
 
 USE_LIBTOOL=	yes
 USE_TOOLS+=	gmake pkg-config
-USE_LANGUAGES=	c++
+USE_LANGUAGES=	c c++
 WRKSRC=		${WRKDIR}/${PKGNAME_NOREV:S/f/F/1}
 AUTO_MKDIRS=	yes
 
-CXXFLAGS+=	-std=c++0x
+#CXXFLAGS+=	-std=c++0x -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED 
+CXXFLAGS+=	-DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED 
+CXXFLAGS+=	-DBOOST_SYSTEM_NO_DEPRECATED 
+CXXFLAGS+=	-Wall -g -I${PREFIX}/include/boost
+#CXXFLAGS+=	-std=c++0x -Wall -g -I${PREFIX}/include/boost
 
 QMAKE_OPTIONS+=	BOOST_INCLUDE_PATH=${PREFIX}/include/boost
 QMAKE_OPTIONS+=	BDB_INCLUDE_PATH=${PREFIX}/include/db4
@@ -28,26 +33,35 @@ QMAKE_OPTIONS+=	BDB_LIB_PATH=${PREFIX}/lib
 QMAKE_OPTIONS+=	OPENSSL_LIB_PATH=${PREFIX}/lib
 QMAKE_OPTIONS+=	LIB_RPATH=${PREFIX}/lib
 
+QMAKE_MOC += 	QMAKE_MOC -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED
+
 RCD_SCRIPTS=	feathercoind
 OWN_DIRS=	${VARBASE}/feathercoin
 EGDIR=		${PREFIX}/share/examples/feathercoin
 CONF_FILES=	${EGDIR}/feathercoin.conf ${PKG_SYSCONFDIR}/feathercoin.conf
 CONF_FILES_PERMS=	${EGDIR}/feathercoin.conf ${PKG_SYSCONFDIR}/feathercoin.conf ${ROOT_USER} ${ROOT_GROUP} 0600
 
+CONFIGURE_ARGS+=       		 --without-gui
+CONFIGURE_ARGS+=                --with-boost=${BUILDLINK_PREFIX.boost-libs}
+BUILDLINK_TRANSFORM+=           l:db_cxx:db4_cxx
+
 do-configure:
 	(cd ${WRKSRC} && env ${CONFIGURE_ENV} ${QTDIR}/bin/qmake "PREFIX=${PREFIX}" "QMAKE_CXXFLAGS=${CXXFLAGS}" ${QMAKE_OPTIONS} feathercoin-qt.pro)
 
 do-build:
 	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${QMAKE_OPTIONS} ${GMAKE};	\
-	cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} CFLAGS+=-Iobj ${QMAKE_OPTIONS} ${GMAKE} -f makefile.unix
+	cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} CFLAGS+=-Iobj ${QMAKE_OPTIONS} ${GMAKE} USE_UPNP= -f makefile.unix
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/feathercoin-qt ${DESTDIR}${PREFIX}/bin
+	#${INSTALL_PROGRAM} ${WRKSRC}/feathercoin-qt ${DESTDIR}${PREFIX}/bin
 	${INSTALL_PROGRAM} ${WRKSRC}/src/feathercoind ${DESTDIR}${PREFIX}/sbin
 	${INSTALL_DATA} -m 600 ${FILESDIR}/feathercoin.conf ${DESTDIR}${EGDIR}
 
+
 .include "options.mk"
 
+DL_AUTO_VARS=           yes
+.include "../../mk/dlopen.buildlink3.mk"
 .include "../../databases/db4/buildlink3.mk"
 .include "../../devel/boost-libs/buildlink3.mk"
 .include "../../security/openssl/buildlink3.mk"
diff --git a/feathercoin/PLIST b/feathercoin/PLIST
index b6c687e..7e6c367 100644
--- a/feathercoin/PLIST
+++ b/feathercoin/PLIST
@@ -1,5 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2014/09/22 11:19:42 othyro Exp $
-bin/feathercoin-qt
+@comment $NetBSD$
 sbin/feathercoind
 share/examples/feathercoin/feathercoin.conf
 share/examples/rc.d/feathercoind
diff --git a/feathercoin/distinfo b/feathercoin/distinfo
index ff6c7a5..080d33f 100644
--- a/feathercoin/distinfo
+++ b/feathercoin/distinfo
@@ -1,10 +1,11 @@
-$NetBSD: distinfo,v 1.1 2014/09/22 11:19:42 othyro Exp $
+$NetBSD$
 
-SHA1 (feathercoin/v0.8.6.2.tar.gz) = b4eab30d57a7e0eeac91bc6083b5fd254c749e8f
-RMD160 (feathercoin/v0.8.6.2.tar.gz) = 725e1f51a8abefae8caf59190a9caa337a9fa363
-Size (feathercoin/v0.8.6.2.tar.gz) = 3687650 bytes
-SHA1 (patch-feathercoin-qt.pro) = 2a37375316c4d298479593e36ed3f0dbecb9a8bf
-SHA1 (patch-src_db.h) = 26c2bbffceeae0d12a2f9f009aef4d298429dc62
-SHA1 (patch-src_makefile.unix) = 46c0327002a5ac1ff09fb1fe486ba38822bebcf7
-SHA1 (patch-src_netbase.cpp) = 75a971994d937248b570e6e40c29586afd515b25
-SHA1 (patch-src_walletdb.cpp) = 7dd655a4be9576b42d67705b199982ccf8ff5481
+SHA1 (feathercoin/v0.8.7.1.tar.gz) = b7aef7205458bd2e2c403e15f88b97e70f560b98
+RMD160 (feathercoin/v0.8.7.1.tar.gz) = e8502841168483f4ac49d87711a9a86ca46bc336
+Size (feathercoin/v0.8.7.1.tar.gz) = 3622006 bytes
+SHA1 (patch-feathercoin-qt.pro) = 49d496354d247c0003a71c95b56a455841c08be9
+SHA1 (patch-src_db.h) = 04952fb0c889b5b6913e11b57c7252fe9dcf9150
+SHA1 (patch-src_makefile.unix) = c99c31181cd2cb3cbfd65ee948aca474b29514e8
+SHA1 (patch-src_netbase.cpp) = 9d53499bd171511076d52abef5920902a450bce5
+SHA1 (patch-src_rpcrawtransaction.cpp) = c4de9d15bead17b2edbaaf561ff1aea4ec6e08f7
+SHA1 (patch-src_walletdb.cpp) = fb2f8382e362ee99c3600db14380bea0286726be
diff --git a/feathercoin/files/feathercoind.sh b/feathercoin/files/feathercoind.sh
index 3182fda..3a000c8 100644
--- a/feathercoin/files/feathercoind.sh
+++ b/feathercoin/files/feathercoind.sh
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: feathercoind.sh,v 1.1 2014/09/22 11:19:42 othyro Exp $
+# $NetBSD$
 #
 
 # PROVIDE: ppcoind
diff --git a/feathercoin/has_binary_operator.hpp b/feathercoin/has_binary_operator.hpp
new file mode 100644
index 0000000..d82a5ce
--- /dev/null
+++ b/feathercoin/has_binary_operator.hpp
@@ -0,0 +1,229 @@
+//  (C) Copyright 2009-2011 Frederic Bron, Robert Stewart, Steven Watanabe & Roman Perepelitsa.
+//
+//  Use, modification and distribution are subject to the Boost Software License,
+//  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+//  http://www.boost.org/LICENSE_1_0.txt).
+//
+//  See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#include <boost/config.hpp>
+#include <boost/type_traits/ice.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/type_traits/is_base_of.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/is_fundamental.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_void.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/remove_pointer.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+
+// should be the last #include
+#include <boost/type_traits/detail/bool_trait_def.hpp>
+
+// cannot include this header without getting warnings of the kind:
+// gcc:
+//    warning: value computed is not used
+//    warning: comparison between signed and unsigned integer expressions
+// msvc:
+//    warning C4018: '<' : signed/unsigned mismatch
+//    warning C4244: '+=' : conversion from 'double' to 'char', possible loss of data
+//    warning C4547: '*' : operator before comma has no effect; expected operator with side-effect
+//    warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
+//    warning C4804: '<' : unsafe use of type 'bool' in operation
+//    warning C4805: '==' : unsafe mix of type 'bool' and type 'char' in operation
+// cannot find another implementation -> declared as system header to suppress these warnings.
+#if defined(__GNUC__)
+#   pragma GCC system_header
+#elif defined(BOOST_MSVC)
+#   pragma warning ( push )
+#   pragma warning ( disable : 4018 4244 4547 4800 4804 4805 4913 )
+#endif
+
+namespace boost {
+namespace detail {
+
+// This namespace ensures that argument-dependent name lookup does not mess things up.
+namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {
+
+// 1. a function to have an instance of type T without requiring T to be default
+// constructible
+template <typename T> T &make();
+
+
+// 2. we provide our operator definition for types that do not have one already
+
+// a type returned from operator BOOST_TT_TRAIT_OP when no such operator is
+// found in the type's own namespace (our own operator is used) so that we have
+// a means to know that our operator was used
+struct no_operator { };
+
+// this class allows implicit conversions and makes the following operator
+// definition less-preferred than any other such operators that might be found
+// via argument-dependent name lookup
+struct any { template <class T> any(T const&); };
+
+// when operator BOOST_TT_TRAIT_OP is not available, this one is used
+no_operator operator BOOST_TT_TRAIT_OP (const any&, const any&);
+
+
+// 3. checks if the operator returns void or not
+// conditions: Lhs!=void and Rhs!=void
+
+// we first redefine "operator," so that we have no compilation error if
+// operator BOOST_TT_TRAIT_OP returns void and we can use the return type of
+// (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) to deduce if
+// operator BOOST_TT_TRAIT_OP returns void or not:
+// - operator BOOST_TT_TRAIT_OP returns void   -> (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns returns_void_t
+// - operator BOOST_TT_TRAIT_OP returns !=void -> (lhs BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns int
+struct returns_void_t { };
+template <typename T> int operator,(const T&, returns_void_t);
+template <typename T> int operator,(const volatile T&, returns_void_t);
+
+// this intermediate trait has member value of type bool:
+// - value==true -> operator BOOST_TT_TRAIT_OP returns void
+// - value==false -> operator BOOST_TT_TRAIT_OP does not return void
+template < typename Lhs, typename Rhs >
+struct operator_returns_void {
+   // overloads of function returns_void make the difference
+   // yes_type and no_type have different size by construction
+   static ::boost::type_traits::yes_type returns_void(returns_void_t);
+   static ::boost::type_traits::no_type returns_void(int);
+   BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make<Lhs>() BOOST_TT_TRAIT_OP make<Rhs>(),returns_void_t())))));
+};
+
+
+// 4. checks if the return type is Ret or Ret==dont_care
+// conditions: Lhs!=void and Rhs!=void
+
+struct dont_care { };
+
+template < typename Lhs, typename Rhs, typename Ret, bool Returns_void >
+struct operator_returns_Ret;
+
+template < typename Lhs, typename Rhs >
+struct operator_returns_Ret < Lhs, Rhs, dont_care, true > {
+   BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template < typename Lhs, typename Rhs >
+struct operator_returns_Ret < Lhs, Rhs, dont_care, false > {
+   BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template < typename Lhs, typename Rhs >
+struct operator_returns_Ret < Lhs, Rhs, void, true > {
+   BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template < typename Lhs, typename Rhs >
+struct operator_returns_Ret < Lhs, Rhs, void, false > {
+   BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template < typename Lhs, typename Rhs, typename Ret >
+struct operator_returns_Ret < Lhs, Rhs, Ret, true > {
+   BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+// otherwise checks if it is convertible to Ret using the sizeof trick
+// based on overload resolution
+// condition: Ret!=void and Ret!=dont_care and the operator does not return void
+template < typename Lhs, typename Rhs, typename Ret >
+struct operator_returns_Ret < Lhs, Rhs, Ret, false > {
+   static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); // this version is preferred for types convertible to Ret
+   static ::boost::type_traits::no_type is_convertible_to_Ret(...); // this version is used otherwise
+
+   BOOST_STATIC_CONSTANT(bool, value = (sizeof(is_convertible_to_Ret(make<Lhs>() BOOST_TT_TRAIT_OP make<Rhs>()))==sizeof(::boost::type_traits::yes_type)));
+};
+
+
+// 5. checks for operator existence
+// condition: Lhs!=void and Rhs!=void
+
+// checks if our definition of operator BOOST_TT_TRAIT_OP is used or an other
+// existing one;
+// this is done with redefinition of "operator," that returns no_operator or has_operator
+struct has_operator { };
+no_operator operator,(no_operator, has_operator);
+
+template < typename Lhs, typename Rhs >
+struct operator_exists {
+   static ::boost::type_traits::yes_type s_check(has_operator); // this version is preferred when operator exists
+   static ::boost::type_traits::no_type s_check(no_operator); // this version is used otherwise
+
+   BOOST_STATIC_CONSTANT(bool, value = (sizeof(s_check(((make<Lhs>() BOOST_TT_TRAIT_OP make<Rhs>()),make<has_operator>())))==sizeof(::boost::type_traits::yes_type)));
+};
+
+
+// 6. main trait: to avoid any compilation error, this class behaves
+// differently when operator BOOST_TT_TRAIT_OP(Lhs, Rhs) is forbidden by the
+// standard.
+// Forbidden_if is a bool that is:
+// - true when the operator BOOST_TT_TRAIT_OP(Lhs, Rhs) is forbidden by the standard
+//   (would yield compilation error if used)
+// - false otherwise
+template < typename Lhs, typename Rhs, typename Ret, bool Forbidden_if >
+struct trait_impl1;
+
+template < typename Lhs, typename Rhs, typename Ret >
+struct trait_impl1 < Lhs, Rhs, Ret, true > {
+   BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template < typename Lhs, typename Rhs, typename Ret >
+struct trait_impl1 < Lhs, Rhs, Ret, false > {
+   BOOST_STATIC_CONSTANT(bool,
+      value = (
+         ::boost::type_traits::ice_and<
+            operator_exists < Lhs, Rhs >::value,
+            operator_returns_Ret < Lhs, Rhs, Ret, operator_returns_void < Lhs, Rhs >::value >::value
+         >::value
+      )
+   );
+};
+
+// some specializations needs to be declared for the special void case
+template < typename Rhs, typename Ret >
+struct trait_impl1 < void, Rhs, Ret, false > {
+   BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template < typename Lhs, typename Ret >
+struct trait_impl1 < Lhs, void, Ret, false > {
+   BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template < typename Ret >
+struct trait_impl1 < void, void, Ret, false > {
+   BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+// defines some typedef for convenience
+template < typename Lhs, typename Rhs, typename Ret >
+struct trait_impl {
+   typedef typename ::boost::remove_reference<Lhs>::type Lhs_noref;
+   typedef typename ::boost::remove_reference<Rhs>::type Rhs_noref;
+   typedef typename ::boost::remove_cv<Lhs_noref>::type Lhs_nocv;
+   typedef typename ::boost::remove_cv<Rhs_noref>::type Rhs_nocv;
+   typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer<Lhs_noref>::type >::type >::type Lhs_noptr;
+   typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer<Rhs_noref>::type >::type >::type Rhs_noptr;
+   BOOST_STATIC_CONSTANT(bool, value = (trait_impl1 < Lhs_noref, Rhs_noref, Ret, BOOST_TT_FORBIDDEN_IF >::value));
+};
+
+} // namespace impl
+} // namespace detail
+
+// this is the accessible definition of the trait to end user
+BOOST_TT_AUX_BOOL_TRAIT_DEF3(BOOST_TT_TRAIT_NAME, Lhs, Rhs=Lhs, Ret=::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::dont_care, (::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::trait_impl < Lhs, Rhs, Ret >::value))
+
+} // namespace boost
+
+#if defined(BOOST_MSVC)
+#   pragma warning ( pop )
+#endif
+
+#include <boost/type_traits/detail/bool_trait_undef.hpp>
diff --git a/feathercoin/options.mk b/feathercoin/options.mk
index 2b9414e..059bd8f 100644
--- a/feathercoin/options.mk
+++ b/feathercoin/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.1 2014/09/22 11:19:42 othyro Exp $
+# $NetBSD$
 
 PKG_OPTIONS_VAR=		PKG_OPTIONS.feathercoin
 PKG_SUPPORTED_OPTIONS+=		miniupnpc dbus qrcode
diff --git a/feathercoin/patches/patch-feathercoin-qt.pro b/feathercoin/patches/patch-feathercoin-qt.pro
index a42915c..60fa7a0 100644
--- a/feathercoin/patches/patch-feathercoin-qt.pro
+++ b/feathercoin/patches/patch-feathercoin-qt.pro
@@ -1,10 +1,10 @@
-$NetBSD: patch-feathercoin-qt.pro,v 1.1 2014/09/22 11:19:42 othyro Exp $
+$NetBSD$
 
 Use pkgsrc databases/db4.
 
---- feathercoin-qt.pro.orig	2014-04-16 19:46:36.000000000 +0000
+--- feathercoin-qt.pro.orig	2014-10-31 15:32:32.000000000 +0000
 +++ feathercoin-qt.pro
-@@ -377,22 +377,26 @@ isEmpty(BOOST_THREAD_LIB_SUFFIX) {
+@@ -387,22 +387,26 @@ isEmpty(BOOST_THREAD_LIB_SUFFIX) {
  
  isEmpty(BDB_LIB_PATH) {
      macx:BDB_LIB_PATH = /opt/local/lib/db48
@@ -32,7 +32,7 @@ Use pkgsrc databases/db4.
  }
  
  win32:DEFINES += WIN32
-@@ -429,7 +433,7 @@ macx:QMAKE_INFO_PLIST = share/qt/Info.pl
+@@ -439,7 +443,7 @@ macx:QMAKE_INFO_PLIST = share/qt/Info.pl
  # Set libraries and includes at end, to use platform-defined defaults if not overridden
  INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH
  LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
diff --git a/feathercoin/patches/patch-src_db.h b/feathercoin/patches/patch-src_db.h
index 096f2fa..b8d5f34 100644
--- a/feathercoin/patches/patch-src_db.h
+++ b/feathercoin/patches/patch-src_db.h
@@ -1,8 +1,8 @@
-$NetBSD: patch-src_db.h,v 1.1 2014/09/22 11:19:42 othyro Exp $
+$NetBSD$
 
 Use pkgsrc databases/db4.
 
---- src/db.h.orig	2014-04-16 19:46:36.000000000 +0000
+--- src/db.h.orig	2014-10-31 15:32:32.000000000 +0000
 +++ src/db.h
 @@ -11,7 +11,7 @@
  #include <string>
diff --git a/feathercoin/patches/patch-src_makefile.unix b/feathercoin/patches/patch-src_makefile.unix
index 89b9d81..3d33b11 100644
--- a/feathercoin/patches/patch-src_makefile.unix
+++ b/feathercoin/patches/patch-src_makefile.unix
@@ -1,9 +1,6 @@
-$NetBSD: patch-src_makefile.unix,v 1.1 2014/09/22 11:19:42 othyro Exp $
+$NetBSD$
 
-miniupnp doesn't build at the moment.
-libs.
-
---- src/makefile.unix.orig	2014-04-16 19:46:36.000000000 +0000
+--- src/makefile.unix.orig	2014-10-31 15:32:32.000000000 +0000
 +++ src/makefile.unix
 @@ -5,7 +5,7 @@
  # :=0 --> UPnP support turned off by default at runtime
@@ -23,11 +20,9 @@ libs.
  
  TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data)
  
-@@ -33,14 +33,15 @@ endif
- 
+@@ -34,13 +34,13 @@ endif
  # for boost 1.37, add -mt to the boost libraries
  LIBS += \
-+ -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib \
   -Wl,-B$(LMODE) \
 -   -l boost_system$(BOOST_LIB_SUFFIX) \
 -   -l boost_filesystem$(BOOST_LIB_SUFFIX) \
@@ -40,13 +35,13 @@ libs.
 +   -lboost_filesystem$(BOOST_LIB_SUFFIX) \
 +   -lboost_program_options$(BOOST_LIB_SUFFIX) \
 +   -lboost_thread$(BOOST_LIB_SUFFIX) \
-+   -ldb4_cxx$(BDB_LIB_SUFFIX) \
++   -ldb_cxx$(BDB_LIB_SUFFIX) \
 +   -lssl \
 +   -lcrypto
  
  TESTLIBS += \
   -Wl,-B$(LMODE) \
-@@ -50,7 +51,7 @@ ifndef USE_UPNP
+@@ -50,7 +50,7 @@ ifndef USE_UPNP
  	override USE_UPNP = -
  endif
  ifneq (${USE_UPNP}, -)
@@ -55,20 +50,22 @@ libs.
  	DEFS += -DUSE_UPNP=$(USE_UPNP)
  endif
  
-@@ -60,9 +61,9 @@ endif
+@@ -60,10 +60,10 @@ endif
  
  LIBS+= \
   -Wl,-B$(LMODE2) \
 -   -l z \
 -   -l dl \
--   -l pthread
+-   -l pthread \
+-   -l rt
 +   -lz \
-+   ${DL_LIBS} \
-+   -lpthread
++   -ldl \
++   -lpthread \
++   -lrt
  
- 
- # Hardening
-@@ -174,7 +175,9 @@ leveldb/libleveldb.a:
+ # Strip symbols from the daemon; disable if debugging
+ LDHARDENING+=-Wl,-s
+@@ -143,10 +143,12 @@ obj/neoscrypt_asm.o: neoscrypt_asm.S
  obj/build.h: FORCE
  	/bin/sh ../share/genbuild.sh obj/build.h
  version.cpp: obj/build.h
@@ -76,12 +73,8 @@ libs.
  DEFS += -DHAVE_BUILD_INFO
 +endif
  
- obj/%-sse2.o: %-sse2.cpp
- 	$(CXX) -c $(xCXXFLAGS) -msse2 -MMD -MF $(@:%.o=%.d) -o $@ $<
-@@ -185,6 +188,7 @@ obj/%-sse2.o: %-sse2.cpp
- 
  obj/%.o: %.cpp
- 	$(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
+-	$(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
 +	$(CXX) -c $(xCXXFLAGS) -Iobj -MMD -MF $(@:%.o=%.d) -o $@ $<
  	@cp $(@:%.o=%.d) $(@:%.o=%.P); \
  	  sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
diff --git a/feathercoin/patches/patch-src_netbase.cpp b/feathercoin/patches/patch-src_netbase.cpp
index 2dc5c7d..6acee63 100644
--- a/feathercoin/patches/patch-src_netbase.cpp
+++ b/feathercoin/patches/patch-src_netbase.cpp
@@ -1,8 +1,8 @@
-$NetBSD: patch-src_netbase.cpp,v 1.1 2014/09/22 11:19:42 othyro Exp $
+$NetBSD$
 
 be nbsd specific.
 
---- src/netbase.cpp.orig	2014-04-16 19:46:36.000000000 +0000
+--- src/netbase.cpp.orig	2014-10-31 15:32:32.000000000 +0000
 +++ src/netbase.cpp
 @@ -77,7 +77,7 @@ bool static LookupIntern(const char *psz
  #else
diff --git a/feathercoin/patches/patch-src_rpcrawtransaction.cpp b/feathercoin/patches/patch-src_rpcrawtransaction.cpp
new file mode 100644
index 0000000..eb12a59
--- /dev/null
+++ b/feathercoin/patches/patch-src_rpcrawtransaction.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/rpcrawtransaction.cpp.orig	2014-10-31 15:32:32.000000000 +0000
++++ src/rpcrawtransaction.cpp
+@@ -239,7 +239,7 @@ Value listunspent(const Array& params, b
+             CTxDestination address;
+             if (ExtractDestination(pk, address))
+             {
+-                const CScriptID& hash = boost::get<const CScriptID&>(address);
++                const CScriptID& hash = boost::get<CScriptID>(address);
+                 CScript redeemScript;
+                 if (pwalletMain->GetCScript(hash, redeemScript))
+                     entry.push_back(Pair("redeemScript", HexStr(redeemScript.begin(), redeemScript.end())));
diff --git a/feathercoin/patches/patch-src_walletdb.cpp b/feathercoin/patches/patch-src_walletdb.cpp
index 69b0b1d..59c978e 100644
--- a/feathercoin/patches/patch-src_walletdb.cpp
+++ b/feathercoin/patches/patch-src_walletdb.cpp
@@ -1,6 +1,6 @@
 --- src/walletdb.cpp~	2014-06-19 00:51:15.000000000 -0700
 +++ src/walletdb.cpp	2014-08-19 03:50:42.757367359 -0700
---- src/walletdb.cpp.orig	2014-04-16 19:46:36.000000000 +0000
+--- src/walletdb.cpp.orig	2014-10-31 15:32:32.000000000 +0000
 +++ src/walletdb.cpp
 @@ -550,11 +550,7 @@ bool BackupWallet(const CWallet& wallet,
                      pathDest /= wallet.strWalletFile;
diff --git a/litecoin/Makefile b/litecoin/Makefile
index 001db84..a0d345c 100644
--- a/litecoin/Makefile
+++ b/litecoin/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.1 2014/09/22 11:20:28 othyro Exp $
+# $NetBSD$
 
-DISTNAME=	v0.8.7.2
+#DISTNAME=	v0.8.7.2
+DISTNAME=	v0.10.2.2
 PKGNAME=	litecoin-${DISTNAME:S/v//1}
 CATEGORIES=	finance
 MASTER_SITES=	https://github.com/litecoin-project/litecoin/archive/
@@ -11,12 +12,30 @@ COMMENT=	Lite version of Bitcoin using scrypt as a proof-of-work algorithm
 LICENSE=	mit
 
 USE_LIBTOOL=	yes
-USE_TOOLS+=	gmake pkg-config
+USE_TOOLS+=	gmake pkg-config autoconf aclocal autoheader automake libtoolize
 USE_LANGUAGES=	c c++
 WRKSRC=		${WRKDIR}/${PKGNAME_NOREV}
 AUTO_MKDIRS=	yes
+HAS_CONFIGURE=	yes
+GNU_CONFIGURE=	yes
 
-CXXFLAGS+=	-std=c++0x
+CXXFLAGS+=	-I${BUILDLINK_PREFIX.boost-libs}/include/boost
+CFLAGS+=        -fPIC
+CXXFLAGS+= -Wl,-R${BUILDLINK_PREFIX.boost-libs}/lib/litecoin -L${BUILDLINK_PREFIX.boost-libs}/lib/litecoin
+BUILDLINK_TRANSFORM+=	l:db_cxx:db4_cxx
+BOOST_LDFLAGS=	-Wl,-R${BUILDLINK_TRANSFORM.boost-libs}/lib -Wl,-L${BUILDLINK_PREFIX.boost-libs}/lib
+#LDFLAGS+=	${BOOST_LDFLAGS:Q}
+#LDFLAGS+=	${PREFIX}/qt4/lib
+#CPPFLAGS+=      -I${PREFIX}/qt4/include/
+
+CONFIGURE_ARGS+=  --with-boost=${BUILDLINK_PREFIX.boost-libs}
+CONFIGURE_ARGS+=  --enable-hardening
+CONFIGURE_ARGS+=  ${PREFIX}/include/db4 
+#CONFIGURE_ARGS+=  --without-gui
+
+LIBTOOLIZE=     ${PREFIX}/bin/libtoolize
+
+QMAKE_CXXFLAGS+= -stdlib=libstdc++
 
 QMAKE_OPTIONS+=	BOOST_INCLUDE_PATH=${PREFIX}/include/boost
 QMAKE_OPTIONS+=	BDB_INCLUDE_PATH=${PREFIX}/include/db4
@@ -27,26 +46,44 @@ QMAKE_OPTIONS+=	BDB_LIB_PATH=${PREFIX}/lib
 QMAKE_OPTIONS+=	OPENSSL_LIB_PATH=${PREFIX}/lib
 QMAKE_OPTIONS+=	LIB_RPATH=${PREFIX}/lib
 
+
 RCD_SCRIPTS=	litecoind
 OWN_DIRS=	${VARBASE}/litecoin
 EGDIR=		${PREFIX}/share/examples/litecoin
 CONF_FILES=	${EGDIR}/litecoin.conf ${PKG_SYSCONFDIR}/litecoin.conf
 CONF_FILES_PERMS=	${EGDIR}/litecoin.conf ${PKG_SYSCONFDIR}/litecoin.conf ${ROOT_USER} ${ROOT_GROUP} 0600
-INSTALLATION_DIRS+=	share/examples/litecoin
+INSTALLATION_DIRS+=	lib share/examples/litecoin
 
-do-configure:
-	(cd ${WRKSRC} && env ${CONFIGURE_ENV} ${QTDIR}/bin/qmake "PREFIX=${PREFIX}" "QMAKE_CXXFLAGS=${CXXFLAGS}" ${QMAKE_OPTIONS} bitcoin-qt.pro)
+.include "options.mk"
 
-do-build:
-	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${QMAKE_OPTIONS} ${GMAKE};	\
-	cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} CFLAGS+=-Iobj ${QMAKE_OPTIONS} ${GMAKE} -f makefile.unix
+pre-configure:
+#	cd ${WRKSRC}; \
+#	aclocal; autoheader; automake -a --foreign -i  --add-missing; autoconf; autoreconf -i
+	cd ${WRKSRC};             \
+        ${LIBTOOLIZE} --force;    \
+        ${PREFIX}/bin/aclocal;    \
+        ${PREFIX}/bin/autoheader; \
+        ${PREFIX}/bin/automake -a --foreign -i  --add-missing; \
+        ${PREFIX}/bin/autoconf; \
+        ${PREFIX}/bin/autoreconf -i
+#do-configure:
+#	#(cd ${WRKSRC} && env ${CONFIGURE_ENV} ${QTDIR}/bin/qmake "PREFIX=${PREFIX}" "QMAKE_CXXFLAGS=${CXXFLAGS}" ${QMAKE_OPTIONS} bitcoin-qt.pro)
+#	(cd ${WRKSRC} && env ${CONFIGURE_ENV} ${QTDIR}/bin/qmake "PREFIX=${PREFIX}" "QMAKE_CXXFLAGS=${CXXFLAGS}" ${QMAKE_OPTIONS})
 
+#do-build:
+#	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${QMAKE_OPTIONS} ${GMAKE};	\
+#	cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} CFLAGS+=-Iobj ${QMAKE_OPTIONS} ${GMAKE} -f makefile.unix
+#
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/litecoin-qt ${DESTDIR}${PREFIX}/bin
-	${INSTALL_PROGRAM} ${WRKSRC}/src/litecoind ${DESTDIR}${PREFIX}/sbin
+#	${INSTALL_PROGRAM} ${WRKSRC}/litecoin-qt ${DESTDIR}${PREFIX}/bin
+	${INSTALL_PROGRAM} ${WRKSRC}/src/.libs/litecoind ${DESTDIR}${PREFIX}/sbin
+	${INSTALL_PROGRAM} ${WRKSRC}/src/.libs/litecoin-tx ${DESTDIR}${PREFIX}/bin
+	${INSTALL_PROGRAM} ${WRKSRC}/src/litecoin-cli ${DESTDIR}${PREFIX}/bin
+	${INSTALL_LIB} -m 644 ${WRKSRC}/src/secp256k1/libsecp256k1.la ${DESTDIR}${PREFIX}/lib/litecoin
+	${INSTALL_LIB} ${WRKSRC}/src/secp256k1/.libs/libsecp256k1.so.0 ${DESTDIR}${PREFIX}/lib/litecoin
+	${LN} -fs ${DESTDIR}${PREFIX}/lib/litecoin/libsecp256k1.so.0 ${DESTDIR}${PREFIX}/lib/litecoin/libsecp256k1.so
 	${INSTALL_DATA} -m 600 ${FILESDIR}/litecoin.conf ${DESTDIR}${EGDIR}
 
-.include "options.mk"
 
 .include "../../databases/db4/buildlink3.mk"
 .include "../../devel/boost-libs/buildlink3.mk"
diff --git a/litecoin/PLIST b/litecoin/PLIST
index d0caca0..929adf9 100644
--- a/litecoin/PLIST
+++ b/litecoin/PLIST
@@ -1,5 +1,9 @@
-@comment $NetBSD: PLIST,v 1.1 2014/09/22 11:20:28 othyro Exp $
-bin/litecoin-qt
+@comment $NetBSD$
+lib/litecoin/libsecp256k1.la
+lib/litecoin/libsecp256k1.so
+lib/litecoin/libsecp256k1.so.0
 sbin/litecoind
+bin/litecoin-cli
+bin/litecoin-tx
 share/examples/litecoin/litecoin.conf
 share/examples/rc.d/litecoind
diff --git a/litecoin/distinfo b/litecoin/distinfo
index 27282de..d40158e 100644
--- a/litecoin/distinfo
+++ b/litecoin/distinfo
@@ -1,10 +1,13 @@
-$NetBSD: distinfo,v 1.1 2014/09/22 11:20:28 othyro Exp $
+$NetBSD$
 
-SHA1 (v0.8.7.2.tar.gz) = b8d6923ebbdfe281c5ee6b23fe8467ea0b23253c
-RMD160 (v0.8.7.2.tar.gz) = 20c48002ed33bc4c626753142520c9a4eeacdbe1
-Size (v0.8.7.2.tar.gz) = 4808488 bytes
-SHA1 (patch-bitcoin-qt.pro) = 03120113e411980457c28afe3ba6b223481103c9
-SHA1 (patch-src_db.h) = ad2523f17c9025492875bc275b28fcf8f12fcb98
-SHA1 (patch-src_makefile.unix) = 8d3d90394d39c4153d28af528e7b5d434a9391ed
-SHA1 (patch-src_netbase.cpp) = 16d5c1133fbba972e9b8bee07571a2a6d85ea6ff
-SHA1 (patch-src_walletdb.cpp) = d6bf080791d64371c4aad6c1ff2bab0b640f3798
+SHA1 (v0.10.2.2.tar.gz) = 140aae5c1cce8a69b03a7f36c1adad9602fbd3aa
+RMD160 (v0.10.2.2.tar.gz) = 99f88b4055fcbd43d8352b894c1cf842767f2103
+Size (v0.10.2.2.tar.gz) = 4700783 bytes
+SHA1 (patch-src_chainparams.cpp) = 7e775c1f9d5890a6d49b94f8cde1cb9dca157833
+SHA1 (patch-src_crypto_scrypt-sse2.cpp) = 0548ce1fe5388cd3ea4e461aa40a2cba8237bc8b
+SHA1 (patch-src_crypto_scrypt.cpp) = 35b7a5c0ea59f7309f4e4ccd3f092f6223fd6e33
+SHA1 (patch-src_crypto_scrypt.h) = 9595a2c0a722958d27879e7f1f2dc4ccbae2bf13
+SHA1 (patch-src_db.h) = bd65519b99e4486cf6be7e42da535e465496a00b
+SHA1 (patch-src_netbase.cpp) = 72bcfc3b65a7ede4adc99da914715cf65df442b4
+#SHA1 (patch-src_utilstrencodings.cpp) = bade934fc481a1597c604a93a96c8a46877c1477
+SHA1 (patch-src_walletdb.cpp) = 7c70770a3e0de7b7daf6799b86ff67a511e2c0ff
diff --git a/litecoin/files/litecoind.sh b/litecoin/files/litecoind.sh
index 678492d..e5c5615 100644
--- a/litecoin/files/litecoind.sh
+++ b/litecoin/files/litecoind.sh
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: litecoind.sh,v 1.1 2014/09/22 11:20:28 othyro Exp $
+# $NetBSD$
 #
 
 # PROVIDE: primed
diff --git a/litecoin/options.mk b/litecoin/options.mk
index 2e0f90f..3bcdd57 100644
--- a/litecoin/options.mk
+++ b/litecoin/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.1 2014/09/22 11:20:28 othyro Exp $
+# $NetBSD$
 
 PKG_OPTIONS_VAR=		PKG_OPTIONS.litecoin
 PKG_SUPPORTED_OPTIONS+=		miniupnpc dbus qrcode
diff --git a/litecoin/patches/patch-bitcoin-qt.pro b/litecoin/patches/patch-bitcoin-qt.pro
deleted file mode 100644
index 9d4a3c5..0000000
--- a/litecoin/patches/patch-bitcoin-qt.pro
+++ /dev/null
@@ -1,43 +0,0 @@
-$NetBSD: patch-bitcoin-qt.pro,v 1.1 2014/09/22 11:20:28 othyro Exp $
-
-Use pkgsrc databases/db4.
-
---- bitcoin-qt.pro.orig	2014-06-13 21:36:21.000000000 +0000
-+++ bitcoin-qt.pro
-@@ -376,22 +376,26 @@ isEmpty(BOOST_THREAD_LIB_SUFFIX) {
- 
- isEmpty(BDB_LIB_PATH) {
-     macx:BDB_LIB_PATH = /opt/local/lib/db48
-+    unix:BDB_LIB_PATH = $$PREFIX/lib
- }
- 
- isEmpty(BDB_LIB_SUFFIX) {
--    macx:BDB_LIB_SUFFIX = -4.8
-+    macx|unix:BDB_LIB_SUFFIX = -4.8
- }
- 
- isEmpty(BDB_INCLUDE_PATH) {
-     macx:BDB_INCLUDE_PATH = /opt/local/include/db48
-+    unix:BDB_INCLUDE_PATH = $$PREFIX/include/db4
- }
- 
- isEmpty(BOOST_LIB_PATH) {
-     macx:BOOST_LIB_PATH = /opt/local/lib
-+    unix:BOOST_LIB_PATH = $$PREFIX/lib
- }
- 
- isEmpty(BOOST_INCLUDE_PATH) {
-     macx:BOOST_INCLUDE_PATH = /opt/local/include
-+    unix:BOOST_INCLUDE_PATH = $$PREFIX/include/boost
- }
- 
- win32:DEFINES += WIN32
-@@ -428,7 +432,7 @@ macx:QMAKE_INFO_PLIST = share/qt/Info.pl
- # Set libraries and includes at end, to use platform-defined defaults if not overridden
- INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH
- LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
--LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX
-+LIBS += -lssl -lcrypto -ldb4_cxx$$BDB_LIB_SUFFIX
- # -lgdi32 has to happen after -lcrypto (see  #681)
- win32:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32
- LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX
diff --git a/litecoin/patches/patch-src_chainparams.cpp b/litecoin/patches/patch-src_chainparams.cpp
new file mode 100644
index 0000000..75787f9
--- /dev/null
+++ b/litecoin/patches/patch-src_chainparams.cpp
@@ -0,0 +1,38 @@
+$NetBSD$
+
+--- src/chainparams.cpp.orig	2015-06-15 08:51:30.000000000 +0000
++++ src/chainparams.cpp
+@@ -161,11 +161,11 @@ public:
+         vSeeds.push_back(CDNSSeedData("koin-project.com", "dnsseed.koin-project.com"));
+         vSeeds.push_back(CDNSSeedData("weminemnc.com", "dnsseed.weminemnc.com"));
+ 
+-        base58Prefixes[PUBKEY_ADDRESS] = list_of(48);
+-        base58Prefixes[SCRIPT_ADDRESS] = list_of(5);
+-        base58Prefixes[SECRET_KEY] =     list_of(176);
+-        base58Prefixes[EXT_PUBLIC_KEY] = list_of(0x04)(0x88)(0xB2)(0x1E);
+-        base58Prefixes[EXT_SECRET_KEY] = list_of(0x04)(0x88)(0xAD)(0xE4);
++        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1, 48);
++        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1, 5);
++        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1, 176);
++        base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x88)(0xB2)(0x1E).convert_to_container<std::vector<unsigned char> >();
++        base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x88)(0xAD)(0xE4).convert_to_container<std::vector<unsigned char> >();
+ 
+         convertSeed6(vFixedSeeds, pnSeed6_main, ARRAYLEN(pnSeed6_main));
+ 
+@@ -222,11 +222,11 @@ public:
+         vSeeds.push_back(CDNSSeedData("xurious.com", "testnet-seed.ltc.xurious.com"));
+         vSeeds.push_back(CDNSSeedData("wemine-testnet.com", "dnsseed.wemine-testnet.com"));
+ 
+-        base58Prefixes[PUBKEY_ADDRESS] = list_of(111);
+-        base58Prefixes[SCRIPT_ADDRESS] = list_of(196);
+-        base58Prefixes[SECRET_KEY]     = list_of(239);
+-        base58Prefixes[EXT_PUBLIC_KEY] = list_of(0x04)(0x35)(0x87)(0xCF);
+-        base58Prefixes[EXT_SECRET_KEY] = list_of(0x04)(0x35)(0x83)(0x94);
++        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1, 111);
++        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1, 196);
++        base58Prefixes[SECRET_KEY]     = std::vector<unsigned char>(1, 239);
++        base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x35)(0x87)(0xCF).convert_to_container<std::vector<unsigned char> >();
++        base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x35)(0x83)(0x94).convert_to_container<std::vector<unsigned char> >();
+ 
+         convertSeed6(vFixedSeeds, pnSeed6_test, ARRAYLEN(pnSeed6_test));
+ 
diff --git a/litecoin/patches/patch-src_crypto_scrypt-sse2.cpp b/litecoin/patches/patch-src_crypto_scrypt-sse2.cpp
new file mode 100644
index 0000000..40a993c
--- /dev/null
+++ b/litecoin/patches/patch-src_crypto_scrypt-sse2.cpp
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- src/crypto/scrypt-sse2.cpp.orig	2015-06-15 08:51:30.000000000 +0000
++++ src/crypto/scrypt-sse2.cpp
+@@ -108,7 +108,7 @@ void scrypt_1024_1_1_256_sp_sse2(const c
+ 
+ 	for (k = 0; k < 2; k++) {
+ 		for (i = 0; i < 16; i++) {
+-			X.u32[k * 16 + i] = le32dec(&B[(k * 16 + (i * 5 % 16)) * 4]);
++			X.u32[k * 16 + i] = scrypt_le32dec(&B[(k * 16 + (i * 5 % 16)) * 4]);
+ 		}
+ 	}
+ 
+@@ -128,7 +128,7 @@ void scrypt_1024_1_1_256_sp_sse2(const c
+ 
+ 	for (k = 0; k < 2; k++) {
+ 		for (i = 0; i < 16; i++) {
+-			le32enc(&B[(k * 16 + (i * 5 % 16)) * 4], X.u32[k * 16 + i]);
++			scrypt_le32enc(&B[(k * 16 + (i * 5 % 16)) * 4], X.u32[k * 16 + i]);
+ 		}
+ 	}
+ 
diff --git a/litecoin/patches/patch-src_crypto_scrypt.cpp b/litecoin/patches/patch-src_crypto_scrypt.cpp
new file mode 100644
index 0000000..7ed949b
--- /dev/null
+++ b/litecoin/patches/patch-src_crypto_scrypt.cpp
@@ -0,0 +1,48 @@
+$NetBSD$
+
+--- src/crypto/scrypt.cpp.orig	2015-06-15 08:51:30.000000000 +0000
++++ src/crypto/scrypt.cpp
+@@ -44,14 +44,14 @@
+ #endif
+ #endif
+ 
+-static inline uint32_t be32dec(const void *pp)
++static inline uint32_t scrypt_be32dec(const void *pp)
+ {
+ 	const uint8_t *p = (uint8_t const *)pp;
+ 	return ((uint32_t)(p[3]) + ((uint32_t)(p[2]) << 8) +
+ 	    ((uint32_t)(p[1]) << 16) + ((uint32_t)(p[0]) << 24));
+ }
+ 
+-static inline void be32enc(void *pp, uint32_t x)
++static inline void scrypt_be32enc(void *pp, uint32_t x)
+ {
+ 	uint8_t *p = (uint8_t *)pp;
+ 	p[3] = x & 0xff;
+@@ -153,7 +153,7 @@ PBKDF2_SHA256(const uint8_t *passwd, siz
+ 	/* Iterate through the blocks. */
+ 	for (i = 0; i * 32 < dkLen; i++) {
+ 		/* Generate INT(i + 1). */
+-		be32enc(ivec, (uint32_t)(i + 1));
++		scrypt_be32enc(ivec, (uint32_t)(i + 1));
+ 
+ 		/* Compute U_1 = PRF(P, S || INT(i)). */
+ 		memcpy(&hctx, &PShctx, sizeof(HMAC_SHA256_CTX));
+@@ -265,7 +265,7 @@ void scrypt_1024_1_1_256_sp_generic(cons
+ 	PBKDF2_SHA256((const uint8_t *)input, 80, (const uint8_t *)input, 80, 1, B, 128);
+ 
+ 	for (k = 0; k < 32; k++)
+-		X[k] = le32dec(&B[4 * k]);
++		X[k] = scrypt_le32dec(&B[4 * k]);
+ 
+ 	for (i = 0; i < 1024; i++) {
+ 		memcpy(&V[i * 32], X, 128);
+@@ -281,7 +281,7 @@ void scrypt_1024_1_1_256_sp_generic(cons
+ 	}
+ 
+ 	for (k = 0; k < 32; k++)
+-		le32enc(&B[4 * k], X[k]);
++		scrypt_le32enc(&B[4 * k], X[k]);
+ 
+ 	PBKDF2_SHA256((const uint8_t *)input, 80, B, 128, 1, (uint8_t *)output, 32);
+ }
diff --git a/litecoin/patches/patch-src_crypto_scrypt.h b/litecoin/patches/patch-src_crypto_scrypt.h
new file mode 100644
index 0000000..75dd354
--- /dev/null
+++ b/litecoin/patches/patch-src_crypto_scrypt.h
@@ -0,0 +1,21 @@
+$NetBSD$
+
+--- src/crypto/scrypt.h.orig	2015-06-15 08:51:30.000000000 +0000
++++ src/crypto/scrypt.h
+@@ -27,14 +27,14 @@ void
+ PBKDF2_SHA256(const uint8_t *passwd, size_t passwdlen, const uint8_t *salt,
+     size_t saltlen, uint64_t c, uint8_t *buf, size_t dkLen);
+ 
+-static inline uint32_t le32dec(const void *pp)
++static inline uint32_t scrypt_le32dec(const void *pp)
+ {
+         const uint8_t *p = (uint8_t const *)pp;
+         return ((uint32_t)(p[0]) + ((uint32_t)(p[1]) << 8) +
+             ((uint32_t)(p[2]) << 16) + ((uint32_t)(p[3]) << 24));
+ }
+ 
+-static inline void le32enc(void *pp, uint32_t x)
++static inline void scrypt_le32enc(void *pp, uint32_t x)
+ {
+         uint8_t *p = (uint8_t *)pp;
+         p[0] = x & 0xff;
diff --git a/litecoin/patches/patch-src_db.h b/litecoin/patches/patch-src_db.h
index d8bd0ff..523132e 100644
--- a/litecoin/patches/patch-src_db.h
+++ b/litecoin/patches/patch-src_db.h
@@ -1,15 +1,13 @@
-$NetBSD: patch-src_db.h,v 1.1 2014/09/22 11:20:28 othyro Exp $
+$NetBSD$
 
-Use pkgsrc databases/db4.
-
---- src/db.h.orig	2014-06-13 21:36:21.000000000 +0000
+--- src/db.h.orig	2015-06-15 08:51:30.000000000 +0000
 +++ src/db.h
-@@ -11,7 +11,7 @@
- #include <string>
- #include <vector>
+@@ -18,7 +18,7 @@
+ 
+ #include <boost/filesystem/path.hpp>
  
 -#include <db_cxx.h>
 +#include <db4/db_cxx.h>
  
- class CAddress;
- class CAddrMan;
+ class CDiskBlockIndex;
+ class COutPoint;
diff --git a/litecoin/patches/patch-src_makefile.unix b/litecoin/patches/patch-src_makefile.unix
deleted file mode 100644
index 08a3854..0000000
--- a/litecoin/patches/patch-src_makefile.unix
+++ /dev/null
@@ -1,69 +0,0 @@
-$NetBSD: patch-src_makefile.unix,v 1.1 2014/09/22 11:20:28 othyro Exp $
-
-miniupnp doesn't build at the moment.
-libs.
-
---- src/makefile.unix.orig	2014-06-13 21:36:21.000000000 +0000
-+++ src/makefile.unix
-@@ -5,7 +5,7 @@
- # :=0 --> UPnP support turned off by default at runtime
- # :=1 --> UPnP support turned on by default at runtime
- # :=- --> No UPnP support - miniupnp not required
--USE_UPNP:=0
-+USE_UPNP:=-
- 
- # :=1 --> Enable IPv6 support
- # :=0 --> Disable IPv6 support
-@@ -33,14 +33,15 @@ endif
- 
- # for boost 1.37, add -mt to the boost libraries
- LIBS += \
-+ -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib \
-  -Wl,-B$(LMODE) \
--   -l boost_system$(BOOST_LIB_SUFFIX) \
--   -l boost_filesystem$(BOOST_LIB_SUFFIX) \
--   -l boost_program_options$(BOOST_LIB_SUFFIX) \
--   -l boost_thread$(BOOST_LIB_SUFFIX) \
--   -l db_cxx$(BDB_LIB_SUFFIX) \
--   -l ssl \
--   -l crypto
-+   -lboost_system$(BOOST_LIB_SUFFIX) \
-+   -lboost_filesystem$(BOOST_LIB_SUFFIX) \
-+   -lboost_program_options$(BOOST_LIB_SUFFIX) \
-+   -lboost_thread$(BOOST_LIB_SUFFIX) \
-+   -ldb4_cxx$(BDB_LIB_SUFFIX) \
-+   -lssl \
-+   -lcrypto
- 
- TESTLIBS += \
-  -Wl,-B$(LMODE) \
-@@ -50,7 +51,7 @@ ifndef USE_UPNP
- 	override USE_UPNP = -
- endif
- ifneq (${USE_UPNP}, -)
--	LIBS += -l miniupnpc
-+	LIBS += -lminiupnpc
- 	DEFS += -DUSE_UPNP=$(USE_UPNP)
- endif
- 
-@@ -60,9 +61,9 @@ endif
- 
- LIBS+= \
-  -Wl,-B$(LMODE2) \
--   -l z \
--   -l dl \
--   -l pthread
-+   -lz \
-+   ${DL_LIBS} \
-+   -lpthread
- 
- 
- # Hardening
-@@ -184,6 +185,7 @@ obj/%-sse2.o: %-sse2.cpp
- 
- obj/%.o: %.cpp
- 	$(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
-+	$(CXX) -c $(xCXXFLAGS) -Iobj -MMD -MF $(@:%.o=%.d) -o $@ $<
- 	@cp $(@:%.o=%.d) $(@:%.o=%.P); \
- 	  sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
- 	      -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
diff --git a/litecoin/patches/patch-src_netbase.cpp b/litecoin/patches/patch-src_netbase.cpp
index b2ae11c..37afb27 100644
--- a/litecoin/patches/patch-src_netbase.cpp
+++ b/litecoin/patches/patch-src_netbase.cpp
@@ -1,15 +1,13 @@
-$NetBSD: patch-src_netbase.cpp,v 1.1 2014/09/22 11:20:28 othyro Exp $
+$NetBSD$
 
-be nbsd specific.
-
---- src/netbase.cpp.orig	2014-06-13 21:36:21.000000000 +0000
+--- src/netbase.cpp.orig	2015-06-15 08:51:30.000000000 +0000
 +++ src/netbase.cpp
-@@ -77,7 +77,7 @@ bool static LookupIntern(const char *psz
- #else
-     aiHint.ai_family = AF_INET;
- #endif
+@@ -124,7 +124,7 @@ bool static LookupIntern(const char *psz
+     aiHint.ai_socktype = SOCK_STREAM;
+     aiHint.ai_protocol = IPPROTO_TCP;
+     aiHint.ai_family = AF_UNSPEC;
 -#ifdef WIN32
-+#if defined(WIN32) || defined(__NetBSD__)
++#ifdef WIN32 || defined(__NetBSD__)
      aiHint.ai_flags = fAllowLookup ? 0 : AI_NUMERICHOST;
  #else
      aiHint.ai_flags = fAllowLookup ? AI_ADDRCONFIG : AI_NUMERICHOST;
diff --git a/litecoin/patches/patch-src_utilstrencodings.cpp b/litecoin/patches/patch-src_utilstrencodings.cpp
new file mode 100644
index 0000000..8c3b4ab
--- /dev/null
+++ b/litecoin/patches/patch-src_utilstrencodings.cpp
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- src/utilstrencodings.cpp.orig	2015-06-15 08:51:30.000000000 +0000
++++ src/utilstrencodings.cpp
+@@ -12,6 +12,11 @@
+ #include <errno.h>
+ #include <limits>
+ 
++#if defined __FreeBSD__
++#include <stdlib.h>
++#include <stdio.h>
++#endif
++
+ using namespace std;
+ 
+ string SanitizeString(const string& str)
diff --git a/litecoin/patches/patch-src_walletdb.cpp b/litecoin/patches/patch-src_walletdb.cpp
index efa7527..6f366c9 100644
--- a/litecoin/patches/patch-src_walletdb.cpp
+++ b/litecoin/patches/patch-src_walletdb.cpp
@@ -1,8 +1,8 @@
---- src/walletdb.cpp~	2014-06-19 00:51:15.000000000 -0700
-+++ src/walletdb.cpp	2014-08-19 03:50:42.757367359 -0700
---- src/walletdb.cpp.orig	2014-06-13 21:36:21.000000000 +0000
+$NetBSD$
+
+--- src/walletdb.cpp.orig	2015-06-15 08:51:30.000000000 +0000
 +++ src/walletdb.cpp
-@@ -548,11 +548,7 @@ bool BackupWallet(const CWallet& wallet,
+@@ -871,11 +871,7 @@ bool BackupWallet(const CWallet& wallet,
                      pathDest /= wallet.strWalletFile;
  
                  try {
@@ -12,6 +12,6 @@
 -                    filesystem::copy_file(pathSrc, pathDest);
 -#endif
 +                    filesystem::copy(pathSrc, pathDest);
-                     printf("copied wallet.dat to %s\n", pathDest.string().c_str());
+                     LogPrintf("copied wallet.dat to %s\n", pathDest.string());
                      return true;
                  } catch(const filesystem::filesystem_error &e) {
diff --git a/peercoin/MESSAGE b/peercoin/MESSAGE
index 31ab0b4..060bf29 100644
--- a/peercoin/MESSAGE
+++ b/peercoin/MESSAGE
@@ -1,5 +1,5 @@
 ===========================================================================
-$NetBSD: MESSAGE,v 1.1 2014/09/22 11:21:19 othyro Exp $
+$NetBSD$
 
 To use peercoind, you must set a rpcpassword in the configuration file:
 ${PKG_SYSCONFDIR}/peercoin.conf
diff --git a/peercoin/Makefile b/peercoin/Makefile
index 9c66098..22c557a 100644
--- a/peercoin/Makefile
+++ b/peercoin/Makefile
@@ -1,9 +1,12 @@
-# $NetBSD: Makefile,v 1.1 2014/09/22 11:21:19 othyro Exp $
+# $NetBSD$
 
-DISTNAME=	v0.4.0ppc
+#DISTNAME=	v0.4.0ppc
+#DISTNAME=	v0.6.2.2
+DISTNAME=       master
 PKGNAME=	peercoin-${DISTNAME:C/v([0-9]\.[0-9]\.[0-9]).*/\1/1}
 CATEGORIES=	finance
-MASTER_SITES=	https://github.com/ppcoin/ppcoin/archive/
+#MASTER_SITES=	https://github.com/ppcoin/ppcoin/archive/
+MASTER_SITES=	${MASTER_SITE_GITHUB:=ppcoin/ppcoin/archive/}
 DIST_SUBDIR=	${PKGBASE}
 
 MAINTAINER=	pkgsrc-users%users.sourceforge.net@localhost
@@ -12,12 +15,18 @@ COMMENT=	Open source peer-to-peer digital currency, favored by Shiba Inus
 LICENSE=	mit
 
 USE_LIBTOOL=	yes
-USE_TOOLS+=	gmake pkg-config
-USE_LANGUAGES=	c++
+#USE_TOOLS+=	gmake pkg-config autoconf aclocal autoheader automake libtoolize
+USE_TOOLS+=	gmake pkg-config autoconf aclocal autoheader automake
+USE_LANGUAGES=	c c++
 WRKSRC=		${WRKDIR}/ppcoin-${DISTNAME:S/v//1}
 AUTO_MKDIRS=	yes
 
-CXXFLAGS+=	-std=c++0x
+#CXXFLAGS+=	-std=c++0x
+CXXFLAGS+=      -I${BUILDLINK_PREFIX.boost-libs}/include/boost
+CXXFLAGS+=      -I/usr/include
+
+BUILDLINK_TRANSFORM+=   l:db_cxx:db4_cxx
+
 
 QMAKE_OPTIONS+=	BOOST_INCLUDE_PATH=${PREFIX}/include/boost
 QMAKE_OPTIONS+=	BDB_INCLUDE_PATH=${PREFIX}/include/db4
@@ -34,6 +43,7 @@ EGDIR=		${PREFIX}/share/examples/peercoin
 CONF_FILES=	${EGDIR}/peercoin.conf ${PKG_SYSCONFDIR}/peercoin.conf
 CONF_FILES_PERMS=	${EGDIR}/peercoin.conf ${PKG_SYSCONFDIR}/peercoin.conf ${ROOT_USER} ${ROOT_GROUP} 0600
 
+
 do-configure:
 	(cd ${WRKSRC} && env ${CONFIGURE_ENV} ${QTDIR}/bin/qmake "PREFIX=${PREFIX}" "QMAKE_CXXFLAGS=${CXXFLAGS}" ${QMAKE_OPTIONS} bitcoin-qt.pro)
 
@@ -49,6 +59,14 @@ do-install:
 
 .include "options.mk"
 
+# for backtrace
+.if ${OPSYS} == "FreeBSD"
+.include "../../devel/libexecinfo/buildlink3.mk"
+LIBS+=  -lexecinfo
+.endif
+
+DL_AUTO_VARS=           yes
+
 .include "../../databases/db4/buildlink3.mk"
 .include "../../devel/boost-libs/buildlink3.mk"
 .include "../../security/openssl/buildlink3.mk"
diff --git a/peercoin/PLIST b/peercoin/PLIST
index 776badb..ea3d7af 100644
--- a/peercoin/PLIST
+++ b/peercoin/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2014/09/22 11:21:19 othyro Exp $
+@comment $NetBSD$
 sbin/ppcoind
 share/examples/peercoin/peercoin.conf
 share/examples/rc.d/peercoind
diff --git a/peercoin/distinfo b/peercoin/distinfo
index 440d56d..45eb4c8 100644
--- a/peercoin/distinfo
+++ b/peercoin/distinfo
@@ -1,10 +1,12 @@
-$NetBSD: distinfo,v 1.1 2014/09/22 11:21:19 othyro Exp $
+$NetBSD$
 
-SHA1 (peercoin/v0.4.0ppc.tar.gz) = f089dca157d30232559b54e92a5b544ae16a6d96
-RMD160 (peercoin/v0.4.0ppc.tar.gz) = 2eaa85e779871b7a026233462447505eaf897dbd
-Size (peercoin/v0.4.0ppc.tar.gz) = 1698817 bytes
-SHA1 (patch-bitcoin-qt.pro) = 650f651fcdf0a18f27ae28d552cba720514d5760
-SHA1 (patch-src_db.h) = 48c97d3bdf04cce97391fcae7f55c8d631c4244f
-SHA1 (patch-src_makefile.unix) = 24b306de9f551cc1d66a1c33aa0d561727dad257
-SHA1 (patch-src_netbase.cpp) = 402bb1c78e0ecbe38306b75ad24fc07abbc8df2b
-SHA1 (patch-src_walletdb.cpp) = 4ed3fcb1c30a8966c8a53dbae997efcda9b80a63
+SHA1 (peercoin/master.tar.gz) = d23e96c5e9860fc598e6833dc6d07fd4c689192b
+RMD160 (peercoin/master.tar.gz) = 69d50b5923ec3f7aa909facb6528ade337d328ab
+Size (peercoin/master.tar.gz) = 1710278 bytes
+SHA1 (patch-bitcoin-qt.pro) = 85bf0be2e987eb52c910f861e4810c45342b1b62
+SHA1 (patch-src_db.h) = 1c258f1534144f7c7335473e2466ae0eb58f6ba4
+SHA1 (patch-src_makefile.unix) = 62408c6babfc0c24bfa2cfe4f0881ae03c6a2e70
+SHA1 (patch-src_netbase.cpp) = aa9fa4038b417426c0f176486a22d04b4777ac47
+SHA1 (patch-src_qt_transactiondesc.cpp) = 20ff326ee3f3eccc50868aae5a70c621b5d6c35b
+SHA1 (patch-src_serialize.h) = b376b4c2c8fb5f0393200efbecee3dd6038bacf3
+SHA1 (patch-src_walletdb.cpp) = 0146d65052eb9f6f0f80ba47f5826982b1f92541
diff --git a/peercoin/files/peercoind.sh b/peercoin/files/peercoind.sh
index 724a3f8..bc1d186 100644
--- a/peercoin/files/peercoind.sh
+++ b/peercoin/files/peercoind.sh
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: peercoind.sh,v 1.1 2014/09/22 11:21:19 othyro Exp $
+# $NetBSD$
 #
 
 # PROVIDE: ppcoind
diff --git a/peercoin/options.mk b/peercoin/options.mk
index 258a475..d613949 100644
--- a/peercoin/options.mk
+++ b/peercoin/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.1 2014/09/22 11:21:19 othyro Exp $
+# $NetBSD$
 
 PKG_OPTIONS_VAR=		PKG_OPTIONS.peercoin
 PKG_SUPPORTED_OPTIONS+=		miniupnpc dbus qrcode
diff --git a/peercoin/patches/patch-bitcoin-qt.pro b/peercoin/patches/patch-bitcoin-qt.pro
index 7647164..99fa95c 100644
--- a/peercoin/patches/patch-bitcoin-qt.pro
+++ b/peercoin/patches/patch-bitcoin-qt.pro
@@ -1,8 +1,8 @@
-$NetBSD: patch-bitcoin-qt.pro,v 1.1 2014/09/22 11:21:19 othyro Exp $
+$NetBSD$
 
 Use pkgsrc databases/db4.
 
---- bitcoin-qt.pro.orig	2014-04-05 03:59:47.000000000 +0000
+--- bitcoin-qt.pro.orig	2015-07-27 20:55:24.000000000 +0000
 +++ bitcoin-qt.pro
 @@ -289,22 +289,26 @@ isEmpty(BOOST_THREAD_LIB_SUFFIX) {
  
diff --git a/peercoin/patches/patch-src_db.h b/peercoin/patches/patch-src_db.h
index 82ce0b3..4ac0be9 100644
--- a/peercoin/patches/patch-src_db.h
+++ b/peercoin/patches/patch-src_db.h
@@ -1,8 +1,8 @@
-$NetBSD: patch-src_db.h,v 1.1 2014/09/22 11:21:19 othyro Exp $
+$NetBSD$
 
 Use pkgsrc databases/db4.
 
---- src/db.h.orig	2014-04-05 03:59:47.000000000 +0000
+--- src/db.h.orig	2015-07-27 20:55:24.000000000 +0000
 +++ src/db.h
 @@ -12,7 +12,7 @@
  #include <string>
diff --git a/peercoin/patches/patch-src_makefile.unix b/peercoin/patches/patch-src_makefile.unix
index 3ca9d15..c26630f 100644
--- a/peercoin/patches/patch-src_makefile.unix
+++ b/peercoin/patches/patch-src_makefile.unix
@@ -1,9 +1,9 @@
-$NetBSD: patch-src_makefile.unix,v 1.1 2014/09/22 11:21:19 othyro Exp $
+$NetBSD$
 
 miniupnp doesn't build at the moment.
 libs.
 
---- src/makefile.unix.orig	2014-04-05 03:59:47.000000000 +0000
+--- src/makefile.unix.orig	2015-07-27 20:55:24.000000000 +0000
 +++ src/makefile.unix
 @@ -3,12 +3,12 @@
  # Distributed under the MIT/X11 software license, see the accompanying
@@ -37,7 +37,7 @@ libs.
 +   -lboost_filesystem$(BOOST_LIB_SUFFIX) \
 +   -lboost_program_options$(BOOST_LIB_SUFFIX) \
 +   -lboost_thread$(BOOST_LIB_SUFFIX) \
-+   -ldb4_cxx$(BDB_LIB_SUFFIX) \
++   -ldb_cxx$(BDB_LIB_SUFFIX) \
 +   -lssl \
 +   -lcrypto
  
diff --git a/peercoin/patches/patch-src_netbase.cpp b/peercoin/patches/patch-src_netbase.cpp
index 10aad86..6318804 100644
--- a/peercoin/patches/patch-src_netbase.cpp
+++ b/peercoin/patches/patch-src_netbase.cpp
@@ -1,8 +1,8 @@
-$NetBSD: patch-src_netbase.cpp,v 1.1 2014/09/22 11:21:19 othyro Exp $
+$NetBSD$
 
 be nbsd specific.
 
---- src/netbase.cpp.orig	2014-04-05 03:59:47.000000000 +0000
+--- src/netbase.cpp.orig	2015-07-27 20:55:24.000000000 +0000
 +++ src/netbase.cpp
 @@ -30,7 +30,7 @@ bool static LookupIntern(const char *psz
  
diff --git a/peercoin/patches/patch-src_qt_transactiondesc.cpp b/peercoin/patches/patch-src_qt_transactiondesc.cpp
new file mode 100644
index 0000000..67c4ebe
--- /dev/null
+++ b/peercoin/patches/patch-src_qt_transactiondesc.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/qt/transactiondesc.cpp.orig	2015-07-27 20:55:24.000000000 +0000
++++ src/qt/transactiondesc.cpp
+@@ -8,7 +8,7 @@
+ #include "db.h"
+ #include "ui_interface.h"
+ #include "base58.h"
+-
++#include "walletdb.h"
+ #include <QString>
+ 
+ using namespace std;
diff --git a/peercoin/patches/patch-src_serialize.h b/peercoin/patches/patch-src_serialize.h
new file mode 100644
index 0000000..975d260
--- /dev/null
+++ b/peercoin/patches/patch-src_serialize.h
@@ -0,0 +1,23 @@
+$NetBSD$
+
+--- src/serialize.h.orig	2015-07-27 20:55:24.000000000 +0000
++++ src/serialize.h
+@@ -814,18 +814,6 @@ public:
+     iterator insert(iterator it, const char& x=char()) { return vch.insert(it, x); }
+     void insert(iterator it, size_type n, const char& x) { vch.insert(it, n, x); }
+ 
+-    void insert(iterator it, const_iterator first, const_iterator last)
+-    {
+-        if (it == vch.begin() + nReadPos && last - first <= nReadPos)
+-        {
+-            // special case for inserting at the front when there's room
+-            nReadPos -= (last - first);
+-            memcpy(&vch[nReadPos], &first[0], last - first);
+-        }
+-        else
+-            vch.insert(it, first, last);
+-    }
+-
+     void insert(iterator it, std::vector<char>::const_iterator first, std::vector<char>::const_iterator last)
+     {
+         if (it == vch.begin() + nReadPos && last - first <= nReadPos)
diff --git a/peercoin/patches/patch-src_walletdb.cpp b/peercoin/patches/patch-src_walletdb.cpp
index 7ecb6f0..d6dcc53 100644
--- a/peercoin/patches/patch-src_walletdb.cpp
+++ b/peercoin/patches/patch-src_walletdb.cpp
@@ -1,6 +1,6 @@
 --- src/walletdb.cpp~	2014-06-19 00:51:15.000000000 -0700
 +++ src/walletdb.cpp	2014-08-19 03:50:42.757367359 -0700
---- src/walletdb.cpp.orig	2014-04-05 03:59:47.000000000 +0000
+--- src/walletdb.cpp.orig	2015-07-27 20:55:24.000000000 +0000
 +++ src/walletdb.cpp
 @@ -410,11 +410,7 @@ bool BackupWallet(const CWallet& wallet,
                      pathDest /= wallet.strWalletFile;
diff --git a/primecoin/Makefile b/primecoin/Makefile
index 034ff02..a85ec0e 100644
--- a/primecoin/Makefile
+++ b/primecoin/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2014/09/22 11:22:07 othyro Exp $
+# $NetBSD$
 
 DISTNAME=	primecoin-0.1.2-linux
 PKGNAME=	${DISTNAME:S/-linux//1}
@@ -16,7 +16,7 @@ USE_LANGUAGES=	c c++
 WRKSRC=		${WRKDIR}/${DISTNAME}/src
 AUTO_MKDIRS=	yes
 
-CXXFLAGS+=	-std=c++0x
+CXXFLAGS+=	-DBOOST_VARIANT_USE_RELAXED_GET_BY_DEFAULT
 
 QMAKE_OPTIONS+=	BOOST_INCLUDE_PATH=${PREFIX}/include/boost
 QMAKE_OPTIONS+=	BDB_INCLUDE_PATH=${PREFIX}/include/db4
@@ -42,7 +42,7 @@ do-build:
 	cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} CFLAGS+=-Iobj ${QMAKE_OPTIONS} ${GMAKE} -f makefile.unix
 
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/primecoin-qt ${DESTDIR}${PREFIX}/bin
+#	${INSTALL_PROGRAM} ${WRKSRC}/primecoin-qt ${DESTDIR}${PREFIX}/bin
 	${INSTALL_PROGRAM} ${WRKSRC}/src/primecoind ${DESTDIR}${PREFIX}/sbin
 	${INSTALL_DATA} -m 600 ${FILESDIR}/primecoin.conf ${DESTDIR}${EGDIR}
 
diff --git a/primecoin/PLIST b/primecoin/PLIST
index 3a8e234..06ac370 100644
--- a/primecoin/PLIST
+++ b/primecoin/PLIST
@@ -1,5 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2014/09/22 11:22:07 othyro Exp $
-bin/primecoin-qt
+@comment $NetBSD$
 sbin/primecoind
 share/examples/primecoin/primecoin.conf
 share/examples/rc.d/primecoind
diff --git a/primecoin/distinfo b/primecoin/distinfo
index 2d35d05..18fe707 100644
--- a/primecoin/distinfo
+++ b/primecoin/distinfo
@@ -1,10 +1,12 @@
-$NetBSD: distinfo,v 1.1 2014/09/22 11:22:07 othyro Exp $
+$NetBSD$
 
 SHA1 (primecoin-0.1.2-linux.tar.gz) = e8f0a1f700d666af46228fbbed2d9f40d475a8ac
 RMD160 (primecoin-0.1.2-linux.tar.gz) = 84deec1c901e039f8172a226d0a81607f82e0021
 Size (primecoin-0.1.2-linux.tar.gz) = 16521236 bytes
 SHA1 (patch-bitcoin-qt.pro) = 065f52b10b8da1d76d3c98c5537da647665e8197
 SHA1 (patch-src_db.h) = bb24554af13e6a052835ef7a985306314119f887
+SHA1 (patch-src_init.cpp) = 252dbb34a712f1b0a533d600dfac6bcd5b719869
 SHA1 (patch-src_makefile.unix) = 7b1148f55cebb8a0c7381a0b96511b241fb9805e
 SHA1 (patch-src_netbase.cpp) = a5f11aa485070d00e635b07a75b98c45537ab401
+SHA1 (patch-src_serialize.h) = f64051b2a14e9ad0e52da0079d8781df55a0716e
 SHA1 (patch-src_walletdb.cpp) = 66bc458acac265b35473458028bd3860f96cf4fe
diff --git a/primecoin/files/primecoind.sh b/primecoin/files/primecoind.sh
index 6a78a02..e5c5615 100644
--- a/primecoin/files/primecoind.sh
+++ b/primecoin/files/primecoind.sh
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: primecoind.sh,v 1.1 2014/09/22 11:22:07 othyro Exp $
+# $NetBSD$
 #
 
 # PROVIDE: primed
diff --git a/primecoin/options.mk b/primecoin/options.mk
index 28cb561..044d2ff 100644
--- a/primecoin/options.mk
+++ b/primecoin/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.1 2014/09/22 11:22:07 othyro Exp $
+# $NetBSD$
 
 PKG_OPTIONS_VAR=		PKG_OPTIONS.primecoin
 PKG_SUPPORTED_OPTIONS+=		miniupnpc dbus qrcode
diff --git a/primecoin/patches/patch-bitcoin-qt.pro b/primecoin/patches/patch-bitcoin-qt.pro
index 1749491..2c1143b 100644
--- a/primecoin/patches/patch-bitcoin-qt.pro
+++ b/primecoin/patches/patch-bitcoin-qt.pro
@@ -1,4 +1,4 @@
-$NetBSD: patch-bitcoin-qt.pro,v 1.1 2014/09/22 11:22:07 othyro Exp $
+$NetBSD$
 
 Use pkgsrc databases/db4.
 
diff --git a/primecoin/patches/patch-src_db.h b/primecoin/patches/patch-src_db.h
index 5337127..7f34b38 100644
--- a/primecoin/patches/patch-src_db.h
+++ b/primecoin/patches/patch-src_db.h
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_db.h,v 1.1 2014/09/22 11:22:07 othyro Exp $
+$NetBSD$
 
 Use pkgsrc databases/db4.
 
diff --git a/primecoin/patches/patch-src_init.cpp b/primecoin/patches/patch-src_init.cpp
new file mode 100644
index 0000000..59589b2
--- /dev/null
+++ b/primecoin/patches/patch-src_init.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/init.cpp.orig	2013-08-05 12:37:20.000000000 +0000
++++ src/init.cpp
+@@ -537,7 +537,7 @@ bool AppInit2(boost::thread_group& threa
+     // Make sure enough file descriptors are available
+     int nBind = std::max((int)mapArgs.count("-bind"), 1);
+     nMaxConnections = GetArg("-maxconnections", 125);
+-    nMaxConnections = std::max(std::min(nMaxConnections, FD_SETSIZE - nBind - MIN_CORE_FILEDESCRIPTORS), 0);
++    nMaxConnections = std::max(std::min(nMaxConnections, (int)(FD_SETSIZE - nBind - MIN_CORE_FILEDESCRIPTORS)), 0);
+     int nFD = RaiseFileDescriptorLimit(nMaxConnections + MIN_CORE_FILEDESCRIPTORS);
+     if (nFD < MIN_CORE_FILEDESCRIPTORS)
+         return InitError(_("Not enough file descriptors available."));
diff --git a/primecoin/patches/patch-src_makefile.unix b/primecoin/patches/patch-src_makefile.unix
index eb56a32..4dc6729 100644
--- a/primecoin/patches/patch-src_makefile.unix
+++ b/primecoin/patches/patch-src_makefile.unix
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_makefile.unix,v 1.1 2014/09/22 11:22:07 othyro Exp $
+$NetBSD$
 
 miniupnp doesn't build at the moment.
 libs.
diff --git a/primecoin/patches/patch-src_netbase.cpp b/primecoin/patches/patch-src_netbase.cpp
index 5b0bf29..03e0a1d 100644
--- a/primecoin/patches/patch-src_netbase.cpp
+++ b/primecoin/patches/patch-src_netbase.cpp
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_netbase.cpp,v 1.1 2014/09/22 11:22:07 othyro Exp $
+$NetBSD$
 
 be nbsd specific.
 
diff --git a/primecoin/patches/patch-src_serialize.h b/primecoin/patches/patch-src_serialize.h
new file mode 100644
index 0000000..0a50c4d
--- /dev/null
+++ b/primecoin/patches/patch-src_serialize.h
@@ -0,0 +1,24 @@
+$NetBSD$
+
+--- src/serialize.h.orig	2013-08-05 12:37:20.000000000 +0000
++++ src/serialize.h
+@@ -895,19 +895,6 @@ public:
+     iterator insert(iterator it, const char& x=char()) { return vch.insert(it, x); }
+     void insert(iterator it, size_type n, const char& x) { vch.insert(it, n, x); }
+ 
+-    void insert(iterator it, const_iterator first, const_iterator last)
+-    {
+-        assert(last - first >= 0);
+-        if (it == vch.begin() + nReadPos && (unsigned int)(last - first) <= nReadPos)
+-        {
+-            // special case for inserting at the front when there's room
+-            nReadPos -= (last - first);
+-            memcpy(&vch[nReadPos], &first[0], last - first);
+-        }
+-        else
+-            vch.insert(it, first, last);
+-    }
+-
+     void insert(iterator it, std::vector<char>::const_iterator first, std::vector<char>::const_iterator last)
+     {
+         assert(last - first >= 0);
diff --git a/quarkcoin/MESSAGE b/quarkcoin/MESSAGE
index 4db5789..3b4d457 100644
--- a/quarkcoin/MESSAGE
+++ b/quarkcoin/MESSAGE
@@ -1,5 +1,5 @@
 ===========================================================================
-$NetBSD: MESSAGE,v 1.1 2014/09/22 11:22:56 othyro Exp $
+$NetBSD$
 
 To use quarkcoind, you must set a rpcpassword in the configuration file:
 ${PKG_SYSCONFDIR}/quarkcoin.conf
diff --git a/quarkcoin/Makefile b/quarkcoin/Makefile
index a3c6332..95e1b90 100644
--- a/quarkcoin/Makefile
+++ b/quarkcoin/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.1 2014/09/22 11:22:56 othyro Exp $
+# $NetBSD$
 
-DISTNAME=	v0.8.3.25
+#DISTNAME=	v0.8.3.25
+DISTNAME=	v0.9.2.4
 PKGNAME=	quarkcoin-${DISTNAME:S/v//1}
 CATEGORIES=	finance
 MASTER_SITES=	https://github.com/MaxGuevara/quark/archive/
@@ -12,12 +13,29 @@ COMMENT=	Open source Internet currency
 LICENSE=	mit
 
 USE_LIBTOOL=	yes
-USE_TOOLS+=	gmake pkg-config
+USE_TOOLS+=	gmake pkg-config autoconf aclocal autoheader automake libtoolize
 USE_LANGUAGES=	c c++
 WRKSRC=		${WRKDIR}/${PKGNAME_NOREV:S/coin//1}
 AUTO_MKDIRS=	yes
+HAS_CONFIGURE=  yes
+GNU_CONFIGURE=  yes
+
+CFLAGS+=        -fPIC
+#CXXFLAGS+=	-std=c++0x
+CXXFLAGS+= -Wl,-R${BUILDLINK_PREFIX.boost-libs}/lib/quarkcoin -L${BUILDLINK_PREFIX.boost-libs}/lib/quarkcoin
+CXXFLAGS+=      -DBOOST_VARIANT_USE_RELAXED_GET_BY_DEFAULT=1
+CXXFLAGS+=      -I${BUILDLINK_PREFIX.boost-libs}/include/boost
+
+
+BUILDLINK_TRANSFORM+=   l:db_cxx:db4_cxx
+
+CONFIGURE_ARGS+=  --with-boost=${BUILDLINK_PREFIX.boost-libs}
+CONFIGURE_ARGS+=  --enable-hardening
+CONFIGURE_ARGS+=  ${PREFIX}/include/db4
+
+LIBTOOLIZE=     ${PREFIX}/bin/libtoolize
+
 
-CXXFLAGS+=	-std=c++0x
 
 QMAKE_OPTIONS+=	BOOST_INCLUDE_PATH=${PREFIX}/include/boost
 QMAKE_OPTIONS+=	BDB_INCLUDE_PATH=${PREFIX}/include/db4
@@ -34,16 +52,25 @@ EGDIR=		${PREFIX}/share/examples/quarkcoin
 CONF_FILES=	${EGDIR}/quarkcoin.conf ${PKG_SYSCONFDIR}/quarkcoin.conf
 CONF_FILES_PERMS=	${EGDIR}/quarkcoin.conf ${PKG_SYSCONFDIR}/quarkcoin.conf ${ROOT_USER} ${ROOT_GROUP} 0600
 
-do-configure:
-	(cd ${WRKSRC} && env ${CONFIGURE_ENV} ${QTDIR}/bin/qmake "PREFIX=${PREFIX}" "QMAKE_CXXFLAGS=${CXXFLAGS}" ${QMAKE_OPTIONS} quarkcoin-qt.pro)
-
-do-build:
-	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${QMAKE_OPTIONS} ${GMAKE};	\
-	cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} CFLAGS+=-Iobj ${QMAKE_OPTIONS} ${GMAKE} -f makefile.unix
+pre-configure:
+	cd ${WRKSRC};             \
+        ${LIBTOOLIZE} --force;    \
+        ${PREFIX}/bin/aclocal;    \
+        ${PREFIX}/bin/autoheader; \
+        ${PREFIX}/bin/automake -a --foreign -i  --add-missing; \
+        ${PREFIX}/bin/autoconf; \
+        ${PREFIX}/bin/autoreconf -i
 
+#do-configure:
+#	(cd ${WRKSRC} && env ${CONFIGURE_ENV} ${QTDIR}/bin/qmake "PREFIX=${PREFIX}" "QMAKE_CXXFLAGS=${CXXFLAGS}" ${QMAKE_OPTIONS} quarkcoin-qt.pro)
+#
+#do-build:
+#	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${QMAKE_OPTIONS} ${GMAKE};	\
+#	cd ${WRKSRC}/src && ${SETENV} ${MAKE_ENV} CFLAGS+=-Iobj ${QMAKE_OPTIONS} ${GMAKE} -f makefile.unix
+#
 do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/quarkcoin-qt ${DESTDIR}${PREFIX}/bin
-	${INSTALL_PROGRAM} ${WRKSRC}/src/quarkcoind ${DESTDIR}${PREFIX}/sbin
+	${INSTALL_PROGRAM} ${WRKSRC}/src/quark-cli ${DESTDIR}${PREFIX}/bin
+	${INSTALL_PROGRAM} ${WRKSRC}/src/quarkd ${DESTDIR}${PREFIX}/sbin/quarkcoind
 	${INSTALL_DATA} -m 600 ${FILESDIR}/quarkcoin.conf ${DESTDIR}${EGDIR}
 
 .include "options.mk"
diff --git a/quarkcoin/PLIST b/quarkcoin/PLIST
index 5a9fdc6..041f7fd 100644
--- a/quarkcoin/PLIST
+++ b/quarkcoin/PLIST
@@ -1,5 +1,5 @@
-@comment $NetBSD: PLIST,v 1.1 2014/09/22 11:22:56 othyro Exp $
-bin/quarkcoin-qt
+@comment $NetBSD$
+bin/quark-cli
 sbin/quarkcoind
 share/examples/quarkcoin/quarkcoin.conf
 share/examples/rc.d/quarkcoind
diff --git a/quarkcoin/distinfo b/quarkcoin/distinfo
index 649204f..1a9f3b7 100644
--- a/quarkcoin/distinfo
+++ b/quarkcoin/distinfo
@@ -1,10 +1,8 @@
-$NetBSD: distinfo,v 1.1 2014/09/22 11:22:56 othyro Exp $
+$NetBSD$
 
-SHA1 (quarkcoin/v0.8.3.25.tar.gz) = 326e9436fe2feb54a04ce1666ea5489a6f284a16
-RMD160 (quarkcoin/v0.8.3.25.tar.gz) = 77206f871c3645155adc0c4023d35e940e03e685
-Size (quarkcoin/v0.8.3.25.tar.gz) = 3917670 bytes
-SHA1 (patch-quarkcoin-qt.pro) = 24aba174da78b9fabc1d0a23572e4c4cab627758
-SHA1 (patch-src_db.h) = 8786ca0bdcc50118477346a40b462ba94e42b128
-SHA1 (patch-src_makefile.unix) = 5d3049213721d9a0eed8a6406a400de97e5e911f
-SHA1 (patch-src_netbase.cpp) = 96c960ac9077ffce08562f1c2e117dbcf215fc8d
-SHA1 (patch-src_walletdb.cpp) = 48a8f6de2beaaf4338e25b82d6ab644bb9214849
+SHA1 (quarkcoin/v0.9.2.4.tar.gz) = 5d462175e63068fdb978de66658ae6f59ee96c2f
+RMD160 (quarkcoin/v0.9.2.4.tar.gz) = 10b7070adf4e83e4bf2b830c97e068de42206f35
+Size (quarkcoin/v0.9.2.4.tar.gz) = 5682978 bytes
+SHA1 (patch-src_chainparams.cpp) = ea45666649ddf2bc07df6eee238ea39f384e36d9
+SHA1 (patch-src_db.h) = db437da5974f71bfb60ad4318ab60799ffdd14ba
+SHA1 (patch-src_netbase.cpp) = 7279be96208a82a3f612f5a8022807868f59cf71
diff --git a/quarkcoin/files/quarkcoind.sh b/quarkcoin/files/quarkcoind.sh
index 2966c97..d8a5814 100644
--- a/quarkcoin/files/quarkcoind.sh
+++ b/quarkcoin/files/quarkcoind.sh
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: quarkcoind.sh,v 1.1 2014/09/22 11:22:57 othyro Exp $
+# $NetBSD$
 #
 
 # PROVIDE: quarkcoind
diff --git a/quarkcoin/options.mk b/quarkcoin/options.mk
index dcfc3d7..1f7f1d6 100644
--- a/quarkcoin/options.mk
+++ b/quarkcoin/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.1 2014/09/22 11:22:56 othyro Exp $
+# $NetBSD$
 
 PKG_OPTIONS_VAR=		PKG_OPTIONS.quark
 PKG_SUPPORTED_OPTIONS+=		miniupnpc dbus qrcode
diff --git a/quarkcoin/patches/patch-quarkcoin-qt.pro b/quarkcoin/patches/patch-quarkcoin-qt.pro
deleted file mode 100644
index ea07602..0000000
--- a/quarkcoin/patches/patch-quarkcoin-qt.pro
+++ /dev/null
@@ -1,43 +0,0 @@
-$NetBSD: patch-quarkcoin-qt.pro,v 1.1 2014/09/22 11:22:57 othyro Exp $
-
-Use pkgsrc databases/db4.
-
---- quarkcoin-qt.pro.orig	2014-08-09 16:55:31.000000000 +0000
-+++ quarkcoin-qt.pro
-@@ -369,22 +369,26 @@ isEmpty(BOOST_THREAD_LIB_SUFFIX) {
- 
- isEmpty(BDB_LIB_PATH) {
-     macx:BDB_LIB_PATH = /opt/local/lib/db48
-+    unix:BDB_LIB_PATH = $$PREFIX/lib
- }
- 
- isEmpty(BDB_LIB_SUFFIX) {
--    macx:BDB_LIB_SUFFIX = -4.8
-+    macx|unix:BDB_LIB_SUFFIX = -4.8
- }
- 
- isEmpty(BDB_INCLUDE_PATH) {
-     macx:BDB_INCLUDE_PATH = /opt/local/include/db48
-+    unix:BDB_INCLUDE_PATH = $$PREFIX/include/db4
- }
- 
- isEmpty(BOOST_LIB_PATH) {
-     macx:BOOST_LIB_PATH = /opt/local/lib
-+    unix:BOOST_LIB_PATH = $$PREFIX/lib
- }
- 
- isEmpty(BOOST_INCLUDE_PATH) {
-     macx:BOOST_INCLUDE_PATH = /opt/local/include
-+    unix:BOOST_INCLUDE_PATH = $$PREFIX/include/boost
- }
- 
- win32:DEFINES += WIN32
-@@ -421,7 +425,7 @@ macx:QMAKE_INFO_PLIST = share/qt/Info.pl
- # Set libraries and includes at end, to use platform-defined defaults if not overridden
- INCLUDEPATH += $$BOOST_INCLUDE_PATH $$BDB_INCLUDE_PATH $$OPENSSL_INCLUDE_PATH $$QRENCODE_INCLUDE_PATH
- LIBS += $$join(BOOST_LIB_PATH,,-L,) $$join(BDB_LIB_PATH,,-L,) $$join(OPENSSL_LIB_PATH,,-L,) $$join(QRENCODE_LIB_PATH,,-L,)
--LIBS += -lssl -lcrypto -ldb_cxx$$BDB_LIB_SUFFIX
-+LIBS += -lssl -lcrypto -ldb4_cxx$$BDB_LIB_SUFFIX
- # -lgdi32 has to happen after -lcrypto (see  #681)
- win32:LIBS += -lws2_32 -lshlwapi -lmswsock -lole32 -loleaut32 -luuid -lgdi32
- LIBS += -lboost_system$$BOOST_LIB_SUFFIX -lboost_filesystem$$BOOST_LIB_SUFFIX -lboost_program_options$$BOOST_LIB_SUFFIX -lboost_thread$$BOOST_THREAD_LIB_SUFFIX
diff --git a/quarkcoin/patches/patch-src_chainparams.cpp b/quarkcoin/patches/patch-src_chainparams.cpp
new file mode 100644
index 0000000..a6ab0cf
--- /dev/null
+++ b/quarkcoin/patches/patch-src_chainparams.cpp
@@ -0,0 +1,38 @@
+$NetBSD$
+
+--- src/chainparams.cpp.orig	2015-05-31 10:15:00.000000000 +0000
++++ src/chainparams.cpp
+@@ -78,11 +78,11 @@ public:
+         vSeeds.push_back(CDNSSeedData("seed7.qrkcoin.org", "seed7.qrkcoin.org"));
+         vSeeds.push_back(CDNSSeedData("seed8.qrkcoin.org", "seed8.qrkcoin.org"));
+ 		
+-        base58Prefixes[PUBKEY_ADDRESS] = list_of(58);
+-        base58Prefixes[SCRIPT_ADDRESS] = list_of(9);
+-        base58Prefixes[SECRET_KEY] =     list_of(186);
+-        base58Prefixes[EXT_PUBLIC_KEY] = list_of(0x04)(0x88)(0xB2)(0x1E);
+-        base58Prefixes[EXT_SECRET_KEY] = list_of(0x04)(0x88)(0xAD)(0xE4);
++        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1, 58);
++        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1, 9);
++        base58Prefixes[SECRET_KEY] =     std::vector<unsigned char>(1, 186);
++        base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x88)(0xB2)(0x1E).convert_to_container<std::vector<unsigned char> >();
++        base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x88)(0xAD)(0xE4).convert_to_container<std::vector<unsigned char> >();
+ 
+         // Convert the pnSeeds array into usable address objects.
+         for (unsigned int i = 0; i < ARRAYLEN(pnSeed); i++)
+@@ -140,11 +140,11 @@ public:
+         vFixedSeeds.clear();
+         vSeeds.clear();
+ 
+-        base58Prefixes[PUBKEY_ADDRESS] = list_of(119);
+-        base58Prefixes[SCRIPT_ADDRESS] = list_of(199);
+-        base58Prefixes[SECRET_KEY]     = list_of(247);
+-        base58Prefixes[EXT_PUBLIC_KEY] = list_of(0x04)(0x35)(0x87)(0xCF);
+-        base58Prefixes[EXT_SECRET_KEY] = list_of(0x04)(0x35)(0x83)(0x94);
++        base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1, 119);
++        base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1, 199);
++        base58Prefixes[SECRET_KEY]     = std::vector<unsigned char>(1, 247);
++        base58Prefixes[EXT_PUBLIC_KEY] = boost::assign::list_of(0x04)(0x35)(0x87)(0xCF).convert_to_container<std::vector<unsigned char> >();
++        base58Prefixes[EXT_SECRET_KEY] = boost::assign::list_of(0x04)(0x35)(0x83)(0x94).convert_to_container<std::vector<unsigned char> >();
+     }
+     virtual Network NetworkID() const { return CChainParams::TESTNET; }
+ };
diff --git a/quarkcoin/patches/patch-src_db.h b/quarkcoin/patches/patch-src_db.h
index 938c5e9..b65eae8 100644
--- a/quarkcoin/patches/patch-src_db.h
+++ b/quarkcoin/patches/patch-src_db.h
@@ -1,15 +1,13 @@
-$NetBSD: patch-src_db.h,v 1.1 2014/09/22 11:22:57 othyro Exp $
+$NetBSD$
 
-Use pkgsrc databases/db4.
-
---- src/db.h.orig	2014-08-09 16:55:31.000000000 +0000
+--- src/db.h.orig	2015-05-31 10:15:00.000000000 +0000
 +++ src/db.h
-@@ -11,7 +11,7 @@
- #include <string>
+@@ -15,7 +15,7 @@
  #include <vector>
  
+ #include <boost/filesystem/path.hpp>
 -#include <db_cxx.h>
 +#include <db4/db_cxx.h>
  
- class CAddress;
  class CAddrMan;
+ struct CBlockLocator;
diff --git a/quarkcoin/patches/patch-src_makefile.unix b/quarkcoin/patches/patch-src_makefile.unix
deleted file mode 100644
index c5302cc..0000000
--- a/quarkcoin/patches/patch-src_makefile.unix
+++ /dev/null
@@ -1,84 +0,0 @@
-$NetBSD: patch-src_makefile.unix,v 1.1 2014/09/22 11:22:57 othyro Exp $
-
-miniupnp doesn't build at the moment.
-libs.
-
---- src/makefile.unix.orig	2014-08-09 16:55:31.000000000 +0000
-+++ src/makefile.unix
-@@ -5,7 +5,7 @@
- # :=0 --> UPnP support turned off by default at runtime
- # :=1 --> UPnP support turned on by default at runtime
- # :=- --> No UPnP support - miniupnp not required
--USE_UPNP:=0
-+USE_UPNP:=-
- 
- # :=1 --> Enable IPv6 support
- # :=0 --> Disable IPv6 support
-@@ -16,7 +16,7 @@ LINK:=$(CXX)
- DEFS=-DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64
- 
- DEFS += $(addprefix -I,$(CURDIR) $(CURDIR)/obj $(BOOST_INCLUDE_PATH) $(BDB_INCLUDE_PATH) $(OPENSSL_INCLUDE_PATH))
--LIBS = $(addprefix -L,$(BOOST_LIB_PATH) $(BDB_LIB_PATH) $(OPENSSL_LIB_PATH))
-+LIBS = $(addprefix -L,$(BOOST_LIB_PATH),$(BDB_LIB_PATH),$(OPENSSL_LIB_PATH))
- 
- TESTDEFS = -DTEST_DATA_DIR=$(abspath test/data)
- 
-@@ -33,14 +33,15 @@ endif
- 
- # for boost 1.37, add -mt to the boost libraries
- LIBS += \
-+ -L/usr/lib -Wl,-R/usr/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib \
-  -Wl,-B$(LMODE) \
--   -l boost_system$(BOOST_LIB_SUFFIX) \
--   -l boost_filesystem$(BOOST_LIB_SUFFIX) \
--   -l boost_program_options$(BOOST_LIB_SUFFIX) \
--   -l boost_thread$(BOOST_LIB_SUFFIX) \
--   -l db_cxx$(BDB_LIB_SUFFIX) \
--   -l ssl \
--   -l crypto
-+   -lboost_system$(BOOST_LIB_SUFFIX) \
-+   -lboost_filesystem$(BOOST_LIB_SUFFIX) \
-+   -lboost_program_options$(BOOST_LIB_SUFFIX) \
-+   -lboost_thread$(BOOST_LIB_SUFFIX) \
-+   -ldb4_cxx$(BDB_LIB_SUFFIX) \
-+   -lssl \
-+   -lcrypto
- 
- TESTLIBS += \
-  -Wl,-B$(LMODE) \
-@@ -50,7 +51,7 @@ ifndef USE_UPNP
- 	override USE_UPNP = -
- endif
- ifneq (${USE_UPNP}, -)
--	LIBS += -l miniupnpc
-+	LIBS += -lminiupnpc
- 	DEFS += -DUSE_UPNP=$(USE_UPNP)
- endif
- 
-@@ -60,9 +61,9 @@ endif
- 
- LIBS+= \
-  -Wl,-B$(LMODE2) \
--   -l z \
--   -l dl \
--   -l pthread
-+   -lz \
-+   ${DL_LIBS} \
-+   -lpthread
- 
- 
- # Hardening
-@@ -175,10 +176,13 @@ leveldb/libleveldb.a:
- obj/build.h: FORCE
- 	/bin/sh ../share/genbuild.sh obj/build.h
- version.cpp: obj/build.h
-+ifeq ($(wildcard obj/build.h),)
- DEFS += -DHAVE_BUILD_INFO
-+endif
- 
- obj/%.o: %.cpp
- 	$(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $<
-+	$(CXX) -c $(xCXXFLAGS) -Iobj -MMD -MF $(@:%.o=%.d) -o $@ $<
- 	@cp $(@:%.o=%.d) $(@:%.o=%.P); \
- 	  sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
- 	      -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \
diff --git a/quarkcoin/patches/patch-src_netbase.cpp b/quarkcoin/patches/patch-src_netbase.cpp
index ca954af..e5799ae 100644
--- a/quarkcoin/patches/patch-src_netbase.cpp
+++ b/quarkcoin/patches/patch-src_netbase.cpp
@@ -1,13 +1,11 @@
-$NetBSD: patch-src_netbase.cpp,v 1.1 2014/09/22 11:22:57 othyro Exp $
+$NetBSD$
 
-be nbsd specific.
-
---- src/netbase.cpp.orig	2014-08-09 16:55:31.000000000 +0000
+--- src/netbase.cpp.orig	2015-05-31 10:15:00.000000000 +0000
 +++ src/netbase.cpp
-@@ -77,7 +77,7 @@ bool static LookupIntern(const char *psz
- #else
-     aiHint.ai_family = AF_INET;
- #endif
+@@ -79,7 +79,7 @@ bool static LookupIntern(const char *psz
+     aiHint.ai_socktype = SOCK_STREAM;
+     aiHint.ai_protocol = IPPROTO_TCP;
+     aiHint.ai_family = AF_UNSPEC;
 -#ifdef WIN32
 +#if defined(WIN32) || defined(__NetBSD__)
      aiHint.ai_flags = fAllowLookup ? 0 : AI_NUMERICHOST;
diff --git a/quarkcoin/patches/patch-src_walletdb.cpp b/quarkcoin/patches/patch-src_walletdb.cpp
deleted file mode 100644
index 80f6013..0000000
--- a/quarkcoin/patches/patch-src_walletdb.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
---- src/walletdb.cpp~	2014-06-19 00:51:15.000000000 -0700
-+++ src/walletdb.cpp	2014-08-19 03:50:42.757367359 -0700
---- src/walletdb.cpp.orig	2014-08-09 16:55:31.000000000 +0000
-+++ src/walletdb.cpp
-@@ -568,11 +568,7 @@ bool BackupWallet(const CWallet& wallet,
-                     pathDest /= wallet.strWalletFile;
- 
-                 try {
--#if BOOST_VERSION >= 104000
--                    filesystem::copy_file(pathSrc, pathDest, filesystem::copy_option::overwrite_if_exists);
--#else
--                    filesystem::copy_file(pathSrc, pathDest);
--#endif
-+                    filesystem::copy(pathSrc, pathDest);
-                     printf("copied wallet.dat to %s\n", pathDest.string().c_str());
-                     return true;
-                 } catch(const filesystem::filesystem_error &e) {
diff --git a/zetacoin/MESSAGE b/zetacoin/MESSAGE
index bed9422..92b1911 100644
--- a/zetacoin/MESSAGE
+++ b/zetacoin/MESSAGE
@@ -1,5 +1,5 @@
 ===========================================================================
-$NetBSD: MESSAGE,v 1.1 2014/09/22 11:23:59 othyro Exp $
+$NetBSD$
 
 To use zetacoind, you must set a rpcpassword in the configuration file:
 ${PKG_SYSCONFDIR}/zetacoin.conf
diff --git a/zetacoin/Makefile b/zetacoin/Makefile
index 0322d06..efcfc41 100644
--- a/zetacoin/Makefile
+++ b/zetacoin/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.2 2014/09/22 11:29:53 othyro Exp $
+# $NetBSD$
 
-DISTNAME=	v0.9.2.2
+#DISTNAME=	v0.9.2.2
+DISTNAME=	v0.9.2.6
 PKGNAME=	zetacoin-${DISTNAME:S/v//1}
 CATEGORIES=	finance
 MASTER_SITES=	https://github.com/zetacoin/zetacoin/archive/
diff --git a/zetacoin/PLIST b/zetacoin/PLIST
index 047c2ba..149efa4 100644
--- a/zetacoin/PLIST
+++ b/zetacoin/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2014/09/22 11:23:59 othyro Exp $
+@comment $NetBSD$
 bin/zetacoin-cli
 ${PLIST.qt}bin/zetacoin-qt
 sbin/zetacoind
diff --git a/zetacoin/distinfo b/zetacoin/distinfo
index 77844af..fe67dc6 100644
--- a/zetacoin/distinfo
+++ b/zetacoin/distinfo
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.1 2014/09/22 11:23:59 othyro Exp $
+$NetBSD$
 
-SHA1 (zetacoin/v0.9.2.2.tar.gz) = 63bcf7565098c8611dcb0eb527a663d241c4c59e
-RMD160 (zetacoin/v0.9.2.2.tar.gz) = 7af8488561551238cd51e71d3c391b5e3daf8b2a
-Size (zetacoin/v0.9.2.2.tar.gz) = 4265820 bytes
-SHA1 (patch-src_db.h) = 98c0e1fa028eb7795d1e9e83fefeb282bdc98a7b
-SHA1 (patch-src_leveldb_port_port__posix.h) = 7bef0b13dd861ecf0d5514572f97b622f93573fa
-SHA1 (patch-src_netbase.cpp) = 32cd4d131667cf706cafa9808f607cd6f697161e
-SHA1 (patch-src_walletdb.cpp) = c5b0d528a5ec5c9ada13b218139164e76861ba74
+SHA1 (zetacoin/v0.9.2.6.tar.gz) = 72890c481932f1f3839def84b873801bb285aa3a
+RMD160 (zetacoin/v0.9.2.6.tar.gz) = 4fe35296b54ed3c4a260da0e94da66b31e7abd67
+Size (zetacoin/v0.9.2.6.tar.gz) = 4266222 bytes
+SHA1 (patch-src_db.h) = f6879888959d0238a50b1fc6aa916342dcc560d4
+SHA1 (patch-src_leveldb_port_port__posix.h) = 8acbc67265e0af5f5dee45e96801e428ac068a85
+SHA1 (patch-src_netbase.cpp) = 1468373d0a1de416350d417d30d16957683222f1
+SHA1 (patch-src_rpcrawtransaction.cpp) = 9165e79902e084e53976f98ec806a919dbfa10de
+SHA1 (patch-src_walletdb.cpp) = ef2946ed59c187ed6af1a3e538b6321c4929f1c8
diff --git a/zetacoin/files/zetacoind.sh b/zetacoin/files/zetacoind.sh
index 2f4c2a3..3eca8d3 100644
--- a/zetacoin/files/zetacoind.sh
+++ b/zetacoin/files/zetacoind.sh
@@ -1,6 +1,6 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: zetacoind.sh,v 1.1 2014/09/22 11:23:59 othyro Exp $
+# $NetBSD$
 #
 
 # PROVIDE: zetacoind
diff --git a/zetacoin/options.mk b/zetacoin/options.mk
index e9486da..3f9b2e7 100644
--- a/zetacoin/options.mk
+++ b/zetacoin/options.mk
@@ -1,7 +1,7 @@
-# $NetBSD: options.mk,v 1.1 2014/09/22 11:23:59 othyro Exp $
+# $NetBSD$
 
 PKG_OPTIONS_VAR=		PKG_OPTIONS.zetacoin
-PKG_SUPPORTED_OPTIONS+=		miniupnpc qrcode qt tests
+PKG_SUPPORTED_OPTIONS+=		miniupnpc qtdbus qrcode qt tests
 PKG_SUGGESTED_OPTIONS=		# blank
 #PKG_SUGGESTED_OPTIONS+=		qtdbus qrcode
 
@@ -24,10 +24,13 @@ QMAKE_OPTIONS+=	USE_QRCODE=1
 QMAKE_OPTIONS+=	USE_IPV6=0
 .endif
 
-.if !empty(PKG_OPTIONS:Mqt)
+.if !empty(PKG_OPTIONS:Mqt) || !empty(PKG_OPTIONS:Mqtdbus)
 PLIST.qt=	yes
 .include "../../x11/qt5-qtbase/buildlink3.mk"
-QMAKE_OPTIONS+=	USE_DBUS=1 # XXX still needed?
+.if !empty(PKG_OPTIONS:Mqtdbus)
+QMAKE_OPTIONS+=	USE_DBUS=1
+.include "../../x11/qt5-dbus/buildlink3.mk"
+.endif
 .endif
 
 .if empty(PKG_OPTIONS:Mqt)
diff --git a/zetacoin/patches/patch-src_db.h b/zetacoin/patches/patch-src_db.h
index a8730b1..8d65633 100644
--- a/zetacoin/patches/patch-src_db.h
+++ b/zetacoin/patches/patch-src_db.h
@@ -1,8 +1,8 @@
-$NetBSD: patch-src_db.h,v 1.1 2014/09/22 11:23:59 othyro Exp $
+$NetBSD$
 
 Use pkgsrc databases/db4.
 
---- src/db.h.orig	2014-06-19 07:51:15.000000000 +0000
+--- src/db.h.orig	2015-03-24 01:40:33.000000000 +0000
 +++ src/db.h
 @@ -15,7 +15,7 @@
  #include <vector>
diff --git a/zetacoin/patches/patch-src_leveldb_port_port__posix.h b/zetacoin/patches/patch-src_leveldb_port_port__posix.h
index f010930..634e15c 100644
--- a/zetacoin/patches/patch-src_leveldb_port_port__posix.h
+++ b/zetacoin/patches/patch-src_leveldb_port_port__posix.h
@@ -1,8 +1,8 @@
-$NetBSD: patch-src_leveldb_port_port__posix.h,v 1.1 2014/09/22 11:23:59 othyro Exp $
+$NetBSD$
 
 Be nbsd specific.
 
---- src/leveldb/port/port_posix.h.orig	2014-06-19 07:51:15.000000000 +0000
+--- src/leveldb/port/port_posix.h.orig	2015-03-24 01:40:33.000000000 +0000
 +++ src/leveldb/port/port_posix.h
 @@ -50,8 +50,12 @@
  #include "port/atomic_pointer.h"
diff --git a/zetacoin/patches/patch-src_netbase.cpp b/zetacoin/patches/patch-src_netbase.cpp
index 76835a4..e28b2ac 100644
--- a/zetacoin/patches/patch-src_netbase.cpp
+++ b/zetacoin/patches/patch-src_netbase.cpp
@@ -1,8 +1,8 @@
-$NetBSD: patch-src_netbase.cpp,v 1.1 2014/09/22 11:23:59 othyro Exp $
+$NetBSD$
 
 be nbsd specific.
 
---- src/netbase.cpp.orig	2014-06-19 07:51:15.000000000 +0000
+--- src/netbase.cpp.orig	2015-03-24 01:40:33.000000000 +0000
 +++ src/netbase.cpp
 @@ -82,8 +82,12 @@ bool static LookupIntern(const char *psz
  #ifdef WIN32
diff --git a/zetacoin/patches/patch-src_rpcrawtransaction.cpp b/zetacoin/patches/patch-src_rpcrawtransaction.cpp
new file mode 100644
index 0000000..08dc9ec
--- /dev/null
+++ b/zetacoin/patches/patch-src_rpcrawtransaction.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/rpcrawtransaction.cpp.orig	2015-03-24 01:40:33.000000000 +0000
++++ src/rpcrawtransaction.cpp
+@@ -296,7 +296,7 @@ Value listunspent(const Array& params, b
+             CTxDestination address;
+             if (ExtractDestination(pk, address))
+             {
+-                const CScriptID& hash = boost::get<const CScriptID&>(address);
++                const CScriptID& hash = boost::get<CScriptID>(address);
+                 CScript redeemScript;
+                 if (pwalletMain->GetCScript(hash, redeemScript))
+                     entry.push_back(Pair("redeemScript", HexStr(redeemScript.begin(), redeemScript.end())));
diff --git a/zetacoin/patches/patch-src_walletdb.cpp b/zetacoin/patches/patch-src_walletdb.cpp
index f5440de..a237dd3 100644
--- a/zetacoin/patches/patch-src_walletdb.cpp
+++ b/zetacoin/patches/patch-src_walletdb.cpp
@@ -1,6 +1,8 @@
 --- src/walletdb.cpp~	2014-06-19 00:51:15.000000000 -0700
 +++ src/walletdb.cpp	2014-08-19 03:50:42.757367359 -0700
-@@ -844,11 +844,7 @@
+--- src/walletdb.cpp.orig	2015-03-24 01:40:33.000000000 +0000
++++ src/walletdb.cpp
+@@ -844,11 +844,7 @@ bool BackupWallet(const CWallet& wallet,
                      pathDest /= wallet.strWalletFile;
  
                  try {


Home | Main Index | Thread Index | Old Index