Received: by mail.netbsd.org (Postfix, from userid 605) id E2435850C3; Sun, 8 Jul 2018 11:13:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 033D184F42 for ; Sun, 8 Jul 2018 11:13:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id q8Qhp35T7deF for ; Sun, 8 Jul 2018 11:13:46 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 88B5B84D68 for ; Sun, 8 Jul 2018 11:13:46 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 780EDFBEC; Sun, 8 Jul 2018 11:13:46 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1531048426208470" MIME-Version: 1.0 Date: Sun, 8 Jul 2018 11:13:46 +0000 From: "Pierre Pronchery" Subject: CVS commit: pkgsrc/finance/bitcoin To: pkgsrc-changes@NetBSD.org Reply-To: khorben@netbsd.org X-Mailer: log_accum Message-Id: <20180708111346.780EDFBEC@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1531048426208470 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: khorben Date: Sun Jul 8 11:13:46 UTC 2018 Added Files: pkgsrc/finance/bitcoin: DESCR Makefile PLIST distinfo options.mk pkgsrc/finance/bitcoin/files: bitcoind.sh pkgsrc/finance/bitcoin/patches: patch-src_leveldb_port_port__posix.h patch-src_netbase.cpp patch-src_secp256k1_configure.ac Log Message: Import bitcoin 0.16.1 as finance/bitcoin Bitcoin is a decentralized P2P electronic cash system without a central server or trusted parties. Users hold the crypto keys to their own money and transact directly with each other, with the help of the network to check for double-spending. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 pkgsrc/finance/bitcoin/DESCR \ pkgsrc/finance/bitcoin/Makefile pkgsrc/finance/bitcoin/PLIST \ pkgsrc/finance/bitcoin/distinfo pkgsrc/finance/bitcoin/options.mk cvs rdiff -u -r0 -r1.1 pkgsrc/finance/bitcoin/files/bitcoind.sh cvs rdiff -u -r0 -r1.1 \ pkgsrc/finance/bitcoin/patches/patch-src_leveldb_port_port__posix.h \ pkgsrc/finance/bitcoin/patches/patch-src_netbase.cpp \ pkgsrc/finance/bitcoin/patches/patch-src_secp256k1_configure.ac Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1531048426208470 Content-Disposition: inline Content-Length: 10124 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Added files: Index: pkgsrc/finance/bitcoin/DESCR diff -u /dev/null pkgsrc/finance/bitcoin/DESCR:1.1 --- /dev/null Sun Jul 8 11:13:46 2018 +++ pkgsrc/finance/bitcoin/DESCR Sun Jul 8 11:13:45 2018 @@ -0,0 +1,4 @@ +Bitcoin is a decentralized P2P electronic cash system without a central +server or trusted parties. Users hold the crypto keys to their own money +and transact directly with each other, with the help of the network to +check for double-spending. Index: pkgsrc/finance/bitcoin/Makefile diff -u /dev/null pkgsrc/finance/bitcoin/Makefile:1.1 --- /dev/null Sun Jul 8 11:13:46 2018 +++ pkgsrc/finance/bitcoin/Makefile Sun Jul 8 11:13:45 2018 @@ -0,0 +1,73 @@ +# $NetBSD: Makefile,v 1.1 2018/07/08 11:13:45 khorben Exp $ + +DISTNAME= bitcoin-0.16.1 +CATEGORIES= finance +MASTER_SITES= ${MASTER_SITE_GITHUB:=bitcoin/} +GITHUB_TAG= v${PKGVERSION_NOREV} + +MAINTAINER= noud4@users.sourceforge.net +HOMEPAGE= https://github.com/bitcoin/bitcoin/ +COMMENT= P2P electronic cash system +LICENSE= mit + +USE_LIBTOOL= yes +USE_TOOLS+= gmake pkg-config autoconf aclocal autoheader automake +AUTO_MKDIRS= yes +GNU_CONFIGURE= yes + +USE_LANGUAGES= c c++ +# bitcoin-core requires c++11 (but does not need manual --std=c++11). + +# TODO: File bug upstream - configure should add this where it is +# needed. Without -fPIC, linking of test_bitcoin fails. +CFLAGS+= -fPIC + +# configure does not look in PREFIX for boost unless instructed. +CONFIGURE_ARGS+= --with-boost=${BUILDLINK_PREFIX.boost-libs} + +CONFIGURE_ARGS+= --enable-hardening + +# pkgsrc's db4 package installs as db4_, but bitcoin looks for db_. +BUILDLINK_TRANSFORM+= l:db_cxx:db4_cxx + +TEST_TARGET= check + +PLIST_VARS+= qt + +RCD_SCRIPTS= bitcoind +BUILD_DEFS+= VARBASE +OWN_DIRS= ${VARBASE}/bitcoin +EGDIR= ${PREFIX}/share/examples/bitcoin +CONF_FILES= ${EGDIR}/bitcoin.conf ${PKG_SYSCONFDIR}/bitcoin.conf +CONF_FILES_PERMS= ${EGDIR}/bitcoin.conf ${PKG_SYSCONFDIR}/bitcoin.conf ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0644 + +# This is currently unnecessary, but it seems likely we will find a +# file that references /usr when ${PREFIX} is appropriate. +SUBST_CLASSES+= pkg +SUBST_STAGE.pkg= post-patch +SUBST_SED.pkg= -e "s|/usr/|${PREFIX}/|g" +SUBST_MESSAGE.pkg= Fixing /usr references to ${PREFIX}. + +# bitcoin does not actually have releases; only snapshots of the +# repository from which a release would have been made. Remedially +# create configure.in and similar. +pre-configure: + cd ${WRKSRC} && ./autogen.sh + +# 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 + +# Install the Debian example config file. +post-install: + ${INSTALL_DATA} -m 644 ${WRKSRC}/contrib/debian/examples/bitcoin.conf ${DESTDIR}${EGDIR} + +.include "options.mk" + +.include "../../sysutils/desktop-file-utils/desktopdb.mk" +.include "../../databases/db4/buildlink3.mk" +.include "../../devel/boost-libs/buildlink3.mk" +.include "../../devel/libevent/buildlink3.mk" +.include "../../security/openssl/buildlink3.mk" +.include "../../mk/dlopen.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" Index: pkgsrc/finance/bitcoin/PLIST diff -u /dev/null pkgsrc/finance/bitcoin/PLIST:1.1 --- /dev/null Sun Jul 8 11:13:46 2018 +++ pkgsrc/finance/bitcoin/PLIST Sun Jul 8 11:13:45 2018 @@ -0,0 +1,23 @@ +@comment $NetBSD: PLIST,v 1.1 2018/07/08 11:13:45 khorben Exp $ +bin/bench_bitcoin +bin/bitcoin-cli +${PLIST.qt}bin/bitcoin-qt +bin/bitcoin-tx +bin/bitcoind +bin/test_bitcoin +${PLIST.qt}bin/test_bitcoin-qt +include/bitcoinconsensus.h +include/secp256k1.h +include/secp256k1_recovery.h +include/univalue.h +lib/libbitcoinconsensus.la +lib/libsecp256k1.la +lib/libunivalue.la +lib/pkgconfig/libbitcoinconsensus.pc +lib/pkgconfig/libsecp256k1.pc +lib/pkgconfig/libunivalue.pc +man/man1/bitcoin-cli.1 +${PLIST.qt}man/man1/bitcoin-qt.1 +man/man1/bitcoin-tx.1 +man/man1/bitcoind.1 +share/examples/bitcoin/bitcoin.conf Index: pkgsrc/finance/bitcoin/distinfo diff -u /dev/null pkgsrc/finance/bitcoin/distinfo:1.1 --- /dev/null Sun Jul 8 11:13:46 2018 +++ pkgsrc/finance/bitcoin/distinfo Sun Jul 8 11:13:46 2018 @@ -0,0 +1,9 @@ +$NetBSD: distinfo,v 1.1 2018/07/08 11:13:46 khorben Exp $ + +SHA1 (bitcoin-0.16.1.tar.gz) = 3454dd16befc04bbd624aece219206728982b9bf +RMD160 (bitcoin-0.16.1.tar.gz) = 70710030badc9287870c26a6436c7a108dfab1cc +SHA512 (bitcoin-0.16.1.tar.gz) = d7b7bd376aa743b9f17a1f3299e4c2f924263e7b8231475cc6b6ecf7a551cb639ffdc1f20820e2030f5d8268a099e4a465cbc3512c281005daaa30ec4e1e326b +Size (bitcoin-0.16.1.tar.gz) = 6655512 bytes +SHA1 (patch-src_leveldb_port_port__posix.h) = 6a3cde12951b9801e8ffe19b6134ca48ad0d876c +SHA1 (patch-src_netbase.cpp) = c1357ce9437fab87651df9fd4ca12dd24c59830c +SHA1 (patch-src_secp256k1_configure.ac) = 688e13e1da110bf15557434f19507f43290be8ef Index: pkgsrc/finance/bitcoin/options.mk diff -u /dev/null pkgsrc/finance/bitcoin/options.mk:1.1 --- /dev/null Sun Jul 8 11:13:46 2018 +++ pkgsrc/finance/bitcoin/options.mk Sun Jul 8 11:13:46 2018 @@ -0,0 +1,36 @@ +# $NetBSD: options.mk,v 1.1 2018/07/08 11:13:46 khorben Exp $ + +PKG_OPTIONS_VAR= PKG_OPTIONS.bitcoin +PKG_SUPPORTED_OPTIONS+= qt4 qt5 miniupnpc +# qt4 is off because it doubles the footprint of the package. +# Please do not enable it by default; instead, create a split +# package. +PKG_SUGGESTED_OPTIONS+= + +.include "../../mk/bsd.options.mk" + +.if !empty(PKG_OPTIONS:Mqt4) +PLIST.qt= yes + +.include "../../converters/qrencode/buildlink3.mk" +.include "../../devel/protobuf/buildlink3.mk" +BUILDLINK_DEPMETHOD.qt4-tools= full +.include "../../x11/qt4-tools/buildlink3.mk" +.include "../../x11/qt4-libs/buildlink3.mk" + +CONFIGURE_ARGS+= --with-qt-bindir=${QTDIR}/bin +.endif + +.if !empty(PKG_OPTIONS:Mqt5) +PLIST.qt= yes + +.include "../../converters/qrencode/buildlink3.mk" +.include "../../devel/protobuf/buildlink3.mk" +.include "../../x11/qt5-qttools/buildlink3.mk" + +CONFIGURE_ARGS+= --with-qt-bindir=${QTDIR}/bin +.endif + +.if !empty(PKG_OPTIONS:Mminiupnpc) +.include "../../net/miniupnpc/buildlink3.mk" +.endif Index: pkgsrc/finance/bitcoin/files/bitcoind.sh diff -u /dev/null pkgsrc/finance/bitcoin/files/bitcoind.sh:1.1 --- /dev/null Sun Jul 8 11:13:46 2018 +++ pkgsrc/finance/bitcoin/files/bitcoind.sh Sun Jul 8 11:13:46 2018 @@ -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 /etc/rc.subr ]; then + . /etc/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 /etc/rc.subr ]; then + load_rc_config $name + run_rc_command "$1" +else + echo -n " ${name}" + ${command} ${bitcoin_flags} ${command_args} +fi Index: pkgsrc/finance/bitcoin/patches/patch-src_leveldb_port_port__posix.h diff -u /dev/null pkgsrc/finance/bitcoin/patches/patch-src_leveldb_port_port__posix.h:1.1 --- /dev/null Sun Jul 8 11:13:46 2018 +++ pkgsrc/finance/bitcoin/patches/patch-src_leveldb_port_port__posix.h Sun Jul 8 11:13:46 2018 @@ -0,0 +1,19 @@ +$NetBSD: patch-src_leveldb_port_port__posix.h,v 1.1 2018/07/08 11:13:46 khorben Exp $ + +Accomodate NetBSD's BYTE_ORDER macros. Not known to be filed upstream. + +--- src/leveldb/port/port_posix.h.orig 2015-07-10 17:23:55.000000000 +0000 ++++ src/leveldb/port/port_posix.h +@@ -47,8 +47,12 @@ + #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 ++#endif + + #if defined(OS_MACOSX) || defined(OS_SOLARIS) || defined(OS_FREEBSD) ||\ + defined(OS_NETBSD) || defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD) ||\ Index: pkgsrc/finance/bitcoin/patches/patch-src_netbase.cpp diff -u /dev/null pkgsrc/finance/bitcoin/patches/patch-src_netbase.cpp:1.1 --- /dev/null Sun Jul 8 11:13:46 2018 +++ pkgsrc/finance/bitcoin/patches/patch-src_netbase.cpp Sun Jul 8 11:13:46 2018 @@ -0,0 +1,17 @@ +$NetBSD: patch-src_netbase.cpp,v 1.1 2018/07/08 11:13:46 khorben Exp $ + +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 2017-04-20 09:28:25.000000000 +0000 ++++ src/netbase.cpp +@@ -95,7 +95,7 @@ bool static LookupIntern(const char *psz + aiHint.ai_socktype = SOCK_STREAM; + aiHint.ai_protocol = IPPROTO_TCP; + aiHint.ai_family = AF_UNSPEC; +-#ifdef WIN32 ++#ifndef AI_ADDRCONFIG + aiHint.ai_flags = fAllowLookup ? 0 : AI_NUMERICHOST; + #else + aiHint.ai_flags = fAllowLookup ? AI_ADDRCONFIG : AI_NUMERICHOST; Index: pkgsrc/finance/bitcoin/patches/patch-src_secp256k1_configure.ac diff -u /dev/null pkgsrc/finance/bitcoin/patches/patch-src_secp256k1_configure.ac:1.1 --- /dev/null Sun Jul 8 11:13:46 2018 +++ pkgsrc/finance/bitcoin/patches/patch-src_secp256k1_configure.ac Sun Jul 8 11:13:46 2018 @@ -0,0 +1,15 @@ +$NetBSD: patch-src_secp256k1_configure.ac,v 1.1 2018/07/08 11:13:46 khorben Exp $ + +Portability fix for the configure script generated. + +--- src/secp256k1/configure.ac.orig 2017-04-20 09:28:25.000000000 +0000 ++++ src/secp256k1/configure.ac +@@ -466,7 +466,7 @@ AM_CONDITIONAL([USE_BENCHMARK], [test x" + AM_CONDITIONAL([USE_ECMULT_STATIC_PRECOMPUTATION], [test x"$set_precomp" = x"yes"]) + AM_CONDITIONAL([ENABLE_MODULE_ECDH], [test x"$enable_module_ecdh" = x"yes"]) + AM_CONDITIONAL([ENABLE_MODULE_RECOVERY], [test x"$enable_module_recovery" = x"yes"]) +-AM_CONDITIONAL([USE_JNI], [test x"$use_jni" == x"yes"]) ++AM_CONDITIONAL([USE_JNI], [test x"$use_jni" = x"yes"]) + AM_CONDITIONAL([USE_EXTERNAL_ASM], [test x"$use_external_asm" = x"yes"]) + AM_CONDITIONAL([USE_ASM_ARM], [test x"$set_asm" = x"arm"]) + --_----------=_1531048426208470--