1 |
commit: 1b8360fe030fceeb64c5af453cc37fcf7d6d5baa |
2 |
Author: Craig Andrews <candrews <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jul 30 13:35:48 2020 +0000 |
4 |
Commit: Craig Andrews <candrews <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jul 30 13:36:14 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b8360fe |
7 |
|
8 |
dev-libs/rocclr: Fix search for OpenCL include dirs |
9 |
|
10 |
Closes: https://bugs.gentoo.org/733926 |
11 |
Package-Manager: Portage-3.0.1, Repoman-2.3.23 |
12 |
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org> |
13 |
|
14 |
.../rocclr/files/rocclr-3.5.0-find-opencl.patch | 49 ++++++++++++++++++++++ |
15 |
dev-libs/rocclr/rocclr-3.5.0.ebuild | 1 + |
16 |
2 files changed, 50 insertions(+) |
17 |
|
18 |
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 |
19 |
new file mode 100644 |
20 |
index 00000000000..fc9bacee502 |
21 |
--- /dev/null |
22 |
+++ b/dev-libs/rocclr/files/rocclr-3.5.0-find-opencl.patch |
23 |
@@ -0,0 +1,49 @@ |
24 |
+From 98df37fc36b6276c26532e86e89be7e389745f4e Mon Sep 17 00:00:00 2001 |
25 |
+From: =?UTF-8?q?Torsten=20Ke=C3=9Fler?= <t.kessler@××××××.de> |
26 |
+Date: Sun, 19 Jul 2020 11:58:24 +0200 |
27 |
+Subject: [PATCH] Fix search for OpenCL include dirs |
28 |
+ |
29 |
+--- |
30 |
+ CMakeLists.txt | 26 +++++++++----------------- |
31 |
+ 1 file changed, 9 insertions(+), 17 deletions(-) |
32 |
+ |
33 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
34 |
+index 122277ee..02ca4644 100644 |
35 |
+--- a/CMakeLists.txt |
36 |
++++ b/CMakeLists.txt |
37 |
+@@ -53,26 +53,18 @@ find_package(amd_comgr REQUIRED CONFIG |
38 |
+ ) |
39 |
+ message(STATUS "Code Object Manager found at ${amd_comgr_DIR}.") |
40 |
+ |
41 |
+-# FIXME: Use find_package(OpenCL) |
42 |
+-find_library( OpenCL REQUIRED CONFIG |
43 |
+- PATHS |
44 |
+- /opt/rocm |
45 |
++find_path(OPENCL_INCLUDE_DIR |
46 |
++ NAMES OpenCL/cl.h CL/cl.h |
47 |
++ PATH_SUFFIXES include opencl/include inc include/x86_64 include/x64 |
48 |
++ PATHS ${OPENCL_DIR} |
49 |
++ DOC "OpenCL include header OpenCL/cl.h or CL/cl.h" |
50 |
+ ) |
51 |
+ |
52 |
+-if( NOT OPENCL_DIR ) |
53 |
+- find_path(OPENCL_INCLUDE_DIR |
54 |
+- NAMES OpenCL/cl.h CL/cl.h |
55 |
+- PATH_SUFFIXES include opencl/include inc include/x86_64 include/x64 |
56 |
+- PATHS /opt/rocm |
57 |
+- DOC "OpenCL include header OpenCL/cl.h or CL/cl.h" |
58 |
+- ) |
59 |
+- |
60 |
+- if( NOT OPENCL_INCLUDE_DIR ) |
61 |
+- unset(OPENCL_INCLUDE_DIR CACHE) |
62 |
+- set(OPENCL_INCLUDE_DIR "" CACHE PATH "" FORCE ) |
63 |
+- endif() |
64 |
+- message(STATUS "Opencl found at ${OPENCL_INCLUDE_DIR}.") |
65 |
++if( NOT OPENCL_INCLUDE_DIR ) |
66 |
++ unset(OPENCL_INCLUDE_DIR CACHE) |
67 |
++ set(OPENCL_INCLUDE_DIR "" CACHE PATH "" FORCE ) |
68 |
+ endif() |
69 |
++message(STATUS "Opencl found at ${OPENCL_INCLUDE_DIR}.") |
70 |
+ |
71 |
+ |
72 |
+ |
73 |
|
74 |
diff --git a/dev-libs/rocclr/rocclr-3.5.0.ebuild b/dev-libs/rocclr/rocclr-3.5.0.ebuild |
75 |
index 08630026ed2..0d721623e54 100644 |
76 |
--- a/dev-libs/rocclr/rocclr-3.5.0.ebuild |
77 |
+++ b/dev-libs/rocclr/rocclr-3.5.0.ebuild |
78 |
@@ -22,6 +22,7 @@ DEPEND="${RDEPEND} |
79 |
|
80 |
PATCHES=( |
81 |
"${FILESDIR}/rocclr-3.5.0-cmake-install-destination.patch" |
82 |
+ "${FILESDIR}/rocclr-3.5.0-find-opencl.patch" |
83 |
) |
84 |
|
85 |
S="${WORKDIR}/ROCclr-roc-${PV}" |