package/bitcoin: new package
authorFabio Urquiza <fabiorush@gmail.com>
Fri, 28 Sep 2018 13:59:21 +0000 (10:59 -0300)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 3 Aug 2019 16:51:37 +0000 (18:51 +0200)
Bitcoin Core is an open source project which maintains and releases
Bitcoin client software called “Bitcoin Core”.

Signed-off-by: Fabio Urquiza <fabiorush@gmail.com>
[Thomas:
 - Don't create a new blockchain applications sub-menu for now, put
   this package in "Miscellaneous applications"
 - Do not select BR2_INSTALL_LIBSTDCPP, use depends on instead, and
   add the corresponding comment.
 - Do not select BR2_TOOLCHAIN_BUILDROOT_USE_SSP. Instead pass
   --disable-hardening, and let Buildroot pass the appropriate CFLAGS
   when hardening features are enabled system-wide.
 - Add missing BR2_TOOLCHAIN_HAS_ATOMIC dependency
 - Add quirky !(BR2_arm || BR2_armeb) || BR2_USE_MMU because the
   Cortex-M toolchains don't provide 8-byte __atomic intrinsics, but
   we don't have a good way to express that today
 - Add missing BR2_TOOLCHAIN_HAS_GCC_BUG_64735 due to the use of
   std::future
 - Use only one BITCOIN_CONF_OPTS assignment to pass all options]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
DEVELOPERS
package/Config.in
package/bitcoin/Config.in [new file with mode: 0644]
package/bitcoin/bitcoin.hash [new file with mode: 0644]
package/bitcoin/bitcoin.mk [new file with mode: 0644]

index c5175155bec3802ded1c5a14bdcbaf5f888eee3a..5073541a970e3bd1825000a2e97d4670caae9052 100644 (file)
@@ -774,6 +774,9 @@ F:  package/kmscube/
 N:     Fabio Porcedda <fabio.porcedda@gmail.com>
 F:     package/netsurf-buildsystem/
 
+N:     Fabio Urquiza <fabiorush@gmail.com>
+F:     package/bitcoin/
+
 N:     Fabrice Fontaine <fabrice.fontaine@orange.com>
 F:     package/domoticz/
 F:     package/libmediaart/
index 9c07ae58748d69d9b48225779b3bc3d7a1a58e04..763616e70cf11341a666c6e8ba2c036721154f4f 100644 (file)
@@ -1823,6 +1823,7 @@ endmenu
 menu "Miscellaneous"
        source "package/aespipe/Config.in"
        source "package/bc/Config.in"
+       source "package/bitcoin/Config.in"
        source "package/clamav/Config.in"
        source "package/collectd/Config.in"
        source "package/domoticz/Config.in"
diff --git a/package/bitcoin/Config.in b/package/bitcoin/Config.in
new file mode 100644 (file)
index 0000000..03e040d
--- /dev/null
@@ -0,0 +1,45 @@
+config BR2_PACKAGE_BITCOIN_ARCH_SUPPORTS
+       bool
+       depends on BR2_TOOLCHAIN_HAS_ATOMIC
+       # bitcoin uses 8-byte __atomic intrinsics, which are not
+       # available on ARM noMMU platforms that we
+       # support. BR2_TOOLCHAIN_HAS_ATOMIC does not provide a
+       # size-level granularity to express this dependency.
+       depends on !(BR2_arm || BR2_armeb) || BR2_USE_MMU
+
+config BR2_PACKAGE_BITCOIN
+       bool "bitcoin"
+       depends on BR2_INSTALL_LIBSTDCPP
+       depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::future
+       depends on BR2_PACKAGE_BITCOIN_ARCH_SUPPORTS
+       select BR2_PACKAGE_BOOST
+       select BR2_PACKAGE_BOOST_SYSTEM
+       select BR2_PACKAGE_BOOST_FILESYSTEM
+       select BR2_PACKAGE_BOOST_THREAD
+       select BR2_PACKAGE_BOOST_CHRONO
+       select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
+       select BR2_PACKAGE_OPENSSL
+       select BR2_PACKAGE_LIBEVENT
+       help
+         Bitcoin Core is an open source project which maintains and
+         releases Bitcoin client software called “Bitcoin Core”.
+
+         It is a direct descendant of the original Bitcoin software
+         client released by Satoshi Nakamoto after he published the
+         famous Bitcoin whitepaper.
+
+         Bitcoin Core consists of both "full-node" software for fully
+         validating the blockchain as well as a bitcoin wallet. The
+         project also currently maintains related software such as
+         the cryptography library libsecp256k1 and others located at
+         GitHub.
+
+         https://bitcoincore.org
+
+comment "bitcoin needs a toolchain w/ C++"
+       depends on BR2_PACKAGE_BITCOIN_ARCH_SUPPORTS
+       depends on !BR2_INSTALL_LIBSTDCPP
+
+comment "bitcoin needs a toolchain not affected by GCC bug 64735"
+       depends on BR2_PACKAGE_BITCOIN_ARCH_SUPPORTS
+       depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
diff --git a/package/bitcoin/bitcoin.hash b/package/bitcoin/bitcoin.hash
new file mode 100644 (file)
index 0000000..96edd22
--- /dev/null
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 c8557b6df5f5cdf67b3ddf6fe501cfc6e0be698f175f16927dd08d6040df7d9f  bitcoin-v0.16.3.tar.gz
+sha256 70223369f70e8cb550e75aa74eb86bfa5220fb09c0ba0549d91c36587d15d1a0  COPYING
diff --git a/package/bitcoin/bitcoin.mk b/package/bitcoin/bitcoin.mk
new file mode 100644 (file)
index 0000000..78170ab
--- /dev/null
@@ -0,0 +1,19 @@
+################################################################################
+#
+# bitcoin
+#
+################################################################################
+
+BITCOIN_VERSION = v0.16.3
+BITCOIN_SITE = $(call github,bitcoin,bitcoin,$(BITCOIN_VERSION))
+BITCOIN_AUTORECONF = YES
+BITCOIN_LICENSE = MIT
+BITCOIN_LICENSE_FILES = COPYING
+BITCOIN_DEPENDENCIES = boost openssl libevent
+BITCOIN_CONF_OPTS = \
+       --disable-wallet \
+       --disable-tests \
+       --with-boost-libdir=$(STAGING_DIR)/usr/lib/ \
+       --disable-hardening
+
+$(eval $(autotools-package))