1 |
commit: 67c51d91eb835704c73e7e48c2cf08f8c4c26911 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 19 05:11:44 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 19 05:20:23 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67c51d91 |
7 |
|
8 |
media-libs/osl: fix declared LLVM compatibility, Python module installation |
9 |
|
10 |
Bug: https://bugs.gentoo.org/794616 |
11 |
Bug: https://bugs.gentoo.org/778005 |
12 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
13 |
|
14 |
media-libs/osl/osl-1.11.9.0-r1.ebuild | 106 ++++++++++++++++++++++++++++++++++ |
15 |
media-libs/osl/osl-1.12.0.2-r1.ebuild | 104 +++++++++++++++++++++++++++++++++ |
16 |
2 files changed, 210 insertions(+) |
17 |
|
18 |
diff --git a/media-libs/osl/osl-1.11.9.0-r1.ebuild b/media-libs/osl/osl-1.11.9.0-r1.ebuild |
19 |
new file mode 100644 |
20 |
index 00000000000..a85d2827df7 |
21 |
--- /dev/null |
22 |
+++ b/media-libs/osl/osl-1.11.9.0-r1.ebuild |
23 |
@@ -0,0 +1,106 @@ |
24 |
+# Copyright 1999-2021 Gentoo Authors |
25 |
+# Distributed under the terms of the GNU General Public License v2 |
26 |
+ |
27 |
+EAPI=7 |
28 |
+ |
29 |
+PYTHON_COMPAT=( python3_{8,9,10} ) |
30 |
+ |
31 |
+# check this on updates |
32 |
+LLVM_MAX_SLOT=10 |
33 |
+ |
34 |
+inherit cmake llvm toolchain-funcs python-single-r1 |
35 |
+ |
36 |
+DESCRIPTION="Advanced shading language for production GI renderers" |
37 |
+HOMEPAGE="http://opensource.imageworks.com/?p=osl https://github.com/imageworks/OpenShadingLanguage" |
38 |
+SRC_URI="https://github.com/imageworks/OpenShadingLanguage/archive/Release-${PV}.tar.gz -> ${P}.tar.gz" |
39 |
+ |
40 |
+LICENSE="BSD" |
41 |
+SLOT="0/11" |
42 |
+KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
43 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
44 |
+ |
45 |
+X86_CPU_FEATURES=( |
46 |
+ sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4.1 sse4_2:sse4.2 |
47 |
+ avx:avx avx2:avx2 avx512f:avx512f f16c:f16c |
48 |
+) |
49 |
+CPU_FEATURES=( ${X86_CPU_FEATURES[@]/#/cpu_flags_x86_} ) |
50 |
+ |
51 |
+IUSE="doc partio qt5 test ${CPU_FEATURES[@]%:*} python" |
52 |
+ |
53 |
+RDEPEND=" |
54 |
+ dev-libs/boost:= |
55 |
+ dev-libs/pugixml |
56 |
+ media-libs/openexr:= |
57 |
+ media-libs/openimageio:= |
58 |
+ <sys-devel/clang-$((${LLVM_MAX_SLOT} + 1)):= |
59 |
+ sys-libs/zlib |
60 |
+ partio? ( media-libs/partio ) |
61 |
+ python? ( |
62 |
+ ${PYTHON_DEPS} |
63 |
+ $(python_gen_cond_dep ' |
64 |
+ dev-python/pybind11[${PYTHON_USEDEP}] |
65 |
+ ') |
66 |
+ ) |
67 |
+ qt5? ( |
68 |
+ dev-qt/qtcore:5 |
69 |
+ dev-qt/qtgui:5 |
70 |
+ dev-qt/qtwidgets:5 |
71 |
+ ) |
72 |
+" |
73 |
+DEPEND="${RDEPEND}" |
74 |
+BDEPEND=" |
75 |
+ sys-devel/bison |
76 |
+ sys-devel/flex |
77 |
+ virtual/pkgconfig |
78 |
+" |
79 |
+ |
80 |
+PATCHES=() |
81 |
+ |
82 |
+CMAKE_REMOVE_MODULES_LIST=() |
83 |
+ |
84 |
+# Restricting tests as Make file handles them differently |
85 |
+RESTRICT="test" |
86 |
+ |
87 |
+S="${WORKDIR}/OpenShadingLanguage-Release-${PV}" |
88 |
+ |
89 |
+llvm_check_deps() { |
90 |
+ has_version -r "sys-devel/clang:${LLVM_SLOT}" |
91 |
+} |
92 |
+ |
93 |
+pkg_setup() { |
94 |
+ use python && python-single-r1_pkg_setup |
95 |
+ llvm_pkg_setup |
96 |
+} |
97 |
+ |
98 |
+src_configure() { |
99 |
+ local cpufeature |
100 |
+ local mysimd=() |
101 |
+ for cpufeature in "${CPU_FEATURES[@]}"; do |
102 |
+ use "${cpufeature%:*}" && mysimd+=("${cpufeature#*:}") |
103 |
+ done |
104 |
+ |
105 |
+ # If no CPU SIMDs were used, completely disable them |
106 |
+ [[ -z ${mysimd} ]] && mysimd=("0") |
107 |
+ |
108 |
+ local gcc=$(tc-getCC) |
109 |
+ |
110 |
+ local mycmakeargs=( |
111 |
+ # LLVM 10+ needs C++14 |
112 |
+ -DCMAKE_CXX_STANDARD=14 |
113 |
+ -DCMAKE_INSTALL_DOCDIR="share/doc/${PF}" |
114 |
+ -DINSTALL_DOCS=$(usex doc) |
115 |
+ -DUSE_CCACHE=OFF |
116 |
+ -DLLVM_STATIC=OFF |
117 |
+ -DLLVM_ROOT="$(get_llvm_prefix ${LLVM_MAX_SLOT})" |
118 |
+ -DOSL_BUILD_TESTS=$(usex test) |
119 |
+ -DOSL_SHADER_INSTALL_DIR="${EPREFIX}/usr/include/${PN^^}/shaders" |
120 |
+ -DOSL_PTX_INSTALL_DIR="${EPREFIX}/usr/include/${PN^^}/ptx" |
121 |
+ -DSTOP_ON_WARNING=OFF |
122 |
+ -DUSE_PARTIO=$(usex partio) |
123 |
+ -DUSE_QT=$(usex qt5) |
124 |
+ -DUSE_PYTHON=$(usex python) |
125 |
+ -DUSE_SIMD="$(IFS=","; echo "${mysimd[*]}")" |
126 |
+ ) |
127 |
+ |
128 |
+ cmake_src_configure |
129 |
+} |
130 |
|
131 |
diff --git a/media-libs/osl/osl-1.12.0.2-r1.ebuild b/media-libs/osl/osl-1.12.0.2-r1.ebuild |
132 |
new file mode 100644 |
133 |
index 00000000000..d8094d70371 |
134 |
--- /dev/null |
135 |
+++ b/media-libs/osl/osl-1.12.0.2-r1.ebuild |
136 |
@@ -0,0 +1,104 @@ |
137 |
+# Copyright 1999-2021 Gentoo Authors |
138 |
+# Distributed under the terms of the GNU General Public License v2 |
139 |
+ |
140 |
+EAPI=7 |
141 |
+ |
142 |
+PYTHON_COMPAT=( python3_{8,9,10} ) |
143 |
+ |
144 |
+# check this on updates |
145 |
+LLVM_MAX_SLOT=13 |
146 |
+ |
147 |
+inherit cmake llvm toolchain-funcs python-single-r1 |
148 |
+ |
149 |
+DESCRIPTION="Advanced shading language for production GI renderers" |
150 |
+HOMEPAGE="http://opensource.imageworks.com/?p=osl" |
151 |
+SRC_URI="https://github.com/imageworks/OpenShadingLanguage/archive/Release-${PV}-dev.tar.gz -> ${P}.tar.gz" |
152 |
+ |
153 |
+LICENSE="BSD" |
154 |
+SLOT="0" |
155 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" |
156 |
+ |
157 |
+X86_CPU_FEATURES=( |
158 |
+ sse2:sse2 sse3:sse3 ssse3:ssse3 sse4_1:sse4.1 sse4_2:sse4.2 |
159 |
+ avx:avx avx2:avx2 avx512f:avx512f f16c:f16c |
160 |
+) |
161 |
+CPU_FEATURES=( ${X86_CPU_FEATURES[@]/#/cpu_flags_x86_} ) |
162 |
+ |
163 |
+IUSE="doc partio qt5 test ${CPU_FEATURES[@]%:*} python" |
164 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
165 |
+ |
166 |
+RDEPEND=" |
167 |
+ dev-libs/boost:= |
168 |
+ dev-libs/pugixml |
169 |
+ media-libs/openexr:= |
170 |
+ media-libs/openimageio:= |
171 |
+ <sys-devel/clang-$((${LLVM_MAX_SLOT} + 1)):= |
172 |
+ sys-libs/zlib:= |
173 |
+ python? ( |
174 |
+ ${PYTHON_DEPS} |
175 |
+ $(python_gen_cond_dep ' |
176 |
+ dev-python/pybind11[${PYTHON_USEDEP}] |
177 |
+ ') |
178 |
+ ) |
179 |
+ partio? ( media-libs/partio ) |
180 |
+ qt5? ( |
181 |
+ dev-qt/qtcore:5 |
182 |
+ dev-qt/qtgui:5 |
183 |
+ dev-qt/qtwidgets:5 |
184 |
+ ) |
185 |
+" |
186 |
+ |
187 |
+DEPEND="${RDEPEND}" |
188 |
+BDEPEND=" |
189 |
+ sys-devel/bison |
190 |
+ sys-devel/flex |
191 |
+ virtual/pkgconfig |
192 |
+" |
193 |
+ |
194 |
+PATCHES=( |
195 |
+ ${FILESDIR}/${P}-llvm-11.patch |
196 |
+ ${FILESDIR}/${P}-llvm-12.patch |
197 |
+) |
198 |
+ |
199 |
+# Restricting tests as Make file handles them differently |
200 |
+RESTRICT="test" |
201 |
+ |
202 |
+S="${WORKDIR}/OpenShadingLanguage-Release-${PV}-dev" |
203 |
+ |
204 |
+llvm_check_deps() { |
205 |
+ has_version -r "sys-devel/clang:${LLVM_SLOT}" |
206 |
+} |
207 |
+ |
208 |
+pkg_setup() { |
209 |
+ use python && python-single-r1_pkg_setup |
210 |
+ llvm_pkg_setup |
211 |
+} |
212 |
+ |
213 |
+src_configure() { |
214 |
+ local cpufeature |
215 |
+ local mysimd=() |
216 |
+ for cpufeature in "${CPU_FEATURES[@]}"; do |
217 |
+ use "${cpufeature%:*}" && mysimd+=("${cpufeature#*:}") |
218 |
+ done |
219 |
+ |
220 |
+ # If no CPU SIMDs were used, completely disable them |
221 |
+ [[ -z ${mysimd} ]] && mysimd=("0") |
222 |
+ |
223 |
+ local gcc=$(tc-getCC) |
224 |
+ # LLVM needs CPP11. Do not disable. |
225 |
+ local mycmakeargs=( |
226 |
+ -DCMAKE_CXX_STANDARD=14 |
227 |
+ -DCMAKE_INSTALL_DOCDIR="share/doc/${PF}" |
228 |
+ -DINSTALL_DOCS=$(usex doc) |
229 |
+ -DUSE_CCACHE=OFF |
230 |
+ -DLLVM_STATIC=OFF |
231 |
+ -DOSL_BUILD_TESTS=$(usex test) |
232 |
+ -DSTOP_ON_WARNING=OFF |
233 |
+ -DUSE_PARTIO=$(usex partio) |
234 |
+ -DUSE_QT=$(usex qt5) |
235 |
+ -DUSE_PYTHON=$(usex python) |
236 |
+ -DUSE_SIMD="$(IFS=","; echo "${mysimd[*]}")" |
237 |
+ ) |
238 |
+ |
239 |
+ cmake_src_configure |
240 |
+} |