git: 89834a7669fb - main - devel/opencl-clang: update to 16.0.0

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Fri, 28 Apr 2023 19:55:48 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=89834a7669fb74b1639f391fc0695a4f665f0dce

commit 89834a7669fb74b1639f391fc0695a4f665f0dce
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-04-13 01:08:59 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-04-28 19:53:17 +0000

    devel/opencl-clang: update to 16.0.0
    
    Changes:        https://github.com/intel/opencl-clang/releases/tag/v16.0.0
    Reported by:    GitHub (watch releases)
---
 devel/opencl-clang/Makefile        | 22 +++++++++++++++++++---
 devel/opencl-clang/distinfo.llvm16 | 11 +++++++++++
 2 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/devel/opencl-clang/Makefile b/devel/opencl-clang/Makefile
index 8433370f7901..e6211548ce88 100644
--- a/devel/opencl-clang/Makefile
+++ b/devel/opencl-clang/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	opencl-clang
 DISTVERSIONPREFIX=	v
 DISTVERSION=	${DISTVERSION_${FLAVOR}}
+DISTVERSION_llvm16=	16.0.0
 DISTVERSION_llvm15=	15.0.0
 DISTVERSION_llvm14=	14.0.0
 DISTVERSION_llvm13=	13.0.0
@@ -9,6 +10,14 @@ DISTVERSION_llvm11=	11.0.0
 CATEGORIES=	devel
 PKGNAMESUFFIX=	-${FLAVOR}
 
+PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
+.if !defined(FLAVOR) || ${FLAVOR} == llvm16
+PATCHFILES+=	529a9188114b.patch:-p1 # https://github.com/intel/opencl-clang/pull/415
+PATCHFILES+=	9f50367661bb.patch:-p1 # https://github.com/intel/opencl-clang/pull/419
+PATCHFILES+=	5491ffa3fde5.patch:-p1 # https://github.com/intel/opencl-clang/pull/416
+PATCHFILES+=	cb864cde32c2.patch:-p1 # https://github.com/intel/opencl-clang/issues/422
+.endif
+
 MAINTAINER=	jbeich@FreeBSD.org
 COMMENT=	Clang wrapper to compile OpenCL C kernels to SPIR-V modules
 WWW=		https://github.com/intel/opencl-clang
@@ -19,7 +28,7 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 LIB_DEPENDS=	libLLVM-${FLAVOR:S/llvm//}.so:devel/${FLAVOR} \
 		libLLVMSPIRVLib.so.${FLAVOR:S/llvm//}:devel/spirv-llvm-translator@${FLAVOR}
 
-FLAVORS=	${15 14 13 12 11:L:S/^/llvm/}
+FLAVORS=	${16 15 14 13 12 11:L:S/^/llvm/}
 
 USES=		cmake compiler:c++11-lib
 USE_GITHUB=	yes
@@ -29,8 +38,15 @@ DISTINFO_FILE=	${.CURDIR}/distinfo.${FLAVOR}
 CMAKE_ARGS=	-DCMAKE_PREFIX_PATH:PATH="${LOCALBASE}/${FLAVOR}" \
 		-DPREFERRED_LLVM_VERSION:STRING="${FLAVOR:S/llvm//}"
 CMAKE_INSTALL_PREFIX=		${PREFIX}/${FLAVOR}
-_PLIST_FILES=	include/cclang/common_clang.h \
-		lib/libopencl-clang.so \
+.if defined(FLAVOR) && ${FLAVOR:S/llvm//} < 16
+_PLIST_FILES=	include/cclang/common_clang.h
+.else
+_PLIST_FILES=	include/cclang/module.modulemap \
+		include/cclang/opencl-c-base.h \
+		include/cclang/opencl-c.h \
+		include/cclang/opencl_clang.h
+.endif
+_PLIST_FILES+=	lib/libopencl-clang.so \
 		lib/libopencl-clang.so.${DISTVERSION:R:R}
 PLIST_FILES=	${_PLIST_FILES:S,^,${FLAVOR}/,}
 
diff --git a/devel/opencl-clang/distinfo.llvm16 b/devel/opencl-clang/distinfo.llvm16
new file mode 100644
index 000000000000..803d27b5c40c
--- /dev/null
+++ b/devel/opencl-clang/distinfo.llvm16
@@ -0,0 +1,11 @@
+TIMESTAMP = 1681348139
+SHA256 (intel-opencl-clang-v16.0.0_GH0.tar.gz) = 0a1b098cb56dc3af1dbeea6dce3124314238dfe50e30e25161ccd5a9067e7ff5
+SIZE (intel-opencl-clang-v16.0.0_GH0.tar.gz) = 28413
+SHA256 (529a9188114b.patch) = 543ea89c0f74b3a71097327e62004670837545868741cc27c2cf730261ea1e7c
+SIZE (529a9188114b.patch) = 967
+SHA256 (9f50367661bb.patch) = fba4ede3454544b670028ab739529b5369686a66bd77876190d406aa9ab97d73
+SIZE (9f50367661bb.patch) = 1665
+SHA256 (5491ffa3fde5.patch) = 06aa137e05f38c642d736ab0fc1ff9b54d57bba8b8248e1cc52a94190c7173f2
+SIZE (5491ffa3fde5.patch) = 727
+SHA256 (cb864cde32c2.patch) = 9d11d43fe55a17eb757976f3f580ff632784f4f8768baecb6aeb4e0d78e2c586
+SIZE (cb864cde32c2.patch) = 3389