pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/finance/bitcoin Import bitcoin 0.16.1 as finance/bitcoin
details: https://anonhg.NetBSD.org/pkgsrc/rev/de1455989a49
branches: trunk
changeset: 310230:de1455989a49
user: khorben <khorben%pkgsrc.org@localhost>
date: Sun Jul 08 11:13:45 2018 +0000
description:
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.
diffstat:
finance/bitcoin/DESCR | 4 +
finance/bitcoin/Makefile | 73 ++++++++++++
finance/bitcoin/PLIST | 23 +++
finance/bitcoin/distinfo | 9 +
finance/bitcoin/files/bitcoind.sh | 27 ++++
finance/bitcoin/options.mk | 36 +++++
finance/bitcoin/patches/patch-src_leveldb_port_port__posix.h | 19 +++
finance/bitcoin/patches/patch-src_netbase.cpp | 17 ++
finance/bitcoin/patches/patch-src_secp256k1_configure.ac | 15 ++
9 files changed, 223 insertions(+), 0 deletions(-)
diffs (259 lines):
diff -r 6a5eb3ab7a4d -r de1455989a49 finance/bitcoin/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/finance/bitcoin/DESCR Sun Jul 08 11:13:45 2018 +0000
@@ -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.
diff -r 6a5eb3ab7a4d -r de1455989a49 finance/bitcoin/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/finance/bitcoin/Makefile Sun Jul 08 11:13:45 2018 +0000
@@ -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@localhost
+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"
diff -r 6a5eb3ab7a4d -r de1455989a49 finance/bitcoin/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/finance/bitcoin/PLIST Sun Jul 08 11:13:45 2018 +0000
@@ -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
diff -r 6a5eb3ab7a4d -r de1455989a49 finance/bitcoin/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/finance/bitcoin/distinfo Sun Jul 08 11:13:45 2018 +0000
@@ -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
diff -r 6a5eb3ab7a4d -r de1455989a49 finance/bitcoin/files/bitcoind.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/finance/bitcoin/files/bitcoind.sh Sun Jul 08 11:13:45 2018 +0000
@@ -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
diff -r 6a5eb3ab7a4d -r de1455989a49 finance/bitcoin/options.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/finance/bitcoin/options.mk Sun Jul 08 11:13:45 2018 +0000
@@ -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
diff -r 6a5eb3ab7a4d -r de1455989a49 finance/bitcoin/patches/patch-src_leveldb_port_port__posix.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/finance/bitcoin/patches/patch-src_leveldb_port_port__posix.h Sun Jul 08 11:13:45 2018 +0000
@@ -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) ||\
diff -r 6a5eb3ab7a4d -r de1455989a49 finance/bitcoin/patches/patch-src_netbase.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/finance/bitcoin/patches/patch-src_netbase.cpp Sun Jul 08 11:13:45 2018 +0000
@@ -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;
diff -r 6a5eb3ab7a4d -r de1455989a49 finance/bitcoin/patches/patch-src_secp256k1_configure.ac
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/finance/bitcoin/patches/patch-src_secp256k1_configure.ac Sun Jul 08 11:13:45 2018 +0000
@@ -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"])
+
Home |
Main Index |
Thread Index |
Old Index