]>
Commit | Line | Data |
---|---|---|
52901ddc | 1 | # TODO: |
1a86070b | 2 | # - OpenFX plugin (OpenFX >= 1.4, https://github.com/ofxa/openfx) |
52901ddc JB |
3 | # - truelight http://www.filmlight.ltd.uk/products/truelight/overview_tl.php (proprietary?) |
4 | # - nuke: http://docs.thefoundry.co.uk/products/nuke/ (proprietary) | |
27b6cb64 JB |
5 | # |
6 | # Conditional build: | |
27b6cb64 | 7 | %bcond_without opengl # OpenGL-dependent app (ociodisplay) |
52901ddc JB |
8 | %bcond_with java # JNI glue (outdated as of 2.2.1) |
9 | %bcond_without doc # documentation | |
27b6cb64 | 10 | %bcond_with sse2 # use SSE2 instructions |
1a86070b JB |
11 | %bcond_with sse3 # use SSE3 instructions |
12 | %bcond_with ssse3 # use SSSE3 instructions | |
13 | %bcond_with sse4 # use SSE4 instructions | |
14 | %bcond_with sse42 # use SSE4.2 instructions | |
15 | %bcond_with avx # use AVX instructions | |
16 | %bcond_with avx2 # use AVX2 instructions | |
17 | %bcond_with avx512 # use AVX512 instructions | |
18 | %bcond_with f16c # use F16C instructions | |
27b6cb64 | 19 | # |
52901ddc | 20 | %ifarch %{x8664} pentium4 x32 |
27b6cb64 JB |
21 | %define with_sse2 1 |
22 | %endif | |
23 | Summary: Complete color management solution | |
24 | Summary(pl.UTF-8): Kompletny pakiet do zarządzania kolorami | |
25 | Name: OpenColorIO | |
1a86070b JB |
26 | Version: 2.3.2 |
27 | Release: 1 | |
27b6cb64 JB |
28 | License: BSD |
29 | Group: Libraries | |
9158e0fc | 30 | #Source0Download: https://github.com/imageworks/OpenColorIO/releases |
b9df10ac | 31 | Source0: https://github.com/imageworks/OpenColorIO/archive/v%{version}/%{name}-%{version}.tar.gz |
1a86070b | 32 | # Source0-md5: 8af74fcb8c4820ab21204463a06ba490 |
52901ddc | 33 | Patch0: %{name}-java.patch |
27b6cb64 | 34 | URL: http://opencolorio.org/ |
1a86070b JB |
35 | BuildRequires: Imath-devel >= 3.1.6 |
36 | BuildRequires: OpenEXR-devel >= 3.0.5 | |
37 | BuildRequires: cmake >= 3.13 | |
38 | BuildRequires: expat-devel >= 1:2.5.0 | |
27b6cb64 | 39 | %{?with_java:BuildRequires: jdk} |
1a86070b | 40 | BuildRequires: lcms2-devel >= 2.2 |
52901ddc JB |
41 | BuildRequires: libstdc++-devel >= 6:5 |
42 | BuildRequires: minizip-ng-devel >= 3.0.7 | |
27b6cb64 | 43 | BuildRequires: pkgconfig |
52901ddc | 44 | BuildRequires: pystring-devel >= 1.1.3 |
0da099bd | 45 | BuildRequires: python3-devel |
52901ddc JB |
46 | BuildRequires: python3-pybind11 >= 2.9.2 |
47 | BuildRequires: rpm-build >= 4.6 | |
48 | BuildRequires: rpmbuild(macros) >= 1.742 | |
49 | BuildRequires: tinyxml-devel >= 2.6.1 | |
09e1f3a9 | 50 | BuildRequires: yaml-cpp-devel >= 0.8.0 |
52901ddc | 51 | BuildRequires: zlib-devel >= 1.2.13 |
b3e55b33 | 52 | %if %{with doc} |
52901ddc | 53 | BuildRequires: python3-breathe |
0da099bd | 54 | BuildRequires: python3-recommonmark |
52901ddc JB |
55 | BuildRequires: python3-six |
56 | BuildRequires: python3-sphinx_press_theme | |
57 | BuildRequires: python3-sphinx_tabs | |
0da099bd | 58 | BuildRequires: python3-testresources |
68f4aba6 | 59 | BuildRequires: sphinx-pdg >= 1.1 |
68f4aba6 | 60 | %endif |
27b6cb64 | 61 | %if %{with opengl} |
52901ddc | 62 | BuildRequires: OpenGL-GLX-devel |
27b6cb64 JB |
63 | BuildRequires: OpenGL-devel |
64 | BuildRequires: OpenGL-glut-devel | |
65 | BuildRequires: glew-devel >= 1.5.1 | |
66 | %endif | |
1a86070b JB |
67 | Requires: Imath >= 3.1.6 |
68 | Requires: expat >= 1:2.5.0 | |
52901ddc | 69 | Requires: minizip-ng >= 3.0.7 |
27b6cb64 | 70 | Requires: tinyxml >= 2.6.1 |
09e1f3a9 | 71 | Requires: yaml-cpp >= 0.8.0 |
52901ddc JB |
72 | Requires: zlib >= 1.2.13 |
73 | %if %{without java} | |
74 | Obsoletes: java-OpenColorIO < 2 | |
75 | %endif | |
27b6cb64 JB |
76 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
77 | ||
78 | %description | |
79 | OpenColorIO (OCIO) is a complete color management solution geared | |
80 | towards motion picture production with an emphasis on visual effects | |
81 | and computer animation. OCIO provides a straightforward and consistent | |
82 | user experience across all supporting applications while allowing for | |
83 | sophisticated back-end configuration options suitable for high-end | |
84 | production usage. OCIO is compatible with the Academy Color Encoding | |
85 | Specification (ACES) and is LUT-format agnostic, supporting many | |
86 | popular formats. | |
87 | ||
88 | %description -l pl.UTF-8 | |
89 | OpenColorIO (OCIO) to kompletne rozwiązanie zarządzania kolorami | |
90 | przeznaczone do tworzenia obrazów ruchomych, w szczególności efektów | |
91 | wizualnych i animacji komputerowej. OCIO zapewnia proste i spójne | |
92 | elementy we wszystkich współpracujących aplikacjach, pozwalając na | |
93 | wyszukane opcje konfiguracyjne backendu, nadające się do zastosowań | |
94 | produkcyjnych wysokiej jakości. OCIO jest zgodne ze specyfikacją ACES | |
95 | (Academy Color Encoding Specification) i jest niezależne od formatu | |
96 | LUT dzięki obsłudze wielu popularnych formatów. | |
97 | ||
98 | %package convert | |
99 | Summary: OpenColorIO convert tool | |
100 | Summary(pl.UTF-8): Narzędzie OpenColorIO do konwersji | |
101 | Group: Applications/Graphics | |
102 | Requires: %{name} = %{version}-%{release} | |
1a86070b | 103 | Requires: OpenEXR >= 3.0.5 |
52901ddc | 104 | Requires: lcms2 >= 2.2 |
27b6cb64 JB |
105 | |
106 | %description convert | |
107 | OpenColorIO convert tool. | |
108 | ||
109 | %description convert -l pl.UTF-8 | |
110 | Narzędzie OpenColorIO do konwersji. | |
111 | ||
112 | %package display | |
113 | Summary: OpenColorIO viewer based on OpenGL | |
114 | Summary(pl.UTF-8): Przeglądarka OpenColorIO oparta na OpenGL-u | |
115 | Group: X11/Applications/Graphics | |
116 | Requires: %{name} = %{version}-%{release} | |
117 | ||
118 | %description display | |
119 | OpenColorIO viewer based on OpenGL. | |
120 | ||
121 | %description display -l pl.UTF-8 | |
122 | Przeglądarka OpenColorIO oparta na OpenGL-u. | |
123 | ||
124 | %package devel | |
125 | Summary: Header files for OpenColorIO library | |
126 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenColorIO | |
127 | Group: Development/Libraries | |
128 | Requires: %{name} = %{version}-%{release} | |
52901ddc | 129 | Requires: libstdc++-devel >= 6:5 |
27b6cb64 JB |
130 | |
131 | %description devel | |
132 | Header files for OpenColorIO library. | |
133 | ||
134 | %description devel -l pl.UTF-8 | |
135 | Pliki nagłówkowe biblioteki OpenColorIO. | |
136 | ||
52901ddc JB |
137 | %package apidocs |
138 | Summary: API documentation for OpenColorIO library | |
139 | Summary(pl.UTF-8): Dokumentacja API biblioteki OpenColorIO | |
140 | Group: Documentation | |
141 | BuildArch: noarch | |
142 | ||
143 | %description apidocs | |
144 | API documentation for OpenColorIO library. | |
145 | ||
146 | %description apidocs -l pl.UTF-8 | |
147 | Dokumentacja API biblioteki OpenColorIO. | |
148 | ||
27b6cb64 JB |
149 | %package -n java-OpenColorIO |
150 | Summary: Java binding for OpenColorIO library | |
151 | Summary(pl.UTF-8): Wiązanie Javy do biblioteki OpenColorIO | |
152 | Group: Libraries/Java | |
153 | Requires: %{name} = %{version}-%{release} | |
154 | ||
155 | %description -n java-OpenColorIO | |
156 | Java binding for OpenColorIO library. | |
157 | ||
158 | %description -n java-OpenColorIO -l pl.UTF-8 | |
159 | Wiązanie Javy do biblioteki OpenColorIO. | |
160 | ||
0da099bd | 161 | %package -n python3-OpenColorIO |
27b6cb64 JB |
162 | Summary: Python binding for OpenColorIO library |
163 | Summary(pl.UTF-8): Wiązanie Pythona do biblioteki OpenColorIO | |
164 | Group: Libraries/Python | |
165 | Requires: %{name} = %{version}-%{release} | |
166 | ||
0da099bd | 167 | %description -n python3-OpenColorIO |
27b6cb64 JB |
168 | Python binding for OpenColorIO library. |
169 | ||
0da099bd | 170 | %description -n python3-OpenColorIO -l pl.UTF-8 |
27b6cb64 JB |
171 | Wiązanie Pythona do biblioteki OpenColorIO. |
172 | ||
27b6cb64 | 173 | %prep |
b9df10ac | 174 | %setup -q |
52901ddc | 175 | %patch0 -p1 |
27b6cb64 JB |
176 | |
177 | %build | |
1ebfdec0 | 178 | # required for cmake to find JNI headers/libs when lib64 is in use |
29d4f210 JB |
179 | %{?with_java:export JAVA_HOME=%{_jvmlibdir}/java} |
180 | ||
1a86070b | 181 | %cmake -B build \ |
0da099bd | 182 | -DCMAKE_CONFIGURATION_TYPES=PLD \ |
e9435103 | 183 | -DCMAKE_CXX_STANDARD=14 \ |
52901ddc JB |
184 | %{cmake_on_off doc OCIO_BUILD_DOCS} \ |
185 | %{cmake_on_off java OCIO_BUILD_JAVA} \ | |
1a86070b JB |
186 | %{!?with_sse2:-DOCIO_USE_SSE2=OFF} \ |
187 | %{!?with_sse3:-DOCIO_USE_SSE3=OFF} \ | |
188 | %{!?with_ssse3:-DOCIO_USE_SSSE3=OFF} \ | |
189 | %{!?with_sse4:-DOCIO_USE_SSE4=OFF} \ | |
190 | %{!?with_sse42:-DOCIO_USE_SSE42=OFF} \ | |
191 | %{!?with_avx:-DOCIO_USE_AVX=OFF} \ | |
192 | %{!?with_avx2:-DOCIO_USE_AVX2=OFF} \ | |
193 | %{!?with_avx512:-DOCIO_USE_AVX512=OFF} \ | |
194 | %{!?with_f16c:-DOCIO_USE_F16C=OFF} | |
195 | ||
196 | %{__make} -C build | |
27b6cb64 JB |
197 | |
198 | %install | |
199 | rm -rf $RPM_BUILD_ROOT | |
200 | ||
201 | %{__make} -C build install \ | |
202 | DESTDIR=$RPM_BUILD_ROOT | |
203 | ||
1a86070b JB |
204 | %py3_comp $RPM_BUILD_ROOT%{py3_sitedir} |
205 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir} | |
206 | ||
27b6cb64 JB |
207 | # not needed when installing to /usr |
208 | %{__rm} $RPM_BUILD_ROOT%{_datadir}/ocio/setup_ocio.sh | |
52901ddc JB |
209 | # packaged as %doc |
210 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/OpenColorIO | |
27b6cb64 JB |
211 | |
212 | %clean | |
213 | rm -rf $RPM_BUILD_ROOT | |
214 | ||
215 | %post -p /sbin/ldconfig | |
216 | %postun -p /sbin/ldconfig | |
217 | ||
218 | %post -n java-OpenColorIO -p /sbin/ldconfig | |
219 | %postun -n java-OpenColorIO -p /sbin/ldconfig | |
220 | ||
0da099bd JR |
221 | %post -n python3-OpenColorIO -p /sbin/ldconfig |
222 | %postun -n python3-OpenColorIO -p /sbin/ldconfig | |
27b6cb64 JB |
223 | |
224 | %files | |
225 | %defattr(644,root,root,755) | |
0da099bd | 226 | %doc CHANGELOG.md LICENSE README.md |
52901ddc | 227 | %attr(755,root,root) %{_bindir}/ocioarchive |
27b6cb64 JB |
228 | %attr(755,root,root) %{_bindir}/ociobakelut |
229 | %attr(755,root,root) %{_bindir}/ociocheck | |
0da099bd JR |
230 | %attr(755,root,root) %{_bindir}/ociochecklut |
231 | %attr(755,root,root) %{_bindir}/ociomakeclf | |
52901ddc | 232 | %attr(755,root,root) %{_bindir}/ocioperf |
0da099bd | 233 | %attr(755,root,root) %{_bindir}/ociowrite |
27b6cb64 | 234 | %attr(755,root,root) %{_libdir}/libOpenColorIO.so.*.*.* |
1a86070b | 235 | %attr(755,root,root) %ghost %{_libdir}/libOpenColorIO.so.2.3 |
27b6cb64 | 236 | |
27b6cb64 JB |
237 | %files convert |
238 | %defattr(644,root,root,755) | |
239 | %attr(755,root,root) %{_bindir}/ocioconvert | |
d8e33fed | 240 | %attr(755,root,root) %{_bindir}/ociolutimage |
27b6cb64 | 241 | |
52901ddc | 242 | %if %{with opengl} |
27b6cb64 JB |
243 | %files display |
244 | %defattr(644,root,root,755) | |
245 | %attr(755,root,root) %{_bindir}/ociodisplay | |
246 | %endif | |
247 | ||
248 | %files devel | |
249 | %defattr(644,root,root,755) | |
27b6cb64 | 250 | %attr(755,root,root) %{_libdir}/libOpenColorIO.so |
52901ddc | 251 | %{_libdir}/libOpenColorIOimageioapphelpers.a |
0da099bd | 252 | %{_libdir}/libOpenColorIOoglapphelpers.a |
27b6cb64 JB |
253 | %{_includedir}/OpenColorIO |
254 | %{_pkgconfigdir}/OpenColorIO.pc | |
b9df10ac | 255 | %{_libdir}/cmake/OpenColorIO |
27b6cb64 | 256 | |
52901ddc JB |
257 | %files apidocs |
258 | %defattr(644,root,root,755) | |
259 | %doc build/docs/build-html/{_images,_static,api,aswf,concepts,configurations,guides,quick_start,releases,tutorials,*.html,*.js} | |
260 | ||
27b6cb64 JB |
261 | %if %{with java} |
262 | %files -n java-OpenColorIO | |
263 | %defattr(644,root,root,755) | |
264 | %attr(755,root,root) %{_libdir}/libOpenColorIO-JNI.so.*.*.* | |
265 | %attr(755,root,root) %ghost %{_libdir}/libOpenColorIO-JNI.so.1 | |
266 | %attr(755,root,root) %{_libdir}/libOpenColorIO-JNI.so | |
267 | %dir %{_datadir}/ocio | |
a05bc41e | 268 | %{_datadir}/ocio/OpenColorIO-%{version}.jar |
27b6cb64 JB |
269 | %endif |
270 | ||
0da099bd | 271 | %files -n python3-OpenColorIO |
27b6cb64 | 272 | %defattr(644,root,root,755) |
1a86070b JB |
273 | %dir %{py3_sitedir}/PyOpenColorIO |
274 | %attr(755,root,root) %{py3_sitedir}/PyOpenColorIO/PyOpenColorIO.so | |
275 | %{py3_sitedir}/PyOpenColorIO/__init__.py | |
276 | %{py3_sitedir}/PyOpenColorIO/__pycache__ |