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