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