1 |
commit: 93a52c5db9c1056a3b10ebbf9aff9a4047d86cc5 |
2 |
Author: Marek Szuba <marecki <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Apr 30 10:58:22 2019 +0000 |
4 |
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 1 16:51:26 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93a52c5d |
7 |
|
8 |
dev-util/spirv-llvm-translator: new package |
9 |
|
10 |
Third-order dependency of Intel Graphics Compute Runtime. |
11 |
|
12 |
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org> |
13 |
Package-Manager: Portage-2.3.62, Repoman-2.3.11 |
14 |
|
15 |
dev-util/spirv-llvm-translator/Manifest | 1 + |
16 |
...lvm-translator-8.0.0.1-no_pkgconfig_files.patch | 18 ++++++ |
17 |
dev-util/spirv-llvm-translator/metadata.xml | 12 ++++ |
18 |
.../spirv-llvm-translator-8.0.0.1.ebuild | 65 ++++++++++++++++++++++ |
19 |
4 files changed, 96 insertions(+) |
20 |
|
21 |
diff --git a/dev-util/spirv-llvm-translator/Manifest b/dev-util/spirv-llvm-translator/Manifest |
22 |
new file mode 100644 |
23 |
index 00000000000..33846447d84 |
24 |
--- /dev/null |
25 |
+++ b/dev-util/spirv-llvm-translator/Manifest |
26 |
@@ -0,0 +1 @@ |
27 |
+DIST spirv-llvm-translator-8.0.0.1.tar.gz 437384 BLAKE2B bca52bfec04d0adc08b00f5fdbcb6cf953be00f835d2a393545e77bd8776063ef91e8fb62c232b50cbeab58a0a01bea6e47b89c1756699bf35481e87823995de SHA512 85faf176d1ce79d19f10c88055f4a102a5952dcdcd6709e5e5cfdbf69eb958d51020a3ad34198c7c874b42ee8e318f1ce3169ea92853134dfff3dc5843f84414 |
28 |
|
29 |
diff --git a/dev-util/spirv-llvm-translator/files/spirv-llvm-translator-8.0.0.1-no_pkgconfig_files.patch b/dev-util/spirv-llvm-translator/files/spirv-llvm-translator-8.0.0.1-no_pkgconfig_files.patch |
30 |
new file mode 100644 |
31 |
index 00000000000..66e81dc3b20 |
32 |
--- /dev/null |
33 |
+++ b/dev-util/spirv-llvm-translator/files/spirv-llvm-translator-8.0.0.1-no_pkgconfig_files.patch |
34 |
@@ -0,0 +1,18 @@ |
35 |
+Do not install pkgconfig data files, pkg-config does not presently look at |
36 |
+/usr/lib/llvm/.../pkgconfig and putting them in /usr/lib*/pkgconfig would |
37 |
+cause collisions between slots. |
38 |
+ |
39 |
+--- a/CMakeLists.txt |
40 |
++++ b/CMakeLists.txt |
41 |
+@@ -66,11 +66,3 @@ |
42 |
+ DESTINATION |
43 |
+ ${CMAKE_INSTALL_PREFIX}/include/LLVMSPIRVLib |
44 |
+ ) |
45 |
+- |
46 |
+-configure_file(LLVMSPIRVLib.pc.in ${CMAKE_BINARY_DIR}/LLVMSPIRVLib.pc @ONLY) |
47 |
+-install( |
48 |
+- FILES |
49 |
+- ${CMAKE_BINARY_DIR}/LLVMSPIRVLib.pc |
50 |
+- DESTINATION |
51 |
+- ${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}/pkgconfig |
52 |
+-) |
53 |
|
54 |
diff --git a/dev-util/spirv-llvm-translator/metadata.xml b/dev-util/spirv-llvm-translator/metadata.xml |
55 |
new file mode 100644 |
56 |
index 00000000000..d7dec83e2de |
57 |
--- /dev/null |
58 |
+++ b/dev-util/spirv-llvm-translator/metadata.xml |
59 |
@@ -0,0 +1,12 @@ |
60 |
+<?xml version="1.0" encoding="UTF-8"?> |
61 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
62 |
+<pkgmetadata> |
63 |
+ <maintainer type="person"> |
64 |
+ <email>marecki@g.o</email> |
65 |
+ <name>Marek Szuba</name> |
66 |
+ </maintainer> |
67 |
+ <upstream> |
68 |
+ <remote-id type="github">KhronosGroup/SPIRV-LLVM-Translator</remote-id> |
69 |
+ </upstream> |
70 |
+</pkgmetadata> |
71 |
+ |
72 |
|
73 |
diff --git a/dev-util/spirv-llvm-translator/spirv-llvm-translator-8.0.0.1.ebuild b/dev-util/spirv-llvm-translator/spirv-llvm-translator-8.0.0.1.ebuild |
74 |
new file mode 100644 |
75 |
index 00000000000..9e8e3b39fed |
76 |
--- /dev/null |
77 |
+++ b/dev-util/spirv-llvm-translator/spirv-llvm-translator-8.0.0.1.ebuild |
78 |
@@ -0,0 +1,65 @@ |
79 |
+# Copyright 1999-2019 Gentoo Authors |
80 |
+# Distributed under the terms of the GNU General Public License v2 |
81 |
+ |
82 |
+EAPI=6 |
83 |
+ |
84 |
+inherit cmake-multilib flag-o-matic llvm eapi7-ver |
85 |
+ |
86 |
+MY_PN="SPIRV-LLVM-Translator" |
87 |
+MY_PV="$(ver_rs 3 -)" |
88 |
+MY_P="${MY_PN}-${MY_PV}" |
89 |
+ |
90 |
+DESCRIPTION="Bi-directional translator between SPIR-V and LLVM IR" |
91 |
+HOMEPAGE="https://github.com/KhronosGroup/SPIRV-LLVM-Translator" |
92 |
+SRC_URI="https://github.com/KhronosGroup/${MY_PN}/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" |
93 |
+ |
94 |
+LICENSE="UoI-NCSA" |
95 |
+SLOT="8" |
96 |
+KEYWORDS="~amd64" |
97 |
+IUSE="test" |
98 |
+ |
99 |
+S="${WORKDIR}/${MY_P}" |
100 |
+ |
101 |
+COMMON="sys-devel/llvm:8=[${MULTILIB_USEDEP}]" |
102 |
+DEPEND="${COMMON} |
103 |
+ test? ( dev-python/lit )" |
104 |
+RDEPEND="${COMMON}" |
105 |
+ |
106 |
+LLVM_MAX_SLOT=8 |
107 |
+ |
108 |
+PATCHES=( |
109 |
+ "${FILESDIR}"/${PN}-8.0.0.1-no_pkgconfig_files.patch |
110 |
+) |
111 |
+ |
112 |
+src_prepare() { |
113 |
+ append-flags -fPIC |
114 |
+ cmake-utils_src_prepare |
115 |
+} |
116 |
+ |
117 |
+multilib_src_configure() { |
118 |
+ local mycmakeargs=( |
119 |
+ -DCMAKE_INSTALL_PREFIX="$(get_llvm_prefix)" |
120 |
+ $(usex test "-DLLVM_INCLUDE_TESTS=ON" "") |
121 |
+ ) |
122 |
+ cmake-utils_src_configure |
123 |
+} |
124 |
+ |
125 |
+multilib_src_compile() { |
126 |
+ cmake-utils_src_compile llvm-spirv |
127 |
+} |
128 |
+ |
129 |
+multilib_src_install() { |
130 |
+ cmake-utils_src_install |
131 |
+ # CMake does not install the executable so do it by hand |
132 |
+ if multilib_is_native_abi; then |
133 |
+ exeinto "$(get_llvm_prefix)"/bin |
134 |
+ doexe "${BUILD_DIR}"/tools/llvm-spirv/llvm-spirv |
135 |
+ fi |
136 |
+} |
137 |
+ |
138 |
+multilib_src_test() { |
139 |
+ # TODO: figure out why some tests fail on amd64 when ABI==x86 |
140 |
+ if multilib_is_native_abi; then |
141 |
+ lit "${BUILD_DIR}/test" || die "Error running tests for ABI ${ABI}" |
142 |
+ fi |
143 |
+} |