1 |
commit: 0d4f19d02396b2449a59b1fd57201fcdaa44a7ad |
2 |
Author: Mike Lothian <mike <AT> fireburn <DOT> co <DOT> uk> |
3 |
AuthorDate: Thu Feb 18 14:08:04 2021 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 27 14:39:43 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d4f19d0 |
7 |
|
8 |
dev-libs/opencl-clang: Add support for llvm 11.1 |
9 |
|
10 |
Signed-off-by: Mike Lothian <mike <AT> fireburn.co.uk> |
11 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
12 |
|
13 |
dev-libs/opencl-clang/files/llvm-11.1.0.patch | 11 ++++++ |
14 |
.../opencl-clang/opencl-clang-11.0.0-r1.ebuild | 44 ++++++++++++++++++++++ |
15 |
2 files changed, 55 insertions(+) |
16 |
|
17 |
diff --git a/dev-libs/opencl-clang/files/llvm-11.1.0.patch b/dev-libs/opencl-clang/files/llvm-11.1.0.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..cd9cb0c2813 |
20 |
--- /dev/null |
21 |
+++ b/dev-libs/opencl-clang/files/llvm-11.1.0.patch |
22 |
@@ -0,0 +1,11 @@ |
23 |
+--- a/CMakeLists.txt 2021-02-18 14:52:20.079691789 +0000 |
24 |
++++ b/CMakeLists.txt 2021-02-18 14:47:43.773873042 +0000 |
25 |
+@@ -20,7 +20,7 @@ |
26 |
+ add_definitions(-DUSE_PREBUILT_LLVM) |
27 |
+ |
28 |
+ if(NOT PREFERRED_LLVM_VERSION) |
29 |
+- set(PREFERRED_LLVM_VERSION "11.0.0") |
30 |
++ set(PREFERRED_LLVM_VERSION "11.1.0") |
31 |
+ endif(NOT PREFERRED_LLVM_VERSION) |
32 |
+ message(STATUS "Looking for LLVM version ${PREFERRED_LLVM_VERSION}") |
33 |
+ find_package(LLVM ${PREFERRED_LLVM_VERSION} REQUIRED) |
34 |
|
35 |
diff --git a/dev-libs/opencl-clang/opencl-clang-11.0.0-r1.ebuild b/dev-libs/opencl-clang/opencl-clang-11.0.0-r1.ebuild |
36 |
new file mode 100644 |
37 |
index 00000000000..7b4a21d88d1 |
38 |
--- /dev/null |
39 |
+++ b/dev-libs/opencl-clang/opencl-clang-11.0.0-r1.ebuild |
40 |
@@ -0,0 +1,44 @@ |
41 |
+# Copyright 1999-2021 Gentoo Authors |
42 |
+# Distributed under the terms of the GNU General Public License v2 |
43 |
+ |
44 |
+EAPI=7 |
45 |
+ |
46 |
+CMAKE_ECLASS=cmake |
47 |
+ |
48 |
+inherit cmake-multilib llvm |
49 |
+ |
50 |
+MY_PV="$(ver_rs 3 -)" |
51 |
+MY_P="${PN}-${MY_PV}" |
52 |
+ |
53 |
+DESCRIPTION="OpenCL-oriented thin wrapper library around clang" |
54 |
+HOMEPAGE="https://github.com/intel/opencl-clang" |
55 |
+SRC_URI="https://github.com/intel/${PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" |
56 |
+ |
57 |
+LICENSE="UoI-NCSA" |
58 |
+SLOT="11" |
59 |
+KEYWORDS="~amd64" |
60 |
+ |
61 |
+S="${WORKDIR}/${MY_P}" |
62 |
+ |
63 |
+# Force a rebuild of this package once clang has been updated from 10.0.0 to 10.0.1 |
64 |
+# in order to work around Bug #743992. Hopefully a one-time thing. |
65 |
+DEPEND="~sys-devel/clang-11.1.0:11=[static-analyzer,${MULTILIB_USEDEP}] |
66 |
+ ~sys-devel/llvm-11.1.0:11=[${MULTILIB_USEDEP}] |
67 |
+ >=dev-util/spirv-llvm-translator-11.0.0:11=[${MULTILIB_USEDEP}]" |
68 |
+RDEPEND="${DEPEND}" |
69 |
+ |
70 |
+LLVM_MAX_SLOT=11 |
71 |
+ |
72 |
+PATCHES=( |
73 |
+ "${FILESDIR}"/${PN}-8.0.0-clang_library_dir.patch |
74 |
+ "${FILESDIR}"/${PN}-10.0.0.1_find-llvm-tblgen.patch |
75 |
+ "${FILESDIR}"/llvm-11.1.0.patch |
76 |
+) |
77 |
+ |
78 |
+multilib_src_configure() { |
79 |
+ local mycmakeargs=( |
80 |
+ -DCMAKE_INSTALL_PREFIX="$(get_llvm_prefix ${LLVM_MAX_SLOT})" |
81 |
+ -DCLANG_LIBRARY_DIRS="${EPREFIX}"/usr/lib/clang |
82 |
+ ) |
83 |
+ cmake_src_configure |
84 |
+} |