1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-29 10:18:30 +00:00

net-p2p/c-lightning: upgrade from 24.02.2 to 24.05

This commit is contained in:
Vasil Dimov 2024-06-11 19:16:08 +02:00
parent 2a46a41f8c
commit 9c47963188
No known key found for this signature in database
GPG Key ID: 54DF06F64B55CBBF
4 changed files with 63 additions and 11 deletions

View File

@ -1,11 +1,10 @@
PORTNAME= c-lightning
# To build from an arbitrary git commit comment PORTVERSION and PORTREVISION (if present)
PORTVERSION= 24.02.2
PORTVERSION= 24.05
DISTVERSIONPREFIX= v
# and uncomment the following two lines (use for example -git-HEAD or -git-f8d8348c)
#PORTVERSION= 0
#PKGNAMESUFFIX= -git-f8d8348c
PORTREVISION= 1
CATEGORIES= net-p2p finance
MAINTAINER= vd@FreeBSD.org
@ -16,6 +15,7 @@ LICENSE= MIT
BUILD_DEPENDS= bash:shells/bash \
lowdown:textproc/lowdown \
jq:textproc/jq \
${PYTHON_PKGNAMEPREFIX}mako>=1.0.14:textproc/py-mako@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}mrkd>=0.2.0_1:devel/py-mrkd@${PY_FLAVOR}
LIB_DEPENDS= libsodium.so:security/libsodium
@ -31,18 +31,18 @@ USES= autoreconf:build \
CPE_VENDOR= elementsproject
BINARY_ALIAS= python=${PYTHON_CMD} python3=${PYTHON_CMD}
ALL_TARGET= default
SHEBANG_FILES= plugins/clnrest/clnrest.py \
SHEBANG_FILES= plugins/wss-proxy/wss-proxy.py \
plugins/clnrest/clnrest.py \
tools/reckless
OPTIONS_DEFINE= CLNRESTDEPS COMPATIBILITY DEBUG
OPTIONS_DEFINE= CLNRESTDEPS COMPATIBILITY DEBUG WSSPROXYDEPS
OPTIONS_MULTI= STORAGE
OPTIONS_MULTI_STORAGE= POSTGRESQL SQLITE
OPTIONS_RADIO= TESTING
OPTIONS_RADIO_TESTING= ASAN VALGRIND
CLNRESTDEPS_DESC= Install and depend on packages required by the clnrest plugin
# for d in $(grep -E '^[^[:space:]]' work/lightning-*/plugins/clnrest/requirements.txt |cut -f 1 -d =) ; do if [ -z "$(make -V CLNRESTDEPS_RUN_DEPENDS |grep -i "$(make -V PYTHON_PKGNAMEPREFIX)${d/-/.}>")" ] ; then echo "$d" ; fi ; done
# ignore cryptography (handled separately via USE_PYTHON+=cryptography) and pkgutil-resolve-name (included in Python 3.9)
# run files/check_python_plugins_deps.sh to verify the list below
CLNRESTDEPS_RUN_DEPENDS=\
${PYTHON_PKGNAMEPREFIX}Flask-Cors>0:www/py-flask-cors@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \
@ -100,12 +100,27 @@ ASAN_CONFIGURE_ENABLE= address-sanitizer
ASAN_DESC= Compile with address-sanitizer
VALGRIND_CONFIGURE_ENABLE= valgrind
VALGRIND_DESC= Run tests with Valgrind
WSSPROXYDEPS_DESC= Install and depend on packages required by the wss-proxy plugin
# run files/check_python_plugins_deps.sh to verify the list below
WSSPROXYDEPS_RUN_DEPENDS=\
${PYTHON_PKGNAMEPREFIX}asn1crypto>0:devel/py-asn1crypto@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}base58>0:security/py-base58@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}bitarray>0:devel/py-bitarray@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}bitstring>0:devel/py-bitstring@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}cffi>0:devel/py-cffi@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}coincurve>0:security/py-coincurve@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pycparser>0:devel/py-pycparser@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pyln-bolt7>0:net-p2p/pyln-bolt7@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pyln-client>0:net-p2p/pyln-client@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pyln-proto>0:net-p2p/pyln-proto@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pysocks>0:net/py-pysocks@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}websockets>0:devel/py-websockets@${PY_FLAVOR}
OPTIONS_DEFAULT=COMPATIBILITY SQLITE
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MCLNRESTDEPS}
.if ${PORT_OPTIONS:MCLNRESTDEPS} || ${PORT_OPTIONS:MWSSPROXYDEPS}
USES+= python:3.9+
USE_PYTHON+= cryptography
.else
@ -146,6 +161,11 @@ PLIST_SUB= U="${USERS}" G="${GROUPS}"
CPPFLAGS+= -Wno-error=unused-but-set-variable
.endif
post-patch:
${REINPLACE_CMD} -e "s|python3|${PYTHON_CMD}|" \
${WRKSRC}/plugins/clnrest/clnrest \
${WRKSRC}/plugins/wss-proxy/wss-proxy
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/lightning-cli
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/lightning-hsmtool

View File

@ -1,6 +1,6 @@
TIMESTAMP = 1713678971
SHA256 (ElementsProject-lightning-v24.02.2_GH0.tar.gz) = b9841132e7e66f56e21f3a8b46e29add26476cbd5421db0d3e5bbb0e147316c0
SIZE (ElementsProject-lightning-v24.02.2_GH0.tar.gz) = 12913908
TIMESTAMP = 1718103408
SHA256 (ElementsProject-lightning-v24.05_GH0.tar.gz) = a1eeaa7e6c26f7db9693979ce0606dee726310404b8718850f8bb19985458b66
SIZE (ElementsProject-lightning-v24.05_GH0.tar.gz) = 13234942
SHA256 (ElementsProject-libwally-core-ec348c884e93a_GH0.tar.gz) = 6a56dcc73f589951db058eb66a3e95e33890c416492f9d1cdf4c68f0b31847c8
SIZE (ElementsProject-libwally-core-ec348c884e93a_GH0.tar.gz) = 1037396
SHA256 (ElementsProject-secp256k1-zkp-1e04d324476f9_GH0.tar.gz) = b987949687db5290fd9cf84029df7ccfecc6787358f9350c7190645969957e0a

View File

@ -0,0 +1,23 @@
#!/usr/bin/env bash
declare -A requirements=(["plugins/clnrest/requirements.txt"]="CLNRESTDEPS_RUN_DEPENDS"
["plugins/wss-proxy/requirements.txt"]="WSSPROXYDEPS_RUN_DEPENDS")
for file in ${!requirements[@]} ; do
make_var="${requirements[${file}]}"
ok=1
for req in $(grep -E '^[^[:space:]]' "$(make -V WRKSRC)/${file}" |cut -f 1 -d =) ; do
# "cryptography" is handled separately via USE_PYTHON+=cryptography
# "pkgutil-resolve-name" is included in Python 3.9
if [ "${req}" != "cryptography" -a \
"${req}" != "pkgutil-resolve-name" -a \
-z "$(make -V "${make_var}" |grep -i "$(make -V PYTHON_PKGNAMEPREFIX)${req/-/.}>")" ] ; then
echo "missing in ${file}: ${req}"
ok=0
fi
done
if [ ${ok} -eq 1 ] ; then
echo "ok: ${file}"
fi
done

View File

@ -26,6 +26,7 @@ libexec/c-lightning/plugins/clnrest/.github/screenshots/Swagger-rpc-method.png
libexec/c-lightning/plugins/clnrest/.github/screenshots/Swagger.png
libexec/c-lightning/plugins/clnrest/Makefile
libexec/c-lightning/plugins/clnrest/__init__.py
libexec/c-lightning/plugins/clnrest/clnrest
libexec/c-lightning/plugins/clnrest/clnrest.py
libexec/c-lightning/plugins/clnrest/poetry.lock
libexec/c-lightning/plugins/clnrest/pyproject.toml
@ -46,6 +47,13 @@ libexec/c-lightning/plugins/spenderp
libexec/c-lightning/plugins/sql
libexec/c-lightning/plugins/topology
libexec/c-lightning/plugins/txprepare
libexec/c-lightning/plugins/wss-proxy/Makefile
libexec/c-lightning/plugins/wss-proxy/poetry.lock
libexec/c-lightning/plugins/wss-proxy/pyproject.toml
libexec/c-lightning/plugins/wss-proxy/requirements.txt
libexec/c-lightning/plugins/wss-proxy/wss-proxy
libexec/c-lightning/plugins/wss-proxy/wss-proxy.py
libexec/c-lightning/plugins/wss-proxy/wss_proxy/__init__.py
share/doc/c-lightning/LICENSE
share/doc/c-lightning/README.md
share/man/man1/lightning-cli.1.gz
@ -79,11 +87,11 @@ share/man/man7/lightning-datastoreusage.7.gz
share/man/man7/lightning-decode.7.gz
share/man/man7/lightning-decodepay.7.gz
share/man/man7/lightning-deldatastore.7.gz
share/man/man7/lightning-delexpiredinvoice.7.gz
share/man/man7/lightning-delforward.7.gz
share/man/man7/lightning-delinvoice.7.gz
share/man/man7/lightning-delpay.7.gz
share/man/man7/lightning-deprecations.7.gz
share/man/man7/lightning-dev-forget-channel.7.gz
share/man/man7/lightning-disableinvoicerequest.7.gz
share/man/man7/lightning-disableoffer.7.gz
share/man/man7/lightning-disconnect.7.gz
@ -165,6 +173,7 @@ share/man/man7/lightning-txdiscard.7.gz
share/man/man7/lightning-txprepare.7.gz
share/man/man7/lightning-txsend.7.gz
share/man/man7/lightning-unreserveinputs.7.gz
share/man/man7/lightning-upgradewallet.7.gz
share/man/man7/lightning-utxopsbt.7.gz
share/man/man7/lightning-wait.7.gz
share/man/man7/lightning-waitanyinvoice.7.gz