From 09c0853fc09ab1e024dc8b160cd7af18b06d6ea9 Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Mon, 24 May 2021 23:46:11 +0100 Subject: net-p2p/c-lightning: add bash completion and python client --- net-p2p/c-lightning/c-lightning-0.10.0.ebuild | 28 ++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) (limited to 'net-p2p/c-lightning') diff --git a/net-p2p/c-lightning/c-lightning-0.10.0.ebuild b/net-p2p/c-lightning/c-lightning-0.10.0.ebuild index 5194ac0b..91cf0573 100644 --- a/net-p2p/c-lightning/c-lightning-0.10.0.ebuild +++ b/net-p2p/c-lightning/c-lightning-0.10.0.ebuild @@ -3,7 +3,7 @@ EAPI=7 PYTHON_COMPAT=( python{3_7,3_8,3_9} ) -inherit git-r3 autotools libtool toolchain-funcs systemd python-r1 +inherit git-r3 bash-completion-r1 autotools libtool toolchain-funcs systemd distutils-r1 python-r1 DESCRIPTION="A specification compliant Lightning Network implementation in C" HOMEPAGE="https://github.com/ElementsProject/lightning" @@ -13,7 +13,9 @@ EGIT_COMMIT="v${PV}" LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~arm64" -IUSE="+sqlite" +IUSE="+sqlite python" + +DISTUTILS_OPTIONAL=True BDEPEND="${PYTHON_DEPS} dev-python/mako:=[${PYTHON_USEDEP}] @@ -23,7 +25,8 @@ BDEPEND="${PYTHON_DEPS} DEPEND="dev-libs/libsodium:= dev-libs/gmp:0 sqlite? ( dev-db/sqlite:3 ) - sys-libs/zlib:=" + sys-libs/zlib:= + python? ( >=dev-python/recommonmark-0.7[${PYTHON_USEDEP}] )" RDEPEND="${DEPEND} net-p2p/bitcoin-cli acct-user/bitcoin" @@ -55,6 +58,12 @@ src_prepare() { 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() { @@ -72,10 +81,23 @@ src_configure() { 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 } -- cgit v1.2.3