commit 2307cc89885cbe52c1fa12d91e6daa40850d1ec0 Author: dogsheng <960055655@qq.com> Date: Tue Nov 19 11:51:28 2019 +0800 Package init diff --git a/OpenEXR.spec b/OpenEXR.spec new file mode 100644 index 0000000..9c35dd5 --- /dev/null +++ b/OpenEXR.spec @@ -0,0 +1,66 @@ +Name: OpenEXR +Summary: A high dynamic-range (HDR) image file format for use in computer imaging applications +Version: 2.2.0 +Release: 16 +License: BSD +URL: http://www.openexr.com/ +Source0: http://download.savannah.nongnu.org/releases/openexr/openexr-%{version}.tar.gz + +Patch0000: openexr-2.1.0-bigendian.patch + +Provides: openexr = %{version}-%{release} %{name}-libs = %{version}-%{release} +Obsoletes: openexr < %{version}-%{release} %{name}-libs < %{version}-%{release} + +BuildConflicts: %{name}-devel < 2.2.0 + +BuildRequires: gcc-c++ ilmbase-devel >= %{version} zlib-devel pkgconfig + +%description +OpenEXR is a high dynamic-range (HDR) image file format originally developed by Industrial +Light & Magic for use in computer imaging applications. + +%package devel +Summary: Development files for %{name} +Provides: openexr-devel = %{version}-%{release} +Obsoletes: openexr-devel < %{version}-%{release} +Requires: %{name} = %{version}-%{release} ilmbase-devel + +%description devel +This package contains libraries and header files for development of %{name}. + +%prep +%autosetup -n openexr-%{version} -p1 + +%build +%configure --disable-static +%make_build + +%install +%make_install +%delete_la + +%check +export PKG_CONFIG_PATH="%{buildroot}%{_libdir}/pkgconfig${PKG_CONFIG_PATH:+:}${PKG_CONFIG_PATH}" +test "$(pkg-config --modversion OpenEXR)" = "%{version}" +%make_build check ||: + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%doc AUTHORS ChangeLog NEWS README +%license LICENSE +%{_libdir}/{libIlmImf-2_2.so.22*,libIlmImfUtil-2_2.so.22*} +%{_bindir}/exr* +%exclude %{_docdir}/%{name}-%{version} + +%files devel +%{_datadir}/aclocal/openexr.m4 +%{_includedir}/%{name}/* +%{_libdir}/libIlmImf*.so +%{_libdir}/pkgconfig/OpenEXR.pc + +%changelog +* Fri Oct 25 2019 huzhiyu - 2.2.0-16 +- Package init diff --git a/openexr-2.1.0-bigendian.patch b/openexr-2.1.0-bigendian.patch new file mode 100644 index 0000000..45a99aa --- /dev/null +++ b/openexr-2.1.0-bigendian.patch @@ -0,0 +1,63 @@ +diff -up openexr-2.1.0/IlmImfTest/testFutureProofing.cpp.bigendian openexr-2.1.0/IlmImfTest/testFutureProofing.cpp +--- openexr-2.1.0/IlmImfTest/testFutureProofing.cpp.bigendian 2013-11-11 17:09:51.000000000 -0600 ++++ openexr-2.1.0/IlmImfTest/testFutureProofing.cpp 2013-11-27 08:43:55.486026741 -0600 +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + + #include "tmpDir.h" + #include "testFutureProofing.h" +@@ -64,6 +65,7 @@ + #include + #include + #include ++#include + + namespace IMF = OPENEXR_IMF_NAMESPACE; + using namespace IMF; +@@ -1234,6 +1236,12 @@ modifyType (bool modify_version) + + //length of attribute + fread(&length,4,1,f); ++ if (!GLOBAL_SYSTEM_LITTLE_ENDIAN) ++ { ++ int tmp = bswap_32(length); ++ length = tmp; ++ } ++ + if(!modify_version && attrib_name=="type") + { + // modify the type of part 1 to be 'X' +diff -up openexr-2.1.0/IlmImfTest/testMultiPartFileMixingBasic.cpp.bigendian openexr-2.1.0/IlmImfTest/testMultiPartFileMixingBasic.cpp +--- openexr-2.1.0/IlmImfTest/testMultiPartFileMixingBasic.cpp.bigendian 2013-11-11 17:09:52.000000000 -0600 ++++ openexr-2.1.0/IlmImfTest/testMultiPartFileMixingBasic.cpp 2013-11-27 08:44:19.370775892 -0600 +@@ -40,6 +40,7 @@ + #include + #include + #include ++#include + + #include "tmpDir.h" + #include "testMultiPartFileMixingBasic.h" +@@ -59,6 +60,7 @@ + #include + #include + #include ++#include + + namespace IMF = OPENEXR_IMF_NAMESPACE; + using namespace IMF; +@@ -1383,6 +1385,11 @@ killOffsetTables (const std::string & fn + + //length of attribute + fread(&length,4,1,f); ++ if (!GLOBAL_SYSTEM_LITTLE_ENDIAN) ++ { ++ int tmp = bswap_32(length); ++ length = tmp; ++ } + + //value of attribute + for(int i=0;i