git: 6d2a9d6effb7 - main - devel/edi: add an option to build the port against libclang
Date: Sat, 11 Feb 2023 12:17:10 UTC
The branch main has been updated by danfe:
URL: https://cgit.FreeBSD.org/ports/commit/?id=6d2a9d6effb75a1af999218db49949829c654ebc
commit 6d2a9d6effb75a1af999218db49949829c654ebc
Author: Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2023-02-11 12:16:04 +0000
Commit: Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2023-02-11 12:16:04 +0000
devel/edi: add an option to build the port against libclang
This enables code autocompletion and inline error reporting.
Allow to override LLVM_DEFAULT: contemporary LLVM versions
are quite demanding on machine resources and take long time
to build. Those who build their own packages can mitigate
this by setting LLVM_VERSION to some lower, saner value e.g.
11, then enabling the option would be less costly.
---
devel/edi/Makefile | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/devel/edi/Makefile b/devel/edi/Makefile
index 53b2f1e4c004..b4451139fa6b 100644
--- a/devel/edi/Makefile
+++ b/devel/edi/Makefile
@@ -11,12 +11,19 @@ WWW= https://phab.enlightenment.org/w/projects/edi/
LIB_DEPENDS= libelementary.so:devel/efl
USES= desktop-file-utils gettext meson pkgconfig tar:xz
-MESON_ARGS= -Dlibclang=false
USE_LDCONFIG= yes
PORTDOCS= AUTHORS NEWS TODO
-OPTIONS_DEFINE= DOCS
+OPTIONS_DEFINE= DOCS LIBCLANG
+
+LIBCLANG_DESC= Autocomplete and inline error reporting via libclang
+LIBCLANG_LIB_DEPENDS= libclang.so:devel/llvm${LLVM_VERSION}
+LIBCLANG_MESON_ON= -Dlibclang-libdir=${LOCALBASE}/llvm${LLVM_VERSION}/lib \
+ -Dlibclang-headerdir=${LOCALBASE}/llvm${LLVM_VERSION}/include
+LIBCLANG_MESON_OFF= -Dlibclang=false
+
+LLVM_VERSION?= ${LLVM_DEFAULT}
post-patch:
@${REINPLACE_CMD} -e '/input : join_paths/d' \