[gentoo-commits] repo/gentoo:master commit in: dev-libs/pocl/files/, dev-libs/pocl/

2023-05-20 Thread Michał Górny
commit: 6c2c837bbaf2258e728b94607ff5756b0f2d7bee
Author: Michał Górny  gentoo  org>
AuthorDate: Sat May 20 07:07:57 2023 +
Commit: Michał Górny  gentoo  org>
CommitDate: Sat May 20 07:15:09 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c2c837b

dev-libs/pocl: Remove old

Signed-off-by: Michał Górny  gentoo.org>

 dev-libs/pocl/Manifest |   1 -
 dev-libs/pocl/files/pocl-3.0-cuda.patch|  48 -
 dev-libs/pocl/files/pocl-3.0-fix-version.patch |  11 --
 dev-libs/pocl/files/pocl-3.0-icd.patch | 127 --
 dev-libs/pocl/pocl-3.0.ebuild  | 144 -
 5 files changed, 331 deletions(-)

diff --git a/dev-libs/pocl/Manifest b/dev-libs/pocl/Manifest
index c053b08330a1..014e89f51635 100644
--- a/dev-libs/pocl/Manifest
+++ b/dev-libs/pocl/Manifest
@@ -1,2 +1 @@
-DIST pocl-3.0.tar.gz 1722809 BLAKE2B 
095d3d1dca3fa7ebdf61e6e34bf444755dd6842c4f16e0f80895337e96508056465d332309d38ee4db6d6b0031e1dfce350485750e59bfe0dea5951eba5fd3e4
 SHA512 
dc02bdf259792edb5cb3c80cde5c5261e1e21219b4b31420a3b537abbca1bc478ce0ca0dfc622727088b67d580217d47566309de7c6114a24553de4496a209ea
 DIST pocl-3.1.tar.gz 1928607 BLAKE2B 
7044a96e361426408fabd973987a0d6956693e3c9095769ee94d7dac47a8841d7489933e94acd22451a1c8a2ca83cb8e6948aebe899b23a8a6080ef1b7b37e9c
 SHA512 
40d17e81d715f6897aa1d97fd02834d45227d9d0bd4c70e76d727f9ad4df675c25b7158a862e20e63810182fdad82a3cb1e454668c3a6422a977e59c8325fa0c

diff --git a/dev-libs/pocl/files/pocl-3.0-cuda.patch 
b/dev-libs/pocl/files/pocl-3.0-cuda.patch
deleted file mode 100644
index d6729b0fedce..
--- a/dev-libs/pocl/files/pocl-3.0-cuda.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-https://github.com/pocl/pocl/pull/1146
-
-From 978afab0ba9f90fbdb39ed4ffc52f8ca46d2bfa9 Mon Sep 17 00:00:00 2001
-From: Sam James 
-Date: Mon, 5 Dec 2022 04:17:05 +
-Subject: [PATCH] pocl-cuda: fix build with -DPOCL_DEBUG_MESSAGES=OFF
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Fixes build failure:
-```
-/var/tmp/portage2/portage/dev-libs/pocl-3.0/work/pocl-3.0/lib/CL/devices/cuda/pocl-cuda.c:
 In function ‘load_or_generate_kernel’:
-/var/tmp/portage2/portage/dev-libs/pocl-3.0/work/pocl-3.0/lib/CL/devices/cuda/pocl-cuda.c:981:9:
 error: ‘pocl_debug_messages_filter’ undeclared (first use in this function)
-  981 |   if (!(pocl_debug_messages_filter & POCL_DEBUG_FLAG_CUDA))
-  | ^~
-```
-
-Bug: https://bugs.gentoo.org/862633
 a/lib/CL/devices/cuda/pocl-cuda.c
-+++ b/lib/CL/devices/cuda/pocl-cuda.c
-@@ -1093,6 +1093,7 @@ load_or_generate_kernel (cl_kernel kernel, cl_device_id 
device,
-   /* TODO: When can we unload the module? */
-   CUmodule module;
- 
-+#ifdef POCL_DEBUG_MESSAGES
-   if (!(pocl_debug_messages_filter & POCL_DEBUG_FLAG_CUDA))
- {
-   result = cuModuleLoad (, ptx_filename);
-@@ -1100,6 +1101,7 @@ load_or_generate_kernel (cl_kernel kernel, cl_device_id 
device,
- }
-   else
- {
-+#endif
-   struct stat st;
-   stat (ptx_filename, );
- 
-@@ -1132,7 +1134,9 @@ load_or_generate_kernel (cl_kernel kernel, cl_device_id 
device,
- 
-   free (log);
-   free (buffer);
-+#ifdef POCL_DEBUG_MESSAGES
- }
-+#endif
- 
-   /* Get kernel function */
-   CUfunction function;
-

diff --git a/dev-libs/pocl/files/pocl-3.0-fix-version.patch 
b/dev-libs/pocl/files/pocl-3.0-fix-version.patch
deleted file mode 100644
index 8ae428036340..
--- a/dev-libs/pocl/files/pocl-3.0-fix-version.patch
+++ /dev/null
@@ -1,11 +0,0 @@
 a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -73,7 +73,7 @@ endif()
- 
- set(MAJOR_VERSION 3)
- set(MINOR_VERSION 0)
--set(VERSION_SUFFIX_FIXED_TEXT "-rc2")
-+set(VERSION_SUFFIX_FIXED_TEXT "")
- set(VERSION_SUFFIX "${VERSION_SUFFIX_FIXED_TEXT}")
- set(VERSION_STRING ${MAJOR_VERSION}.${MINOR_VERSION}${VERSION_SUFFIX})
- set(POCL_VERSION_BASE ${VERSION_STRING})

diff --git a/dev-libs/pocl/files/pocl-3.0-icd.patch 
b/dev-libs/pocl/files/pocl-3.0-icd.patch
deleted file mode 100644
index f64e633e2f53..
--- a/dev-libs/pocl/files/pocl-3.0-icd.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From 408fe60850977ab9c68d174a42ae4a5f3455cab1 Mon Sep 17 00:00:00 2001
-From: Sam James 
-Date: Wed, 20 Jul 2022 04:59:11 +
-Subject: [PATCH] CMake: fix build without ocl-icd
-
-If not using ocl-icd (in this case, I was using dev-libs/opencl-icd-loader),
-OCL_ICD_INCLUDE_DIRS and friends won't be defined and CMake bails out
-with an error:
-```
--- Configuring done
-CMake Error: The following variables are used in this project, but they are 
set to NOTFOUND.
-Please set them or make sure they are set and tested correctly in the CMake 
files:
-/var/tmp/portage/dev-libs/pocl-3.0/work/pocl-3.0/lib/CL/OCL_ICD_INCLUDE_DIRS
-   used as include directory in directory 
/var/tmp/portage/dev-libs/pocl-3.0/work/pocl-3.0/lib/CL
-   used as include directory in 

[gentoo-commits] repo/gentoo:master commit in: dev-libs/pocl/files/, dev-libs/pocl/

2023-01-19 Thread Sam James
commit: ec263559dc06dcf768ef474d9099e923e59b0405
Author: Martin Kletzander  gmail  com>
AuthorDate: Wed Jan 18 15:19:45 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Jan 20 01:19:50 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec263559

dev-libs/pocl: Fix possible build failure in 3.1

There is a possible missing macro which was now fixed upstream, but not
in 3.1, so this is a backport.  Not raising the release number since
there is no need for rebuild of installed pocl-3.1.

Signed-off-by: Martin Kletzander  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/29159
Signed-off-by: Sam James  gentoo.org>

 dev-libs/pocl/files/pocl-3.1-nodebug.patch | 29 +
 dev-libs/pocl/pocl-3.1.ebuild  |  4 
 2 files changed, 33 insertions(+)

diff --git a/dev-libs/pocl/files/pocl-3.1-nodebug.patch 
b/dev-libs/pocl/files/pocl-3.1-nodebug.patch
new file mode 100644
index ..ea1085dc4a49
--- /dev/null
+++ b/dev-libs/pocl/files/pocl-3.1-nodebug.patch
@@ -0,0 +1,29 @@
+https://github.com/pocl/pocl/commit/a13cb332d6678d4556d7319b284b77c371c4b91e
+
+commit a13cb332d6678d4556d7319b284b77c371c4b91e
+Author: Martin Kletzander 
+Date:   Tue Jan 17 09:04:41 2023 +0100
+
+Add stub macro POCL_MSG_PRINT_ALMAIF_MMAP without POCL_DEBUG_MESSAGES
+
+Without this the build fails with the following error when built without
+POCL_DEBUG_MESSAGES:
+
+../lib/CL/devices/almaif/MMAPRegion.cc: In constructor 
‘MMAPRegion::MMAPRegion(size_t, size_t, int)’:
+../lib/CL/devices/almaif/MMAPRegion.cc:43:3: error: 
‘POCL_MSG_PRINT_ALMAIF_MMAP’ was not declared in this scope; did you mean 
‘POCL_MSG_PRINT_ALMAIF2’?
+   43 |   POCL_MSG_PRINT_ALMAIF_MMAP(
+  |   ^~
+  |   POCL_MSG_PRINT_ALMAIF2
+
+and about 10 more.
+
+--- a/lib/CL/pocl_debug.h
 b/lib/CL/pocl_debug.h
+@@ -284,6 +284,7 @@ POCL_EXPORT
+ 
+ #define POCL_MSG_PRINT_ALMAIF2(...)  do {} while (0)
+ #define POCL_MSG_PRINT_ALMAIF(...)  do {} while (0)
++#define POCL_MSG_PRINT_ALMAIF_MMAP(...)  do {} while (0)
+ #define POCL_MSG_PRINT_PROXY2(...)  do {} while (0)
+ #define POCL_MSG_PRINT_PROXY(...)  do {} while (0)
+ #define POCL_MSG_PRINT_VULKAN2(...)  do {} while (0)

diff --git a/dev-libs/pocl/pocl-3.1.ebuild b/dev-libs/pocl/pocl-3.1.ebuild
index 19be29e62882..f5e877a39aea 100644
--- a/dev-libs/pocl/pocl-3.1.ebuild
+++ b/dev-libs/pocl/pocl-3.1.ebuild
@@ -57,6 +57,10 @@ llvm_check_deps() {
has_version -b "sys-devel/clang:${LLVM_SLOT}${usedep}"
 }
 
+PATCHES=(
+   "${FILESDIR}"/${P}-nodebug.patch
+)
+
 pkg_setup() {
use doc && python-any-r1_pkg_setup
 



[gentoo-commits] repo/gentoo:master commit in: dev-libs/pocl/files/, dev-libs/pocl/

2022-12-04 Thread Sam James
commit: 462ef1543682881ba43c755db473b60d4436a579
Author: Sam James  gentoo  org>
AuthorDate: Mon Dec  5 04:20:26 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Mon Dec  5 04:20:26 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=462ef154

dev-libs/pocl: fix build w/ cuda

Closes: https://bugs.gentoo.org/862633
Signed-off-by: Sam James  gentoo.org>

 dev-libs/pocl/files/pocl-3.0-cuda.patch | 48 +
 dev-libs/pocl/pocl-3.0.ebuild   |  1 +
 2 files changed, 49 insertions(+)

diff --git a/dev-libs/pocl/files/pocl-3.0-cuda.patch 
b/dev-libs/pocl/files/pocl-3.0-cuda.patch
new file mode 100644
index ..d6729b0fedce
--- /dev/null
+++ b/dev-libs/pocl/files/pocl-3.0-cuda.patch
@@ -0,0 +1,48 @@
+https://github.com/pocl/pocl/pull/1146
+
+From 978afab0ba9f90fbdb39ed4ffc52f8ca46d2bfa9 Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Mon, 5 Dec 2022 04:17:05 +
+Subject: [PATCH] pocl-cuda: fix build with -DPOCL_DEBUG_MESSAGES=OFF
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes build failure:
+```
+/var/tmp/portage2/portage/dev-libs/pocl-3.0/work/pocl-3.0/lib/CL/devices/cuda/pocl-cuda.c:
 In function ‘load_or_generate_kernel’:
+/var/tmp/portage2/portage/dev-libs/pocl-3.0/work/pocl-3.0/lib/CL/devices/cuda/pocl-cuda.c:981:9:
 error: ‘pocl_debug_messages_filter’ undeclared (first use in this function)
+  981 |   if (!(pocl_debug_messages_filter & POCL_DEBUG_FLAG_CUDA))
+  | ^~
+```
+
+Bug: https://bugs.gentoo.org/862633
+--- a/lib/CL/devices/cuda/pocl-cuda.c
 b/lib/CL/devices/cuda/pocl-cuda.c
+@@ -1093,6 +1093,7 @@ load_or_generate_kernel (cl_kernel kernel, cl_device_id 
device,
+   /* TODO: When can we unload the module? */
+   CUmodule module;
+ 
++#ifdef POCL_DEBUG_MESSAGES
+   if (!(pocl_debug_messages_filter & POCL_DEBUG_FLAG_CUDA))
+ {
+   result = cuModuleLoad (, ptx_filename);
+@@ -1100,6 +1101,7 @@ load_or_generate_kernel (cl_kernel kernel, cl_device_id 
device,
+ }
+   else
+ {
++#endif
+   struct stat st;
+   stat (ptx_filename, );
+ 
+@@ -1132,7 +1134,9 @@ load_or_generate_kernel (cl_kernel kernel, cl_device_id 
device,
+ 
+   free (log);
+   free (buffer);
++#ifdef POCL_DEBUG_MESSAGES
+ }
++#endif
+ 
+   /* Get kernel function */
+   CUfunction function;
+

diff --git a/dev-libs/pocl/pocl-3.0.ebuild b/dev-libs/pocl/pocl-3.0.ebuild
index 51f20465bc25..7f94d77e1958 100644
--- a/dev-libs/pocl/pocl-3.0.ebuild
+++ b/dev-libs/pocl/pocl-3.0.ebuild
@@ -47,6 +47,7 @@ BDEPEND="${CLANG_DEPS}
 PATCHES=(
"${FILESDIR}"/${P}-icd.patch
"${FILESDIR}"/${P}-fix-version.patch
+   "${FILESDIR}"/${P}-cuda.patch
 )
 
 python_check_deps() {



[gentoo-commits] repo/gentoo:master commit in: dev-libs/pocl/files/, dev-libs/pocl/

2022-09-11 Thread Sam James
commit: a195830ec668619d95d793582f8ca4f8cd1b2434
Author: Sam James  gentoo  org>
AuthorDate: Sun Sep 11 18:05:19 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Sun Sep 11 18:13:20 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a195830e

dev-libs/pocl: drop 1.8-r2

Signed-off-by: Sam James  gentoo.org>

 dev-libs/pocl/Manifest |   1 -
 .../pocl/files/vendor_opencl_libs_location.patch   |  20 
 dev-libs/pocl/metadata.xml |   1 -
 dev-libs/pocl/pocl-1.8-r2.ebuild   | 126 -
 4 files changed, 148 deletions(-)

diff --git a/dev-libs/pocl/Manifest b/dev-libs/pocl/Manifest
index e1f69ae33d0f..3fefa356fa2d 100644
--- a/dev-libs/pocl/Manifest
+++ b/dev-libs/pocl/Manifest
@@ -1,2 +1 @@
-DIST pocl-1.8.tar.gz 1614545 BLAKE2B 
b0ccc08d1f899719f5def731c61727440035a879ebeebae89dd406423eba6c12b866f34cd47dd0e0f944b7f0c4569c57c44a9a62bf02552de5c4c3b8c9fb3b48
 SHA512 
bcbb3fa3d2234d4c5b0c17863eba0bc4c8f13f863cc58cfd1de49e21fa7bf0aec82b81aec143c81885e3a39274c8ae783b2f03b9a12846e024204d6ed0e59a9d
 DIST pocl-3.0.tar.gz 1722809 BLAKE2B 
095d3d1dca3fa7ebdf61e6e34bf444755dd6842c4f16e0f80895337e96508056465d332309d38ee4db6d6b0031e1dfce350485750e59bfe0dea5951eba5fd3e4
 SHA512 
dc02bdf259792edb5cb3c80cde5c5261e1e21219b4b31420a3b537abbca1bc478ce0ca0dfc622727088b67d580217d47566309de7c6114a24553de4496a209ea

diff --git a/dev-libs/pocl/files/vendor_opencl_libs_location.patch 
b/dev-libs/pocl/files/vendor_opencl_libs_location.patch
deleted file mode 100644
index 548589ca41bc..
--- a/dev-libs/pocl/files/vendor_opencl_libs_location.patch
+++ /dev/null
@@ -1,20 +0,0 @@
 a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -125,7 +125,7 @@
- endif()
- 
- # for libpocl.so
--set(POCL_INSTALL_PUBLIC_LIBDIR 
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" CACHE PATH "POCL public 
libdir")
-+set(POCL_INSTALL_PUBLIC_LIBDIR 
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/OpenCL/vendors/pocl" CACHE 
PATH "POCL public libdir")
- 
- # for llvmopencl.so
- set(POCL_INSTALL_PRIVATE_LIBDIR 
"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pocl" CACHE PATH "POCL private 
libdir")
-@@ -134,7 +134,7 @@
- if(UNIX AND NOT CMAKE_CROSSCOMPILING AND 
CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
-   set(POCL_INSTALL_ICD_VENDORDIR "/etc/OpenCL/vendors" CACHE PATH "POCL ICD 
file destination")
- else()
--  set(POCL_INSTALL_ICD_VENDORDIR "${CMAKE_INSTALL_PREFIX}/etc/OpenCL/vendors" 
CACHE PATH "POCL ICD file destination")
-+  set(POCL_INSTALL_ICD_VENDORDIR "${SYSCONFDIR}/etc/OpenCL/vendors" CACHE 
PATH "POCL ICD file destination")
- endif()
- 
- # for kernel-.bc

diff --git a/dev-libs/pocl/metadata.xml b/dev-libs/pocl/metadata.xml
index 9e73154528e9..a08bc6bb7825 100644
--- a/dev-libs/pocl/metadata.xml
+++ b/dev-libs/pocl/metadata.xml
@@ -6,7 +6,6 @@


Enable the generic hardware accelerator 
device driver
-   Enable reporting OpenCL 2.0 for the CPU 
device
Ensures that certain build options 
which would result in non-conformant pocl build stay disabled. Note that this 
does not quarantee a fully conformant build of pocl.
Enable the CUDA backend for NVIDIA GPUs
When enabled, OpenCL printf() 
call's f/e/g formatters are handled by pocl. When disabled, these are handled 
by system C library.

diff --git a/dev-libs/pocl/pocl-1.8-r2.ebuild b/dev-libs/pocl/pocl-1.8-r2.ebuild
deleted file mode 100644
index cba8d60fd806..
--- a/dev-libs/pocl/pocl-1.8-r2.ebuild
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DOCS_AUTODOC=0
-DOCS_BUILDER="sphinx"
-DOCS_DIR="doc/sphinx/source"
-PYTHON_COMPAT=( python3_{8..10} pypy3 )
-LLVM_MAX_SLOT=13
-
-inherit cmake llvm python-any-r1 docs
-
-DESCRIPTION="Portable Computing Language (an implementation of OpenCL)"
-HOMEPAGE="http://portablecl.org https://github.com/pocl/pocl;
-SRC_URI="https://github.com/pocl/pocl/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64"
-# TODO: hsa tce
-IUSE="accel cl20 +conformance cuda debug examples float-conversion hardening 
+hwloc memmanager test"
-# Tests not yet passing, fragile in Portage environment(?)
-RESTRICT="!test? ( test ) test"
-
-# TODO: add dependencies for cuda
-# Note: No := on LLVM because it pulls in Clang
-# see llvm.eclass for why
-CLANG_DEPS="!cuda? ( https://github.com/pocl/pocl/blob/master/.drone.yml
-   # But couldn't seem to get tests working yet
-   cmake_src_test
-}
-
-src_install() {
-   cmake_src_install
-
-   dodoc CREDITS README CHANGES
-
-   if use doc; then
-   dodoc -r _build/html
-   docompress -x /usr/share/doc/${P}/html
-   fi
-
-   if use examples; then
-   dodoc -r examples
-   docompress -x 

[gentoo-commits] repo/gentoo:master commit in: dev-libs/pocl/files/, dev-libs/pocl/

2022-07-19 Thread Sam James
commit: a8eaf7528b14c0bf00989be80ecddf94f4ac2bc6
Author: Sam James  gentoo  org>
AuthorDate: Wed Jul 20 05:04:46 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Jul 20 05:09:06 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8eaf752

dev-libs/pocl: add 3.0

Signed-off-by: Sam James  gentoo.org>

 dev-libs/pocl/Manifest |   1 +
 dev-libs/pocl/files/pocl-3.0-icd.patch | 127 
 dev-libs/pocl/metadata.xml |   1 +
 dev-libs/pocl/pocl-3.0.ebuild  | 131 +
 4 files changed, 260 insertions(+)

diff --git a/dev-libs/pocl/Manifest b/dev-libs/pocl/Manifest
index eacf11d34468..e1f69ae33d0f 100644
--- a/dev-libs/pocl/Manifest
+++ b/dev-libs/pocl/Manifest
@@ -1 +1,2 @@
 DIST pocl-1.8.tar.gz 1614545 BLAKE2B 
b0ccc08d1f899719f5def731c61727440035a879ebeebae89dd406423eba6c12b866f34cd47dd0e0f944b7f0c4569c57c44a9a62bf02552de5c4c3b8c9fb3b48
 SHA512 
bcbb3fa3d2234d4c5b0c17863eba0bc4c8f13f863cc58cfd1de49e21fa7bf0aec82b81aec143c81885e3a39274c8ae783b2f03b9a12846e024204d6ed0e59a9d
+DIST pocl-3.0.tar.gz 1722809 BLAKE2B 
095d3d1dca3fa7ebdf61e6e34bf444755dd6842c4f16e0f80895337e96508056465d332309d38ee4db6d6b0031e1dfce350485750e59bfe0dea5951eba5fd3e4
 SHA512 
dc02bdf259792edb5cb3c80cde5c5261e1e21219b4b31420a3b537abbca1bc478ce0ca0dfc622727088b67d580217d47566309de7c6114a24553de4496a209ea

diff --git a/dev-libs/pocl/files/pocl-3.0-icd.patch 
b/dev-libs/pocl/files/pocl-3.0-icd.patch
new file mode 100644
index ..f64e633e2f53
--- /dev/null
+++ b/dev-libs/pocl/files/pocl-3.0-icd.patch
@@ -0,0 +1,127 @@
+From 408fe60850977ab9c68d174a42ae4a5f3455cab1 Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Wed, 20 Jul 2022 04:59:11 +
+Subject: [PATCH] CMake: fix build without ocl-icd
+
+If not using ocl-icd (in this case, I was using dev-libs/opencl-icd-loader),
+OCL_ICD_INCLUDE_DIRS and friends won't be defined and CMake bails out
+with an error:
+```
+-- Configuring done
+CMake Error: The following variables are used in this project, but they are 
set to NOTFOUND.
+Please set them or make sure they are set and tested correctly in the CMake 
files:
+/var/tmp/portage/dev-libs/pocl-3.0/work/pocl-3.0/lib/CL/OCL_ICD_INCLUDE_DIRS
+   used as include directory in directory 
/var/tmp/portage/dev-libs/pocl-3.0/work/pocl-3.0/lib/CL
+   used as include directory in directory 
/var/tmp/portage/dev-libs/pocl-3.0/work/pocl-3.0/lib/CL
+/var/tmp/portage/dev-libs/pocl-3.0/work/pocl-3.0/lib/CL/devices/OCL_ICD_INCLUDE_DIRS
+   used as include directory in directory 
/var/tmp/portage/dev-libs/pocl-3.0/work/pocl-3.0/lib/CL/devices
+/var/tmp/portage/dev-libs/pocl-3.0/work/pocl-3.0/lib/CL/devices/basic/OCL_ICD_INCLUDE_DIRS
+   used as include directory in directory 
/var/tmp/portage/dev-libs/pocl-3.0/work/pocl-3.0/lib/CL/devices/basic
+/var/tmp/portage/dev-libs/pocl-3.0/work/pocl-3.0/lib/CL/devices/pthread/OCL_ICD_INCLUDE_DIRS
+   used as include directory in directory 
/var/tmp/portage/dev-libs/pocl-3.0/work/pocl-3.0/lib/CL/devices/pthread
+/var/tmp/portage/dev-libs/pocl-3.0/work/pocl-3.0/lib/CL/devices/topology/OCL_ICD_INCLUDE_DIRS
+   used as include directory in directory 
/var/tmp/portage/dev-libs/pocl-3.0/work/pocl-3.0/lib/CL/devices/topology
+/var/tmp/portage/dev-libs/pocl-3.0/work/pocl-3.0/lib/llvmopencl/OCL_ICD_INCLUDE_DIRS
+   used as include directory in directory 
/var/tmp/portage/dev-libs/pocl-3.0/work/pocl-3.0/lib/llvmopencl
+```
+
+This broke in 3ecda3b294d70e4f915ad141d669f4bc1298f606.
+
+To fix, just check if the value is truthy before using (this is enough
+for checking if it's NOTFOUND).
+--- a/lib/CL/CMakeLists.txt
 b/lib/CL/CMakeLists.txt
+@@ -179,7 +179,9 @@ endif()
+ add_library("pocl_cache" OBJECT "pocl_cache.c")
+ harden("pocl_cache")
+ 
+-target_include_directories("pocl_cache" SYSTEM PUBLIC ${OCL_ICD_INCLUDE_DIRS})
++if(${OCL_ICD_INCLUDE_DIRS})
++  target_include_directories("pocl_cache" SYSTEM PUBLIC 
${OCL_ICD_INCLUDE_DIRS})
++endif()
+ 
+ 
+ if (ENABLE_LLVM)
+@@ -190,7 +192,9 @@ if (ENABLE_LLVM)
+   add_library("lib_cl_llvm" OBJECT ${LLVM_API_SOURCES})
+   harden("lib_cl_llvm")
+ 
+-  target_include_directories("lib_cl_llvm" SYSTEM PUBLIC 
${OCL_ICD_INCLUDE_DIRS})
++  if(${OCL_ICD_INCLUDE_DIRS})
++target_include_directories("lib_cl_llvm" SYSTEM PUBLIC 
${OCL_ICD_INCLUDE_DIRS})
++  endif()
+ 
+   list(APPEND LIBPOCL_OBJS "$")
+   list(APPEND LIBPOCL_OBJS "$")
+@@ -200,7 +204,9 @@ if (ENABLE_LLVM)
+ endif()
+ 
+ if(ENABLE_ICD)
+-  add_compile_options(${OCL_ICD_CFLAGS})
++  if(${OCL_ICD_CFLAGS})
++add_compile_options(${OCL_ICD_CFLAGS})
++  endif()
+ endif()
+ 
+ if(HAVE_LTTNG_UST)
+--- a/lib/CL/devices/CMakeLists.txt
 b/lib/CL/devices/CMakeLists.txt
+@@ -28,7 +28,9 @@ if(ENABLE_LOADABLE_DRIVERS)
+   function(add_pocl_device_library name)
+ add_library(${name} SHARED ${ARGN})
+ harden("${name}")
+-target_include_directories(${name} SYSTEM PUBLIC