diff --git a/net-p2p/c-lightning/Manifest b/net-p2p/c-lightning/Manifest index a85d7a541..2c3e374d0 100644 --- a/net-p2p/c-lightning/Manifest +++ b/net-p2p/c-lightning/Manifest @@ -1,3 +1,4 @@ +DIST 0a501b3646d298f11420a9cdd8892742f7bad498.patch 3674 BLAKE2B d83d749c2bd56e5ac6e4d8344938368258ebdead5f4e0cbd34295ba297336817bb1c0eba9062e1ecba34b0291ab214777b95d1e84b1f9f8007cddc1acd25bdc9 SHA512 02fc5c9edfecad6cd8ce957d75442b903ff14b5328b18f3980ae6bd8ef4f88f40675de425cbee251cfc3b33f65ffe96668670c5407db83a46a41b9f2fc663ec5 DIST c-lightning-0.9.0.1.tar.gz 3005098 BLAKE2B d6a5381e2dfa02ad7107ed9fea06a1c3520889aa513dd3833447613e411963ef9ec374084bfee6ad21a49e23eea29c22edaf150268585d6f2e98835a0e089c33 SHA512 765ba35cd71b4f93a56e04caf8b7efdae1dc7054faa811dd796e8058076a339f464805000ef917ba3e09c8e71645e235b0d6e2afa190ee46043a98d14bdb1595 DIST c-lightning-support-slotted-postgresql.patch 4038 BLAKE2B 2f0129a2122f8fa929bef65b6a3ed7a4be44dc866e1b7f3010f2f2f5979bb7d409ef1494857de706c51857c8868a74f721f2dd0e1841e5e7535bb33abb25800c SHA512 7838eb4b0bab9c8cb5101a20680fb36bc83642d604e6e7e744fcb23a4e41a25af3fb2d815adcc9ba6e2fd20675ba94c2baad16904608a161489c38fd29317fae DIST jsmn-1.0.0.tar.gz 11035 BLAKE2B e2952e4ad05965189f38d0ce0afbaace0bf5f4a38126dd457cf99a5aae0732b47c145a0dd514bb56050a8815923b6e7866fbf815e449d64c0e9f78938e6d07e4 SHA512 11dfb575b85c37eb806a42d95ee78b8506e264406ee9b5a1e86bd326e9545a2b8da5b1ff14238d2714374e82e01719f65eb86862094fddea021cb9571e9f6eb7 diff --git a/net-p2p/c-lightning/c-lightning-0.9.0.1.ebuild b/net-p2p/c-lightning/c-lightning-0.9.0.1.ebuild index 6a14ca679..f4dd4d984 100644 --- a/net-p2p/c-lightning/c-lightning-0.9.0.1.ebuild +++ b/net-p2p/c-lightning/c-lightning-0.9.0.1.ebuild @@ -3,23 +3,30 @@ EAPI=7 +POSTGRES_COMPAT=( 9.5 9.6 10 11 12 13 ) + PYTHON_COMPAT=( python{3_6,3_7,3_8} ) PYTHON_SUBDIRS=( contrib/{pyln-client,pylightning} ) DISTUTILS_OPTIONAL=1 -inherit bash-completion-r1 distutils-r1 toolchain-funcs +inherit bash-completion-r1 distutils-r1 postgres toolchain-funcs MyPN=lightning MyPV=$(ver_rs 3 - "${PV//_}") PATCH_HASHES=( + 0a501b3646d298f11420a9cdd8892742f7bad498 # configure: Use pg_config to locate the header location ) PATCH_FILES=( "${PATCH_HASHES[@]/%/.patch}" ) -PATCHES=( "${PATCH_FILES[@]/#/${DISTDIR%/}/}" ) +PATCHES=( + "${PATCH_FILES[@]/#/${DISTDIR%/}/}" + "${DISTDIR}/${PN}-support-slotted-postgresql.patch" +) DESCRIPTION="An implementation of Bitcoin's Lightning Network in C" HOMEPAGE="https://github.com/ElementsProject/${MyPN}" SRC_URI="${HOMEPAGE}/archive/v${MyPV}.tar.gz -> ${P}.tar.gz https://github.com/zserge/jsmn/archive/v1.0.0.tar.gz -> jsmn-1.0.0.tar.gz + ${HOMEPAGE}/pull/3995.patch -> ${PN}-support-slotted-postgresql.patch ${PATCH_FILES[@]/#/${HOMEPAGE}/commit/}" LICENSE="MIT CC0-1.0 GPL-2 LGPL-2.1 LGPL-3" @@ -28,12 +35,12 @@ KEYWORDS="~amd64 ~amd64-linux ~arm ~arm64 ~mips ~ppc ~x86 ~x86-linux" IUSE="developer experimental postgres python test" CDEPEND=" - postgres? ( dev-db/postgresql:* ) dev-db/sqlite >=dev-libs/libbacktrace-0.0.0_pre20180606 >=dev-libs/libsecp256k1-0.1_pre20181017[ecdh,recovery] >=dev-libs/libsodium-1.0.16 >=net-libs/libwally-core-niftynei-0.7.9_pre20200713[elements] + postgres? ( ${POSTGRES_DEP} ) python? ( ${PYTHON_DEPS} ) " RDEPEND="${CDEPEND} @@ -51,6 +58,7 @@ BDEPEND=" sys-devel/gettext " REQUIRED_USE=" + postgres? ( ${POSTGRES_REQ_USE} ) python? ( ${PYTHON_REQUIRED_USE} ) " # FIXME: bundled deps: ccan @@ -71,6 +79,14 @@ do_python_phase() { done } +pkg_setup() { + if use postgres ; then + postgres_pkg_setup + else + export PG_CONFIG= + fi +} + src_unpack() { unpack "${P}.tar.gz" rm -r "${S}/external"/*/ @@ -82,8 +98,6 @@ src_unpack() { src_prepare() { default - use postgres || sed -e $'/^var=HAVE_POSTGRES$/,/\\bEND\\b/{/^code=/a#error\n}' -i configure || die - use python && do_python_phase distutils-r1_src_prepare }