Update to latest upstream release.
This commit is contained in:
parent
a6786cf0bc
commit
fdddaa9e48
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@
|
||||
/OpenImageIO-oiio-Release-0.10.2-0-g7a6cba8.tar.gz
|
||||
/OpenImageIO-oiio-Release-0.10.3-0-ge93cd33.tar.gz
|
||||
/OpenImageIO-oiio-Release-0.10.4-0-gad1950d.tar.gz
|
||||
/OpenImageIO-oiio-Release-1.0.0-0-g5b37f1c.tar.gz
|
||||
|
@ -1,119 +0,0 @@
|
||||
diff --git a/src/include/thread.h b/src/include/thread.h
|
||||
index 2303c3e..039a98d 100644
|
||||
--- a/src/include/thread.h
|
||||
+++ b/src/include/thread.h
|
||||
@@ -87,9 +87,15 @@
|
||||
# include <tbb/spin_mutex.h>
|
||||
#endif
|
||||
|
||||
-#ifdef _WIN32
|
||||
+#if defined(_WIN32) && !USE_TBB
|
||||
# include <windows.h>
|
||||
# include <winbase.h>
|
||||
+# pragma intrinsic (_InterlockedExchangeAdd)
|
||||
+# pragma intrinsic (_InterlockedCompareExchange)
|
||||
+# pragma intrinsic (_InterlockedCompareExchange64)
|
||||
+# if defined(_WIN64)
|
||||
+# pragma intrinsic(_InterlockedExchangeAdd64)
|
||||
+# endif
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
@@ -250,7 +256,7 @@ private:
|
||||
inline int
|
||||
atomic_exchange_and_add (volatile int *at, int x)
|
||||
{
|
||||
-#if defined(__GNUC__) && defined(_GLIBCXX_ATOMIC_BUILTINS)
|
||||
+#if defined(__GNUC__) && (defined(_GLIBCXX_ATOMIC_BUILTINS) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 401))
|
||||
return __sync_fetch_and_add ((int *)at, x);
|
||||
#elif USE_TBB
|
||||
atomic<int> *a = (atomic<int> *)at;
|
||||
@@ -260,9 +266,9 @@ atomic_exchange_and_add (volatile int *at, int x)
|
||||
return OSAtomicAdd32Barrier (x, at) - x;
|
||||
#elif defined(_WIN32)
|
||||
// Windows
|
||||
- return InterlockedExchangeAdd ((volatile LONG *)at, x);
|
||||
+ return _InterlockedExchangeAdd ((volatile LONG *)at, x);
|
||||
#else
|
||||
- error ("No atomics on this platform.")
|
||||
+# error No atomics on this platform.
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -271,7 +277,7 @@ atomic_exchange_and_add (volatile int *at, int x)
|
||||
inline long long
|
||||
atomic_exchange_and_add (volatile long long *at, long long x)
|
||||
{
|
||||
-#if defined(__GNUC__) && defined(_GLIBCXX_ATOMIC_BUILTINS)
|
||||
+#if defined(__GNUC__) && (defined(_GLIBCXX_ATOMIC_BUILTINS) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 401))
|
||||
return __sync_fetch_and_add (at, x);
|
||||
#elif USE_TBB
|
||||
atomic<long long> *a = (atomic<long long> *)at;
|
||||
@@ -281,9 +287,13 @@ atomic_exchange_and_add (volatile long long *at, long long x)
|
||||
return OSAtomicAdd64Barrier (x, at) - x;
|
||||
#elif defined(_WIN32)
|
||||
// Windows
|
||||
+# if defined(_WIN64)
|
||||
+ return _InterlockedExchangeAdd64 ((volatile LONGLONG *)at, x);
|
||||
+# else
|
||||
return InterlockedExchangeAdd64 ((volatile LONGLONG *)at, x);
|
||||
+# endif
|
||||
#else
|
||||
- error ("No atomics on this platform.")
|
||||
+# error No atomics on this platform.
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -298,7 +308,7 @@ atomic_exchange_and_add (volatile long long *at, long long x)
|
||||
inline bool
|
||||
atomic_compare_and_exchange (volatile int *at, int compareval, int newval)
|
||||
{
|
||||
-#if defined(__GNUC__) && defined(_GLIBCXX_ATOMIC_BUILTINS)
|
||||
+#if defined(__GNUC__) && (defined(_GLIBCXX_ATOMIC_BUILTINS) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 401))
|
||||
return __sync_bool_compare_and_swap (at, compareval, newval);
|
||||
#elif USE_TBB
|
||||
atomic<int> *a = (atomic<int> *)at;
|
||||
@@ -306,9 +316,9 @@ atomic_compare_and_exchange (volatile int *at, int compareval, int newval)
|
||||
#elif defined(__APPLE__)
|
||||
return OSAtomicCompareAndSwap32Barrier (compareval, newval, at);
|
||||
#elif defined(_WIN32)
|
||||
- return (InterlockedCompareExchange ((volatile LONG *)at, newval, compareval) == compareval);
|
||||
+ return (_InterlockedCompareExchange ((volatile LONG *)at, newval, compareval) == compareval);
|
||||
#else
|
||||
- error ("No atomics on this platform.")
|
||||
+# error No atomics on this platform.
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -317,7 +327,7 @@ atomic_compare_and_exchange (volatile int *at, int compareval, int newval)
|
||||
inline bool
|
||||
atomic_compare_and_exchange (volatile long long *at, long long compareval, long long newval)
|
||||
{
|
||||
-#if defined(__GNUC__) && defined(_GLIBCXX_ATOMIC_BUILTINS)
|
||||
+#if defined(__GNUC__) && (defined(_GLIBCXX_ATOMIC_BUILTINS) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 401))
|
||||
return __sync_bool_compare_and_swap (at, compareval, newval);
|
||||
#elif USE_TBB
|
||||
atomic<long long> *a = (atomic<long long> *)at;
|
||||
@@ -325,9 +335,9 @@ atomic_compare_and_exchange (volatile long long *at, long long compareval, long
|
||||
#elif defined(__APPLE__)
|
||||
return OSAtomicCompareAndSwap64Barrier (compareval, newval, at);
|
||||
#elif defined(_WIN32)
|
||||
- return (InterlockedCompareExchange64 ((volatile LONGLONG *)at, newval, compareval) == compareval);
|
||||
+ return (_InterlockedCompareExchange64 ((volatile LONGLONG *)at, newval, compareval) == compareval);
|
||||
#else
|
||||
- error ("No atomics on this platform.")
|
||||
+# error No atomics on this platform.
|
||||
#endif
|
||||
}
|
||||
|
||||
diff --git a/src/maketx/CMakeLists.txt b/src/maketx/CMakeLists.txt
|
||||
index c465960..5c408d8 100644
|
||||
--- a/src/maketx/CMakeLists.txt
|
||||
+++ b/src/maketx/CMakeLists.txt
|
||||
@@ -1,3 +1,6 @@
|
||||
+if (NOT USE_TBB)
|
||||
+ add_definitions ("-DUSE_TBB=0")
|
||||
+endif ()
|
||||
set (maketx_srcs maketx.cpp)
|
||||
add_executable (maketx ${maketx_srcs})
|
||||
link_ilmbase (maketx)
|
@ -1,11 +0,0 @@
|
||||
diff -Naur OpenImageIO-oiio-1c4030e.orig/src/ico.imageio/icooutput.cpp OpenImageIO-oiio-1c4030e/src/ico.imageio/icooutput.cpp
|
||||
--- OpenImageIO-oiio-1c4030e.orig/src/ico.imageio/icooutput.cpp 2011-08-06 12:56:10.000000000 -0500
|
||||
+++ OpenImageIO-oiio-1c4030e/src/ico.imageio/icooutput.cpp 2011-11-05 14:29:27.850429691 -0500
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cmath>
|
||||
+#include <zlib.h>
|
||||
|
||||
#include "ico.h"
|
||||
#include "../png.imageio/png_pvt.h"
|
@ -1,379 +0,0 @@
|
||||
diff -up OpenImageIO-oiio-1c4030e/Makefile.backport OpenImageIO-oiio-1c4030e/Makefile
|
||||
--- OpenImageIO-oiio-1c4030e/Makefile.backport 2011-08-06 13:56:10.000000000 -0400
|
||||
+++ OpenImageIO-oiio-1c4030e/Makefile 2011-08-27 09:26:48.255906794 -0400
|
||||
@@ -27,7 +27,7 @@ ifdef PROFILE
|
||||
endif
|
||||
|
||||
MY_MAKE_FLAGS ?=
|
||||
-MY_CMAKE_FLAGS ?=
|
||||
+MY_CMAKE_FLAGS ?= -DSELF_CONTAINED_INSTALL_TREE:BOOL=TRUE
|
||||
|
||||
# Site-specific build instructions
|
||||
ifndef OPENIMAGEIO_SITE
|
||||
diff -up OpenImageIO-oiio-1c4030e/src/cmake/externalpackages.cmake.backport OpenImageIO-oiio-1c4030e/src/cmake/externalpackages.cmake
|
||||
--- OpenImageIO-oiio-1c4030e/src/cmake/externalpackages.cmake.backport 2011-08-06 13:56:10.000000000 -0400
|
||||
+++ OpenImageIO-oiio-1c4030e/src/cmake/externalpackages.cmake 2011-08-27 09:26:48.255906794 -0400
|
||||
@@ -237,3 +237,15 @@ endif ()
|
||||
# end Field3d setup
|
||||
###########################################################################
|
||||
|
||||
+###########################################################################
|
||||
+# Pugixml setup. Normally we just use the version bundled with oiio, but
|
||||
+# some linux distros are quite particular about having separate packages so we
|
||||
+# allow this to be overridden to use the distro-provided package if desired.
|
||||
+if (USE_EXTERNAL_PUGIXML)
|
||||
+ find_package (PugiXML REQUIRED)
|
||||
+ # insert include path to pugixml first, to ensure that the external
|
||||
+ # pugixml is found, and not the one in OIIO's include directory.
|
||||
+ include_directories (BEFORE ${PUGIXML_INCLUDE_DIR})
|
||||
+endif()
|
||||
+
|
||||
+###########################################################################
|
||||
diff -up OpenImageIO-oiio-1c4030e/src/CMakeLists.txt.backport OpenImageIO-oiio-1c4030e/src/CMakeLists.txt
|
||||
--- OpenImageIO-oiio-1c4030e/src/CMakeLists.txt.backport 2011-08-06 13:56:10.000000000 -0400
|
||||
+++ OpenImageIO-oiio-1c4030e/src/CMakeLists.txt 2011-08-27 09:26:48.256906780 -0400
|
||||
@@ -29,13 +29,11 @@ set (USE_FIELD3D ON CACHE BOOL "Use Fiel
|
||||
set (USE_JASPER ON CACHE BOOL "Use Jasper for JPEG-2000 if found")
|
||||
set (NOTHREADS OFF CACHE BOOL "Compile with no threads or locking")
|
||||
set (PYTHON_VERSION 2.6)
|
||||
+set (USE_EXTERNAL_PUGIXML OFF CACHE BOOL
|
||||
+ "Use an externally built shared library version of the pugixml library")
|
||||
|
||||
-if (NOT SOVERSION)
|
||||
- set (SOVERSION ${OIIO_VERSION_MAJOR} CACHE STRING "Set the SO version in the SO name of the output library")
|
||||
-endif ()
|
||||
-if (NOT ${SOVERSION} STREQUAL ${OIIO_VERSION_MAJOR})
|
||||
- set (OIIO_VERSION_MAJOR ${SOVERSION})
|
||||
-endif ()
|
||||
+set (SOVERSION ${OIIO_VERSION_MAJOR}.${OIIO_VERSION_MINOR}
|
||||
+ CACHE STRING "Set the SO version in the SO name of the output library")
|
||||
|
||||
if (NOTHREADS)
|
||||
message (STATUS "NO THREADS!")
|
||||
@@ -89,19 +87,61 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
add_definitions ("-DDEBUG=1")
|
||||
endif ()
|
||||
|
||||
-# Exec Install Locations
|
||||
-set (BINDIR "${CMAKE_INSTALL_PREFIX}/bin")
|
||||
-set (LIBDIR "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
-set (PYLIBDIR "${CMAKE_INSTALL_PREFIX}/python")
|
||||
-if (EXEC_INSTALL_PREFIX)
|
||||
- set (BINDIR "${EXEC_INSTALL_PREFIX}/bin")
|
||||
- set (LIBDIR "${EXEC_INSTALL_PREFIX}/lib")
|
||||
- set (PYLIBDIR "${EXEC_INSTALL_PREFIX}/python")
|
||||
+###########################################################################
|
||||
+# Paths for install tree customization. Note that relative paths are relative
|
||||
+# to CMAKE_INSTALL_PREFIX.
|
||||
+set (DEFAULT_BIN_INSTALL_DIR "bin")
|
||||
+set (DEFAULT_LIB_INSTALL_DIR "lib")
|
||||
+set (DEFAULT_INCLUDE_INSTALL_DIR "include/OpenImageIO")
|
||||
+if (UNIX AND NOT SELF_CONTAINED_INSTALL_TREE)
|
||||
+ # Try to be well-behaved and install into reasonable places according to
|
||||
+ # the "standard" unix directory heirarchy
|
||||
+ # TODO: Figure out how to get the correct python directory
|
||||
+ set (DEFAULT_PYLIB_INSTALL_DIR "lib/python/site-packages")
|
||||
+ set (DEFAULT_DOC_INSTALL_DIR "share/doc/openimageio")
|
||||
+ set (DEFAULT_MAN_INSTALL_DIR "share/man/man1")
|
||||
+else ()
|
||||
+ # Here is the "self-contained install tree" case: the expectation here is
|
||||
+ # that everything OIIO related will go into its own directory, not into
|
||||
+ # some standard system heirarchy.
|
||||
+ set (DEFAULT_PYLIB_INSTALL_DIR "python")
|
||||
+ set (DEFAULT_DOC_INSTALL_DIR "doc")
|
||||
+ set (DEFAULT_MAN_INSTALL_DIR "doc/man")
|
||||
endif ()
|
||||
+if (EXEC_INSTALL_PREFIX)
|
||||
+ # Tack on an extra prefix to support multi-arch builds.
|
||||
+ set (DEFAULT_BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/${DEFAULT_BIN_INSTALL_DIR}")
|
||||
+ set (DEFAULT_LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/${DEFAULT_LIB_INSTALL_DIR}")
|
||||
+ set (DEFAULT_PYLIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/${DEFAULT_PYLIB_INSTALL_DIR}")
|
||||
+endif ()
|
||||
+# Set up cmake cache variables corresponding to the defaults deduced above, so
|
||||
+# that the user can override them as desired:
|
||||
+set (BIN_INSTALL_DIR ${DEFAULT_BIN_INSTALL_DIR} CACHE STRING
|
||||
+ "Install location for binaries (relative to CMAKE_INSTALL_PREFIX or absolute)")
|
||||
+set (LIB_INSTALL_DIR ${DEFAULT_LIB_INSTALL_DIR} CACHE STRING
|
||||
+ "Install location for libraries (relative to CMAKE_INSTALL_PREFIX or absolute)")
|
||||
+set (PYLIB_INSTALL_DIR ${DEFAULT_PYLIB_INSTALL_DIR} CACHE STRING
|
||||
+ "Install location for python libraries (relative to CMAKE_INSTALL_PREFIX or absolute)")
|
||||
+set (INCLUDE_INSTALL_DIR ${DEFAULT_INCLUDE_INSTALL_DIR} CACHE STRING
|
||||
+ "Install location of header files (relative to CMAKE_INSTALL_PREFIX or absolute)")
|
||||
+set (DOC_INSTALL_DIR ${DEFAULT_DOC_INSTALL_DIR} CACHE STRING
|
||||
+ "Install location for documentation (relative to CMAKE_INSTALL_PREFIX or absolute)")
|
||||
+if (UNIX)
|
||||
+ set (MAN_INSTALL_DIR ${DEFAULT_MAN_INSTALL_DIR} CACHE STRING
|
||||
+ "Install location for manual pages (relative to CMAKE_INSTALL_PREFIX or absolute)")
|
||||
+endif()
|
||||
+
|
||||
+set (INSTALL_DOCS ON CACHE BOOL "Install documentation")
|
||||
+
|
||||
|
||||
-set (CMAKE_INSTALL_RPATH "${LIBDIR}")
|
||||
+#####
|
||||
+set (CMAKE_INSTALL_RPATH "${LIB_INSTALL_DIR}")
|
||||
+if (NOT IS_ABSOLUTE ${CMAKE_INSTALL_RPATH})
|
||||
+ set (CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
|
||||
+endif ()
|
||||
set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
||||
+
|
||||
###########################################################################
|
||||
if (MSVC)
|
||||
add_definitions (-D_CRT_SECURE_NO_DEPRECATE)
|
||||
diff -up OpenImageIO-oiio-1c4030e/src/cmake/modules/FindPugiXML.cmake.backport OpenImageIO-oiio-1c4030e/src/cmake/modules/FindPugiXML.cmake
|
||||
--- OpenImageIO-oiio-1c4030e/src/cmake/modules/FindPugiXML.cmake.backport 2011-08-27 09:26:48.255906794 -0400
|
||||
+++ OpenImageIO-oiio-1c4030e/src/cmake/modules/FindPugiXML.cmake 2011-08-27 09:26:48.255906794 -0400
|
||||
@@ -0,0 +1,21 @@
|
||||
+# Find the pugixml XML parsing library.
|
||||
+#
|
||||
+# Sets the usual variables expected for find_package scripts:
|
||||
+#
|
||||
+# PUGIXML_INCLUDE_DIR - header location
|
||||
+# PUGIXML_LIBRARIES - library to link against
|
||||
+# PUGIXML_FOUND - true if pugixml was found.
|
||||
+
|
||||
+find_path (PUGIXML_INCLUDE_DIR pugixml.hpp)
|
||||
+find_library (PUGIXML_LIBRARY NAMES pugixml)
|
||||
+
|
||||
+# Support the REQUIRED and QUIET arguments, and set PUGIXML_FOUND if found.
|
||||
+include (FindPackageHandleStandardArgs)
|
||||
+FIND_PACKAGE_HANDLE_STANDARD_ARGS (PugiXML DEFAULT_MSG PUGIXML_LIBRARY
|
||||
+ PUGIXML_INCLUDE_DIR)
|
||||
+
|
||||
+if (PUGIXML_FOUND)
|
||||
+ set (PUGIXML_LIBRARIES ${PUGIXML_LIBRARY})
|
||||
+endif()
|
||||
+
|
||||
+mark_as_advanced (PUGIXML_LIBRARY PUGIXML_INCLUDE_DIR)
|
||||
diff -up OpenImageIO-oiio-1c4030e/src/cmake/oiio_macros.cmake.backport OpenImageIO-oiio-1c4030e/src/cmake/oiio_macros.cmake
|
||||
--- OpenImageIO-oiio-1c4030e/src/cmake/oiio_macros.cmake.backport 2011-08-06 13:56:10.000000000 -0400
|
||||
+++ OpenImageIO-oiio-1c4030e/src/cmake/oiio_macros.cmake 2011-08-27 09:26:48.256906780 -0400
|
||||
@@ -7,9 +7,9 @@
|
||||
#
|
||||
macro (oiio_install_targets)
|
||||
install (TARGETS ${ARGN}
|
||||
- RUNTIME DESTINATION "${BINDIR}" COMPONENT user
|
||||
- LIBRARY DESTINATION "${LIBDIR}" COMPONENT user
|
||||
- ARCHIVE DESTINATION "${LIBDIR}" COMPONENT developer)
|
||||
+ RUNTIME DESTINATION "${BIN_INSTALL_DIR}" COMPONENT user
|
||||
+ LIBRARY DESTINATION "${LIB_INSTALL_DIR}" COMPONENT user
|
||||
+ ARCHIVE DESTINATION "${LIB_INSTALL_DIR}" COMPONENT developer)
|
||||
endmacro ()
|
||||
|
||||
# Macro to add a build target for an IO plugin.
|
||||
diff -up OpenImageIO-oiio-1c4030e/src/doc/CMakeLists.txt.backport OpenImageIO-oiio-1c4030e/src/doc/CMakeLists.txt
|
||||
--- OpenImageIO-oiio-1c4030e/src/doc/CMakeLists.txt.backport 2011-08-06 13:56:10.000000000 -0400
|
||||
+++ OpenImageIO-oiio-1c4030e/src/doc/CMakeLists.txt 2011-08-27 09:28:40.225349570 -0400
|
||||
@@ -1,11 +1,38 @@
|
||||
-set (public_docs openimageio.pdf CLA-INDIVIDUAL CLA-CORPORATE)
|
||||
+project(documentation)
|
||||
|
||||
-install (FILES ${public_docs} DESTINATION doc COMPONENT documentation)
|
||||
+set (public_docs
|
||||
+ openimageio.pdf
|
||||
+ ${OpenImageIO_SOURCE_DIR}/../LICENSE
|
||||
+ ${OpenImageIO_SOURCE_DIR}/../CHANGES
|
||||
+)
|
||||
|
||||
-install (FILES ${PROJECT_SOURCE_DIR}/../LICENSE
|
||||
- ${PROJECT_SOURCE_DIR}/../INSTALL
|
||||
- ${PROJECT_SOURCE_DIR}/../CHANGES
|
||||
- DESTINATION .)
|
||||
+if (INSTALL_DOCS)
|
||||
+ install (FILES ${public_docs} DESTINATION doc COMPONENT documentation)
|
||||
+endif ()
|
||||
|
||||
-#install (DIRECTORY doxygen/html DESTINATION doc
|
||||
-# PATTERN .svn EXCLUDE)
|
||||
+# generate man pages using txt2man and a tiny python script to munge the
|
||||
+# result of "$tool --help"
|
||||
+find_program(TXT2MAN txt2man)
|
||||
+find_package(PythonInterp)
|
||||
+if (UNIX AND TXT2MAN AND PYTHONINTERP_FOUND)
|
||||
+ message (STATUS "Unix man page documentation will be generated")
|
||||
+ set (cli_tools iinfo maketx idiff iv igrep iprocess iconvert)
|
||||
+
|
||||
+ foreach (tool ${cli_tools})
|
||||
+ set (outfile "${documentation_BINARY_DIR}/${tool}.1")
|
||||
+ list (APPEND manpage_files ${outfile})
|
||||
+ add_custom_command (OUTPUT ${outfile}
|
||||
+ COMMAND ${tool} --help |
|
||||
+ ${PYTHON_EXECUTABLE} ${documentation_SOURCE_DIR}/help2man_preformat.py |
|
||||
+ ${TXT2MAN} -v OpenImageIO -s 1 -t ${tool} > ${outfile}
|
||||
+ DEPENDS ${tool} help2man_preformat.py)
|
||||
+ endforeach()
|
||||
+
|
||||
+ # force man page build before install
|
||||
+ add_custom_target (man_pages ALL DEPENDS ${manpage_files})
|
||||
+
|
||||
+ if (INSTALL_DOCS)
|
||||
+ install (FILES ${manpage_files}
|
||||
+ DESTINATION ${MAN_INSTALL_DIR} COMPONENT documentation)
|
||||
+ endif ()
|
||||
+endif()
|
||||
diff -up OpenImageIO-oiio-1c4030e/src/doc/help2man_preformat.py.backport OpenImageIO-oiio-1c4030e/src/doc/help2man_preformat.py
|
||||
--- OpenImageIO-oiio-1c4030e/src/doc/help2man_preformat.py.backport 2011-08-27 09:26:48.257906766 -0400
|
||||
+++ OpenImageIO-oiio-1c4030e/src/doc/help2man_preformat.py 2011-08-27 09:26:48.257906766 -0400
|
||||
@@ -0,0 +1,35 @@
|
||||
+#!/usr/bin/python
|
||||
+
|
||||
+from __future__ import print_function
|
||||
+import sys
|
||||
+
|
||||
+lines = [l.rstrip().replace('\t', ' '*8) for l in sys.stdin.readlines()]
|
||||
+
|
||||
+print('TITLE')
|
||||
+print(lines[0])
|
||||
+print()
|
||||
+
|
||||
+print('SYNOPSIS')
|
||||
+for i,line in enumerate(lines[2:]):
|
||||
+ if line.lstrip().startswith('-'):
|
||||
+ optStart = i+2
|
||||
+ break
|
||||
+ print(line)
|
||||
+
|
||||
+print('''DESCRIPTION
|
||||
+This program is part of the OpenImageIO (http://www.openimageio.org) tool suite.
|
||||
+Detailed documentation is avaliable in pdf format with the OpenImageIO
|
||||
+distribution.
|
||||
+''')
|
||||
+
|
||||
+print('OPTIONS')
|
||||
+for line in lines[optStart:]:
|
||||
+ if not line.startswith(' '):
|
||||
+ print()
|
||||
+ print(line)
|
||||
+ elif not line.lstrip().startswith('-'):
|
||||
+ print(line.lstrip())
|
||||
+ else:
|
||||
+ print(line)
|
||||
+print()
|
||||
+
|
||||
diff -up OpenImageIO-oiio-1c4030e/src/include/CMakeLists.txt.backport OpenImageIO-oiio-1c4030e/src/include/CMakeLists.txt
|
||||
--- OpenImageIO-oiio-1c4030e/src/include/CMakeLists.txt.backport 2011-08-06 13:56:10.000000000 -0400
|
||||
+++ OpenImageIO-oiio-1c4030e/src/include/CMakeLists.txt 2011-08-27 09:26:48.257906766 -0400
|
||||
@@ -4,22 +4,26 @@ set (public_headers argparse.h dassert.h
|
||||
imagecache.h imageio.h osdep.h paramlist.h
|
||||
refcnt.h strutil.h sysutil.h texture.h thread.h timer.h
|
||||
typedesc.h ustring.h varyingref.h
|
||||
- colortransfer.h pugixml.hpp pugiconfig.hpp
|
||||
+ colortransfer.h
|
||||
)
|
||||
|
||||
+if (NOT USE_EXTERNAL_PUGIXML)
|
||||
+ list (APPEND public_headers pugixml.hpp pugiconfig.hpp)
|
||||
+endif ()
|
||||
+
|
||||
message(STATUS "Create version.h from version.h.in")
|
||||
+# Mangle the SOVERSION so that it's a valid C++ identifier for the versioning
|
||||
+# namespace defined in version.h
|
||||
+string (REGEX REPLACE "\\." "_" MANGLED_SOVERSION ${SOVERSION})
|
||||
+set (OIIO_VERSION_NS "v${MANGLED_SOVERSION}")
|
||||
configure_file(version.h.in ${CMAKE_BINARY_DIR}/include/version.h @ONLY)
|
||||
list(APPEND public_headers ${CMAKE_BINARY_DIR}/include/version.h)
|
||||
|
||||
-install (FILES ${public_headers} DESTINATION include/OpenImageIO
|
||||
+install (FILES ${public_headers} DESTINATION ${INCLUDE_INSTALL_DIR}
|
||||
COMPONENT developer)
|
||||
|
||||
if (USE_TBB)
|
||||
- file (GLOB tbb_headers tbb/*.h)
|
||||
- file (GLOB tbb_headers2 tbb/machine/*.h)
|
||||
- install (FILES ${tbb_headers} DESTINATION include/OpenImageIO/tbb
|
||||
- COMPONENT developer)
|
||||
- install (FILES ${tbb_headers2} DESTINATION include/OpenImageIO/tbb/machine
|
||||
+ install (DIRECTORY tbb DESTINATION ${INCLUDE_INSTALL_DIR}
|
||||
COMPONENT developer)
|
||||
endif ()
|
||||
|
||||
diff -up OpenImageIO-oiio-1c4030e/src/include/version.h.in.backport OpenImageIO-oiio-1c4030e/src/include/version.h.in
|
||||
--- OpenImageIO-oiio-1c4030e/src/include/version.h.in.backport 2011-08-06 13:56:10.000000000 -0400
|
||||
+++ OpenImageIO-oiio-1c4030e/src/include/version.h.in 2011-08-27 09:26:48.257906766 -0400
|
||||
@@ -39,7 +39,7 @@
|
||||
#define OIIO_VERSION_MAJOR @OIIO_VERSION_MAJOR@
|
||||
#define OIIO_VERSION_MINOR @OIIO_VERSION_MINOR@
|
||||
#define OIIO_VERSION_PATCH @OIIO_VERSION_PATCH@
|
||||
-#define OIIO_VERSION_NS v@SOVERSION@
|
||||
+#define OIIO_VERSION_NS @OIIO_VERSION_NS@
|
||||
|
||||
#define OIIO_VERSION (10000 * OIIO_VERSION_MAJOR + \
|
||||
100 * OIIO_VERSION_MINOR + \
|
||||
diff -up OpenImageIO-oiio-1c4030e/src/libOpenImageIO/CMakeLists.txt.backport OpenImageIO-oiio-1c4030e/src/libOpenImageIO/CMakeLists.txt
|
||||
--- OpenImageIO-oiio-1c4030e/src/libOpenImageIO/CMakeLists.txt.backport 2011-08-06 13:56:10.000000000 -0400
|
||||
+++ OpenImageIO-oiio-1c4030e/src/libOpenImageIO/CMakeLists.txt 2011-08-27 09:26:48.257906766 -0400
|
||||
@@ -12,8 +12,6 @@ set (libOpenImageIO_hdrs ../include/argp
|
||||
../include/osdep.h
|
||||
../include/paramlist.h
|
||||
../include/plugin.h
|
||||
- ../include/pugiconfig.hpp
|
||||
- ../include/pugixml.hpp
|
||||
../include/SHA1.h
|
||||
../include/strutil.h
|
||||
../include/sysutil.h
|
||||
@@ -25,6 +23,13 @@ set (libOpenImageIO_hdrs ../include/argp
|
||||
../include/varyingref.h
|
||||
)
|
||||
|
||||
+if (NOT USE_EXTERNAL_PUGIXML)
|
||||
+ list (APPEND libOpenImageIO_hdrs
|
||||
+ ../include/pugiconfig.hpp
|
||||
+ ../include/pugixml.hpp
|
||||
+ )
|
||||
+endif()
|
||||
+
|
||||
set (libOpenImageIO_srcs formatspec.cpp imagebuf.cpp
|
||||
imagebufalgo.cpp imagebufalgo_orient.cpp
|
||||
imageinput.cpp imageio.cpp imageioplugin.cpp
|
||||
@@ -37,7 +42,6 @@ set (libOpenImageIO_srcs formatspec.cpp
|
||||
../libutil/paramlist.cpp
|
||||
../libutil/plugin.cpp
|
||||
../libutil/pystring.cpp
|
||||
- ../libutil/pugixml.cpp
|
||||
../libutil/SHA1.cpp
|
||||
../libutil/strutil.cpp
|
||||
../libutil/sysutil.cpp
|
||||
@@ -51,6 +55,10 @@ set (libOpenImageIO_srcs formatspec.cpp
|
||||
${libOpenImageIO_hdrs}
|
||||
)
|
||||
|
||||
+if (NOT USE_EXTERNAL_PUGIXML)
|
||||
+ list (APPEND libOpenImageIO_srcs ../libutil/pugixml.cpp)
|
||||
+endif ()
|
||||
+
|
||||
# Include our own TBB if using it
|
||||
if (USE_TBB)
|
||||
add_definitions ("-DUSE_TBB=1")
|
||||
@@ -175,14 +183,16 @@ if (EMBEDPLUGINS)
|
||||
link_openexr (OpenImageIO)
|
||||
endif ()
|
||||
|
||||
-if (SOVERSION)
|
||||
+if (USE_EXTERNAL_PUGIXML)
|
||||
+ target_link_libraries (OpenImageIO ${PUGIXML_LIBRARIES})
|
||||
+endif ()
|
||||
+
|
||||
message(STATUS "Setting SOVERSION to: ${SOVERSION}")
|
||||
set_target_properties(OpenImageIO
|
||||
PROPERTIES
|
||||
VERSION ${OIIO_VERSION_MAJOR}.${OIIO_VERSION_MINOR}.${OIIO_VERSION_PATCH}
|
||||
SOVERSION ${SOVERSION}
|
||||
)
|
||||
-endif ()
|
||||
|
||||
oiio_install_targets (OpenImageIO)
|
||||
|
||||
diff -up OpenImageIO-oiio-1c4030e/src/python/CMakeLists.txt.backport OpenImageIO-oiio-1c4030e/src/python/CMakeLists.txt
|
||||
--- OpenImageIO-oiio-1c4030e/src/python/CMakeLists.txt.backport 2011-08-06 13:56:10.000000000 -0400
|
||||
+++ OpenImageIO-oiio-1c4030e/src/python/CMakeLists.txt 2011-08-27 09:26:48.264906668 -0400
|
||||
@@ -42,7 +42,7 @@ if ( BOOST_CUSTOM OR Boost_FOUND AND PYT
|
||||
endif()
|
||||
|
||||
install (TARGETS PyOpenImageIO
|
||||
- RUNTIME DESTINATION ${PYLIBDIR} COMPONENT user
|
||||
- LIBRARY DESTINATION ${PYLIBDIR} COMPONENT user)
|
||||
+ RUNTIME DESTINATION ${PYLIB_INSTALL_DIR} COMPONENT user
|
||||
+ LIBRARY DESTINATION ${PYLIB_INSTALL_DIR} COMPONENT user)
|
||||
|
||||
endif ()
|
@ -1,74 +0,0 @@
|
||||
src/cmake/externalpackages.cmake | 19 +++++++++++++++++++
|
||||
src/include/CMakeLists.txt | 2 +-
|
||||
src/libOpenImageIO/CMakeLists.txt | 11 ++++++++++-
|
||||
3 files changed, 30 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake
|
||||
index ddea7e0..aa25df6 100644
|
||||
--- a/src/cmake/externalpackages.cmake
|
||||
+++ b/src/cmake/externalpackages.cmake
|
||||
@@ -272,3 +272,22 @@ if (USE_EXTERNAL_PUGIXML)
|
||||
endif()
|
||||
|
||||
###########################################################################
|
||||
+
|
||||
+###########################################################################
|
||||
+# TBB setup. Normally we just use the version bundled with oiio, but
|
||||
+# some linux distros are quite particular about having separate packages so we
|
||||
+# allow this to be overridden to use the distro-provided package if desired.
|
||||
+#
|
||||
+# Try to find it first and fall back to built-in if not available.
|
||||
+find_package (TBB REQUIRED)
|
||||
+if (TBB_FOUND)
|
||||
+ set (USE_EXTERNAL_TBB TRUE CACHE BOOL
|
||||
+ "Use system installed TBB library if avaialble."
|
||||
+ )
|
||||
+ mark_as_advanced (FORCE USE_EXTERNAL_TBB)
|
||||
+ # insert include path to TBB first, to ensure that the external
|
||||
+ # TBB is found, and not the one in OIIO's include directory.
|
||||
+ include_directories (BEFORE ${TBB_INCLUDE_DIR})
|
||||
+endif()
|
||||
+
|
||||
+###########################################################################
|
||||
diff --git a/src/include/CMakeLists.txt b/src/include/CMakeLists.txt
|
||||
index 385f98e..4a2da55 100644
|
||||
--- a/src/include/CMakeLists.txt
|
||||
+++ b/src/include/CMakeLists.txt
|
||||
@@ -23,7 +23,7 @@ list(APPEND public_headers ${CMAKE_BINARY_DIR}/include/version.h)
|
||||
install (FILES ${public_headers} DESTINATION ${INCLUDE_INSTALL_DIR}
|
||||
COMPONENT developer)
|
||||
|
||||
-if (USE_TBB)
|
||||
+if (USE_TBB AND NOT USE_EXTERNAL_TBB)
|
||||
install (DIRECTORY tbb DESTINATION ${INCLUDE_INSTALL_DIR}
|
||||
COMPONENT developer)
|
||||
endif ()
|
||||
diff --git a/src/libOpenImageIO/CMakeLists.txt b/src/libOpenImageIO/CMakeLists.txt
|
||||
index f4425f6..62da8dd 100644
|
||||
--- a/src/libOpenImageIO/CMakeLists.txt
|
||||
+++ b/src/libOpenImageIO/CMakeLists.txt
|
||||
@@ -61,7 +61,12 @@ if (NOT USE_EXTERNAL_PUGIXML)
|
||||
endif ()
|
||||
|
||||
# Include our own TBB if using it
|
||||
-if (USE_TBB)
|
||||
+if (USE_TBB AND USE_EXTERNAL_TBB)
|
||||
+ message (STATUS "System TBB library will be used.")
|
||||
+ add_definitions ("-DUSE_TBB=1")
|
||||
+ set (libOpenImageIO_srcs ${libOpenImageIO_srcs})
|
||||
+elseif (USE_TBB AND NOT USE_EXTERNAL_TBB)
|
||||
+ message (STATUS "Built-in TBB library will be used.")
|
||||
add_definitions ("-DUSE_TBB=1")
|
||||
set (libOpenImageIO_srcs ${libOpenImageIO_srcs} ../libutil/tbb_misc.cpp)
|
||||
else ()
|
||||
@@ -221,6 +226,10 @@ if (USE_EXTERNAL_PUGIXML)
|
||||
target_link_libraries (OpenImageIO ${PUGIXML_LIBRARIES})
|
||||
endif ()
|
||||
|
||||
+if (USE_EXTERNAL_TBB)
|
||||
+ target_link_libraries (OpenImageIO ${TBB_LIBRARIES})
|
||||
+endif ()
|
||||
+
|
||||
message(STATUS "Setting SOVERSION to: ${SOVERSION}")
|
||||
set_target_properties(OpenImageIO
|
||||
PROPERTIES
|
@ -1,11 +0,0 @@
|
||||
diff -Naur OpenImageIO-oiio-7b7590f.orig/src/include/strutil.h OpenImageIO-oiio-7b7590f/src/include/strutil.h
|
||||
--- OpenImageIO-oiio-7b7590f.orig/src/include/strutil.h 2011-11-20 09:23:48.000000000 -0600
|
||||
+++ OpenImageIO-oiio-7b7590f/src/include/strutil.h 2012-01-05 14:30:34.015046609 -0600
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <string>
|
||||
#include <cstring>
|
||||
#include <map>
|
||||
+#include <unistd.h>
|
||||
|
||||
#include "export.h"
|
||||
#include "version.h"
|
28
OpenImageIO-1.0.0-use_external_tbb.patch
Normal file
28
OpenImageIO-1.0.0-use_external_tbb.patch
Normal file
@ -0,0 +1,28 @@
|
||||
diff -Naur OpenImageIO-oiio-5b37f1c.orig/src/libOpenImageIO/CMakeLists.txt OpenImageIO-oiio-5b37f1c/src/libOpenImageIO/CMakeLists.txt
|
||||
--- OpenImageIO-oiio-5b37f1c.orig/src/libOpenImageIO/CMakeLists.txt 2012-02-28 12:58:45.306847484 -0600
|
||||
+++ OpenImageIO-oiio-5b37f1c/src/libOpenImageIO/CMakeLists.txt 2012-02-28 13:02:27.438365805 -0600
|
||||
@@ -61,7 +61,11 @@
|
||||
endif ()
|
||||
|
||||
# Include our own TBB if using it
|
||||
-if (USE_TBB)
|
||||
+if (USE_TBB AND USE_EXTERNAL_TBB)
|
||||
+ message (STATUS "System TBB library will be used.")
|
||||
+ set (libOpenImageIO_srcs ${libOpenImageIO_srcs})
|
||||
+elseif (USE_TBB AND NOT USE_EXTERNAL_TBB)
|
||||
+ message (STATUS "Built-in TBB library will be used.")
|
||||
set (libOpenImageIO_srcs ${libOpenImageIO_srcs} ../libutil/tbb_misc.cpp)
|
||||
endif ()
|
||||
|
||||
diff -Naur OpenImageIO-oiio-5b37f1c.orig/src/include/CMakeLists.txt OpenImageIO-oiio-5b37f1c/src/include/CMakeLists.txt
|
||||
--- OpenImageIO-oiio-5b37f1c.orig/src/include/CMakeLists.txt 2012-02-25 17:17:12.000000000 -0600
|
||||
+++ OpenImageIO-oiio-5b37f1c/src/include/CMakeLists.txt 2012-02-28 13:32:00.961799696 -0600
|
||||
@@ -22,7 +22,7 @@
|
||||
install (FILES ${public_headers} DESTINATION ${INCLUDE_INSTALL_DIR}
|
||||
COMPONENT developer)
|
||||
|
||||
-if (USE_TBB)
|
||||
+if (USE_TBB AND NOT USE_EXTERNAL_TBB)
|
||||
install (DIRECTORY tbb DESTINATION ${INCLUDE_INSTALL_DIR}
|
||||
COMPONENT developer)
|
||||
endif ()
|
@ -1,9 +1,9 @@
|
||||
%global githash1 gad1950d
|
||||
%global githash2 7b7590f
|
||||
%global githash1 g5b37f1c
|
||||
%global githash2 5b37f1c
|
||||
|
||||
Name: OpenImageIO
|
||||
Version: 0.10.4
|
||||
Release: 3%{?dist}
|
||||
Version: 1.0.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Library for reading and writing images
|
||||
|
||||
Group: Development/Libraries
|
||||
@ -13,11 +13,7 @@ URL: https://sites.google.com/site/openimageio/home
|
||||
Source0: https://download.github.com/%{name}-oiio-Release-%{version}-0-%{githash1}.tar.gz
|
||||
Source1: FindTBB.cmake
|
||||
|
||||
Patch0: OpenImageIO-0.10.2-git_backports.patch
|
||||
Patch1: OpenImageIO-0.10.0-atomic_test_fix.patch
|
||||
Patch2: OpenImageIO-0.10.3-use_external_tbb.patch
|
||||
Patch3: OpenImageIO-0.10.2-Z_BEST_COMPRESSION.patch
|
||||
Patch4: OpenImageIO-0.10.4-gcc47_unistd_h.fix
|
||||
Patch0: OpenImageIO-1.0.0-use_external_tbb.patch
|
||||
|
||||
BuildRequires: boost-devel glew-devel qt-devel OpenEXR-devel ilmbase-devel
|
||||
BuildRequires: python2-devel txt2man
|
||||
@ -25,9 +21,6 @@ BuildRequires: libpng-devel libtiff-devel
|
||||
BuildRequires: zlib-devel jasper-devel
|
||||
BuildRequires: pugixml-devel
|
||||
BuildRequires: tbb-devel
|
||||
# Field3D support is not considered stable at this time and no package
|
||||
# currently exists for Fedora. Re-enable when fixed.
|
||||
# Field3D Review Request: https://bugzilla.redhat.com/show_bug.cgi?id=753453
|
||||
BuildRequires: hdf5-devel Field3D-devel
|
||||
|
||||
# We don't want to provide private python extension libs
|
||||
@ -62,11 +55,7 @@ Development files for package %{name}
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-oiio-%{githash2}
|
||||
%patch0 -p1 -b .backport
|
||||
%patch1 -p1 -b .atomic
|
||||
%patch2 -p1 -b .tbb
|
||||
%patch3 -p1 -b .zlib
|
||||
%patch4 -p1 -b .gcc47
|
||||
%patch0 -p1 -b .tbb
|
||||
|
||||
# Remove bundled pugixml
|
||||
rm -f src/include/pugixml.hpp \
|
||||
@ -84,12 +73,14 @@ mkdir -p build
|
||||
pushd build
|
||||
# CMAKE_SKIP_RPATH is OK here because it is set to FALSE internally and causes
|
||||
# CMAKE_INSTALL_RPATH to be cleared, which is the desiered result.
|
||||
%cmake -DCMAKE_SKIP_RPATH:BOOL=TRUE \
|
||||
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_SKIP_RPATH:BOOL=TRUE \
|
||||
-DINCLUDE_INSTALL_DIR:PATH=/usr/include/%{name} \
|
||||
-DPYLIB_INSTALL_DIR:PATH=%{python_sitearch} \
|
||||
-DINSTALL_DOCS:BOOL=FALSE \
|
||||
-DUSE_EXTERNAL_PUGIXML:BOOL=TRUE \
|
||||
-DUSE_TBB:BOOL=TRUE \
|
||||
-DUSE_EXTERNAL_TBB=TRUE \
|
||||
../src
|
||||
|
||||
make %{?_smp_mflags}
|
||||
@ -126,6 +117,9 @@ cp -a doc/*.1 %{buildroot}%{_mandir}/man1
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Mar 02 2012 Richard Shaw <hobbes1069@gmail.com> - 1.0.0-1
|
||||
- Update to latest upstream release.
|
||||
|
||||
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.4-3
|
||||
- Rebuilt for c++ ABI breakage
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user