054dab7
%global subname oiio
054dab7
7a63317
Name:           OpenImageIO
a476e32
Version:        1.4.15
c37941e
Release:        1%{?dist}
7a63317
Summary:        Library for reading and writing images
7a63317
7a63317
Group:          Development/Libraries
7a63317
License:        BSD
7a63317
URL:            https://sites.google.com/site/openimageio/home
7a63317
054dab7
Source0:        https://github.com/%{name}/%{subname}/archive/Release-%{version}/%{subname}-Release-%{version}.tar.gz
3bbc3b7
# Images for test suite
a0d96ee
#Source1:        oiio-images.tar.gz
527c815
ebab20c
BuildRequires:  cmake
ebab20c
BuildRequires:  txt2man
e4810c4
BuildRequires:  qt4-devel
2f57d9f
BuildRequires:  boost-devel
2f57d9f
BuildRequires:  glew-devel
2f57d9f
BuildRequires:  OpenEXR-devel ilmbase-devel
2f57d9f
BuildRequires:  python2-devel
92eeec4
BuildRequires:  libpng-devel libtiff-devel openjpeg-devel giflib-devel
ebab20c
%if 0%{?!rhel}
ebab20c
BuildRequires:  libwebp-devel
ebab20c
BuildRequires:  Field3D-devel
ebab20c
%endif
ebab20c
BuildRequires:  hdf5-devel
2f57d9f
BuildRequires:  zlib-devel
2f57d9f
BuildRequires:  jasper-devel
7a63317
BuildRequires:  pugixml-devel
92eeec4
92eeec4
# WARNING: OpenColorIO and OpenImageIO are cross dependent.
92eeec4
# If an ABI incompatible update is done in one, the other also needs to be
92eeec4
# rebuilt.
b8cbdd9
BuildRequires:  OpenColorIO-devel
7a63317
66ec4f2
# We don't want to provide private python extension libs
66ec4f2
%{?filter_setup:
66ec4f2
%filter_provides_in %{python_sitearch}/.*\.so$ 
66ec4f2
%filter_setup
66ec4f2
}
66ec4f2
7a63317
7a63317
%description
7a63317
OpenImageIO is a library for reading and writing images, and a bunch of related
7a63317
classes, utilities, and applications. Main features include:
7a63317
- Extremely simple but powerful ImageInput and ImageOutput APIs for reading and
7a63317
  writing 2D images that is format agnostic.
7a63317
- Format plugins for TIFF, JPEG/JFIF, OpenEXR, PNG, HDR/RGBE, Targa, JPEG-2000,
7a63317
  DPX, Cineon, FITS, BMP, ICO, RMan Zfile, Softimage PIC, DDS, SGI,
7a63317
  PNM/PPM/PGM/PBM, Field3d.
7a63317
- An ImageCache class that transparently manages a cache so that it can access
7a63317
  truly vast amounts of image data.
2f57d9f
2f57d9f
2f57d9f
%package utils
92eeec4
Summary:        Command line utilities for %{name}
2f57d9f
Requires:       %{name}%{?_isa} = %{version}-%{release}
2f57d9f
2f57d9f
%description utils
92eeec4
Command-line tools to manipulate and get information on images using the
2f57d9f
%{name} library.
2f57d9f
2f57d9f
2f57d9f
%package iv
92eeec4
Summary:        %{name} based image viewer
2f57d9f
Requires:       %{name}%{?_isa} = %{version}-%{release}
2f57d9f
2f57d9f
%description iv
c37941e
A really nice image viewer, iv, based on %{name} classes (and so will work
c37941e
with any formats for which plugins are available).
7a63317
527c815
7a63317
%package devel
527c815
Summary:        Documentation for %{name}
7a63317
Group:          Development/Libraries
7a63317
Requires:       %{name}%{?_isa} = %{version}-%{release}
7a63317
7a63317
%description devel
7a63317
Development files for package %{name}
7a63317
7a63317
7a63317
%prep
2f57d9f
%setup -q -n oiio-Release-%{version}
3bbc3b7
7a63317
# Remove bundled pugixml
7a63317
rm -f src/include/pugixml.hpp \
7a63317
      src/include/pugiconfig.hpp \
5371afc
      src/libutil/pugixml.cpp 
527c815
1a39c4a
# Remove bundled tbb
7a63317
rm -rf src/include/tbb
3bbc3b7
3bbc3b7
# Install test images
3bbc3b7
#rm -rf ../oiio-images && mkdir ../oiio-images && pushd ../oiio-images
3bbc3b7
#tar --strip-components=1 -xzf %{SOURCE1}
7a63317
7a63317
7a63317
%build
3bbc3b7
rm -rf build/linux && mkdir -p build/linux && pushd build/linux
527c815
# CMAKE_SKIP_RPATH is OK here because it is set to FALSE internally and causes
527c815
# CMAKE_INSTALL_RPATH to be cleared, which is the desiered result.
fdddaa9
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
fdddaa9
       -DCMAKE_SKIP_RPATH:BOOL=TRUE \
7a63317
       -DINCLUDE_INSTALL_DIR:PATH=/usr/include/%{name} \
7a63317
       -DPYLIB_INSTALL_DIR:PATH=%{python_sitearch} \
527c815
       -DINSTALL_DOCS:BOOL=FALSE \
7a63317
       -DUSE_EXTERNAL_PUGIXML:BOOL=TRUE \
03f891c
       -DUSE_TBB:BOOL=FALSE \
5d225ec
%ifarch ppc ppc64
8dcfcd4
       -DNOTHREADS:BOOL=FALSE \
f84394c
%endif
39a295a
       -DVERBOSE=TRUE \
92eeec4
       ../../
7a63317
7a63317
make %{?_smp_mflags}
7a63317
7a63317
7a63317
%install
3bbc3b7
pushd build/linux
7a63317
make DESTDIR=%{buildroot} install
7a63317
7a63317
# Move man pages to the right directory
7a63317
mkdir -p %{buildroot}%{_mandir}/man1
92eeec4
cp -a src/doc/*.1 %{buildroot}%{_mandir}/man1
7a63317
7a63317
7a63317
%post -p /sbin/ldconfig
7a63317
%postun -p /sbin/ldconfig
7a63317
7a63317
527c815
%check
5d225ec
# Not all tests pass on linux
3bbc3b7
#pushd build/linux && make test
527c815
527c815
7a63317
%files
7a63317
%doc CHANGES LICENSE
7a63317
%{_libdir}/libOpenImageIO.so.*
054dab7
%{_libdir}/libOpenImageIO_Util.so.*
7a63317
%{python_sitearch}/OpenImageIO.so
2f57d9f
2f57d9f
%files utils
2f57d9f
%exclude %{_bindir}/iv
2f57d9f
%{_bindir}/*
2f57d9f
%exclude %{_mandir}/man1/iv.1.gz
2f57d9f
%{_mandir}/man1/*.1.gz
2f57d9f
2f57d9f
%files iv
2f57d9f
%{_bindir}/iv
2f57d9f
%{_mandir}/man1/iv.1.gz
7a63317
7a63317
%files devel
7a63317
%doc src/doc/*.pdf
7a63317
%{_libdir}/libOpenImageIO.so
054dab7
%{_libdir}/libOpenImageIO_Util.so
7a63317
%{_includedir}/*
7a63317
5371afc
7a63317
%changelog
a476e32
* Tue Nov 25 2014 Richard Shaw <hobbes1069@gmail.com> - 1.4.15-1
a476e32
- Update to latest upstream release.
a476e32
c37941e
* Fri Nov 14 2014 Richard Shaw <hobbes1069@gmail.com> - 1.4.14-1
c37941e
- Update to latest upstream release.
c37941e
dd68cd1
* Fri Sep  5 2014 Richard Shaw <hobbes1069@gmail.com> - 1.4.12-4
dd68cd1
- Rebuild for Field3D 1.4.3.
dd68cd1
Orion Poplawski 338ba88
* Thu Sep 04 2014 Orion Poplawski <orion@cora.nwra.com> - 1.4.12-3
Orion Poplawski 338ba88
- Rebuild for pugixml 1.4
Orion Poplawski 338ba88
dc67a32
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.12-2
dc67a32
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
dc67a32
8dcfcd4
* Fri Aug  1 2014 Richard Shaw <hobbes1069@gmail.com> - 1.4.12-1
8dcfcd4
- Update to latest upstream release.
8dcfcd4
c0f199b
* Fri Jun 06 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.7-4
c0f199b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
c0f199b
Petr Machata ce55f90
* Fri May 23 2014 Petr Machata <pmachata@redhat.com> - 1.4.7-3
Petr Machata ce55f90
- Rebuild for boost 1.55.0
Petr Machata ce55f90
ff65deb
* Fri May 23 2014 David Tardon <dtardon@redhat.com> - 1.4.7-2
ff65deb
- rebuild for boost 1.55.0
ff65deb
054dab7
* Mon May 19 2014 Richard Shaw <hobbes1069@gmail.com> - 1.4.7-1
054dab7
- Update to latest upstream release.
054dab7
92eeec4
* Tue Jan  7 2014 Richard Shaw <hobbes1069@gmail.com> - 1.3.10-1
92eeec4
- Update to latest upstream release.
92eeec4
- Add libgif as build requirement.
92eeec4
Rex Dieter a0c1f52
* Wed Nov 27 2013 Rex Dieter <rdieter@fedoraproject.org> - 1.2.3-3
Rex Dieter a0c1f52
- rebuild (openexr)
Rex Dieter a0c1f52
c82996b
* Mon Nov 18 2013 Dave Airlie <airlied@redhat.com> - 1.2.3-2
c82996b
- rebuilt for GLEW 1.10
c82996b
ebab20c
* Wed Nov  6 2013 Richard Shaw <hobbes1069@gmail.com> - 1.2.3-1
ebab20c
- Update to latest upstream release.
ebab20c
- Fix ppc builds (BZ#1021977).
ebab20c
- Add conditionals to build requirements for EPEL 6.
ebab20c
ebab20c
* Wed Oct  2 2013 Richard Shaw <hobbes1069@gmail.com> - 1.2.2-1
ebab20c
- Update to latest upstream release.
ebab20c
Rex Dieter d70c6b3
* Sun Sep 08 2013 Rex Dieter <rdieter@fedoraproject.org> 1.2.1-2
Rex Dieter d70c6b3
- rebuild (ilmbase/openexr)
Rex Dieter d70c6b3
8b5f5d6
* Thu Aug  8 2013 Richard Shaw <hobbes1069@gmail.com> - 1.2.1-1
8b5f5d6
- Update to latest upstream release.
8b5f5d6
4a3ef26
* Fri Aug 02 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-3
4a3ef26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
4a3ef26
Petr Machata 55ccc44
* Sun Jul 28 2013 Petr Machata <pmachata@redhat.com> - 1.2.0-2
Petr Machata 55ccc44
- Rebuild for boost 1.54.0