fix build on s390(x)

This commit is contained in:
Dan Horák 2013-05-20 12:27:39 +02:00
parent e3e2eba6cc
commit 0c096be9e6
2 changed files with 18 additions and 1 deletions

View File

@ -1,6 +1,6 @@
Name: OpenImageIO
Version: 1.1.10
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Library for reading and writing images
Group: Development/Libraries
@ -15,6 +15,7 @@ Source101: FindTBB.cmake
Patch0: OpenImageIO-ppc.patch
Patch1: 589.patch
Patch2: oiio-arm.patch
Patch3: oiio-s390.patch
BuildRequires: cmake txt2man
BuildRequires: qt4-devel
@ -85,6 +86,7 @@ Development files for package %{name}
%endif
%patch1 -p1 -b .spinlocks
%patch2 -p1 -b .arm
%patch3 -p1 -b .s390
# Install FindTBB.cmake
install %{SOURCE101} src/cmake/modules/
@ -161,6 +163,9 @@ cp -a doc/*.1 %{buildroot}%{_mandir}/man1
%changelog
* Mon May 20 2013 Dan Horák <dan[at]danny.cz> - 1.1.10-2
- fix build on s390(x)
* Tue Apr 23 2013 Richard Shaw <hobbes1069@gmail.com> - 1.1.10-1
- Update to latest upstream release.

12
oiio-s390.patch Normal file
View File

@ -0,0 +1,12 @@
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;");