File ilmbase.spec of Package ilmbase
#
# spec file for package ilmbase
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name:           ilmbase
BuildRequires:  gcc-c++
BuildRequires:  pkg-config
Summary:        Base library for ILM software (OpenEXR)
License:        BSD-3-Clause
Group:          Development/Libraries/C and C++
Version:        1.0.3
Release:        0
Url:            http://www.openexr.com
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        %{name}-%{version}.tar.gz
Source1:        baselibs.conf
#PATCH-FIX-UPSTREAM: bnc#774408, proprietary license
#https://github.com/openexr/openexr/commit/301c13f7d9129e6e0d99e8f572de5fbc3d5bf8e3
Patch0:         0001-Correcting-for-incorrect-license-section.patch
#PATCH-FIX-OPENSUSE: allow 32bit build
Patch1:         ilmbase-1.0.3-ucontext-i386.patch
Patch2:         arm-build.diff
Patch3:         fix-i586.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  gcc-c++
BuildRequires:  libtool
BuildRequires:  pkg-config
# Renamed to libilmbase6 to met the Shared Library Policy
Obsoletes:      IlmBase <= 1.0.1
Provides:       IlmBase = %{version}
%description
Base library for Industrial Light & Magic software (OpenEXR).
* Half is a class that encapsulates our 16-bit floating-point
   format.
* IlmThread is a thread abstraction library for use with OpenEXR and
   other software packages.  It currently supports pthreads and
   Windows threads.
* Imath implements 2D and 3D vectors, 3x3 and 4x4 matrices,
   quaternions and other useful 2D and 3D math functions.
* Iex is an exception-handling library.
%package devel
Requires:       libHalf7
Requires:       libIex7
Requires:       libIexMath7
Requires:       libIlmThread7
Requires:       libImath7
Requires:       libstdc++-devel
Summary:        Base library for ILM software (OpenEXR)
License:        BSD-3-Clause and GPL-2.0+
Group:          Development/Libraries/C and C++
# Renamed to libilmbase6 to met the Shared Library Policy
Obsoletes:      IlmBase-devel <= 1.0.1
Provides:       IlmBase-devel = %{version}
Obsoletes:      libilmbase-devel <= 1.0.2
Provides:       libilmbase-devel = %{version}
%description devel
Devel files for ilmbase 
Base library for Industrial Light & Magic software (OpenEXR).
%files -n ilmbase-devel
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README*
%{_includedir}/OpenEXR
%_libdir/libHalf.so
%_libdir/libIex.so
%_libdir/libImath.so
%_libdir/libIlmThread.so
%_libdir/libIexMath.so
%_libdir/pkgconfig/IlmBase.pc
%package -n libHalf7
Summary:        Base library for ILM software (OpenEXR)
License:        BSD-3-Clause
Group:          Development/Libraries/C and C++
%description -n libHalf7
%{summary}.
%post -n libHalf7 -p /sbin/ldconfig
%postun -n libHalf7 -p /sbin/ldconfig
%files -n libHalf7
%defattr(-,root,root,-)
%{_libdir}/libHalf.so.*
%package -n libIexMath7
Summary:        Base library for ILM software (OpenEXR)
License:        BSD-3-Clause
Group:          Development/Libraries/C and C++
%description -n libIexMath7
%{summary}.
%post -n libIexMath7 -p /sbin/ldconfig
%postun -n libIexMath7 -p /sbin/ldconfig
%files -n libIexMath7
%defattr(-,root,root,-)
%{_libdir}/libIexMath.so.*
%package -n libIex7
Summary:        Base library for ILM software (OpenEXR)
License:        BSD-3-Clause
Group:          Development/Libraries/C and C++
%description -n libIex7
%{summary}.
%post -n libIex7 -p /sbin/ldconfig
%postun -n libIex7 -p /sbin/ldconfig
%files -n libIex7
%defattr(-,root,root,-)
%{_libdir}/libIex.so.*
%package -n libIlmThread7
Summary:        Base library for ILM software (OpenEXR)
License:        BSD-3-Clause
Group:          Development/Libraries/C and C++
%description -n libIlmThread7
%{summary}.
%post -n libIlmThread7 -p /sbin/ldconfig
%postun -n libIlmThread7 -p /sbin/ldconfig
%files -n libIlmThread7
%defattr(-,root,root,-)
%{_libdir}/libIlmThread.so.*
%package -n libImath7
Summary:        Base library for ILM software (OpenEXR)
License:        BSD-3-Clause
Group:          Development/Libraries/C and C++
%description -n libImath7
%{summary}.
%post -n libImath7 -p /sbin/ldconfig
%postun -n libImath7 -p /sbin/ldconfig
%files -n libImath7
%defattr(-,root,root,-)
%{_libdir}/libImath.so.*
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2
%patch3 -p1
# remove a non unix READMEs
rm README.win32
%build
./bootstrap
export PTHREAD_LIBS="-lpthread"
%configure --disable-static --with-pic
make %{?_smp_mflags}
%install
%{makeinstall}
rm -f %{buildroot}%{_libdir}/*.la
%check
#XXX: workaround for a build fail with gcc45 with -02 on i586
%if 0%{?suse_version} >= 1130
%ifarch %ix86
make CXXFLAGS="`echo "%{optflags}" | sed 's/O2/O1/'`" check
%endif
%endif
make check
%clean
rm -rf %{buildroot}
%changelog