Package init

This commit is contained in:
dogsheng 2019-11-19 11:51:28 +08:00
commit 2307cc8988
3 changed files with 129 additions and 0 deletions

66
OpenEXR.spec Normal file
View File

@ -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 <huzhiyu1@huawei.com> - 2.2.0-16
- Package init

View File

@ -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 <stdio.h>
#include <stdlib.h>
#include <assert.h>
+#include <byteswap.h>
#include "tmpDir.h"
#include "testFutureProofing.h"
@@ -64,6 +65,7 @@
#include <ImfNamespace.h>
#include <ImathNamespace.h>
#include <IlmThreadNamespace.h>
+#include <ImfSystemSpecific.h>
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<whatevever>'
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 <stdio.h>
#include <stdlib.h>
#include <assert.h>
+#include <byteswap.h>
#include "tmpDir.h"
#include "testMultiPartFileMixingBasic.h"
@@ -59,6 +60,7 @@
#include <ImfDeepScanLineInputPart.h>
#include <ImfPartType.h>
#include <ImfMisc.h>
+#include <ImfSystemSpecific.h>
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<length;i++)

BIN
openexr-2.2.0.tar.gz Normal file

Binary file not shown.