pkgsrc-WIP-changes archive

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

namecoin: import version 0.21.0.1



Module Name:	pkgsrc-wip
Committed By:	Pierre Pronchery <khorben%defora.org@localhost>
Pushed By:	khorben
Date:		Wed Jun 16 01:16:29 2021 +0200
Changeset:	7a9ddeceaa55ce86a6a28d25c5a647450ec6833e

Modified Files:
	Makefile
Added Files:
	namecoin/DESCR
	namecoin/Makefile
	namecoin/PLIST
	namecoin/distinfo
	namecoin/files/bitcoind.sh
	namecoin/options.mk
	namecoin/patches/patch-src_netbase.cpp
	namecoin/patches/patch-src_wallet_walletutil.cpp

Log Message:
namecoin: import version 0.21.0.1

Namecoin is a decentralized open source information registration and transfer
system based on the Bitcoin cryptocurrency.

Namecoin can:

 * Securely record and transfer arbitrary names (keys).
 * Attach a value (data) to the names (up to 520 bytes, more in the future).
 * Transact namecoins, the digital currency (NMC).

Namecoin was the first fork of Bitcoin and still is one of the most innovative
altcoins. It was first to implement merged mining and a decentralized DNS.

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

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

diffstat:
 Makefile                                         |  1 +
 namecoin/DESCR                                   | 11 ++++++
 namecoin/Makefile                                | 49 ++++++++++++++++++++++++
 namecoin/PLIST                                   | 27 +++++++++++++
 namecoin/distinfo                                |  8 ++++
 namecoin/files/bitcoind.sh                       | 27 +++++++++++++
 namecoin/options.mk                              | 29 ++++++++++++++
 namecoin/patches/patch-src_netbase.cpp           | 20 ++++++++++
 namecoin/patches/patch-src_wallet_walletutil.cpp | 13 +++++++
 9 files changed, 185 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 2455fb19dd..3c047d1689 100644
--- a/Makefile
+++ b/Makefile
@@ -2463,6 +2463,7 @@ SUBDIR+=	n2n
 SUBDIR+=	naev
 SUBDIR+=	nag
 SUBDIR+=	nagios-plugin-mysql_health
+SUBDIR+=	namecoin
 SUBDIR+=	nanoQC
 SUBDIR+=	nanocomp
 SUBDIR+=	nanofilt
diff --git a/namecoin/DESCR b/namecoin/DESCR
new file mode 100644
index 0000000000..31a547e22e
--- /dev/null
+++ b/namecoin/DESCR
@@ -0,0 +1,11 @@
+Namecoin is a decentralized open source information registration and transfer
+system based on the Bitcoin cryptocurrency.
+
+Namecoin can:
+
+ * Securely record and transfer arbitrary names (keys).
+ * Attach a value (data) to the names (up to 520 bytes, more in the future).
+ * Transact namecoins, the digital currency (NMC).
+
+Namecoin was the first fork of Bitcoin and still is one of the most innovative
+altcoins. It was first to implement merged mining and a decentralized DNS.
diff --git a/namecoin/Makefile b/namecoin/Makefile
new file mode 100644
index 0000000000..145d187bf5
--- /dev/null
+++ b/namecoin/Makefile
@@ -0,0 +1,49 @@
+# $NetBSD$
+
+DISTNAME=	namecoin-nc0.21.0.1
+PKGNAME=	namecoin-0.21.0.1
+CATEGORIES=	finance
+MASTER_SITES=	https://www.namecoin.org/files/namecoin-core/namecoin-core-${PKGVERSION_NOREV}/
+
+MAINTAINER=	khorben%defora.org@localhost
+HOMEPAGE=	https://github.com/namecoin/namecoin-core
+COMMENT=	Implementation of Namecoin on top of the Bitcoin Core codebase
+LICENSE=	mit
+
+# namecoin-core requires c++11 (but does not need manual -std=c++11).
+USE_LANGUAGES=		c c++
+USE_LIBTOOL=		yes
+USE_TOOLS+=		autoconf automake gmake pkg-config
+GNU_CONFIGURE=		yes
+CONFIGURE_ARGS+=	--disable-ccache
+CONFIGURE_ARGS+=	--disable-hardening # uses -fPIE which is problematic
+CONFIGURE_ARGS+=	--with-boost=${BUILDLINK_PREFIX.boost-libs}
+PKGCONFIG_OVERRIDE=	libnamecoinconsensus.pc.in
+TEST_TARGET=		check
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OS_VARIANT} == "SmartOS"
+CONFIGURE_ARGS+=	--disable-tests
+.endif
+
+# pkgsrc's db4 package installs as db4_, but namecoin looks for db_.
+BUILDLINK_TRANSFORM+=	l:db_cxx:db4_cxx
+
+# TODO: Decide if secp256k1 and univalue are supposed to be installed,
+# and if so where, or if they should be linked with privately.
+INSTALL_DIRS=	${BUILD_DIRS} src/secp256k1 src/univalue
+
+.include "options.mk"
+
+pre-configure:
+	cd ${WRKSRC} && autoreconf -fiv
+
+.include "../../databases/db4/buildlink3.mk"
+.include "../../devel/boost-libs/buildlink3.mk"
+BUILDLINK_API_DEPENDS.libevent+=	libevent>=2.0.21
+.include "../../devel/libevent/buildlink3.mk"
+.include "../../net/zeromq/buildlink3.mk"
+.include "../../sysutils/desktop-file-utils/desktopdb.mk"
+.include "../../mk/dlopen.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/namecoin/PLIST b/namecoin/PLIST
new file mode 100644
index 0000000000..e5d6574d45
--- /dev/null
+++ b/namecoin/PLIST
@@ -0,0 +1,27 @@
+@comment $NetBSD$
+bin/bench_namecoin
+bin/namecoin-cli
+${PLIST.qt}bin/namecoin-qt
+bin/namecoin-tx
+bin/namecoin-wallet
+bin/namecoind
+bin/test_namecoin
+${PLIST.qt}bin/test_namecoin-qt
+include/namecoinconsensus.h
+include/secp256k1.h
+include/secp256k1_extrakeys.h
+include/secp256k1_preallocated.h
+include/secp256k1_recovery.h
+include/secp256k1_schnorrsig.h
+include/univalue.h
+lib/libnamecoinconsensus.la
+lib/libsecp256k1.la
+lib/libunivalue.la
+lib/pkgconfig/libnamecoinconsensus.pc
+lib/pkgconfig/libsecp256k1.pc
+lib/pkgconfig/libunivalue.pc
+man/man1/namecoin-cli.1
+${PLIST.qt}man/man1/namecoin-qt.1
+man/man1/namecoin-tx.1
+man/man1/namecoin-wallet.1
+man/man1/namecoind.1
diff --git a/namecoin/distinfo b/namecoin/distinfo
new file mode 100644
index 0000000000..3e673e0a27
--- /dev/null
+++ b/namecoin/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.10 2021/01/19 10:17:00 adam Exp $
+
+SHA1 (namecoin-nc0.21.0.1.tar.gz) = 566bd4b8765d6de4b2134708ae581ead6c4a6b26
+RMD160 (namecoin-nc0.21.0.1.tar.gz) = 860b5ff2dc410355c03a95738178231c6180b9dc
+SHA512 (namecoin-nc0.21.0.1.tar.gz) = 758a8278727c94794e6715f405c74c9a94d7dcf8f0dff98a944cd62e7052df8d811d18ae5e2716fc9545292a811ecde8ac85f50e270d689eb3e502e333c27ac8
+Size (namecoin-nc0.21.0.1.tar.gz) = 6771179 bytes
+SHA1 (patch-src_netbase.cpp) = 901c8928181ba351658562477115dc92640d3886
+SHA1 (patch-src_wallet_walletutil.cpp) = 21b7208901c8403bbe839fa601f44e7417beea4e
diff --git a/namecoin/files/bitcoind.sh b/namecoin/files/bitcoind.sh
new file mode 100644
index 0000000000..04b2b04b3e
--- /dev/null
+++ b/namecoin/files/bitcoind.sh
@@ -0,0 +1,27 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: bitcoind.sh,v 1.1 2018/07/08 11:13:46 khorben Exp $
+#
+
+# PROVIDE: bitcoind
+# REQUIRE: DAEMON LOGIN wscons
+# KEYWORD: shutdown
+
+if [ -f @SYSCONFBASE@/rc.subr ]; then
+	. @SYSCONFBASE@/rc.subr
+fi
+
+name="bitcoind"
+rcvar=$name
+command="@PREFIX@/bin/bitcoind"
+pidfile="@VARBASE@/run/bitcoind.pid"
+required_directory="@VARBASE@/bitcoin"
+command_args="-daemon -conf=@PREFIX@/etc/bitcoin.conf -pid=${pidfile} -datadir=${required_directory}"
+
+if [ -f @SYSCONFBASE@/rc.subr ]; then
+	load_rc_config $name
+	run_rc_command "$1"
+else
+	echo -n " ${name}"
+	${command} ${bitcoin_flags} ${command_args}
+fi
diff --git a/namecoin/options.mk b/namecoin/options.mk
new file mode 100644
index 0000000000..8c46028c02
--- /dev/null
+++ b/namecoin/options.mk
@@ -0,0 +1,29 @@
+# $NetBSD$
+
+PKG_OPTIONS_VAR=		PKG_OPTIONS.namecoin
+PKG_SUPPORTED_OPTIONS+=		qt5 upnp
+# qt5 is off because it doubles the footprint of the package.
+# Please do not enable it by default; instead, create a split
+# package.
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+=	qt
+
+.if !empty(PKG_OPTIONS:Mqt5)
+CONFIGURE_ARGS+=	--with-gui=qt5
+CONFIGURE_ARGS+=	--with-qt-bindir=${QTDIR}/bin
+PLIST.qt=	yes
+.include "../../converters/qrencode/buildlink3.mk"
+.include "../../devel/protobuf/buildlink3.mk"
+.include "../../x11/qt5-qttools/buildlink3.mk"
+.else
+CONFIGURE_ARGS+=	--with-gui=no
+.endif
+
+.if !empty(PKG_OPTIONS:Mupnp)
+CONFIGURE_ARGS+=	--with-miniupnpc
+.include "../../net/miniupnpc/buildlink3.mk"
+.else
+CONFIGURE_ARGS+=	--without-miniupnpc
+.endif
diff --git a/namecoin/patches/patch-src_netbase.cpp b/namecoin/patches/patch-src_netbase.cpp
new file mode 100644
index 0000000000..eefa2dbeff
--- /dev/null
+++ b/namecoin/patches/patch-src_netbase.cpp
@@ -0,0 +1,20 @@
+$NetBSD$
+
+It is unclear why this patch exists.  NetBSD 6 and 7 have AI_ADDRCONFIG,
+although NetBSD 5 does not.  Arguably upstream should have an autoconf
+test instead.  This is not known to be reported upstream.
+
+--- src/netbase.cpp.orig	2020-06-02 07:43:04.000000000 +0000
++++ src/netbase.cpp
+@@ -96,7 +96,11 @@ bool static LookupIntern(const std::stri
+     // If we don't allow lookups, then use the AI_NUMERICHOST flag for
+     // getaddrinfo to only decode numerical network addresses and suppress
+     // hostname lookups.
++#ifdef AI_ADDRCONFIG
+     aiHint.ai_flags = fAllowLookup ? AI_ADDRCONFIG : AI_NUMERICHOST;
++#else
++    aiHint.ai_flags = fAllowLookup ? 0 : AI_NUMERICHOST;
++#endif
+     struct addrinfo *aiRes = nullptr;
+     int nErr = getaddrinfo(name.c_str(), nullptr, &aiHint, &aiRes);
+     if (nErr)
diff --git a/namecoin/patches/patch-src_wallet_walletutil.cpp b/namecoin/patches/patch-src_wallet_walletutil.cpp
new file mode 100644
index 0000000000..4030b96ea3
--- /dev/null
+++ b/namecoin/patches/patch-src_wallet_walletutil.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/wallet/walletutil.cpp.orig	2021-01-13 21:52:34.000000000 +0000
++++ src/wallet/walletutil.cpp
+@@ -58,7 +58,7 @@ std::vector<fs::path> ListWalletDir()
+                 (ExistsBerkeleyDatabase(it->path()) || ExistsSQLiteDatabase(it->path()))) {
+                 // Found a directory which contains wallet.dat btree file, add it as a wallet.
+                 paths.emplace_back(path);
+-            } else if (it.level() == 0 && it->symlink_status().type() == fs::regular_file && ExistsBerkeleyDatabase(it->path())) {
++            } else if (it.depth() == 0 && it->symlink_status().type() == fs::regular_file && ExistsBerkeleyDatabase(it->path())) {
+                 if (it->path().filename() == "wallet.dat") {
+                     // Found top-level wallet.dat btree file, add top level directory ""
+                     // as a wallet.


Home | Main Index | Thread Index | Old Index