summaryrefslogtreecommitdiff
path: root/net-p2p/c-lightning
diff options
context:
space:
mode:
authorBertrand Jacquin <bertrand@jacquin.bzh>2022-07-02 22:35:16 +0100
committerBertrand Jacquin <bertrand@jacquin.bzh>2022-07-02 23:00:41 +0100
commit1b9b93955983fcb6442246a57f98ad25b05bf201 (patch)
tree2d927d0c45bab6b24666ecb9bfac2eda310bda4b /net-p2p/c-lightning
parentsys-apps/mrkd: version bump (diff)
downloadportage-1b9b93955983fcb6442246a57f98ad25b05bf201.tar.xz
net-p2p/c-lightning: version bump
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Diffstat (limited to 'net-p2p/c-lightning')
-rw-r--r--net-p2p/c-lightning/c-lightning-0.11.2.ebuild277
-rw-r--r--net-p2p/c-lightning/files/0.11.2-build-do-not-Werror.patch22
-rw-r--r--net-p2p/c-lightning/files/0.11.2-build-do-not-cargo-quiet.patch25
-rw-r--r--net-p2p/c-lightning/files/0.11.2-build-do-not-refresh-external-modules.patch22
-rw-r--r--net-p2p/c-lightning/files/0.11.2-build-remove-deprecated-AM_ENABLE_MULTILIB.patch25
-rw-r--r--net-p2p/c-lightning/files/0.11.2-build-use-FHS-docdir.patch22
6 files changed, 393 insertions, 0 deletions
diff --git a/net-p2p/c-lightning/c-lightning-0.11.2.ebuild b/net-p2p/c-lightning/c-lightning-0.11.2.ebuild
new file mode 100644
index 00000000..57567c13
--- /dev/null
+++ b/net-p2p/c-lightning/c-lightning-0.11.2.ebuild
@@ -0,0 +1,277 @@
+# Copyright 2019-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python{3_8,3_9,3_10} )
+CRATES="
+aho-corasick-0.7.18
+anyhow-1.0.57
+async-stream-0.3.3
+async-stream-impl-0.3.3
+async-trait-0.1.53
+atty-0.2.14
+autocfg-1.1.0
+base64-0.13.0
+bitflags-1.3.2
+bumpalo-3.9.1
+bytes-1.1.0
+cc-1.0.73
+cfg-if-1.0.0
+chrono-0.4.19
+cln-rpc-0.1.0
+core-foundation-0.9.3
+core-foundation-sys-0.8.3
+data-encoding-2.3.2
+der-oid-macro-0.5.0
+der-parser-6.0.1
+either-1.6.1
+env_logger-0.9.0
+fastrand-1.7.0
+fixedbitset-0.2.0
+fnv-1.0.7
+foreign-types-0.3.2
+foreign-types-shared-0.1.1
+futures-0.3.21
+futures-channel-0.3.21
+futures-core-0.3.21
+futures-executor-0.3.21
+futures-io-0.3.21
+futures-macro-0.3.21
+futures-sink-0.3.21
+futures-task-0.3.21
+futures-util-0.3.21
+getrandom-0.2.6
+h2-0.3.13
+hashbrown-0.11.2
+heck-0.3.3
+hermit-abi-0.1.19
+hex-0.4.3
+http-0.2.7
+http-body-0.4.4
+httparse-1.7.1
+httpdate-1.0.2
+humantime-2.1.0
+hyper-0.14.18
+hyper-timeout-0.4.1
+indexmap-1.8.1
+instant-0.1.12
+itertools-0.10.3
+itoa-1.0.1
+js-sys-0.3.57
+lazy_static-1.4.0
+libc-0.2.125
+log-0.4.16
+memchr-2.4.1
+minimal-lexical-0.2.1
+mio-0.8.2
+miow-0.3.7
+multimap-0.8.3
+native-tls-0.2.10
+nom-7.1.1
+ntapi-0.3.7
+num-bigint-0.4.3
+num-integer-0.1.45
+num-traits-0.2.14
+num_cpus-1.13.1
+oid-registry-0.2.0
+once_cell-1.10.0
+openssl-0.10.38
+openssl-probe-0.1.5
+openssl-src-111.18.0+1.1.1n
+openssl-sys-0.9.72
+pem-1.0.2
+percent-encoding-2.1.0
+petgraph-0.5.1
+pin-project-1.0.10
+pin-project-internal-1.0.10
+pin-project-lite-0.2.9
+pin-utils-0.1.0
+pkg-config-0.3.25
+ppv-lite86-0.2.16
+proc-macro2-1.0.37
+prost-0.8.0
+prost-build-0.8.0
+prost-derive-0.8.0
+prost-types-0.8.0
+quote-1.0.18
+rand-0.8.5
+rand_chacha-0.3.1
+rand_core-0.6.3
+rcgen-0.8.14
+redox_syscall-0.2.13
+regex-1.5.5
+regex-syntax-0.6.25
+remove_dir_all-0.5.3
+ring-0.16.20
+rusticata-macros-4.1.0
+rustls-0.19.1
+ryu-1.0.9
+schannel-0.1.19
+sct-0.6.1
+security-framework-2.6.1
+security-framework-sys-2.6.1
+serde-1.0.136
+serde_derive-1.0.136
+serde_json-1.0.79
+slab-0.4.6
+socket2-0.4.4
+spin-0.5.2
+syn-1.0.92
+tempfile-3.3.0
+termcolor-1.1.3
+thiserror-1.0.30
+thiserror-impl-1.0.30
+tokio-1.18.0
+tokio-io-timeout-1.2.0
+tokio-macros-1.7.0
+tokio-rustls-0.22.0
+tokio-stream-0.1.8
+tokio-util-0.6.9
+tokio-util-0.7.1
+tonic-0.5.2
+tonic-build-0.5.2
+tower-0.4.12
+tower-layer-0.3.1
+tower-service-0.3.1
+tracing-0.1.34
+tracing-attributes-0.1.21
+tracing-core-0.1.26
+tracing-futures-0.2.5
+try-lock-0.2.3
+unicode-segmentation-1.9.0
+unicode-xid-0.2.2
+untrusted-0.7.1
+vcpkg-0.2.15
+want-0.3.0
+wasi-0.10.2+wasi-snapshot-preview1
+wasi-0.11.0+wasi-snapshot-preview1
+wasm-bindgen-0.2.80
+wasm-bindgen-backend-0.2.80
+wasm-bindgen-macro-0.2.80
+wasm-bindgen-macro-support-0.2.80
+wasm-bindgen-shared-0.2.80
+web-sys-0.3.57
+webpki-0.21.4
+which-4.2.5
+winapi-0.3.9
+winapi-i686-pc-windows-gnu-0.4.0
+winapi-util-0.1.5
+winapi-x86_64-pc-windows-gnu-0.4.0
+x509-parser-0.12.0
+yasna-0.4.0
+"
+
+inherit git-r3 bash-completion-r1 autotools libtool toolchain-funcs systemd distutils-r1 python-r1 cargo
+
+DESCRIPTION="A specification compliant Lightning Network implementation in C"
+HOMEPAGE="https://github.com/ElementsProject/lightning"
+EGIT_REPO_URI="https://github.com/ElementsProject/lightning.git"
+EGIT_COMMIT="v${PV}"
+SRC_URI="$(cargo_crate_uris)"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+IUSE="+sqlite python"
+
+DISTUTILS_OPTIONAL=True
+
+BDEPEND="${PYTHON_DEPS}
+ dev-python/mako:=[${PYTHON_USEDEP}]
+ app-text/asciidoc
+ sys-apps/coreutils
+ sys-devel/gettext
+ >=sys-apps/mrkd-0.2.0-r1
+ virtual/rust[rustfmt]"
+DEPEND="dev-libs/libsodium:=
+ dev-libs/gmp:0
+ sqlite? ( dev-db/sqlite:3 )
+ sys-libs/zlib:=
+ python? (
+ >=dev-python/recommonmark-0.7[${PYTHON_USEDEP}]
+ >=dev-python/grpcio-1.34.0[${PYTHON_USEDEP}]
+ >=dev-python/grpcio-tools-1.34.0[${PYTHON_USEDEP}]
+ >=dev-python/protobuf-python-3.19.3[${PYTHON_USEDEP}]
+ )"
+RDEPEND="${DEPEND}
+ net-p2p/bitcoin-cli
+ acct-user/bitcoin"
+
+PATCHES=(
+ "${FILESDIR}/${PV}-build-do-not-Werror.patch"
+ "${FILESDIR}/${PV}-build-do-not-refresh-external-modules.patch"
+ "${FILESDIR}/${PV}-build-remove-deprecated-AM_ENABLE_MULTILIB.patch"
+ "${FILESDIR}/${PV}-build-use-FHS-docdir.patch"
+ "${FILESDIR}/${PV}-build-do-not-cargo-quiet.patch"
+)
+
+src_unpack () {
+ git-r3_src_unpack
+ cargo_src_unpack
+}
+
+src_prepare() {
+ default
+
+ export PYTEST=:
+ export CC="$(tc-getCC)" CONFIGURATOR_CC="${CBUILD}-gcc"
+ export PKG_CONFIG="$(tc-getPKG_CONFIG)"
+ export CDEBUGFLAGS="-std=gnu11 -fstack-protector ${CFLAGS}"
+
+ sed -i \
+ -e "s:^VERSION=.*:VERSION=${PVR}:" \
+ Makefile \
+ || die
+
+ local externals=( libbacktrace libsodium libwally-core )
+
+ for x in ${externals[@]} ; do
+ pushd "external/${x}" > /dev/null || die
+ eautoreconf
+ popd > /dev/null || die
+ done
+
+ if use python ; then
+ pushd "${S}/contrib/pyln-client" > /dev/null || die
+ distutils-r1_src_prepare
+ popd > /dev/null || die
+ fi
+}
+
+src_configure() {
+ ./configure \
+ --prefix="${EPREFIX}/usr" \
+ --enable-compat \
+ --enable-rust \
+ --disable-static \
+ --disable-developer \
+ --disable-experimental-features \
+ --disable-valgrind \
+ --disable-address-sanitizer \
+ --disable-ub-sanitize \
+ --disable-fuzzing \
+ || die "configure failed"
+}
+
+src_compile() {
+ emake CDEBUGFLAGS="${CDEBUGFLAGS}" V=1
+
+ if use python ; then
+ pushd "${S}/contrib/pyln-client" > /dev/null || die
+ distutils-r1_src_compile
+ popd > /dev/null || die
+ fi
+}
+
+src_install() {
+ default
+
+ if use python ; then
+ pushd "${S}/contrib/pyln-client" > /dev/null || die
+ distutils-r1_src_install
+ popd > /dev/null || die
+ fi
+
+ systemd_dounit contrib/init/lightningd.service
+ newbashcomp contrib/lightning-cli.bash-completion lightning-cli
+}
diff --git a/net-p2p/c-lightning/files/0.11.2-build-do-not-Werror.patch b/net-p2p/c-lightning/files/0.11.2-build-do-not-Werror.patch
new file mode 100644
index 00000000..775cedb4
--- /dev/null
+++ b/net-p2p/c-lightning/files/0.11.2-build-do-not-Werror.patch
@@ -0,0 +1,22 @@
+From 58772d26b6f42b3db99fec6cc23ba5e259bca24c Mon Sep 17 00:00:00 2001
+From: Bertrand Jacquin <bertrand@jacquin.bzh>
+Date: Mon, 13 May 2019 23:59:33 +0000
+Subject: [PATCH] build: do not -Werror
+
+---
+ configure | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure b/configure
+index a0fd5d805062..d8761d34cc8e 100755
+--- a/configure
++++ b/configure
+@@ -6,7 +6,7 @@ set -e
+ CONFIGURATOR=ccan/tools/configurator/configurator
+ CONFIG_VAR_FILE=config.vars
+ CONFIG_HEADER=ccan/config.h
+-BASE_WARNFLAGS="-Wall -Wundef -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wold-style-definition -Werror"
++BASE_WARNFLAGS="-Wall -Wundef -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wold-style-definition"
+
+ : ${PKG_CONFIG=pkg-config}
+
diff --git a/net-p2p/c-lightning/files/0.11.2-build-do-not-cargo-quiet.patch b/net-p2p/c-lightning/files/0.11.2-build-do-not-cargo-quiet.patch
new file mode 100644
index 00000000..6eecb030
--- /dev/null
+++ b/net-p2p/c-lightning/files/0.11.2-build-do-not-cargo-quiet.patch
@@ -0,0 +1,25 @@
+From 8c32248304ca1eaab2320a6a96738877c71eea2d Mon Sep 17 00:00:00 2001
+From: Bertrand Jacquin <bertrand@jacquin.bzh>
+Date: Sat, 30 Apr 2022 04:40:28 +0100
+Subject: [PATCH] build: do not cargo --quiet
+
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index cb549645338c..d55ce3d9d08a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -329,9 +329,9 @@ endif
+
+ RUST_PROFILE ?= debug
+ ifneq ($(RUST_PROFILE),debug)
+-CARGO_OPTS := --profile=$(RUST_PROFILE) --quiet
++CARGO_OPTS := --profile=$(RUST_PROFILE)
+ else
+-CARGO_OPTS := --quiet
++CARGO_OPTS :=
+ endif
+
+ include external/Makefile
diff --git a/net-p2p/c-lightning/files/0.11.2-build-do-not-refresh-external-modules.patch b/net-p2p/c-lightning/files/0.11.2-build-do-not-refresh-external-modules.patch
new file mode 100644
index 00000000..13345f40
--- /dev/null
+++ b/net-p2p/c-lightning/files/0.11.2-build-do-not-refresh-external-modules.patch
@@ -0,0 +1,22 @@
+From 64d9a04a9129c826028f90fbe86f6ff0d1d98517 Mon Sep 17 00:00:00 2001
+From: Bertrand Jacquin <bertrand@jacquin.bzh>
+Date: Mon, 13 May 2019 23:50:38 +0000
+Subject: [PATCH] build: do not refresh external modules
+
+---
+ external/Makefile | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/external/Makefile b/external/Makefile
+index 975d4d259041..f4975c4d7f37 100644
+--- a/external/Makefile
++++ b/external/Makefile
+@@ -49,8 +49,6 @@ endif
+ EXTERNAL_LDLIBS := -L${TARGET_DIR} $(patsubst lib%.a,-l%,$(notdir $(EXTERNAL_LIBS)))
+
+ submodcheck: $(FORCE)
+- @tools/refresh-submodules.sh $(SUBMODULES)
+- @cd external/libwally-core && ../../tools/refresh-submodules.sh src/secp256k1
+
+ $(EXTERNAL_HEADERS): submodcheck
+
diff --git a/net-p2p/c-lightning/files/0.11.2-build-remove-deprecated-AM_ENABLE_MULTILIB.patch b/net-p2p/c-lightning/files/0.11.2-build-remove-deprecated-AM_ENABLE_MULTILIB.patch
new file mode 100644
index 00000000..415a71cf
--- /dev/null
+++ b/net-p2p/c-lightning/files/0.11.2-build-remove-deprecated-AM_ENABLE_MULTILIB.patch
@@ -0,0 +1,25 @@
+From 8271ca3e71e258c99675c0f873724d07a8c22440 Mon Sep 17 00:00:00 2001
+From: Bertrand Jacquin <bertrand@jacquin.bzh>
+Date: Mon, 13 May 2019 23:47:42 +0000
+Subject: [PATCH] build: remove deprecated AM_ENABLE_MULTILIB
+
+---
+ external/libbacktrace/configure.ac | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/external/libbacktrace/configure.ac b/external/libbacktrace/configure.ac
+index 2aad65ad9c7f..0cebaab8fc9a 100644
+--- a/external/libbacktrace/configure.ac
++++ b/external/libbacktrace/configure.ac
+@@ -35,11 +35,6 @@ AC_CONFIG_SRCDIR(backtrace.h)
+ AC_CONFIG_HEADER(config.h)
+ AC_CONFIG_MACRO_DIR(config)
+
+-# with_target_subdir is used when configured as part of a GCC tree.
+-if test -n "${with_target_subdir}"; then
+- AM_ENABLE_MULTILIB(, ..)
+-fi
+-
+ AC_CANONICAL_SYSTEM
+ target_alias=${target_alias-$host_alias}
+
diff --git a/net-p2p/c-lightning/files/0.11.2-build-use-FHS-docdir.patch b/net-p2p/c-lightning/files/0.11.2-build-use-FHS-docdir.patch
new file mode 100644
index 00000000..6c861a7d
--- /dev/null
+++ b/net-p2p/c-lightning/files/0.11.2-build-use-FHS-docdir.patch
@@ -0,0 +1,22 @@
+From d700c55234316630dd47d7dc3a0f8b9b65a56241 Mon Sep 17 00:00:00 2001
+From: Bertrand Jacquin <bertrand@jacquin.bzh>
+Date: Tue, 14 May 2019 01:33:02 +0000
+Subject: [PATCH] build: use FHS docdir
+
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 737f26641133..cb549645338c 100644
+--- a/Makefile
++++ b/Makefile
+@@ -683,7 +683,7 @@ libexecdir = $(exec_prefix)/libexec
+ pkglibexecdir = $(libexecdir)/$(PKGNAME)
+ plugindir = $(pkglibexecdir)/plugins
+ datadir = $(PREFIX)/share
+-docdir = $(datadir)/doc/$(PKGNAME)
++docdir = $(datadir)/doc/$(PKGNAME)-$(VERSION)
+ mandir = $(datadir)/man
+ man1dir = $(mandir)/man1
+ man5dir = $(mandir)/man5