git: 31637dc81773 - main - devel/oclgrind: update to 21.10

From: Johannes M Dieterich <jmd_at_FreeBSD.org>
Date: Tue, 30 Nov 2021 18:53:10 UTC
The branch main has been updated by jmd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=31637dc81773fce2b313ec59036a546d5d22edae

commit 31637dc81773fce2b313ec59036a546d5d22edae
Author:     Johannes M Dieterich <jmd@FreeBSD.org>
AuthorDate: 2021-11-30 18:49:41 +0000
Commit:     Johannes M Dieterich <jmd@FreeBSD.org>
CommitDate: 2021-11-30 18:53:02 +0000

    devel/oclgrind: update to 21.10
    
    Changelog: https://github.com/jrprice/Oclgrind/releases/tag/v21.10
    
    Update LLVM dependency to LLVM12 - minimum LLVM11 is required upstream.
    
    Remove powerpc special casing in-line with comment (LLVM >9)
    
    Add pkg-message that procfs(5) is required.
    
    Clean pkg-descr whitespace.
---
 devel/oclgrind/Makefile                   | 27 ++++++++++-----------------
 devel/oclgrind/distinfo                   |  6 +++---
 devel/oclgrind/files/patch-CMakeLists.txt | 13 +++++++++++--
 devel/oclgrind/pkg-descr                  | 10 +++++-----
 devel/oclgrind/pkg-message                | 15 +++++++++++++++
 devel/oclgrind/pkg-plist                  |  2 +-
 6 files changed, 45 insertions(+), 28 deletions(-)

diff --git a/devel/oclgrind/Makefile b/devel/oclgrind/Makefile
index ada317e518f6..7acaf2ec4748 100644
--- a/devel/oclgrind/Makefile
+++ b/devel/oclgrind/Makefile
@@ -1,9 +1,9 @@
 # Created by: Johannes Dieterich <jmd@freebsd.org>
 
 PORTNAME=	oclgrind
-PORTVERSION=	20190907
+PORTVERSION=	21.10
 DISTVERSIONPREFIX=	v
-PORTREVISION=	1
+PORTREVISION=	0
 CATEGORIES=	devel
 
 MAINTAINER=	jmd@FreeBSD.org
@@ -12,30 +12,23 @@ COMMENT=	SPIR interpreter and virtual OpenCL device simulator
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+LLVM_VER=	12
 BUILD_DEPENDS=	opencl>=0:devel/opencl \
-		llvm-config${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT}
+		llvm-config${LLVM_VER}:devel/llvm${LLVM_VER}
 LIB_DEPENDS=	libOpenCL.so:devel/ocl-icd
-RUN_DEPENDS=	opencl>=0:devel/opencl
+RUN_DEPENDS=	opencl>=0:devel/opencl \
+		llvm${LLVM_VER}>=0:devel/llvm${LLVM_VER}
 
 USES=		cmake
 USE_GITHUB=	yes
 GH_ACCOUNT=	jrprice
 GH_PROJECT=	Oclgrind
-GH_TAGNAME=	e7c87b0
 USE_LDCONFIG=	yes
 
-CC=		clang${LLVM_DEFAULT}
-CXX=		clang++${LLVM_DEFAULT}
-CPP=		clang-cpp${LLVM_DEFAULT}
+CC=		clang${LLVM_VER}
+CXX=		clang++${LLVM_VER}
+CPP=		clang-cpp${LLVM_VER}
 
-# to be removed after switching to LLVM 9 or later
-CXXFLAGS_powerpc64=	-mabi=elfv2
-CMAKE_ARGS+=	-DLLVM_DIR=${LOCALBASE}/llvm${LLVM_DEFAULT}/lib/cmake/llvm
-
-.include <bsd.port.options.mk>
-
-.if ${LLVM_DEFAULT:C/[1-5]./&0/:S,-devel,990,} >= 90
-LLVM_DEFAULT=	80
-.endif
+CMAKE_ARGS+=	-DLLVM_DIR=${LOCALBASE}/llvm${LLVM_VER}/lib/cmake/llvm/
 
 .include <bsd.port.mk>
diff --git a/devel/oclgrind/distinfo b/devel/oclgrind/distinfo
index dabe435280d1..b9d4cf3923a0 100644
--- a/devel/oclgrind/distinfo
+++ b/devel/oclgrind/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1567897486
-SHA256 (jrprice-Oclgrind-v20190907-e7c87b0_GH0.tar.gz) = d9900578c320c430f2970423c6d2288f18f187a67d508c5b93295f1b422bc52c
-SIZE (jrprice-Oclgrind-v20190907-e7c87b0_GH0.tar.gz) = 196630
+TIMESTAMP = 1638296132
+SHA256 (jrprice-Oclgrind-v21.10_GH0.tar.gz) = b40ea81fcf64e9012d63c3128640fde9785ef4f304f9f876f53496595b8e62cc
+SIZE (jrprice-Oclgrind-v21.10_GH0.tar.gz) = 219855
diff --git a/devel/oclgrind/files/patch-CMakeLists.txt b/devel/oclgrind/files/patch-CMakeLists.txt
index a17a44808ed4..c288b5dc294d 100644
--- a/devel/oclgrind/files/patch-CMakeLists.txt
+++ b/devel/oclgrind/files/patch-CMakeLists.txt
@@ -1,6 +1,6 @@
---- CMakeLists.txt.orig	2017-01-22 12:14:21 UTC
+--- CMakeLists.txt.orig	2021-10-18 02:36:25 UTC
 +++ CMakeLists.txt
-@@ -151,7 +151,7 @@ endif()
+@@ -191,7 +191,7 @@ endif()
  # Check for library directory suffixes
  set(_LIBDIR_SUFFIX "")
  get_property(USING_LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
@@ -9,3 +9,12 @@
    set(_LIBDIR_SUFFIX "64")
  endif()
  set(LIBDIR_SUFFIX "${_LIBDIR_SUFFIX}"
+@@ -251,7 +251,7 @@ add_library(oclgrind ${CORE_LIB_TYPE}
+   src/plugins/Uninitialized.cpp)
+ target_link_libraries(oclgrind
+   PRIVATE ${CORE_EXTRA_LIBS} ${CLANG_LIBS}
+-  PUBLIC ${LLVM_LIBS})
++  PUBLIC ${LLVM_LIBS} pthread)
+ 
+ if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
+   target_link_libraries(oclgrind PRIVATE Version)
diff --git a/devel/oclgrind/pkg-descr b/devel/oclgrind/pkg-descr
index d6cbf2de6dff..26e4e069de7a 100644
--- a/devel/oclgrind/pkg-descr
+++ b/devel/oclgrind/pkg-descr
@@ -2,11 +2,11 @@ Oclgrind
 
 SPIR interpreter and virtual OpenCL device simulator
 
-Oclgrind implements a virtual OpenCL device simulator, including an OpenCL 
-runtime with ICD support. The goal is to provide a platform for creating tools 
-to aid OpenCL development. In particular, this project currently implements 
-utilities for debugging memory access errors, detecting data-races and barrier 
-divergence, collecting instruction histograms, and for interactive OpenCL 
+Oclgrind implements a virtual OpenCL device simulator, including an OpenCL
+runtime with ICD support. The goal is to provide a platform for creating tools
+to aid OpenCL development. In particular, this project currently implements
+utilities for debugging memory access errors, detecting data-races and barrier
+divergence, collecting instruction histograms, and for interactive OpenCL
 kernel debugging. The simulator is built on an interpreter for LLVM IR.
 
 WWW: https://github.com/jrprice/Oclgrind
diff --git a/devel/oclgrind/pkg-message b/devel/oclgrind/pkg-message
new file mode 100644
index 000000000000..645ed53d79ca
--- /dev/null
+++ b/devel/oclgrind/pkg-message
@@ -0,0 +1,15 @@
+[
+{ type: install
+  message: <<EOM
+oclgrind requires procfs(5) mounted on /proc.
+
+If you have not done it yet, please do the following:
+
+	mount -t procfs proc /proc
+
+To make it permanent, you need the following lines in /etc/fstab:
+
+	proc	/proc		procfs		rw	0	0
+EOM
+}
+]
diff --git a/devel/oclgrind/pkg-plist b/devel/oclgrind/pkg-plist
index ebfb75b2ca05..162d875729de 100644
--- a/devel/oclgrind/pkg-plist
+++ b/devel/oclgrind/pkg-plist
@@ -10,11 +10,11 @@ include/oclgrind/Queue.h
 include/oclgrind/WorkGroup.h
 include/oclgrind/WorkItem.h
 include/oclgrind/common.h
-include/oclgrind/half.h
 include/oclgrind/opencl-c-1.2-32.pch
 include/oclgrind/opencl-c-1.2-64.pch
 include/oclgrind/opencl-c-2.0-32.pch
 include/oclgrind/opencl-c-2.0-64.pch
+include/oclgrind/opencl-c-base.h
 include/oclgrind/opencl-c.h
 lib/liboclgrind-rt-icd.so
 lib/liboclgrind-rt.so