summaryrefslogtreecommitdiffstats
path: root/audio-drivers/libffado
diff options
context:
space:
mode:
authorThomas Orgis2016-02-13 10:53:17 +0100
committerThomas Orgis2016-02-13 10:53:17 +0100
commitc2b5398662f889fc90a7cdb696293e8705645362 (patch)
tree437cf66b42d4cc313ed43db7f23fefd590b8c735 /audio-drivers/libffado
parent3852780b2aae136d8bd94bb89a0de87f41bfced4 (diff)
libffado: build fixes, C++11, dropping Alpha hacks
Diffstat (limited to 'audio-drivers/libffado')
-rwxr-xr-xaudio-drivers/libffado/BUILD9
-rwxr-xr-xaudio-drivers/libffado/DEPENDS3
-rw-r--r--audio-drivers/libffado/HISTORY7
-rwxr-xr-xaudio-drivers/libffado/PRE_BUILD6
-rw-r--r--audio-drivers/libffado/ffado-tests-errno.patch91
-rw-r--r--audio-drivers/libffado/libffado-atomic_ops.patch101
6 files changed, 103 insertions, 114 deletions
diff --git a/audio-drivers/libffado/BUILD b/audio-drivers/libffado/BUILD
index 292b5b837d..c87b2c917a 100755
--- a/audio-drivers/libffado/BUILD
+++ b/audio-drivers/libffado/BUILD
@@ -1,7 +1,4 @@
cd "$SOURCE_DIRECTORY" &&
-if [[ ${SMGL_COMPAT_ARCHS[1]} == alpha ]]; then
- scons PREFIX=/usr DEBUG=no ENABLE_OPTIMIZATIONS=yes DIST_TARGET=none
-else
- # note: this always compiles for current cpu
- scons PREFIX=/usr DEBUG=no ENABLE_OPTIMIZATIONS=yes
-fi
+# note: this always compiles for current cpu
+scons COMPILE_FLAGS="$CXXFLAGS -std=gnu++11" \
+ PREFIX=/usr DEBUG=no ENABLE_OPTIMIZATIONS=yes
diff --git a/audio-drivers/libffado/DEPENDS b/audio-drivers/libffado/DEPENDS
index 7e85a8bea7..6164a367cc 100755
--- a/audio-drivers/libffado/DEPENDS
+++ b/audio-drivers/libffado/DEPENDS
@@ -1,7 +1,4 @@
depends scons &&
-if [[ ${SMGL_COMPAT_ARCHS[1]} == alpha ]]; then
- depends libatomic_ops
-fi &&
depends expat &&
depends libxml++ &&
depends libraw1394 &&
diff --git a/audio-drivers/libffado/HISTORY b/audio-drivers/libffado/HISTORY
index b54b043507..2c901de874 100644
--- a/audio-drivers/libffado/HISTORY
+++ b/audio-drivers/libffado/HISTORY
@@ -1,3 +1,10 @@
+2016-02-11 Thomas Orgis <sobukus@sourcemage.org>
+ * BUILD: C++11 mode because of libxml++, but the gnu++11 variant because
+ plain c++11 breaks dbus-c++ usage in horrible ways
+ * DEPENDS, BUILD, PRE_BUILD: drop alpha, was a fun thing back then
+ * libffado-atomic_ops.patch: gone
+ * PRE_BUILD, ffado-tests-errno.patch: fix errno usage (breaks nowadays)
+
2015-02-13 Thomas Orgis <sobukus@sourcemage.org>
* DETAILS: version 2.2.1
diff --git a/audio-drivers/libffado/PRE_BUILD b/audio-drivers/libffado/PRE_BUILD
index 67a868655b..6e09512fab 100755
--- a/audio-drivers/libffado/PRE_BUILD
+++ b/audio-drivers/libffado/PRE_BUILD
@@ -1,6 +1,4 @@
default_pre_build &&
cd "$SOURCE_DIRECTORY" &&
-if [[ ${SMGL_COMPAT_ARCHS[1]} == alpha ]]; then
- message "${MESSAGE_COLOR}Aptching for portable atomic operations...$DEFAULT_COLOR" &&
- patch -p0 < "$SCRIPT_DIRECTORY/libffado-atomic_ops.patch"
-fi
+# See https://lists.debian.org/debian-sparc/2015/11/msg00051.html .
+patch -p1 < "$SCRIPT_DIRECTORY/ffado-tests-errno.patch"
diff --git a/audio-drivers/libffado/ffado-tests-errno.patch b/audio-drivers/libffado/ffado-tests-errno.patch
new file mode 100644
index 0000000000..0596678f1f
--- /dev/null
+++ b/audio-drivers/libffado/ffado-tests-errno.patch
@@ -0,0 +1,91 @@
+Nur in libffado-2.2.1.fixed/admin: dbus.pyc.
+Nur in libffado-2.2.1.fixed/admin: doxygen.pyc.
+Nur in libffado-2.2.1.fixed/admin: pkgconfig.pyc.
+Nur in libffado-2.2.1.fixed/admin: pyuic4.pyc.
+Nur in libffado-2.2.1.fixed/admin: pyuic.pyc.
+Nur in libffado-2.2.1.fixed/admin: scanreplace.pyc.
+Nur in libffado-2.2.1.fixed: cache.
+Nur in libffado-2.2.1.fixed: .sconsign.dblite.
+Nur in libffado-2.2.1.fixed/support/tools: ffado_diag_helpers.pyc.
+diff -ru libffado-2.2.1/tests/test-enhanced-mixer.cpp libffado-2.2.1.fixed/tests/test-enhanced-mixer.cpp
+--- libffado-2.2.1/tests/test-enhanced-mixer.cpp 2008-05-29 10:24:21.000000000 +0200
++++ libffado-2.2.1.fixed/tests/test-enhanced-mixer.cpp 2016-02-11 10:12:40.929018609 +0100
+@@ -27,6 +27,7 @@
+ #include "libieee1394/ieee1394service.h"
+ #include <cstdlib>
+ #include <cstring>
++#include <cerrno>
+
+ using namespace AVC;
+
+@@ -77,7 +78,7 @@
+ exit(0);
+ }
+
+- int errno = 0;
++ errno = 0;
+ char* tail;
+ int node_id = strtol( argv[1], &tail, 0 );
+ int fb_id = strtol( argv[2], &tail, 0 );
+diff -ru libffado-2.2.1/tests/test-mixer.cpp libffado-2.2.1.fixed/tests/test-mixer.cpp
+--- libffado-2.2.1/tests/test-mixer.cpp 2008-03-23 11:32:19.000000000 +0100
++++ libffado-2.2.1.fixed/tests/test-mixer.cpp 2016-02-11 10:10:46.236452463 +0100
+@@ -28,6 +28,7 @@
+
+ #include "libieee1394/ieee1394service.h"
+ #include <string.h>
++#include <cerrno>
+
+ DECLARE_GLOBAL_DEBUG_MODULE;
+
+@@ -227,7 +228,7 @@
+ exit(0);
+ }
+
+- int errno = 0;
++ errno = 0;
+ char* tail;
+ int port = strtol( argv[1], &tail, 0 );
+ int node_id = strtol( argv[2], &tail, 0 );
+diff -ru libffado-2.2.1/tests/test-pan.cpp libffado-2.2.1.fixed/tests/test-pan.cpp
+--- libffado-2.2.1/tests/test-pan.cpp 2008-09-23 23:51:42.000000000 +0200
++++ libffado-2.2.1.fixed/tests/test-pan.cpp 2016-02-11 10:10:07.618935249 +0100
+@@ -27,6 +27,8 @@
+
+ #include "libieee1394/ieee1394service.h"
+
++#include <cerrno>
++
+ const bool bVerbose = false;
+
+ using namespace AVC;
+@@ -131,7 +133,7 @@
+ exit(0);
+ }
+
+- int errno = 0;
++ errno = 0;
+ char* tail;
+ int node_id = strtol( argv[1], &tail, 0 );
+ int fb_id = strtol( argv[2], &tail, 0 );
+diff -ru libffado-2.2.1/tests/test-volume.cpp libffado-2.2.1.fixed/tests/test-volume.cpp
+--- libffado-2.2.1/tests/test-volume.cpp 2008-05-05 23:29:40.000000000 +0200
++++ libffado-2.2.1.fixed/tests/test-volume.cpp 2016-02-11 10:11:13.669109508 +0100
+@@ -27,6 +27,8 @@
+
+ #include "libieee1394/ieee1394service.h"
+
++#include <cerrno>
++
+ const bool bVerbose = false;
+
+ using namespace AVC;
+@@ -127,7 +129,7 @@
+ exit(0);
+ }
+
+- int errno = 0;
++ errno = 0;
+ char* tail;
+ int node_id = strtol( argv[1], &tail, 0 );
+ int fb_id = strtol( argv[2], &tail, 0 );
diff --git a/audio-drivers/libffado/libffado-atomic_ops.patch b/audio-drivers/libffado/libffado-atomic_ops.patch
deleted file mode 100644
index f195119eea..0000000000
--- a/audio-drivers/libffado/libffado-atomic_ops.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-Index: src/libieee1394/CycleTimerHelper.cpp
-===================================================================
---- src/libieee1394/CycleTimerHelper.cpp (Revision 1319)
-+++ src/libieee1394/CycleTimerHelper.cpp (Arbeitskopie)
-@@ -27,7 +27,6 @@
- #include "ieee1394service.h"
- #include "libutil/PosixThread.h"
- #include "libutil/PosixMutex.h"
--#include "libutil/Atomic.h"
- #include "libutil/Watchdog.h"
-
- #define DLL_PI (3.141592653589793238)
-Index: src/libieee1394/IsoHandlerManager.cpp
-===================================================================
---- src/libieee1394/IsoHandlerManager.cpp (Revision 1319)
-+++ src/libieee1394/IsoHandlerManager.cpp (Arbeitskopie)
-@@ -27,7 +27,7 @@
- #include "cycletimer.h"
- #include "libstreaming/generic/StreamProcessor.h"
-
--#include "libutil/Atomic.h"
-+#include <atomic_ops.h>
- #include "libutil/PosixThread.h"
- #include "libutil/SystemTimeSource.h"
- #include "libutil/Watchdog.h"
-@@ -82,7 +82,7 @@
- IsoTask::requestShadowMapUpdate()
- {
- debugOutput(DEBUG_LEVEL_VERBOSE, "(%p) enter\n", this);
-- INC_ATOMIC(&request_update);
-+ AO_fetch_and_add1(&request_update);
-
- // get the thread going again
- signalActivity();
-@@ -227,7 +227,7 @@
- // if some other thread requested a shadow map update, do it
- if(request_update) {
- updateShadowMapHelper();
-- DEC_ATOMIC(&request_update); // ack the update
-+ AO_fetch_and_sub1(&request_update); // ack the update
- assert(request_update >= 0);
- }
-
-Index: src/libieee1394/IsoHandlerManager.h
-===================================================================
---- src/libieee1394/IsoHandlerManager.h (Revision 1319)
-+++ src/libieee1394/IsoHandlerManager.h (Arbeitskopie)
-@@ -31,6 +31,7 @@
-
- #include "IsoHandler.h"
-
-+#include <atomic_ops.h>
- #include <sys/poll.h>
- #include <errno.h>
- #include <vector>
-@@ -94,7 +95,7 @@
- IsoHandlerManager& m_manager;
-
- // the event request structure
-- int32_t request_update;
-+ AO_t request_update;
-
- // static allocation due to RT constraints
- // this is the map used by the actual thread
-Index: src/libstreaming/generic/StreamProcessor.cpp
-===================================================================
---- src/libstreaming/generic/StreamProcessor.cpp (Revision 1319)
-+++ src/libstreaming/generic/StreamProcessor.cpp (Arbeitskopie)
-@@ -34,8 +34,6 @@
-
- #include "libutil/Time.h"
-
--#include "libutil/Atomic.h"
--
- #include <assert.h>
- #include <math.h>
-
-Index: src/libutil/Thread.h
-===================================================================
---- src/libutil/Thread.h (Revision 1319)
-+++ src/libutil/Thread.h (Arbeitskopie)
-@@ -53,7 +53,6 @@
-
- #include "../debugmodule/debugmodule.h"
-
--#include "Atomic.h"
- #include <pthread.h>
- #include <string>
-
-Index: src/libutil/TimestampedBuffer.cpp
-===================================================================
---- src/libutil/TimestampedBuffer.cpp (Revision 1319)
-+++ src/libutil/TimestampedBuffer.cpp (Arbeitskopie)
-@@ -23,7 +23,6 @@
-
- #include "config.h"
-
--#include "libutil/Atomic.h"
- #include "libieee1394/cycletimer.h"
-
- #include "TimestampedBuffer.h"