commit:     40133476b7cb91fc70935f3ba50e99ba544926a1
Author:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Fri Sep  4 11:36:24 2020 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Fri Sep  4 11:36:37 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40133476

media-sound/ardour: fix compilation in 6.2-r1

Closes: https://bugs.gentoo.org/740312
Package-Manager: Portage-3.0.5, Repoman-3.0.1
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 media-sound/ardour/ardour-6.2-r1.ebuild            |  1 +
 ...-6.2-use-signed-int-for-atomic-operations.patch | 69 ++++++++++++++++++++++
 2 files changed, 70 insertions(+)

diff --git a/media-sound/ardour/ardour-6.2-r1.ebuild 
b/media-sound/ardour/ardour-6.2-r1.ebuild
index 9935afaf3d5..97893a719d6 100644
--- a/media-sound/ardour/ardour-6.2-r1.ebuild
+++ b/media-sound/ardour/ardour-6.2-r1.ebuild
@@ -71,6 +71,7 @@ DEPEND="${RDEPEND}
 
 PATCHES=(
        "${FILESDIR}/${P}-fix-no-nls.patch"
+       "${FILESDIR}/${P}-use-signed-int-for-atomic-operations.patch"
 )
 
 pkg_setup() {

diff --git 
a/media-sound/ardour/files/ardour-6.2-use-signed-int-for-atomic-operations.patch
 
b/media-sound/ardour/files/ardour-6.2-use-signed-int-for-atomic-operations.patch
new file mode 100644
index 00000000000..90454593b68
--- /dev/null
+++ 
b/media-sound/ardour/files/ardour-6.2-use-signed-int-for-atomic-operations.patch
@@ -0,0 +1,69 @@
+From 6d950d15ba5192a86c57d8045d1d26f9ad4be0db Mon Sep 17 00:00:00 2001
+From: Robin Gareus <[email protected]>
+Date: Thu, 16 Jul 2020 16:13:21 +0200
+Subject: [PATCH] Use signed int for atomic operations -- #8314
+
+---
+ libs/pbd/pbd/mpmc_queue.h | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libs/pbd/pbd/mpmc_queue.h b/libs/pbd/pbd/mpmc_queue.h
+index a7909a901..2c08068e1 100644
+--- a/libs/pbd/pbd/mpmc_queue.h
++++ b/libs/pbd/pbd/mpmc_queue.h
+@@ -82,7 +82,7 @@ public:
+       push_back (T const& data)
+       {
+               cell_t* cell;
+-              guint   pos = g_atomic_int_get (&_enqueue_pos);
++              gint    pos = g_atomic_int_get (&_enqueue_pos);
+               for (;;) {
+                       cell         = &_buffer[pos & _buffer_mask];
+                       guint    seq = g_atomic_int_get (&cell->_sequence);
+@@ -108,7 +108,7 @@ public:
+       pop_front (T& data)
+       {
+               cell_t* cell;
+-              guint   pos = g_atomic_int_get (&_dequeue_pos);
++              gint    pos = g_atomic_int_get (&_dequeue_pos);
+               for (;;) {
+                       cell         = &_buffer[pos & _buffer_mask];
+                       guint    seq = g_atomic_int_get (&cell->_sequence);
+@@ -138,8 +138,8 @@ private:
+       cell_t* _buffer;
+       size_t  _buffer_mask;
+ 
+-      volatile guint _enqueue_pos;
+-      volatile guint _dequeue_pos;
++      volatile gint _enqueue_pos;
++      volatile gint _dequeue_pos;
+ };
+ 
+ } /* end namespace */
+-- 
+2.28.0
+
+From 9fcb51de2e34f9fee74838e57317ad44d21c40d0 Mon Sep 17 00:00:00 2001
+From: Robin Gareus <[email protected]>
+Date: Thu, 16 Jul 2020 18:07:14 +0200
+Subject: [PATCH] Use signed int for atomic operations part II -- #8314
+
+---
+ libs/ardour/ardour/session.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
+index dcc8c88ed..f491f7f17 100644
+--- a/libs/ardour/ardour/session.h
++++ b/libs/ardour/ardour/session.h
+@@ -1762,7 +1762,7 @@ private:
+               OnlyLoop,
+       };
+ 
+-      volatile guint _punch_or_loop; // enum PunchLoopLock
++      volatile gint _punch_or_loop; // enum PunchLoopLock
+       gint current_usecs_per_track;
+ 
+       bool punch_active () const;
+-- 
+2.28.0

Reply via email to