[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48635] trunk/lib/mingw64/openimageio: MinGW-w64 lib update
Antony Riakiotakis
kalast at gmail.com
Thu Jul 5 12:52:33 CEST 2012
Revision: 48635
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48635
Author: psy-fi
Date: 2012-07-05 10:52:33 +0000 (Thu, 05 Jul 2012)
Log Message:
-----------
MinGW-w64 lib update
=====================
Update OpenImageIO to version 1.0.6
Modified Paths:
--------------
trunk/lib/mingw64/openimageio/0001-Changes-to-make-the-library-compile-against-MinGW-w6.patch
trunk/lib/mingw64/openimageio/include/OpenImageIO/fmath.h
trunk/lib/mingw64/openimageio/include/OpenImageIO/thread.h
trunk/lib/mingw64/openimageio/include/OpenImageIO/typedesc.h
trunk/lib/mingw64/openimageio/include/OpenImageIO/version.h
trunk/lib/mingw64/openimageio/lib/libOpenImageIO.a
Modified: trunk/lib/mingw64/openimageio/0001-Changes-to-make-the-library-compile-against-MinGW-w6.patch
===================================================================
--- trunk/lib/mingw64/openimageio/0001-Changes-to-make-the-library-compile-against-MinGW-w6.patch 2012-07-05 10:51:07 UTC (rev 48634)
+++ trunk/lib/mingw64/openimageio/0001-Changes-to-make-the-library-compile-against-MinGW-w6.patch 2012-07-05 10:52:33 UTC (rev 48635)
@@ -1,14 +1,13 @@
-From 4548065b924b80021c4072325859e6532c2679ac Mon Sep 17 00:00:00 2001
+From e4f41228f83537797c9f6fed72e1ed063734316a Mon Sep 17 00:00:00 2001
From: Antony Riakiotakis <kalast at gmail.com>
-Date: Tue, 24 Apr 2012 12:50:34 +0300
+Date: Thu, 5 Jul 2012 13:38:47 +0300
Subject: [PATCH] Changes to make the library compile against MinGW-w64
---
- src/CMakeLists.txt | 83 +++++++++++++++++-----------------
- src/cmake/externalpackages.cmake | 4 +-
+ src/CMakeLists.txt | 82 +++++++++++++++++-----------------
+ src/cmake/externalpackages.cmake | 2 +
src/include/fmath.h | 5 +-
- src/include/thread.h | 41 +++++++++++++++--
- src/libOpenImageIO/CMakeLists.txt | 58 ++++++++++++-----------
+ src/libOpenImageIO/CMakeLists.txt | 58 ++++++++++++------------
src/libOpenImageIO/exif.cpp | 1 +
src/libOpenImageIO/imagebufalgo.cpp | 1 +
src/libOpenImageIO/imageinput.cpp | 1 +
@@ -17,15 +16,15 @@
src/libutil/plugin.cpp | 3 +-
src/libutil/sysutil.cpp | 2 +-
src/ptex.imageio/ptex/PtexCache.cpp | 21 ++++++---
- src/ptex.imageio/ptex/PtexPlatform.h | 8 +++
- src/rla.imageio/rlaoutput.cpp | 1 +
- 15 files changed, 147 insertions(+), 84 deletions(-)
+ src/ptex.imageio/ptex/PtexPlatform.h | 5 ++
+ src/rla.imageio/rlainput.cpp | 1 +
+ 14 files changed, 105 insertions(+), 79 deletions(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 7dc6541..782d886 100644
+index f7e7430..f3ffa69 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
-@@ -182,15 +182,16 @@ endif (MSVC)
+@@ -181,15 +181,15 @@ endif (MSVC)
# Tell CMake to process the sub-directories
add_subdirectory (libOpenImageIO)
@@ -47,11 +46,10 @@
+#add_subdirectory (oiiotool)
+#add_subdirectory (testtex)
+#add_subdirectory (iv)
-+
# Add IO plugin directories
if (NOT EMBEDPLUGINS)
add_subdirectory (bmp.imageio)
-@@ -253,47 +254,47 @@ if (DEFINED CMAKE_VERSION AND NOT CMAKE_VERSION VERSION_LESS 2.8)
+@@ -252,47 +252,47 @@ if (DEFINED CMAKE_VERSION AND NOT CMAKE_VERSION VERSION_LESS 2.8)
endif()
# List all the individual testsuite tests here:
@@ -130,29 +128,20 @@
#########################################################################
-@@ -327,7 +328,7 @@ if (WIN32)
+@@ -326,7 +326,7 @@ if (WIN32)
set(CPACK_PACKAGE_EXECUTABLES "iv" "iv - Image Viewer")
# set(CPACK_CREATE_DESCTOP_LINKS "iv" "iv - Image Viewer")
set(CPACK_NSIS_MODIFY_PATH ON)
- add_dll_files ()
-+ #add_dll_files ()
++# add_dll_files ()
include (InstallRequiredSystemLibraries)
endif ()
set (CPACK_SOURCE_PACKAGE_FILE_NAME OpenImageIO-${OIIO_VERSION_MAJOR}.${OIIO_VERSION_MINOR}.${OIIO_VERSION_PATCH}-source)
diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake
-index 124a848..94ef76a 100644
+index ad538b4..2ef1824 100644
--- a/src/cmake/externalpackages.cmake
+++ b/src/cmake/externalpackages.cmake
-@@ -82,7 +82,7 @@ endmacro ()
-
- message (STATUS "BOOST_ROOT ${BOOST_ROOT}")
-
--set (Boost_ADDITIONAL_VERSIONS "1.45" "1.44"
-+set (Boost_ADDITIONAL_VERSIONS "1.49 1.48 1.47" "1_46_1" "1.45" "1.44" "1.45" "1.44"
- "1.43" "1.43.0" "1.42" "1.42.0"
- "1.41" "1.41.0" "1.40" "1.40.0"
- "1.39" "1.39.0" "1.38" "1.38.0"
-@@ -142,6 +142,8 @@ else ()
+@@ -140,6 +140,8 @@ else ()
endif ()
endif ()
@@ -162,7 +151,7 @@
message (STATUS "Boost version ${Boost_VERSION}")
message (STATUS "Boost include dirs ${Boost_INCLUDE_DIRS}")
diff --git a/src/include/fmath.h b/src/include/fmath.h
-index 9e784ba..a99bc67 100644
+index 46c7035..c20d985 100644
--- a/src/include/fmath.h
+++ b/src/include/fmath.h
@@ -46,6 +46,7 @@
@@ -173,7 +162,7 @@
#if defined(_MSC_VER) && _MSC_VER < 1600
typedef __int8 int8_t;
-@@ -834,7 +835,7 @@ inline float degrees (float rad) { return rad * (float)(180.0 / M_PI); }
+@@ -838,7 +839,7 @@ inline float degrees (float rad) { return rad * (float)(180.0 / M_PI); }
@@ -182,7 +171,7 @@
// Windows doesn't define these functions from math.h
#define hypotf _hypotf
#define copysign(x,y) _copysign(x,y)
-@@ -959,7 +960,7 @@ truncf(float val)
+@@ -963,7 +964,7 @@ truncf(float val)
// Some systems have isnan, isinf and isfinite in the std namespace.
@@ -191,67 +180,6 @@
using std::isnan;
using std::isinf;
using std::isfinite;
-diff --git a/src/include/thread.h b/src/include/thread.h
-index f651051..170bdf3 100644
---- a/src/include/thread.h
-+++ b/src/include/thread.h
-@@ -254,7 +254,33 @@ private:
-
- #endif
-
--
-+inline LONGLONG _InterlockedCompareExchange64(LONGLONG volatile* Destination, LONGLONG Exchange, LONGLONG Comperand)
-+{
-+#ifndef __GNUC__
-+ __asm {
-+ mov esi, [Destination]
-+ mov ebx, dword ptr [Exchange]
-+ mov ecx, dword ptr [Exchange + 4]
-+ mov eax, dword ptr [Comperand]
-+ mov edx, dword ptr [Comperand + 4]
-+ lock cmpxchg8b [esi]
-+ }
-+#else
-+ LONGLONG *ep = &Exchange;
-+ LONGLONG *cp = &Comperand;
-+
-+ asm("movl (%2), %%ebx\n\t"
-+ "movl 4(%2), %%ecx\n\t"
-+ "movl (%1), %%eax\n\t"
-+ "movl 4(%1), %%edx\n\t"
-+ "lock\n\t"
-+ "cmpxchg8b (%0)\n\t"
-+ : "=r" (Destination)
-+ : "r" (cp), "r" (ep)
-+ : "%edx", "%eax", "%ecx", "%ebx"
-+ );
-+#endif
-+}
-
- /// Atomic version of: r = *at, *at += x, return r
- /// For each of several architectures.
-@@ -291,11 +317,18 @@ atomic_exchange_and_add (volatile long long *at, long long x)
- // Apple, not inline for Intel (only PPC?)
- return OSAtomicAdd64Barrier (x, at) - x;
- #elif defined(_WIN32)
-+# if !defined(__GNUC__)
- // Windows
--# if defined(_WIN64)
-- return _InterlockedExchangeAdd64 ((volatile LONGLONG *)at, x);
-+# if defined(_WIN64)
-+ return _InterlockedExchangeAdd64 ((volatile LONGLONG *)at, x);
-+# else
-+ return InterlockedExchangeAdd64 ((volatile LONGLONG *)at, x);
-+# endif
- # else
-- return InterlockedExchangeAdd64 ((volatile LONGLONG *)at, x);
-+ LONGLONG Old;
-+ do Old = *at;
-+ while (_InterlockedCompareExchange64(at, Old + x, Old) != Old);
-+ return Old;
- # endif
- #else
- # error No atomics on this platform.
diff --git a/src/libOpenImageIO/CMakeLists.txt b/src/libOpenImageIO/CMakeLists.txt
index ad3dfed..b94de21 100644
--- a/src/libOpenImageIO/CMakeLists.txt
@@ -342,7 +270,7 @@
#include <boost/foreach.hpp>
diff --git a/src/libOpenImageIO/imagebufalgo.cpp b/src/libOpenImageIO/imagebufalgo.cpp
-index 9ca3a12..074fa29 100644
+index ec7da3f..39994f8 100644
--- a/src/libOpenImageIO/imagebufalgo.cpp
+++ b/src/libOpenImageIO/imagebufalgo.cpp
@@ -44,6 +44,7 @@
@@ -354,7 +282,7 @@
#include "imagebuf.h"
#include "imagebufalgo.h"
diff --git a/src/libOpenImageIO/imageinput.cpp b/src/libOpenImageIO/imageinput.cpp
-index 1b1bf23..aaf576c 100644
+index cfd1de4..681a382 100644
--- a/src/libOpenImageIO/imageinput.cpp
+++ b/src/libOpenImageIO/imageinput.cpp
@@ -32,6 +32,7 @@
@@ -366,7 +294,7 @@
#include "dassert.h"
#include "typedesc.h"
diff --git a/src/libtexture/imagecache.cpp b/src/libtexture/imagecache.cpp
-index 6198865..b751de3 100644
+index 293c61d..cbe8f67 100644
--- a/src/libtexture/imagecache.cpp
+++ b/src/libtexture/imagecache.cpp
@@ -32,6 +32,7 @@
@@ -411,10 +339,10 @@
void *s = dlsym (plugin_handle, symbol_name);
if (!s)
diff --git a/src/libutil/sysutil.cpp b/src/libutil/sysutil.cpp
-index d5dcf56..6371278 100644
+index 3a24c24..f53689b 100644
--- a/src/libutil/sysutil.cpp
+++ b/src/libutil/sysutil.cpp
-@@ -131,7 +131,7 @@ Sysutil::get_local_time (const time_t *time, struct tm *converted_time)
+@@ -132,7 +132,7 @@ Sysutil::get_local_time (const time_t *time, struct tm *converted_time)
#ifdef _MSC_VER
localtime_s (converted_time, time);
#else
@@ -456,10 +384,10 @@
}
diff --git a/src/ptex.imageio/ptex/PtexPlatform.h b/src/ptex.imageio/ptex/PtexPlatform.h
-index f6cc65d..304f639 100644
+index f6cc65d..44f5d66 100644
--- a/src/ptex.imageio/ptex/PtexPlatform.h
+++ b/src/ptex.imageio/ptex/PtexPlatform.h
-@@ -79,11 +79,19 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+@@ -79,11 +79,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
// missing functions on Windows
#ifdef WINDOWS
@@ -472,21 +400,18 @@
+#if !defined(__GNUC__)
#define fseeko _fseeki64
#define ftello _ftelli64
-+#else
-+#define fseeko fseek
-+#define ftello ftell
+#endif
inline double log2(double x) {
return log(x) * 1.4426950408889634;
-diff --git a/src/rla.imageio/rlaoutput.cpp b/src/rla.imageio/rlaoutput.cpp
-index b5f3a3e..8a05c44 100644
---- a/src/rla.imageio/rlaoutput.cpp
-+++ b/src/rla.imageio/rlaoutput.cpp
+diff --git a/src/rla.imageio/rlainput.cpp b/src/rla.imageio/rlainput.cpp
+index 440484e..11e5888 100644
+--- a/src/rla.imageio/rlainput.cpp
++++ b/src/rla.imageio/rlainput.cpp
@@ -32,6 +32,7 @@
#include <cstdlib>
#include <cmath>
- #include <ctime>
+ #include <cassert>
+#include <malloc.h>
#include "dassert.h"
Modified: trunk/lib/mingw64/openimageio/include/OpenImageIO/fmath.h
===================================================================
--- trunk/lib/mingw64/openimageio/include/OpenImageIO/fmath.h 2012-07-05 10:51:07 UTC (rev 48634)
+++ trunk/lib/mingw64/openimageio/include/OpenImageIO/fmath.h 2012-07-05 10:52:33 UTC (rev 48635)
@@ -65,6 +65,10 @@
# include <stdint.h>
#endif
+#if defined(__FreeBSD__)
+#include <sys/param.h>
+#endif
+
#include "version.h"
OIIO_NAMESPACE_ENTER
@@ -968,6 +972,18 @@
+// Functions missing from FreeBSD
+#if (defined(__FreeBSD__) && (__FreeBSD_version < 803000))
+
+inline float
+log2f (float val) {
+ return logf (val)/static_cast<float>(M_LN2);
+}
+
+#endif
+
+
+
/// Simple conversion of a (presumably non-negative) float into a
/// rational. This does not attempt to find the simplest fraction
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list