[luminance-hdr] fix build on non-x86 arches
Dan Horák
sharkcz at fedoraproject.org
Wed Mar 28 13:52:44 UTC 2012
commit 1c52264284e5cf5ffef6caf09d9d67ab5b9be9b1
Author: Dan Horák <dan at danny.cz>
Date: Wed Mar 28 15:52:40 2012 +0200
fix build on non-x86 arches
luminance-hdr-2.2.1-non-x86.patch | 15 +++++++++++++++
luminance-hdr.spec | 8 +++++++-
2 files changed, 22 insertions(+), 1 deletions(-)
---
diff --git a/luminance-hdr-2.2.1-non-x86.patch b/luminance-hdr-2.2.1-non-x86.patch
new file mode 100644
index 0000000..79f1f50
--- /dev/null
+++ b/luminance-hdr-2.2.1-non-x86.patch
@@ -0,0 +1,15 @@
+diff -up luminance-hdr-2.2.1/src/arch/malloc.h.non-x86 luminance-hdr-2.2.1/src/arch/malloc.h
+--- luminance-hdr-2.2.1/src/arch/malloc.h.non-x86 2012-03-28 15:30:37.000000000 +0200
++++ luminance-hdr-2.2.1/src/arch/malloc.h 2012-03-28 15:48:18.000000000 +0200
+@@ -25,5 +25,11 @@
+ #if defined(_MSC_VER)
+ #include <malloc.h>
+ #else
++#if defined(__i386__) || defined(__x86_64__)
+ #include <mm_malloc.h>
++#else
++ #define _mm_malloc(a,b) malloc(a)
++ #define _mm_free(a) free(a)
++ #include <stdlib.h>
++#endif
+ #endif
diff --git a/luminance-hdr.spec b/luminance-hdr.spec
index 0a91bea..d8d2f70 100644
--- a/luminance-hdr.spec
+++ b/luminance-hdr.spec
@@ -1,6 +1,6 @@
Name: luminance-hdr
Version: 2.2.1
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A graphical tool for creating and tone-mapping HDR images
Group: Applications/Productivity
@@ -8,6 +8,8 @@ License: GPLv2+
URL: http://qtpfsgui.sourceforge.net/
Source0: http://downloads.sourceforge.net/qtpfsgui/%{name}-%{version}.tar.bz2
Patch0: desktop.patch
+# mm_malloc.h a x86-only thing
+Patch1: %{name}-2.2.1-non-x86.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: qt4-devel
@@ -35,6 +37,7 @@ operators for creating low dynamic range versions of HDR images.
%setup -q -n %{name}-%{version}%{?pre:-%{pre}}
%patch0 -p0
+%patch1 -p1 -b .non-x86
# fix inconsistant newlines
%{__sed} -i 's/\r//' Changelog
@@ -91,6 +94,9 @@ fi
%changelog
+* Wed Mar 28 2012 Dan Horák <dan[at]danny.cz> - 2.2.1-3
+- fix build on non-x86 arches
+
* Tue Mar 13 2012 Franco Comida <francocomida at googlemail.com> - 2.2.1-2
- Removed unused PATH from luminance-hdr.desktop
More information about the scm-commits
mailing list