Update to latest upstream release.

This commit is contained in:
Richard M. Shaw 2014-08-01 08:44:48 -05:00
parent c0f199bf19
commit 8dcfcd472d
9 changed files with 8 additions and 388 deletions

1
.gitignore vendored
View File

@ -21,3 +21,4 @@ clog
/oiio-Release-1.2.3.tar.gz
/oiio-Release-1.3.11.tar.gz
/oiio-Release-1.4.7.tar.gz
/oiio-Release-1.4.12.tar.gz

View File

@ -5,8 +5,8 @@
%endif
Name: OpenImageIO
Version: 1.4.7
Release: 4%{?dist}
Version: 1.4.12
Release: 1%{?dist}
Summary: Library for reading and writing images
Group: Development/Libraries
@ -17,13 +17,6 @@ Source0: https://github.com/%{name}/%{subname}/archive/Release-%{version}
# Images for test suite
#Source1: oiio-images.tar.gz
Patch0: oiio-arm.patch
Patch1: oiio-ppc.patch
Patch2: oiio-s390.patch
Patch3: oiio-cmake.patch
Patch4: oiio-size_t.patch
Patch5: oiio-pull_858.patch
%if 0%{?rhel} && 0%{?rhel} <= 6
BuildRequires: cmake28
%else
@ -98,12 +91,6 @@ Development files for package %{name}
%prep
%setup -q -n oiio-Release-%{version}
#patch0 -p1 -b .arm
#patch1 -p1 -b .ppc
#patch2 -p1 -b .s390
#patch3 -p1 -b .cmake
%patch4 -p1 -b .size_t
%patch5 -p1 -b .pull_858
# Remove bundled pugixml
rm -f src/include/pugixml.hpp \
@ -130,7 +117,7 @@ rm -rf build/linux && mkdir -p build/linux && pushd build/linux
-DUSE_EXTERNAL_PUGIXML:BOOL=TRUE \
-DUSE_TBB:BOOL=FALSE \
%ifarch ppc ppc64
-DNOTHREADS:BOOL=TRUE \
-DNOTHREADS:BOOL=FALSE \
%endif
-DVERBOSE=TRUE \
../../
@ -180,6 +167,9 @@ cp -a src/doc/*.1 %{buildroot}%{_mandir}/man1
%changelog
* Fri Aug 1 2014 Richard Shaw <hobbes1069@gmail.com> - 1.4.12-1
- Update to latest upstream release.
* Fri Jun 06 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

View File

@ -1,16 +0,0 @@
diff -Naur oiio-Release-1.2.1.orig/src/include/thread.h oiio-Release-1.2.1/src/include/thread.h
--- oiio-Release-1.2.1.orig/src/include/thread.h 2013-08-06 00:10:31.000000000 -0500
+++ oiio-Release-1.2.1/src/include/thread.h 2013-08-28 14:29:19.730464642 -0500
@@ -447,7 +447,12 @@
// Disallow copy construction by making private and unimplemented.
atomic (atomic const &);
+#if defined __arm__
+} __attribute__((aligned(8)));
+#else
};
+#endif
+
#endif /* ! USE_TBB_ATOMIC */

View File

@ -1,15 +0,0 @@
diff -Naur oiio-Release-1.2.2.orig/src/CMakeLists.txt oiio-Release-1.2.2/src/CMakeLists.txt
--- oiio-Release-1.2.2.orig/src/CMakeLists.txt 2013-09-30 12:25:21.000000000 -0500
+++ oiio-Release-1.2.2/src/CMakeLists.txt 2013-10-02 08:04:11.217616340 -0500
@@ -396,9 +396,9 @@
set (CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/doc/Description.txt")
set (CPACK_PACKAGE_FILE_NAME OpenImageIO-${OIIO_VERSION_MAJOR}.${OIIO_VERSION_MINOR}.${OIIO_VERSION_PATCH}-${platform})
#SET (CPACK_PACKAGE_INSTALL_DIRECTORY ${PROJECT_SOURCE_DIR}/..)
-exec_program ("cmake -E copy ${PROJECT_SOURCE_DIR}/../LICENSE ${CMAKE_BINARY_DIR}/License.txt")
+exec_program ("${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/../LICENSE ${CMAKE_BINARY_DIR}/License.txt")
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_BINARY_DIR}/License.txt")
-exec_program ("cmake -E copy ${PROJECT_SOURCE_DIR}/../README.rst ${CMAKE_BINARY_DIR}/Readme.rst")
+exec_program ("${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/../README.rst ${CMAKE_BINARY_DIR}/Readme.rst")
set (CPACK_RESOURCE_FILE_README "${CMAKE_BINARY_DIR}/Readme.rst")
set (CPACK_RESOURCE_FILE_WELCOME "${PROJECT_SOURCE_DIR}/doc/Welcome.txt")
#SET (CPACK_STRIP_FILES Do we need this?)

View File

@ -1,56 +0,0 @@
diff -Naur oiio-Release-1.2.1.orig/src/include/thread.h oiio-Release-1.2.1/src/include/thread.h
--- oiio-Release-1.2.1.orig/src/include/thread.h 2013-08-06 00:10:31.000000000 -0500
+++ oiio-Release-1.2.1/src/include/thread.h 2013-08-28 14:35:21.873905568 -0500
@@ -112,8 +112,10 @@
#endif
#if defined(__GNUC__) && (defined(_GLIBCXX_ATOMIC_BUILTINS) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 401))
+#if !defined(__FreeBSD__) && !defined(__powerpc__) || defined(__x86_64__)
#define USE_GCC_ATOMICS
#endif
+#endif
OIIO_NAMESPACE_ENTER
{
@@ -227,6 +229,11 @@
#elif defined(_MSC_VER)
// Windows
return _InterlockedExchangeAdd ((volatile LONG *)at, x);
+#elif defined (__powerpc__)
+ long long r;
+ r = *at;
+ *at += x;
+ return r;
#else
# error No atomics on this platform.
#endif
@@ -249,6 +256,11 @@
# else
return InterlockedExchangeAdd64 ((volatile LONGLONG *)at, x);
# endif
+#elif defined (__powerpc__)
+ long long r;
+ r = *at;
+ *at += x;
+ return r;
#else
# error No atomics on this platform.
#endif
@@ -272,6 +284,8 @@
return a->compare_and_swap (newval, compareval) == newval;
#elif defined(_MSC_VER)
return (_InterlockedCompareExchange ((volatile LONG *)at, newval, compareval) == compareval);
+#elif defined(__powerpc__)
+ return ((*at == compareval) ? (*at = newval), 1 : 0);
#else
# error No atomics on this platform.
#endif
@@ -289,6 +303,8 @@
return a->compare_and_swap (newval, compareval) == newval;
#elif defined(_MSC_VER)
return (_InterlockedCompareExchange64 ((volatile LONGLONG *)at, newval, compareval) == compareval);
+#elif defined(__PPC__)
+ return ((*at == compareval) ? (*at = newval), 1 : 0);
#else
# error No atomics on this platform.
#endif

View File

@ -1,260 +0,0 @@
From c8e9e15f8e51a3e0f2e690c642b6b4a4e3edc8d4 Mon Sep 17 00:00:00 2001
From: Larry Gritz <lg@larrygritz.com>
Date: Tue, 20 May 2014 12:06:25 -0700
Subject: [PATCH 1/4] Better handling of stdint.h and defines.
Try more ways to ensure that __STDC_LIMIT_MACROS is defined before we
include stdint.h. And, when we really need its defines, if they didn't
come through, try to give a clear error message.
---
CMakeLists.txt | 2 ++
src/include/OpenImageIO/fmath.h | 5 ++++-
src/include/OpenImageIO/image_view.h | 17 +++++++++++++----
3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ed4665e..8bc96a8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -69,6 +69,8 @@ if (CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNUCC)
# CMake doesn't automatically know what do do with
# include_directories(SYSTEM...) when using clang or gcc.
set (CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ")
+ # Ensure this macro is set for stdint.h
+ add_definitions ("-D__STDC_LIMIT_MACROS")
endif ()
if (CMAKE_COMPILER_IS_CLANG)
diff --git a/src/include/OpenImageIO/fmath.h b/src/include/OpenImageIO/fmath.h
index 33b90b3..367df8a 100644
--- a/src/include/OpenImageIO/fmath.h
+++ b/src/include/OpenImageIO/fmath.h
@@ -61,7 +61,10 @@
# define _UINT64_T
# endif
#else
-# include <stdint.h>
+# ifndef __STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS /* needed for some defs in stdint.h */
+# endif
+# include <stdint.h>
#endif
#if defined(__FreeBSD__)
diff --git a/src/include/OpenImageIO/image_view.h b/src/include/OpenImageIO/image_view.h
index cffa0e1..981eb52 100644
--- a/src/include/OpenImageIO/image_view.h
+++ b/src/include/OpenImageIO/image_view.h
@@ -32,13 +32,22 @@
#pragma once
-#ifndef __STDC_LIMIT_MACROS
-# define __STDC_LIMIT_MACROS /* needed for some defs in stdint.h */
-#endif
-
#include <vector>
#include <stdexcept>
+
+// We're including stdint.h to get int64_t and INT64_MIN. But on some
+// platforms, stdint.h only defines them if __STDC_LIMIT_MACROS is defined,
+// so we do so. But, oops, if user code included stdint.h before this file,
+// and without defining the macro, it may have had ints one and only include
+// and not seen the definitions we need, so at least try to make a helpful
+// compile-time error in that case.
+#ifndef __STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS /* needed for some defs in stdint.h */
+#endif
#include <stdint.h>
+#if ! defined(INT64_MIN)
+# error You must define __STDC_LIMIT_MACROS prior to including stdint.h
+#endif
#include "oiioversion.h"
#include "strided_ptr.h"
--
1.9.3
From 338f58ac9433dc2c064c4cfe840f51809abe68d3 Mon Sep 17 00:00:00 2001
From: Larry Gritz <lg@larrygritz.com>
Date: Tue, 20 May 2014 12:54:10 -0700
Subject: [PATCH 2/4] Improve warning suppression for recent gcc
---
CMakeLists.txt | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8bc96a8..509e95c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -82,11 +82,14 @@ if (CMAKE_COMPILER_IS_CLANG)
add_definitions ("-Wunused-private-field")
# disable warning about unused command line arguments
add_definitions ("-Qunused-arguments")
+ # Don't warn if we ask it not to warn about warnings it doesn't know
+ add_definitions ("-Wunknown-warning-option")
endif ()
-if (CMAKE_COMPILER_IS_GNUCC AND (NOT ${GCC_VERSION} VERSION_LESS 4.8))
+if (CMAKE_COMPILER_IS_GNUCC AND (NOT CMAKE_COMPILER_IS_CLANG) AND (NOT ${GCC_VERSION} VERSION_LESS 4.8))
# suppress a warning that Boost::Python hits in g++ 4.8
add_definitions ("-Wno-error=unused-local-typedefs")
+ add_definitions ("-Wunused-local-typedefs")
endif ()
if (CMAKE_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNUCC)
--
1.9.3
From 1e086bcbc491c9bd2f26cf6f260ef5696e6c1af1 Mon Sep 17 00:00:00 2001
From: Larry Gritz <lg@larrygritz.com>
Date: Tue, 20 May 2014 14:37:56 -0700
Subject: [PATCH 3/4] SPI compiler diddling
---
site/spi/Makefile-bits-arnold | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/site/spi/Makefile-bits-arnold b/site/spi/Makefile-bits-arnold
index dfd70e1..422fb35 100644
--- a/site/spi/Makefile-bits-arnold
+++ b/site/spi/Makefile-bits-arnold
@@ -67,15 +67,25 @@ ifeq ($(SP_OS), spinux1)
endif
ifeq (${COMPILER}, gcc463)
- MY_CMAKE_FLAGS += \
+ MY_CMAKE_FLAGS += \
-DCMAKE_C_COMPILER=/net/soft_scratch/apps/arnold/tools/gcc-4.6.3-test/bin/gcc \
-DCMAKE_CXX_COMPILER=/net/soft_scratch/apps/arnold/tools/gcc-4.6.3-test/bin/g++
endif
ifeq (${COMPILER}, gcc470)
- MY_CMAKE_FLAGS += \
+ MY_CMAKE_FLAGS += \
-DCMAKE_C_COMPILER=/net/soft_scratch/apps/arnold/tools/gcc-4.7.0-test/bin/gcc \
-DCMAKE_CXX_COMPILER=/net/soft_scratch/apps/arnold/tools/gcc-4.7.0-test/bin/g++
endif
+ ifeq (${COMPILER}, gcc472)
+ MY_CMAKE_FLAGS += \
+ -DCMAKE_C_COMPILER=/net/soft_scratch/apps/arnold/tools/gcc-4.7.2-test/bin/gcc \
+ -DCMAKE_CXX_COMPILER=/net/soft_scratch/apps/arnold/tools/gcc-4.7.2-test/bin/g++
+ endif
+ ifeq (${COMPILER}, gcc490)
+ MY_CMAKE_FLAGS += \
+ -DCMAKE_C_COMPILER=/net/soft_scratch/apps/arnold/tools/gcc-4.9-20130512-test/bin/gcc \
+ -DCMAKE_CXX_COMPILER=/net/soft_scratch/apps/arnold/tools/gcc-4.9-20130512-test/bin/g++
+ endif
ifneq (,$(wildcard /usr/include/OpenEXR2))
MY_CMAKE_FLAGS += \
--
1.9.3
From 39c28a09702f1726061f917be99f7ec22b12e39a Mon Sep 17 00:00:00 2001
From: Larry Gritz <lg@larrygritz.com>
Date: Tue, 20 May 2014 14:47:46 -0700
Subject: [PATCH 4/4] Fix confusion of stride_t vs ptrdiff_t for platforms
where they're differen
---
src/include/OpenImageIO/array_view.h | 12 ++++++------
src/include/OpenImageIO/image_view.h | 18 +++++++++---------
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/src/include/OpenImageIO/array_view.h b/src/include/OpenImageIO/array_view.h
index 0b9e18c..ffa6ee9 100644
--- a/src/include/OpenImageIO/array_view.h
+++ b/src/include/OpenImageIO/array_view.h
@@ -223,7 +223,7 @@ class array_view_strided {
array_view_strided (T *data, size_t len) { init(data,len); }
/// Construct from T*, length, and stride (in bytes).
- array_view_strided (T *data, size_t len, ptrdiff_t stride) {
+ array_view_strided (T *data, size_t len, stride_t stride) {
init(data,len,stride);
}
@@ -263,7 +263,7 @@ class array_view_strided {
size_type size() const { return m_len; }
size_type max_size() const { return m_len; }
bool empty() const { return m_len == 0; }
- ptrdiff_t stride() const { return m_stride; }
+ stride_t stride() const { return m_stride; }
const T& operator[] (size_type pos) const { return get(pos); }
const T& at (size_t pos) const {
@@ -310,17 +310,17 @@ class array_view_strided {
private:
T * m_data;
size_t m_len;
- ptrdiff_t m_stride;
+ stride_t m_stride;
- void init (T *data, size_t len, ptrdiff_t stride=AutoStride) {
+ void init (T *data, size_t len, stride_t stride=AutoStride) {
m_data = data;
m_len = len;
m_stride = stride == AutoStride ? sizeof(T) : stride;
}
- inline T* getptr (ptrdiff_t pos=0) const {
+ inline T* getptr (stride_t pos=0) const {
return (T*)((char *)m_data + pos*m_stride);
}
- inline T& get (ptrdiff_t pos=0) const {
+ inline T& get (stride_t pos=0) const {
return *getptr(pos);
}
diff --git a/src/include/OpenImageIO/image_view.h b/src/include/OpenImageIO/image_view.h
index 981eb52..efdcbb2 100644
--- a/src/include/OpenImageIO/image_view.h
+++ b/src/include/OpenImageIO/image_view.h
@@ -83,8 +83,8 @@ class image_view {
/// bytes).
image_view (T *data, int nchannels,
int width, int height, int depth=1,
- ptrdiff_t chanstride=AutoStride, ptrdiff_t xstride=AutoStride,
- ptrdiff_t ystride=AutoStride, ptrdiff_t zstride=AutoStride) {
+ stride_t chanstride=AutoStride, stride_t xstride=AutoStride,
+ stride_t ystride=AutoStride, stride_t zstride=AutoStride) {
init (data, nchannels, width, height, depth,
chanstride, xstride, ystride, zstride);
}
@@ -110,10 +110,10 @@ class image_view {
int height() const { return m_height; }
int depth() const { return m_depth; }
- ptrdiff_t chanstride() const { return m_chanstride; }
- ptrdiff_t xstride() const { return m_xstride; }
- ptrdiff_t ystride() const { return m_ystride; }
- ptrdiff_t zstride() const { return m_zstride; }
+ stride_t chanstride() const { return m_chanstride; }
+ stride_t xstride() const { return m_xstride; }
+ stride_t ystride() const { return m_ystride; }
+ stride_t zstride() const { return m_zstride; }
const T* data() const { return m_data; }
@@ -122,12 +122,12 @@ class image_view {
private:
const T * m_data;
int m_nchannels, m_width, m_height, m_depth;
- ptrdiff_t m_chanstride, m_xstride, m_ystride, m_zstride;
+ stride_t m_chanstride, m_xstride, m_ystride, m_zstride;
void init (T *data, int nchannels,
int width, int height, int depth=1,
- ptrdiff_t chanstride=AutoStride, ptrdiff_t xstride=AutoStride,
- ptrdiff_t ystride=AutoStride, ptrdiff_t zstride=AutoStride) {
+ stride_t chanstride=AutoStride, stride_t xstride=AutoStride,
+ stride_t ystride=AutoStride, stride_t zstride=AutoStride) {
m_data = data;
m_nchannels = nchannels;
m_width = width; m_height = height; m_depth = depth;
--
1.9.3

View File

@ -1,12 +0,0 @@
diff -up oiio-Release-1.1.10/src/include/thread.h.s390 oiio-Release-1.1.10/src/include/thread.h
--- oiio-Release-1.1.10/src/include/thread.h.s390 2013-05-20 11:23:40.000000000 +0200
+++ oiio-Release-1.1.10/src/include/thread.h 2013-05-20 11:24:06.000000000 +0200
@@ -326,7 +326,7 @@ pause (int delay)
{
#if defined(__GNUC__)
for (int i = 0; i < delay; ++i) {
-#if defined __arm__
+#if defined __arm__ || defined __s390__
__asm__ __volatile__("NOP;");
#else
__asm__ __volatile__("pause;");

View File

@ -1,12 +0,0 @@
diff -Naur oiio-Release-1.4.7.orig/src/dpx.imageio/libdpx/Writer.cpp oiio-Release-1.4.7/src/dpx.imageio/libdpx/Writer.cpp
--- oiio-Release-1.4.7.orig/src/dpx.imageio/libdpx/Writer.cpp 2014-05-19 15:20:32.000000000 -0500
+++ oiio-Release-1.4.7/src/dpx.imageio/libdpx/Writer.cpp 2014-05-20 07:04:17.940464785 -0500
@@ -140,7 +140,7 @@
bool dpx::Writer::WriteUserData(void *data)
{
- long size = this->header.UserSize();
+ size_t size = this->header.UserSize();
if (fd->Write(data, size) != size)
return false;
this->fileLoc += size;

View File

@ -1 +1 @@
098ed75608f4c0e20370b788280c8a26 oiio-Release-1.4.7.tar.gz
c75343cb9a4e0373f80a20d9b3b2d799 oiio-Release-1.4.12.tar.gz