diff options
author | Craig Andrews <candrews@gentoo.org> | 2020-07-30 09:35:48 -0400 |
---|---|---|
committer | Craig Andrews <candrews@gentoo.org> | 2020-07-30 09:36:14 -0400 |
commit | 1b8360fe030fceeb64c5af453cc37fcf7d6d5baa (patch) | |
tree | b16c988c05caa5c4740e8783e057ec10ddaf5601 | |
parent | dev-ros/rosauth: add missing test dep (diff) | |
download | gentoo-1b8360fe030fceeb64c5af453cc37fcf7d6d5baa.tar.gz gentoo-1b8360fe030fceeb64c5af453cc37fcf7d6d5baa.tar.bz2 gentoo-1b8360fe030fceeb64c5af453cc37fcf7d6d5baa.zip |
dev-libs/rocclr: Fix search for OpenCL include dirs
Closes: https://bugs.gentoo.org/733926
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: Craig Andrews <candrews@gentoo.org>
-rw-r--r-- | dev-libs/rocclr/files/rocclr-3.5.0-find-opencl.patch | 49 | ||||
-rw-r--r-- | dev-libs/rocclr/rocclr-3.5.0.ebuild | 1 |
2 files changed, 50 insertions, 0 deletions
diff --git a/dev-libs/rocclr/files/rocclr-3.5.0-find-opencl.patch b/dev-libs/rocclr/files/rocclr-3.5.0-find-opencl.patch new file mode 100644 index 000000000000..fc9bacee5020 --- /dev/null +++ b/dev-libs/rocclr/files/rocclr-3.5.0-find-opencl.patch @@ -0,0 +1,49 @@ +From 98df37fc36b6276c26532e86e89be7e389745f4e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Torsten=20Ke=C3=9Fler?= <t.kessler@posteo.de> +Date: Sun, 19 Jul 2020 11:58:24 +0200 +Subject: [PATCH] Fix search for OpenCL include dirs + +--- + CMakeLists.txt | 26 +++++++++----------------- + 1 file changed, 9 insertions(+), 17 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 122277ee..02ca4644 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -53,26 +53,18 @@ find_package(amd_comgr REQUIRED CONFIG + ) + message(STATUS "Code Object Manager found at ${amd_comgr_DIR}.") + +-# FIXME: Use find_package(OpenCL) +-find_library( OpenCL REQUIRED CONFIG +- PATHS +- /opt/rocm ++find_path(OPENCL_INCLUDE_DIR ++ NAMES OpenCL/cl.h CL/cl.h ++ PATH_SUFFIXES include opencl/include inc include/x86_64 include/x64 ++ PATHS ${OPENCL_DIR} ++ DOC "OpenCL include header OpenCL/cl.h or CL/cl.h" + ) + +-if( NOT OPENCL_DIR ) +- find_path(OPENCL_INCLUDE_DIR +- NAMES OpenCL/cl.h CL/cl.h +- PATH_SUFFIXES include opencl/include inc include/x86_64 include/x64 +- PATHS /opt/rocm +- DOC "OpenCL include header OpenCL/cl.h or CL/cl.h" +- ) +- +- if( NOT OPENCL_INCLUDE_DIR ) +- unset(OPENCL_INCLUDE_DIR CACHE) +- set(OPENCL_INCLUDE_DIR "" CACHE PATH "" FORCE ) +- endif() +- message(STATUS "Opencl found at ${OPENCL_INCLUDE_DIR}.") ++if( NOT OPENCL_INCLUDE_DIR ) ++ unset(OPENCL_INCLUDE_DIR CACHE) ++ set(OPENCL_INCLUDE_DIR "" CACHE PATH "" FORCE ) + endif() ++message(STATUS "Opencl found at ${OPENCL_INCLUDE_DIR}.") + + + diff --git a/dev-libs/rocclr/rocclr-3.5.0.ebuild b/dev-libs/rocclr/rocclr-3.5.0.ebuild index 08630026ed2e..0d721623e54e 100644 --- a/dev-libs/rocclr/rocclr-3.5.0.ebuild +++ b/dev-libs/rocclr/rocclr-3.5.0.ebuild @@ -22,6 +22,7 @@ DEPEND="${RDEPEND} PATCHES=( "${FILESDIR}/rocclr-3.5.0-cmake-install-destination.patch" + "${FILESDIR}/rocclr-3.5.0-find-opencl.patch" ) S="${WORKDIR}/ROCclr-roc-${PV}" |