[OpenImageIO/f19] modify ppc patch for current release
Karsten Hopp
karsten at fedoraproject.org
Mon May 27 15:22:38 UTC 2013
commit 71bc860169694e1071c696bec51d4130b9c4c881
Author: Karsten Hopp <karsten at redhat.com>
Date: Mon May 27 17:21:41 2013 +0200
modify ppc patch for current release
OpenImageIO-ppc.patch | 40 ++++++++++++++++++++--------------------
OpenImageIO.spec | 11 ++++++-----
2 files changed, 26 insertions(+), 25 deletions(-)
---
diff --git a/OpenImageIO-ppc.patch b/OpenImageIO-ppc.patch
index 76d99fb..00ef9a0 100644
--- a/OpenImageIO-ppc.patch
+++ b/OpenImageIO-ppc.patch
@@ -1,20 +1,20 @@
-diff -up oiio-Release-1.1.3/src/include/thread.h.ppc oiio-Release-1.1.3/src/include/thread.h
---- oiio-Release-1.1.3/src/include/thread.h.ppc 2013-01-10 02:13:37.000000000 +0100
-+++ oiio-Release-1.1.3/src/include/thread.h 2013-01-28 15:07:23.190624263 +0100
-@@ -98,7 +98,7 @@
+diff -up oiio-Release-1.1.10/src/include/thread.h.ppc oiio-Release-1.1.10/src/include/thread.h
+--- oiio-Release-1.1.10/src/include/thread.h.ppc 2013-05-27 16:16:38.902025786 +0200
++++ oiio-Release-1.1.10/src/include/thread.h 2013-05-27 17:00:19.856167856 +0200
+@@ -112,7 +112,7 @@ InterlockedExchangeAdd64 (volatile long
#endif
#if defined(__GNUC__) && (defined(_GLIBCXX_ATOMIC_BUILTINS) || (__GNUC__ * 100 + __GNUC_MINOR__ >= 401))
-#if !defined(__FreeBSD__) || defined(__x86_64__)
-+#if !defined(__FreeBSD__) && !defined(__PPC__) || defined(__x86_64__)
++#if !defined(__FreeBSD__) && !defined(__powerpc__) || defined(__x86_64__)
#define USE_GCC_ATOMICS
#endif
#endif
-@@ -224,6 +224,11 @@ atomic_exchange_and_add (volatile int *a
+@@ -235,6 +235,11 @@ atomic_exchange_and_add (volatile int *a
#elif defined(_MSC_VER)
// Windows
return _InterlockedExchangeAdd ((volatile LONG *)at, x);
-+#elif defined (__PPC__)
++#elif defined (__powerpc__)
+ long long r;
+ r = *at;
+ *at += x;
@@ -22,11 +22,11 @@ diff -up oiio-Release-1.1.3/src/include/thread.h.ppc oiio-Release-1.1.3/src/incl
#else
# error No atomics on this platform.
#endif
-@@ -249,6 +254,11 @@ atomic_exchange_and_add (volatile long l
+@@ -257,6 +262,11 @@ atomic_exchange_and_add (volatile long l
# else
return InterlockedExchangeAdd64 ((volatile LONGLONG *)at, x);
# endif
-+#elif defined (__PPC__)
++#elif defined (__powerpc__)
+ long long r;
+ r = *at;
+ *at += x;
@@ -34,17 +34,17 @@ diff -up oiio-Release-1.1.3/src/include/thread.h.ppc oiio-Release-1.1.3/src/incl
#else
# error No atomics on this platform.
#endif
-@@ -274,6 +284,8 @@ atomic_compare_and_exchange (volatile in
- return OSAtomicCompareAndSwap32Barrier (compareval, newval, at);
+@@ -280,6 +290,8 @@ atomic_compare_and_exchange (volatile in
+ return a->compare_and_swap (newval, compareval) == newval;
#elif defined(_MSC_VER)
return (_InterlockedCompareExchange ((volatile LONG *)at, newval, compareval) == compareval);
-+#elif defined(__PPC__)
++#elif defined(__powerpc__)
+ return ((*at == compareval) ? (*at = newval), 1 : 0);
#else
# error No atomics on this platform.
#endif
-@@ -293,6 +305,8 @@ atomic_compare_and_exchange (volatile lo
- return OSAtomicCompareAndSwap64Barrier (compareval, newval, at);
+@@ -297,6 +309,8 @@ atomic_compare_and_exchange (volatile lo
+ return a->compare_and_swap (newval, compareval) == newval;
#elif defined(_MSC_VER)
return (_InterlockedCompareExchange64 ((volatile LONGLONG *)at, newval, compareval) == compareval);
+#elif defined(__PPC__)
@@ -52,12 +52,12 @@ diff -up oiio-Release-1.1.3/src/include/thread.h.ppc oiio-Release-1.1.3/src/incl
#else
# error No atomics on this platform.
#endif
-@@ -324,7 +338,7 @@ pause (int delay)
+@@ -326,7 +340,7 @@ pause (int delay)
{
- #if USE_TBB
- __TBB_Pause(delay);
--#elif defined(__GNUC__)
-+#elif defined(__GNUC__) && !defined (__PPC__)
+ #if defined(__GNUC__)
for (int i = 0; i < delay; ++i) {
+-#if defined __arm__ || defined __s390__
++#if defined __arm__ || defined __s390__ || defined __powerpc__
+ __asm__ __volatile__("NOP;");
+ #else
__asm__ __volatile__("pause;");
- }
diff --git a/OpenImageIO.spec b/OpenImageIO.spec
index 8f6ea3f..ba12345 100644
--- a/OpenImageIO.spec
+++ b/OpenImageIO.spec
@@ -1,6 +1,6 @@
Name: OpenImageIO
Version: 1.1.10
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Library for reading and writing images
Group: Development/Libraries
@@ -12,10 +12,10 @@ Source0: https://download.github.com/oiio-Release-%{version}.tar.gz
#Source1: oiio-images.tar.gz
Source101: FindTBB.cmake
-Patch0: OpenImageIO-ppc.patch
Patch1: 589.patch
Patch2: oiio-arm.patch
Patch3: oiio-s390.patch
+Patch4: OpenImageIO-ppc.patch
BuildRequires: cmake txt2man
BuildRequires: qt4-devel
@@ -81,12 +81,10 @@ Development files for package %{name}
%prep
%setup -q -n oiio-Release-%{version}
-%ifarch ppc ppc64
-%patch0 -p1 -b .ppc
-%endif
%patch1 -p1 -b .spinlocks
%patch2 -p1 -b .arm
%patch3 -p1 -b .s390
+%patch4 -p1 -b .ppc
# Install FindTBB.cmake
install %{SOURCE101} src/cmake/modules/
@@ -163,6 +161,9 @@ cp -a doc/*.1 %{buildroot}%{_mandir}/man1
%changelog
+* Mon May 27 2013 Karsten Hopp <karsten at redhat.com> 1.1.10-4
+- modify ppc patch for current release
+
* Fri May 24 2013 Petr Machata <pmachata at redhat.com> - 1.1.10-3
- Rebuild for TBB memory barrier bug
More information about the scm-commits
mailing list