Compare commits

...

19 Commits
master ... el6

Author SHA1 Message Date
Richard M. Shaw 445f69a935 Update to 1.2.3. 2014-01-13 11:45:03 -06:00
Richard M. Shaw 753582fd6a Fix oops in patch. 2013-10-01 16:15:07 -05:00
Richard M. Shaw 3040001735 Another PPC fix attempt. 2013-10-01 16:13:07 -05:00
Richard M. Shaw 5907817269 Tweak PPC patch 2013-10-01 15:14:19 -05:00
Richard M. Shaw 5aad988794 Add cmake patch to fix problem exposed by cmake28. 2013-10-01 15:00:33 -05:00
Richard M. Shaw cfc0cdb83f Add conditional to use cmake28 package for EL6. 2013-10-01 14:39:12 -05:00
Richard M. Shaw 133ed4f241 HDF5 is actually needed and available. 2013-10-01 14:21:22 -05:00
Richard M. Shaw 026866e861 Add conditional for BR not available in EL/EPEL. 2013-10-01 14:05:52 -05:00
Richard M. Shaw 6a27bccdf8 Add conditional for BR not available in EL/EPEL. 2013-10-01 13:28:30 -05:00
Richard M. Shaw 47d07a5c21 Fix conflicts from merging with master. 2013-10-01 13:16:02 -05:00
Richard M. Shaw 8bfa9a347c Add OpenColorIO-devel, not OpenColorIO. 2012-05-07 12:43:44 -05:00
Richard M. Shaw 6e554ccd1a Add OpenColorIO-devel, not OpenColorIO. 2012-05-07 12:42:12 -05:00
Richard M. Shaw 4143dbced2 Update to latest upstream release.
Add build requirement for OpenColorIO.
2012-05-07 10:32:25 -05:00
Richard M. Shaw 4d6b4b9518 Try qt4-devel... 2012-05-01 14:19:14 -05:00
Richard M. Shaw a746e34c3f Try and make sure QT4 is installed. 2012-05-01 13:09:33 -05:00
Richard M. Shaw 57952262a0 Add cmake to BR. 2012-05-01 12:40:37 -05:00
Richard M. Shaw b51484b566 Commit spec updates. 2012-04-25 11:21:53 -05:00
Richard M. Shaw 7a6c661976 Add patch for ppc64 build. 2012-04-25 11:21:04 -05:00
Richard M. Shaw 2752d175a5 Comment out build requirement for Field3D as it isn't build for EPEL. 2012-04-25 11:07:14 -05:00
3 changed files with 64 additions and 5 deletions

View File

@ -0,0 +1,49 @@
src/include/thread.h | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/src/include/thread.h b/src/include/thread.h
index 3b3bd19..53773e8 100644
--- a/src/include/thread.h
+++ b/src/include/thread.h
@@ -272,6 +272,11 @@ atomic_exchange_and_add (volatile int *at, int x)
#elif defined(_WIN32)
// Windows
return _InterlockedExchangeAdd ((volatile LONG *)at, x);
+#elif defined (__PPC__)
+ long long r;
+ r = *at;
+ *at += x;
+ return r;
#else
# error No atomics on this platform.
#endif
@@ -297,6 +302,11 @@ atomic_exchange_and_add (volatile long long *at, long long x)
# else
return InterlockedExchangeAdd64 ((volatile LONGLONG *)at, x);
# endif
+#elif defined (__PPC__)
+ long long r;
+ r = *at;
+ *at += x;
+ return r;
#else
# error No atomics on this platform.
#endif
@@ -322,6 +332,8 @@ atomic_compare_and_exchange (volatile int *at, int compareval, int newval)
return OSAtomicCompareAndSwap32Barrier (compareval, newval, at);
#elif defined(_WIN32)
return (_InterlockedCompareExchange ((volatile LONG *)at, newval, compareval) == compareval);
+#elif defined(__PPC__)
+ return ((*at == compareval) ? (*at = newval), 1 : 0);
#else
# error No atomics on this platform.
#endif
@@ -341,6 +353,8 @@ atomic_compare_and_exchange (volatile long long *at, long long compareval, long
return OSAtomicCompareAndSwap64Barrier (compareval, newval, at);
#elif defined(_WIN32)
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

@ -94,7 +94,6 @@ Development files for package %{name}
%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 .spin_mutex

View File

@ -16,7 +16,7 @@ diff -Naur oiio-Release-1.2.1.orig/src/include/thread.h oiio-Release-1.2.1/src/i
#elif defined(_MSC_VER)
// Windows
return _InterlockedExchangeAdd ((volatile LONG *)at, x);
+#elif defined (__powerpc__)
+#elif defined (__powerpc__) || defined(__PPC__)
+ long long r;
+ r = *at;
+ *at += x;
@ -28,7 +28,7 @@ diff -Naur oiio-Release-1.2.1.orig/src/include/thread.h oiio-Release-1.2.1/src/i
# else
return InterlockedExchangeAdd64 ((volatile LONGLONG *)at, x);
# endif
+#elif defined (__powerpc__)
+#elif defined (__powerpc__) || defined(__PPC__)
+ long long r;
+ r = *at;
+ *at += x;
@ -40,7 +40,7 @@ diff -Naur oiio-Release-1.2.1.orig/src/include/thread.h oiio-Release-1.2.1/src/i
return a->compare_and_swap (newval, compareval) == newval;
#elif defined(_MSC_VER)
return (_InterlockedCompareExchange ((volatile LONG *)at, newval, compareval) == compareval);
+#elif defined(__powerpc__)
+#elif defined(__powerpc__) || defined(__PPC__)
+ return ((*at == compareval) ? (*at = newval), 1 : 0);
#else
# error No atomics on this platform.
@ -49,8 +49,19 @@ diff -Naur oiio-Release-1.2.1.orig/src/include/thread.h oiio-Release-1.2.1/src/i
return a->compare_and_swap (newval, compareval) == newval;
#elif defined(_MSC_VER)
return (_InterlockedCompareExchange64 ((volatile LONGLONG *)at, newval, compareval) == compareval);
+#elif defined(__PPC__)
+#elif defined(__PPC__) || defined(__powerpc__)
+ return ((*at == compareval) ? (*at = newval), 1 : 0);
#else
# error No atomics on this platform.
#endif
diff -Naur oiio-Release-1.2.1.orig/src/bmp.imageio/bmp_pvt.h oiio-Release-1.2.1/src/bmp.imageio/bmp_pvt.h
--- oiio-Release-1.2.1.orig/src/bmp.imageio/bmp_pvt.h 2013-08-06 00:10:31.000000000 -0500
+++ oiio-Release-1.2.1/src/bmp.imageio/bmp_pvt.h 2013-10-01 16:10:19.546711936 -0500
@@ -34,6 +34,7 @@
#include "imageio.h"
#include "filesystem.h"
#include "fmath.h"
+#include "thread.h"
OIIO_PLUGIN_NAMESPACE_BEGIN