git: 784b096f01e8 - main - devel/llvm11: fix openmp library depends

From: Brooks Davis <brooks_at_FreeBSD.org>
Date: Thu, 21 Sep 2023 15:29:17 UTC
The branch main has been updated by brooks:

URL: https://cgit.FreeBSD.org/ports/commit/?id=784b096f01e8c65c3f5aaddadc4b9ed231354c76

commit 784b096f01e8c65c3f5aaddadc4b9ed231354c76
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2023-09-21 08:38:46 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2023-09-21 15:23:31 +0000

    devel/llvm11: fix openmp library depends
    
    Use base system libelf and don't link with libffi.
    
    Reformat long and/or multi-line OPTION_FOO variables.
    
    PR:             273801
    Co-authored-by: Ivan Rozhuk <rozhuk.im@gmail.com>
---
 devel/llvm11/Makefile | 39 ++++++++++++++++++++++++---------------
 1 file changed, 24 insertions(+), 15 deletions(-)

diff --git a/devel/llvm11/Makefile b/devel/llvm11/Makefile
index bf81ca24124c..344ccde0df79 100644
--- a/devel/llvm11/Makefile
+++ b/devel/llvm11/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	llvm
 DISTVERSION=	11.0.1
-PORTREVISION=	7
+PORTREVISION=	8
 CATEGORIES=	devel lang
 MASTER_SITES=	https://github.com/llvm/llvm-project/releases/download/llvmorg-${DISTVERSION:S/rc/-rc/}/ \
 		https://${PRE_}releases.llvm.org/${LLVM_RELEASE}/${RCDIR}
@@ -107,17 +107,20 @@ CLANG_USE=		GNOME=libxml2
 COMPILER_RT_DESC=	Sanitizer libraries
 COMPILER_RT_DISTFILES=	compiler-rt-${DISTVERSION}.src${EXTRACT_SUFX}
 COMPILER_RT_EXTRA_PATCHES=	${PATCHDIR}/compiler-rt
-COMPILER_RT_CMAKE_ON=	-DCOMPILER_RT_INSTALL_PATH=${LLVM_PREFIX}/lib/clang/${LLVM_RELEASE}
+COMPILER_RT_CMAKE_ON= \
+	-DCOMPILER_RT_INSTALL_PATH=${LLVM_PREFIX}/lib/clang/${LLVM_RELEASE}
 COMPILER_RT_PLIST_FILES=${_COMPILER_RT_LIBS:S|^|${_CRTLIBDIR}/|} \
 			${_COMPILER_RT_BLACKLISTS:S|^|${_CRTBLDIR}/|}
-DOCS_BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}sphinx>=0,1:textproc/py-sphinx@${PY_FLAVOR} \
-			${PYTHON_PKGNAMEPREFIX}recommonmark>=0.0.20180530:textproc/py-recommonmark@${PY_FLAVOR}
+DOCS_BUILD_DEPENDS= \
+	${PYTHON_PKGNAMEPREFIX}sphinx>=0,1:textproc/py-sphinx@${PY_FLAVOR} \
+	${PYTHON_PKGNAMEPREFIX}recommonmark>=0.0.20180530:textproc/py-recommonmark@${PY_FLAVOR}
 DOCS_CONFLICTS_BUILD=	cmark
 DOCS_PORTDOCS=		llvm
-DOCS_CMAKE_ON=		-DLLVM_ENABLE_SPHINX=ON \
-			-DSPHINX_EXECUTABLE=${LOCALBASE}/bin/sphinx-build-${PYTHON_VER} \
-			-DSPHINX_WARNINGS_AS_ERRORS=OFF \
-			-DLLVM_BUILD_DOCS=ON
+DOCS_CMAKE_ON= \
+	-DLLVM_ENABLE_SPHINX=ON \
+	-DSPHINX_EXECUTABLE=${LOCALBASE}/bin/sphinx-build-${PYTHON_VER} \
+	-DSPHINX_WARNINGS_AS_ERRORS=OFF \
+	-DLLVM_BUILD_DOCS=ON
 DOCS_PLIST_FILES=	${MAN1SRCS:S|^|man/man1/|:S|.1$|${LLVM_SUFFIX}.1.gz|}
 EXTRAS_DESC=		Extra clang tools
 EXTRAS_EXTRA_PATCHES=	${PATCHDIR}/extras
@@ -132,13 +135,14 @@ LLD_DESC=		Install lld, the LLVM linker
 LLD_DISTFILES=		lld-${DISTVERSION}.src${EXTRACT_SUFX}
 LLDB_BINARY_ALIAS=	swig=swig40
 LLDB_BUILD_DEPENDS=	swig40:devel/swig40
-LLDB_CMAKE_ON=		-DLUA_INCLUDE_DIR=${LOCALBASE}/include/lua${LUA_VER_STR} \
-			-DLUA_LIBRARY=${LOCALBASE}/lib/liblua-${LUA_VER}.so \
-			-DCURSES_INCLUDE_PATH=/usr/include \
-			-DCURSES_CURSES_LIBRARY=/usr/lib/libcurses.so \
-			-DCURSES_FORM_LIBRARY=/usr/lib/libform.so \
-			-DCURSES_NCURSES_LIBRARY=/usr/lib/libncurses.so \
-			-DPANEL_LIBRARIES=/usr/lib/libpanel.so
+LLDB_CMAKE_ON= \
+	-DLUA_INCLUDE_DIR=${LOCALBASE}/include/lua${LUA_VER_STR} \
+	-DLUA_LIBRARY=${LOCALBASE}/lib/liblua-${LUA_VER}.so \
+	-DCURSES_INCLUDE_PATH=/usr/include \
+	-DCURSES_CURSES_LIBRARY=/usr/lib/libcurses.so \
+	-DCURSES_FORM_LIBRARY=/usr/lib/libform.so \
+	-DCURSES_NCURSES_LIBRARY=/usr/lib/libncurses.so \
+	-DPANEL_LIBRARIES=/usr/lib/libpanel.so
 LLDB_DESC=		Install lldb, the LLVM debugger
 LLDB_DISTFILES=		lldb-${DISTVERSION}.src${EXTRACT_SUFX}
 LLDB_EXTRA_PATCHES=	${PATCHDIR}/lldb
@@ -146,6 +150,11 @@ LLDB_IMPLIES=		CLANG
 LLDB_PORTDOCS=		lldb
 LLDB_VARS=		_USES_PYTHON=python
 OPENMP_DESC=		Install libomp, the LLVM OpenMP runtime library
+OPENMP_CMAKE_ON= \
+	-DLIBOMPTARGET_DEP_LIBELF_INCLUDE_DIR="/usr/include/libelf.h" \
+	-DLIBOMPTARGET_DEP_LIBELF_LIBRARIES="/usr/lib/libelf.so" \
+	-DLIBOMPTARGET_DEP_LIBFFI_INCLUDE_DIR="" \
+	-DLIBOMPTARGET_DEP_LIBFFI_LIBRARIES=""
 OPENMP_DISTFILES=	openmp-${DISTVERSION}.src${EXTRACT_SUFX}
 PYCLANG_DESC=		Install python bindings to libclang
 PYCLANG_IMPLIES=	CLANG