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