Changeset View
Standalone View
net-p2p/c-lightning/Makefile
PORTNAME= c-lightning | PORTNAME= c-lightning | ||||
# To build from an arbitrary git commit comment PORTVERSION and PORTREVISION (if present) | # To build from an arbitrary git commit comment PORTVERSION and PORTREVISION (if present) | ||||
PORTVERSION= 23.11.2 | PORTVERSION= 23.11.2 | ||||
DISTVERSIONPREFIX= v | DISTVERSIONPREFIX= v | ||||
PORTREVISION= 1 | |||||
# and uncomment the following two lines (use for example -git-HEAD or -git-f8d8348c) | # and uncomment the following two lines (use for example -git-HEAD or -git-f8d8348c) | ||||
#PORTVERSION= 0 | #PORTVERSION= 0 | ||||
#PKGNAMESUFFIX= -git-f8d8348c | #PKGNAMESUFFIX= -git-f8d8348c | ||||
CATEGORIES= net-p2p finance | CATEGORIES= net-p2p finance | ||||
MAINTAINER= vd@FreeBSD.org | MAINTAINER= vd@FreeBSD.org | ||||
Context not available. | |||||
SHEBANG_FILES= plugins/clnrest/clnrest.py \ | SHEBANG_FILES= plugins/clnrest/clnrest.py \ | ||||
tools/reckless | tools/reckless | ||||
EXTRA_PATCHES_aarch64= ${FILESDIR}/extra-patch-external_libwally-core_src_ccan_ccan_base64_base64.c | EXTRA_PATCHES_aarch64= ${FILESDIR}/extra-patch-external_libwally-core_src_ccan_ccan_base64_base64.c | ||||
EXTRA_PATCHES= ${EXTRA_PATCHES_${ARCH}} | EXTRA_PATCHES= ${EXTRA_PATCHES_${ARCH}} | ||||
OPTIONS_DEFINE= COMPATIBILITY DEBUG | OPTIONS_DEFINE= CLNRESTDEPS COMPATIBILITY DEBUG | ||||
OPTIONS_MULTI= STORAGE | OPTIONS_MULTI= STORAGE | ||||
OPTIONS_MULTI_STORAGE= POSTGRESQL SQLITE | OPTIONS_MULTI_STORAGE= POSTGRESQL SQLITE | ||||
OPTIONS_RADIO= TESTING | OPTIONS_RADIO= TESTING | ||||
OPTIONS_RADIO_TESTING= ASAN VALGRIND | 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-23.11.2/plugins/clnrest/requirements.txt |cut -f 1 -d =` ; do echo "=== $d ===" ; portsearch -n "py.*$d" -o path ; done | |||||
CLNRESTDEPS_RUN_DEPENDS=\ | |||||
${PYTHON_PKGNAMEPREFIX}Flask-Cors>0:www/py-flask-cors@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}Jinja2>0:devel/py-Jinja2@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}aniso8601>0:devel/py-aniso8601@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}asn1crypto>0:devel/py-asn1crypto@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}attrs>0:devel/py-attrs@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}base58>0:security/py-base58@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}bidict>0:devel/py-bidict@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}bitstring>0:devel/py-bitstring@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}blinker>0:devel/py-blinker@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}cffi>0:devel/py-cffi@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}click>0:devel/py-click@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}coincurve>0:security/py-coincurve@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}colorama>0:devel/py-colorama@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}flask-restx>0:www/py-flask-restx@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}flask-socketio>0:www/py-flask-socketio@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}flask>0:www/py-flask@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}gevent-websocket>0:www/py-gevent-websocket@${PY_FLAVOR} \ | |||||
danfe: This should probably be spelled as `USE_PYTHON+=cryptography` as there are two possible… | |||||
Done Inline ActionsDone like this: .if ${PORT_OPTIONS:MCLNRESTDEPS} USE_PYTHON+= cryptography .endif Thanks! vd: Done like this:
```
.if ${PORT_OPTIONS:MCLNRESTDEPS}
USE_PYTHON+= cryptography
.endif
```… | |||||
${PYTHON_PKGNAMEPREFIX}gevent>0:devel/py-gevent@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}greenlet>0:devel/py-greenlet@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}gunicorn>0:www/py-gunicorn@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}importlib-metadata>0:devel/py-importlib-metadata@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}importlib-resources>0:devel/py-importlib-resources@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}itsdangerous>0:security/py-itsdangerous@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}json5>0:devel/py-json5@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}jsonschema-specifications>0:devel/py-jsonschema-specifications@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}jsonschema>0:devel/py-jsonschema@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}markupsafe>0:textproc/py-markupsafe@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}packaging>0:devel/py-packaging@${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}python-engineio>0:devel/py-python-engineio@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}python-socketio>0:devel/py-python-socketio@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}pytz>0:devel/py-pytz@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}referencing>0:devel/py-referencing@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}rpds-py>0:devel/py-rpds-py@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}werkzeug>0:www/py-werkzeug@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}zipp>0:devel/py-zipp@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}zope.event>0:devel/py-zope.event@${PY_FLAVOR} \ | |||||
${PYTHON_PKGNAMEPREFIX}zope.interface>0:devel/py-zope.interface@${PY_FLAVOR} | |||||
COMPATIBILITY_CONFIGURE_ENABLE= compat | COMPATIBILITY_CONFIGURE_ENABLE= compat | ||||
COMPATIBILITY_DESC= Compatibility mode, good to disable to see if your software breaks | COMPATIBILITY_DESC= Compatibility mode, good to disable to see if your software breaks | ||||
DEBUG_CONFIGURE_ENABLE= debugbuild | DEBUG_CONFIGURE_ENABLE= debugbuild | ||||
DEBUG_DESC= Extra debug checks in the build, good for testing | DEBUG_DESC= Extra debug checks in the build, good for testing | ||||
POSTGRESQL_DESC= Use PostgreSQL for storage | POSTGRESQL_DESC= Use PostgreSQL for storage | ||||
POSTGRESQL_USES= pgsql | POSTGRESQL_USES= pgsql | ||||
Context not available. | |||||
ASAN_DESC= Compile with address-sanitizer | ASAN_DESC= Compile with address-sanitizer | ||||
VALGRIND_CONFIGURE_ENABLE= valgrind | VALGRIND_CONFIGURE_ENABLE= valgrind | ||||
VALGRIND_DESC= Run tests with Valgrind | VALGRIND_DESC= Run tests with Valgrind | ||||
OPTIONS_DEFAULT=COMPATIBILITY SQLITE | OPTIONS_DEFAULT=COMPATIBILITY SQLITE | ||||
.include <bsd.port.options.mk> | |||||
.if ${PORT_OPTIONS:MCLNRESTDEPS} | |||||
Not Done Inline ActionsThat's quite a lot of dependencies there, did you consider moving plugins/clnrest/clnrest.py itself under an option, perhaps off by default? Generally I'm not a big fan of forcing RUN_DEPENDS, esp. when they come in large numbers, unless the software is really not usable without them being installed. If that's the case here then I guess it makes sense, if not (e.g. some/most of them are optional), I'd rather let the user decide and install only those one she needs, i.e. list them not in RUN_DEPENDS but in the pkg-message or as part of the documentation. danfe: That's quite a lot of dependencies there, did you consider moving `plugins/clnrest/clnrest.py`… | |||||
Done Inline ActionsThe plugin is installed by default and it has been like this. I think it is ok/harmless. Only if one tries to use it/enable it then it will not start because of missing py dependencies. Indeed that plugin is not critical to the running of the software. I set the new option to OFF by default. However I left the dependencies in RUN_DEPENDS because that is the most convenient way - the user clicks the option to ON, meaning "I will use the clnrest plugin, thus I need those dependencies" and then everything needed gets installed. If the dependencies are only listed in pkg-message, then the user has to bother manually installing them if they will use the clnrest plugin and then there is a chance that some of them gets deinstalled later by accident. With RUN_DEPENDS attempt to deinstall some of them will show that c-lightning depends on it. Thank you! vd: The plugin is installed by default and it has been like this. I think it is ok/harmless. Only… | |||||
USE_PYTHON+= cryptography | |||||
.endif | |||||
HAS_CONFIGURE= yes | HAS_CONFIGURE= yes | ||||
CONFIGURE_ARGS= --disable-rust | CONFIGURE_ARGS= --disable-rust | ||||
# Print the compilation commands (verbose). | # Print the compilation commands (verbose). | ||||
MAKE_ARGS= V=1 | MAKE_ARGS= V=1 | ||||
Context not available. |
This should probably be spelled as USE_PYTHON+=cryptography as there are two possible providers, see /usr/ports/Mk/Uses/python.mk around line 607.