[qtractor] - fix build on non-x86 arches
Dan Horák
sharkcz at fedoraproject.org
Thu Mar 13 21:51:35 UTC 2014
commit 2562d038df049127d67b8cb551dc8ef45f43ca49
Author: Dan Horák <dan at danny.cz>
Date: Thu Mar 13 22:51:27 2014 +0100
- fix build on non-x86 arches
qtractor-0.5.12-secondary.patch | 59 +++++++++++++++++++++++++++++++++++++++
qtractor.spec | 8 ++++-
2 files changed, 65 insertions(+), 2 deletions(-)
---
diff --git a/qtractor-0.5.12-secondary.patch b/qtractor-0.5.12-secondary.patch
new file mode 100644
index 0000000..155d98e
--- /dev/null
+++ b/qtractor-0.5.12-secondary.patch
@@ -0,0 +1,59 @@
+diff -up qtractor-0.5.12/src/qtractorAtomic.h.secondary qtractor-0.5.12/src/qtractorAtomic.h
+--- qtractor-0.5.12/src/qtractorAtomic.h.secondary 2014-03-13 20:20:56.000000000 +0100
++++ qtractor-0.5.12/src/qtractorAtomic.h 2014-03-13 21:45:47.000000000 +0100
+@@ -33,6 +33,27 @@
+ extern "C" {
+ #endif
+
++
++#if defined(HAVE_QATOMIC_H)
++
++typedef QAtomicInt qtractorAtomic;
++
++#if QT_VERSION >= 0x050000
++#define ATOMIC_GET(a) ((a)->load())
++#define ATOMIC_SET(a,v) ((a)->store(v))
++#else
++#define ATOMIC_GET(a) ((int) *(a))
++#define ATOMIC_SET(a,v) (*(a) = (v))
++#endif
++
++static inline int ATOMIC_CAS ( qtractorAtomic *pVal,
++ int iOldValue, int iNewValue )
++{
++ return pVal->testAndSetOrdered(iOldValue, iNewValue);
++}
++
++#else
++
+ #if defined(__GNUC__)
+
+ #if defined(powerpc) || defined(__ppc__)
+@@ -106,27 +127,6 @@ static inline int ATOMIC_CAS1 (
+ # error "qtractorAtomic.h: unsupported target compiler processor (WIN32)."
+ #endif
+
+-
+-#if defined(HAVE_QATOMIC_H)
+-
+-typedef QAtomicInt qtractorAtomic;
+-
+-#if QT_VERSION >= 0x050000
+-#define ATOMIC_GET(a) ((a)->load())
+-#define ATOMIC_SET(a,v) ((a)->store(v))
+-#else
+-#define ATOMIC_GET(a) ((int) *(a))
+-#define ATOMIC_SET(a,v) (*(a) = (v))
+-#endif
+-
+-static inline int ATOMIC_CAS ( qtractorAtomic *pVal,
+- int iOldValue, int iNewValue )
+-{
+- return pVal->testAndSetOrdered(iOldValue, iNewValue);
+-}
+-
+-#else
+-
+ typedef struct { volatile int value; } qtractorAtomic;
+
+ #define ATOMIC_GET(a) ((a)->value)
diff --git a/qtractor.spec b/qtractor.spec
index 7bba9f6..cf9c463 100644
--- a/qtractor.spec
+++ b/qtractor.spec
@@ -11,14 +11,14 @@
Summary: Audio/MIDI multi-track sequencer
Name: qtractor
Version: 0.5.12
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2+
Group: Applications/Multimedia
URL: http://qtractor.sourceforge.net/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Patch1: qtractor-libmad-factorout.patch
Patch2: qtractor-libmad-factorout-makefile.patch
-ExcludeArch: %{arm}
+Patch3: qtractor-0.5.12-secondary.patch
BuildRequires: alsa-lib-devel
BuildRequires: desktop-file-utils
@@ -50,6 +50,7 @@ dedicated to the personal home-studio.
%setup -q -n %{name}-%{version}
%patch1 -p1
%patch2 -p1
+%patch3 -p1
# Fix odd permissions
chmod -x src/qtractorMmcEvent.*
@@ -98,6 +99,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_bindir}/%{name}
%changelog
+* Thu Mar 13 2014 Dan Horák <dan[at]danny.cz> - 0.5.12-2
+- fix build on non-x86 arches
+
* Sat Jan 11 2014 Brendan Jones <brendan.jones.it at gmail.com> 0.5.12-1
- Update to 0.5.12
More information about the scm-commits
mailing list