]>
Commit | Line | Data |
---|---|---|
4f07e9d7 JB |
1 | # to bootstrap: build OpenColorIO --without oiio, build OpenImageIO, rebuild OpenColorIO |
2 | # | |
20734182 | 3 | # Conditional build: |
4f07e9d7 | 4 | %bcond_without ocio # OpenColorIO support in library |
20734182 JB |
5 | %bcond_without static_libs # don't build static libraries |
6 | %bcond_without tbb # Threading Building Blocks | |
7 | # | |
8 | Summary: Library for reading and writing images | |
9 | Summary(pl.UTF-8): Biblioteka do odczytu i zapisu obrazów | |
10 | Name: OpenImageIO | |
aa41c492 | 11 | Version: 1.2.0 |
fd631079 | 12 | Release: 2 |
20734182 JB |
13 | License: BSD |
14 | Group: Libraries | |
db5a25bb | 15 | Source0: https://github.com/OpenImageIO/oiio/tarball/Release-%{version}/%{name}-%{version}.tar.gz |
aa41c492 | 16 | # Source0-md5: 8738dd9b24fc4f0cb3eebb094347104a |
40b0de7c | 17 | Patch0: %{name}-link.patch |
8a5e279e | 18 | Patch2: %{name}-hdf.patch |
fc6d7d67 | 19 | Patch3: %{name}-system-squish.patch |
d46df4d1 | 20 | Patch4: %{name}-system-ptex.patch |
b238f81f JB |
21 | Patch5: %{name}-system-dpx.patch |
22 | Patch6: %{name}-system-libcineon.patch | |
725e24e0 | 23 | Patch7: no-gcc-atomics.patch |
aa41c492 | 24 | Patch8: %{name}-werror.patch |
20734182 | 25 | URL: https://sites.google.com/site/openimageio/home |
8a5e279e | 26 | BuildRequires: Field3D-devel |
4f07e9d7 | 27 | %{?with_ocio:BuildRequires: OpenColorIO-devel} |
20734182 JB |
28 | BuildRequires: OpenEXR-devel >= 1.6.1 |
29 | BuildRequires: OpenGL-devel | |
30 | BuildRequires: QtCore-devel | |
31 | BuildRequires: QtGui-devel | |
32 | BuildRequires: QtOpenGL-devel | |
33 | # filesystem, regex, system, thread | |
34 | BuildRequires: boost-devel >= 1.35 | |
35 | BuildRequires: boost-python-devel >= 1.35 | |
36 | BuildRequires: cmake >= 2.6 | |
b238f81f | 37 | BuildRequires: dpx-devel |
20734182 | 38 | BuildRequires: glew-devel >= 1.5.1 |
8a5e279e | 39 | BuildRequires: hdf5-devel |
20734182 | 40 | BuildRequires: ilmbase-devel >= 1.0.1 |
4f07e9d7 | 41 | BuildRequires: libstdc++-devel |
20734182 | 42 | BuildRequires: jasper-devel |
e83a6d4b | 43 | BuildRequires: libcineon-devel |
20734182 JB |
44 | BuildRequires: libjpeg-devel |
45 | BuildRequires: libpng-devel | |
46 | BuildRequires: libtiff-devel | |
cf6fcddf | 47 | BuildRequires: libwebp-devel |
2b19192f | 48 | BuildRequires: openjpeg-devel |
4f07e9d7 | 49 | BuildRequires: pugixml-devel |
d46df4d1 | 50 | BuildRequires: ptex-devel >= 2 |
20734182 | 51 | BuildRequires: python-devel >= 1:2.6 |
fc6d7d67 | 52 | BuildRequires: squish-devel >= 1.10 |
20734182 | 53 | %{?with_tbb:BuildRequires: tbb-devel} |
5bef7fef | 54 | BuildRequires: txt2man |
20734182 JB |
55 | BuildRequires: zlib-devel |
56 | Requires: ilmbase >= 1.0.1 | |
57 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
58 | ||
59 | %description | |
60 | OpenImageIO is a library for reading and writing images, and a bunch | |
61 | of related classes, utilities, and applications. It has extremely | |
62 | simple but powerful ImageInput and ImageOutput APIs for reading and | |
63 | writing 2D images that is format agnostic; specific formats are | |
64 | implemented by DLL/DSO plugins. | |
65 | ||
66 | Currently there are format plugins for: TIFF, JPEG/JFIF, OpenEXR, PNG, | |
67 | HDR/RGBE, Targa, JPEG-2000, DPX, Cineon, FITS, BMP, ICO, RMan Zfile, | |
68 | Softimage PIC, DDS, SGI, PNM/PPM/PGM/PBM, Field3d, WebP. | |
69 | ||
70 | %description -l pl.UTF-8 | |
71 | OpenImageIO to biblioteka do odczytu i zapisu obrazów oraz wiele | |
72 | powiązanych klas, narzędzi i aplikacji. Ma bardzo proste, ale mające | |
73 | wiele możliwości API ImageInput i ImageOutput służące do odczytu i | |
74 | zapisu obrazów 2D, które jest niezależne od formatu; konkretne formaty | |
75 | są implementowane przez wtyczki DLL/DSO. | |
76 | ||
77 | Obecnie istnieją wtyczki obsługujące formaty: TIFF, JPEG/JFIF, | |
78 | OpenEXR, PNG, HDR/RGBE, Targa, JPEG-2000, DPX, Cineon, FITS, BMP, ICO, | |
79 | RMan Zfile, Softimage PIC, DDS, SGI, PNM/PPM/PGM/PBM, Field3d, WebP. | |
80 | ||
81 | %package devel | |
82 | Summary: Header files for OpenImageIO library | |
83 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki OpenImageIO | |
84 | Group: Development/Libraries | |
85 | Requires: %{name} = %{version}-%{release} | |
4f07e9d7 | 86 | Requires: libstdc++-devel |
20734182 JB |
87 | |
88 | %description devel | |
89 | Header files for OpenImageIO library. | |
90 | ||
91 | %description devel -l pl.UTF-8 | |
92 | Pliki nagłówkowe biblioteki OpenImageIO. | |
93 | ||
52005a92 JR |
94 | %package plugin-cineon |
95 | Summary: Cineon plugin for OpenImageIO library | |
96 | Summary(pl.UTF-8): Wtyczka Cineon dla biblioteki OpenImageIO | |
97 | Group: Libraries | |
98 | Requires: %{name} = %{version}-%{release} | |
99 | ||
100 | %description plugin-cineon | |
101 | OpenImageIO plugin to read Cineon files. | |
102 | ||
103 | %description plugin-cineon -l pl.UTF-8 | |
104 | Wtyczka biblioteki OpenImageIO czytająca pliki Cineon. | |
105 | ||
fc6d7d67 JB |
106 | %package plugin-dds |
107 | Summary: DDS plugin for OpenImageIO library | |
108 | Summary(pl.UTF-8): Wtyczka DDS dla biblioteki OpenImageIO | |
109 | Group: Libraries | |
110 | Requires: %{name} = %{version}-%{release} | |
111 | Requires: squish >= 1.10 | |
112 | ||
113 | %description plugin-dds | |
d46df4d1 | 114 | OpenImageIO plugin to read DDS files. |
fc6d7d67 JB |
115 | |
116 | %description plugin-dds -l pl.UTF-8 | |
d46df4d1 | 117 | Wtyczka biblioteki OpenImageIO czytająca pliki DDS. |
fc6d7d67 | 118 | |
b238f81f JB |
119 | %package plugin-dpx |
120 | Summary: DPX plugin for OpenImageIO library | |
121 | Summary(pl.UTF-8): Wtyczka DPX dla biblioteki OpenImageIO | |
122 | Group: Libraries | |
123 | Requires: %{name} = %{version}-%{release} | |
124 | ||
125 | %description plugin-dpx | |
126 | OpenImageIO plugin to read and write DPX files. | |
127 | ||
128 | %description plugin-dpx -l pl.UTF-8 | |
129 | Wtyczka biblioteki OpenImageIO czytająca i zapisująca pliki DPX. | |
130 | ||
8a5e279e JB |
131 | %package plugin-field3d |
132 | Summary: Field3D plugin for OpenImageIO library | |
133 | Summary(pl.UTF-8): Wtyczka Field3D dla biblioteki OpenImageIO | |
134 | Group: Libraries | |
135 | Requires: %{name} = %{version}-%{release} | |
136 | ||
137 | %description plugin-field3d | |
d46df4d1 | 138 | OpenImageIO plugin to read Field3D files. |
8a5e279e JB |
139 | |
140 | %description plugin-field3d -l pl.UTF-8 | |
d46df4d1 | 141 | Wtyczka biblioteki OpenImageIO czytająca pliki Field3D. |
8a5e279e | 142 | |
20734182 JB |
143 | %package plugin-ico |
144 | Summary: ICO plugin for OpenImageIO library | |
145 | Summary(pl.UTF-8): Wtyczka ICO dla biblioteki OpenImageIO | |
146 | Group: Libraries | |
147 | Requires: %{name} = %{version}-%{release} | |
148 | ||
149 | %description plugin-ico | |
150 | OpenImageIO plugin to read and write ICO files. | |
151 | ||
152 | %description plugin-ico -l pl.UTF-8 | |
153 | Wtyczka biblioteki OpenImageIO czytająca i zapisująca pliki ICO. | |
154 | ||
155 | %package plugin-jpeg | |
156 | Summary: JPEG plugin for OpenImageIO library | |
157 | Summary(pl.UTF-8): Wtyczka JPEG dla biblioteki OpenImageIO | |
158 | Group: Libraries | |
159 | Requires: %{name} = %{version}-%{release} | |
160 | ||
161 | %description plugin-jpeg | |
162 | OpenImageIO plugin to read and write JPEG files (with TIFF/EXIF | |
163 | information). | |
164 | ||
165 | %description plugin-jpeg -l pl.UTF-8 | |
166 | Wtyczka biblioteki OpenImageIO czytająca i zapisująca pliki JPEG | |
167 | (wraz z informacjami TIFF/EXIF). | |
168 | ||
169 | %package plugin-jpeg2000 | |
170 | Summary: JPEG2000 plugin for OpenImageIO library | |
171 | Summary(pl.UTF-8): Wtyczka JPEG2000 dla biblioteki OpenImageIO | |
172 | Group: Libraries | |
173 | Requires: %{name} = %{version}-%{release} | |
174 | ||
175 | %description plugin-jpeg2000 | |
176 | OpenImageIO plugin to read and write JPEG2000 files. | |
177 | ||
178 | %description plugin-jpeg2000 -l pl.UTF-8 | |
179 | Wtyczka biblioteki OpenImageIO czytająca i zapisująca pliki JPEG2000. | |
180 | ||
181 | %package plugin-openexr | |
182 | Summary: OpenEXR plugin for OpenImageIO library | |
183 | Summary(pl.UTF-8): Wtyczka OpenEXR dla biblioteki OpenImageIO | |
184 | Group: Libraries | |
185 | Requires: %{name} = %{version}-%{release} | |
186 | Requires: OpenEXR >= 1.6.1 | |
187 | ||
188 | %description plugin-openexr | |
189 | OpenImageIO plugin to read and write OpenEXR files. | |
190 | ||
191 | %description plugin-openexr -l pl.UTF-8 | |
192 | Wtyczka biblioteki OpenImageIO czytająca i zapisująca pliki OpenEXR. | |
193 | ||
194 | %package plugin-png | |
195 | Summary: PNG plugin for OpenImageIO library | |
196 | Summary(pl.UTF-8): Wtyczka PNG dla biblioteki OpenImageIO | |
197 | Group: Libraries | |
198 | Requires: %{name} = %{version}-%{release} | |
199 | ||
200 | %description plugin-png | |
201 | OpenImageIO plugin to read and write PNG files. | |
202 | ||
203 | %description plugin-png -l pl.UTF-8 | |
204 | Wtyczka biblioteki OpenImageIO czytająca i zapisująca pliki PNG. | |
205 | ||
52005a92 JR |
206 | %package plugin-psd |
207 | Summary: PSD plugin for OpenImageIO library | |
208 | Summary(pl.UTF-8): Wtyczka PSD dla biblioteki OpenImageIO | |
209 | Group: Libraries | |
210 | Requires: %{name} = %{version}-%{release} | |
211 | ||
212 | %description plugin-psd | |
213 | OpenImageIO plugin to read and write PSD files. | |
214 | ||
215 | %description plugin-psd -l pl.UTF-8 | |
216 | Wtyczka biblioteki OpenImageIO czytająca i zapisująca pliki PSD. | |
217 | ||
d46df4d1 JB |
218 | %package plugin-ptex |
219 | Summary: Ptex plugin for OpenImageIO library | |
220 | Summary(pl.UTF-8): Wtyczka Ptex dla biblioteki OpenImageIO | |
221 | Group: Libraries | |
222 | Requires: %{name} = %{version}-%{release} | |
223 | Requires: ptex >= 2 | |
224 | ||
225 | %description plugin-ptex | |
226 | OpenImageIO plugin to read Ptex files. | |
227 | ||
228 | %description plugin-ptex -l pl.UTF-8 | |
229 | Wtyczka biblioteki OpenImageIO czytająca pliki Ptex. | |
230 | ||
cf6fcddf JR |
231 | %package plugin-webp |
232 | Summary: WebP plugin for OpenImageIO library | |
233 | Summary(pl.UTF-8): Wtyczka WebP dla biblioteki OpenImageIO | |
234 | Group: Libraries | |
235 | Requires: %{name} = %{version}-%{release} | |
236 | ||
237 | %description plugin-webp | |
238 | OpenImageIO plugin to read and write WebP files. | |
239 | ||
240 | %description plugin-webp -l pl.UTF-8 | |
241 | Wtyczka biblioteki OpenImageIO czytająca i zapisująca pliki WebP. | |
242 | ||
20734182 JB |
243 | %package plugin-tiff |
244 | Summary: TIFF plugin for OpenImageIO library | |
245 | Summary(pl.UTF-8): Wtyczka TIFF dla biblioteki OpenImageIO | |
246 | Group: Libraries | |
247 | Requires: %{name} = %{version}-%{release} | |
248 | ||
249 | %description plugin-tiff | |
250 | OpenImageIO plugin to read and write TIFF files. | |
251 | ||
252 | %description plugin-tiff -l pl.UTF-8 | |
253 | Wtyczka biblioteki OpenImageIO czytająca i zapisująca pliki TIFF. | |
254 | ||
255 | %package apidocs | |
256 | Summary: Programmer documentation for OpenImageIO library | |
257 | Summary(pl.UTF-8): Dokumentacja programisty do biblioteki OpenImageIO | |
258 | Group: Documentation | |
259 | ||
260 | %description apidocs | |
261 | Programmer documentation for OpenImageIO library. | |
262 | ||
263 | %description apidocs -l pl.UTF-8 | |
264 | Dokumentacja programisty do biblioteki OpenImageIO. | |
265 | ||
266 | %package iv | |
267 | Summary: Qt/OpenImageIO-based Image Viewer | |
268 | Summary(pl.UTF-8): Przeglądarka obrazków (IV) oparta o Qt i OpenImageIO | |
269 | Group: X11/Applications/Graphics | |
270 | Requires: %{name} = %{version}-%{release} | |
271 | Requires: glew >= 1.5.1 | |
272 | ||
273 | %description iv | |
274 | IV is an image viewer based on ImageIO plugins; therefore it can read | |
275 | images of any format for which an appropriate plugin may be found. | |
276 | ||
277 | %description iv -l pl.UTF-8 | |
278 | IV to przeglądarka obrazków oparta na wtyczkach ImageIO; dzięki temu | |
279 | jest w stanie odczytać obrazy w dowolnym formacie, dla którego | |
280 | istnieje właściwa wtyczka. | |
281 | ||
282 | %package -n python-OpenImageIO | |
283 | Summary: Python binding for OpenImageIO library | |
284 | Summary(pl.UTF-8): Wiązanie Pythona do biblioteki OpenImageIO | |
285 | Group: Libraries/Python | |
286 | Requires: %{name} = %{version}-%{release} | |
287 | ||
288 | %description -n python-OpenImageIO | |
289 | Python binding for OpenImageIO library. | |
290 | ||
291 | %description -n python-OpenImageIO -l pl.UTF-8 | |
292 | Wiązanie Pythona do biblioteki OpenImageIO. | |
293 | ||
294 | %prep | |
aa41c492 | 295 | %setup -q -n OpenImageIO-oiio-f4d79c0 |
40b0de7c | 296 | %patch0 -p1 |
8a5e279e | 297 | %patch2 -p1 |
fc6d7d67 | 298 | %patch3 -p1 |
d46df4d1 | 299 | %patch4 -p1 |
b238f81f JB |
300 | %patch5 -p1 |
301 | %patch6 -p1 | |
aa41c492 | 302 | %ifarch i386 i486 |
725e24e0 JR |
303 | %patch7 -p1 |
304 | %endif | |
aa41c492 | 305 | %patch8 -p1 |
fc6d7d67 | 306 | |
d46df4d1 | 307 | %{__rm} -r src/dds.imageio/squish src/ptex.imageio/ptex |
4f07e9d7 JB |
308 | # when using system pugixml, don't use hacked headers |
309 | %{__rm} src/include/pugi*.hpp | |
20734182 JB |
310 | |
311 | %build | |
312 | install -d build | |
313 | cd build | |
314 | %cmake ../src \ | |
315 | -DEMBEDPLUGINS=OFF \ | |
67c89aae | 316 | -DOPENJPEG_INCLUDE_DIR=%{_includedir}/openjpeg-1.5 \ |
52005a92 | 317 | -DINCLUDE_INSTALL_DIR=%{_includedir}/%{name} \ |
4f07e9d7 | 318 | -DPYLIB_INSTALL_DIR=%{py_sitedir} \ |
20734182 | 319 | -DPYTHON_VERSION=%{py_ver} \ |
4f07e9d7 JB |
320 | -DUSE_EXTERNAL_PUGIXML=ON \ |
321 | %{!?with_ocio:-DUSE_OCIO=OFF} \ | |
322 | %{!?with_tbb:-DUSE_TBB=OFF} | |
20734182 JB |
323 | |
324 | %{__make} | |
325 | ||
326 | %install | |
327 | rm -rf $RPM_BUILD_ROOT | |
328 | ||
329 | %{__make} -C build install \ | |
330 | DESTDIR=$RPM_BUILD_ROOT | |
331 | ||
332 | # name clash with iv | |
40b0de7c | 333 | %{__mv} -f $RPM_BUILD_ROOT%{_bindir}/{iv,oiiv} |
5bef7fef | 334 | %{__mv} -f $RPM_BUILD_ROOT%{_mandir}/man1/{iv,oiiv}.1 |
20734182 | 335 | |
52005a92 JR |
336 | # installed as %doc |
337 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/doc/openimageio | |
338 | ||
20734182 JB |
339 | %clean |
340 | rm -rf $RPM_BUILD_ROOT | |
341 | ||
342 | %post -p /sbin/ldconfig | |
343 | %postun -p /sbin/ldconfig | |
344 | ||
345 | %files | |
346 | %defattr(644,root,root,755) | |
aa41c492 | 347 | %doc CHANGES CREDITS LICENSE README.rst |
20734182 JB |
348 | %attr(755,root,root) %{_bindir}/iconvert |
349 | %attr(755,root,root) %{_bindir}/idiff | |
350 | %attr(755,root,root) %{_bindir}/igrep | |
351 | %attr(755,root,root) %{_bindir}/iinfo | |
20734182 | 352 | %attr(755,root,root) %{_bindir}/maketx |
52005a92 | 353 | %attr(755,root,root) %{_bindir}/oiiotool |
20734182 | 354 | %attr(755,root,root) %{_libdir}/libOpenImageIO.so.*.*.* |
aa41c492 | 355 | %attr(755,root,root) %ghost %{_libdir}/libOpenImageIO.so.1.2 |
20734182 | 356 | %attr(755,root,root) %{_libdir}/bmp.imageio.so |
20734182 JB |
357 | %attr(755,root,root) %{_libdir}/fits.imageio.so |
358 | %attr(755,root,root) %{_libdir}/hdr.imageio.so | |
52005a92 | 359 | %attr(755,root,root) %{_libdir}/iff.imageio.so |
20734182 | 360 | %attr(755,root,root) %{_libdir}/pnm.imageio.so |
52005a92 | 361 | %attr(755,root,root) %{_libdir}/rla.imageio.so |
20734182 JB |
362 | %attr(755,root,root) %{_libdir}/sgi.imageio.so |
363 | %attr(755,root,root) %{_libdir}/socket.imageio.so | |
364 | %attr(755,root,root) %{_libdir}/softimage.imageio.so | |
365 | %attr(755,root,root) %{_libdir}/targa.imageio.so | |
366 | %attr(755,root,root) %{_libdir}/zfile.imageio.so | |
5bef7fef JR |
367 | %{_mandir}/man1/iconvert.1* |
368 | %{_mandir}/man1/idiff.1* | |
369 | %{_mandir}/man1/igrep.1* | |
370 | %{_mandir}/man1/iinfo.1* | |
5bef7fef JR |
371 | %{_mandir}/man1/maketx.1* |
372 | %{_mandir}/man1/oiiotool.1* | |
20734182 JB |
373 | |
374 | %files devel | |
375 | %defattr(644,root,root,755) | |
376 | %attr(755,root,root) %{_libdir}/libOpenImageIO.so | |
377 | %{_includedir}/OpenImageIO | |
378 | ||
52005a92 JR |
379 | %files plugin-cineon |
380 | %defattr(644,root,root,755) | |
381 | %attr(755,root,root) %{_libdir}/cineon.imageio.so | |
382 | ||
fc6d7d67 JB |
383 | %files plugin-dds |
384 | %defattr(644,root,root,755) | |
385 | %attr(755,root,root) %{_libdir}/dds.imageio.so | |
386 | ||
b238f81f JB |
387 | %files plugin-dpx |
388 | %defattr(644,root,root,755) | |
389 | %attr(755,root,root) %{_libdir}/dpx.imageio.so | |
390 | ||
8a5e279e JB |
391 | %files plugin-field3d |
392 | %defattr(644,root,root,755) | |
393 | %attr(755,root,root) %{_libdir}/field3d.imageio.so | |
394 | ||
20734182 JB |
395 | %files plugin-ico |
396 | %defattr(644,root,root,755) | |
397 | %attr(755,root,root) %{_libdir}/ico.imageio.so | |
398 | ||
399 | %files plugin-jpeg | |
400 | %defattr(644,root,root,755) | |
401 | %attr(755,root,root) %{_libdir}/jpeg.imageio.so | |
402 | ||
403 | %files plugin-jpeg2000 | |
404 | %defattr(644,root,root,755) | |
405 | %attr(755,root,root) %{_libdir}/jpeg2000.imageio.so | |
406 | ||
407 | %files plugin-openexr | |
408 | %defattr(644,root,root,755) | |
409 | %attr(755,root,root) %{_libdir}/openexr.imageio.so | |
410 | ||
411 | %files plugin-png | |
412 | %defattr(644,root,root,755) | |
413 | %attr(755,root,root) %{_libdir}/png.imageio.so | |
414 | ||
52005a92 JR |
415 | %files plugin-psd |
416 | %defattr(644,root,root,755) | |
417 | %attr(755,root,root) %{_libdir}/psd.imageio.so | |
418 | ||
d46df4d1 JB |
419 | %files plugin-ptex |
420 | %defattr(644,root,root,755) | |
421 | %attr(755,root,root) %{_libdir}/ptex.imageio.so | |
422 | ||
20734182 JB |
423 | %files plugin-tiff |
424 | %defattr(644,root,root,755) | |
425 | %attr(755,root,root) %{_libdir}/tiff.imageio.so | |
426 | ||
cf6fcddf JR |
427 | %files plugin-webp |
428 | %defattr(644,root,root,755) | |
429 | %attr(755,root,root) %{_libdir}/webp.imageio.so | |
430 | ||
20734182 JB |
431 | %files apidocs |
432 | %defattr(644,root,root,755) | |
433 | %doc src/doc/openimageio.pdf | |
434 | ||
435 | %files iv | |
436 | %defattr(644,root,root,755) | |
437 | %attr(755,root,root) %{_bindir}/oiiv | |
5bef7fef | 438 | %{_mandir}/man1/oiiv.1* |
20734182 JB |
439 | |
440 | %files -n python-OpenImageIO | |
441 | %defattr(644,root,root,755) | |
442 | %attr(755,root,root) %{py_sitedir}/OpenImageIO.so |