Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Ismael Luceno (27ab9fad51f91c5f5dea9d18a1be290d8d899c00)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Ismael Luceno (27ab9fad51f91c5f5dea9d18a1be290d8d899c00)
  • Date: Tue, 26 Jul 2022 20:12:20 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

audio-libs/rtmidi/HISTORY
| 4
audio-libs/rtmidi/PRE_BUILD
| 3

audio-libs/rtmidi/patches/0001-Use-posix-sched_yield-instead-of-pthread_yield.patch
| 42 ++++++++++
3 files changed, 49 insertions(+)

New commits:
commit 27ab9fad51f91c5f5dea9d18a1be290d8d899c00
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

rtmidi: Fix build against musl

diff --git a/audio-libs/rtmidi/HISTORY b/audio-libs/rtmidi/HISTORY
index f855fd0..b185ca0 100644
--- a/audio-libs/rtmidi/HISTORY
+++ b/audio-libs/rtmidi/HISTORY
@@ -1,3 +1,7 @@
+2022-07-26 Ismael Luceno <ismael AT iodev.co.uk>
+ * patches/0001-Use-posix-sched_yield-instead-of-pthread_yield.patch,
+ PRE_BUILD: fixed build against musl
+
2022-06-18 Treeve Jelbert <treeve AT sourcemage.org>
* DETAILS: version 5.0.0
spell created
diff --git a/audio-libs/rtmidi/PRE_BUILD b/audio-libs/rtmidi/PRE_BUILD
new file mode 100755
index 0000000..c230ad1
--- /dev/null
+++ b/audio-libs/rtmidi/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+apply_patch_dir patches
diff --git
a/audio-libs/rtmidi/patches/0001-Use-posix-sched_yield-instead-of-pthread_yield.patch

b/audio-libs/rtmidi/patches/0001-Use-posix-sched_yield-instead-of-pthread_yield.patch
new file mode 100644
index 0000000..e26e163
--- /dev/null
+++
b/audio-libs/rtmidi/patches/0001-Use-posix-sched_yield-instead-of-pthread_yield.patch
@@ -0,0 +1,42 @@
+From cfe34c02112c256235b62b45895fc2c401fd874d Mon Sep 17 00:00:00 2001
+From: Niclas Rosenvik <youremailsarecrap AT gmail.com>
+Date: Sun, 19 Dec 2021 13:56:27 +0100
+Subject: [PATCH] Use posix sched_yield instead of pthread_yield
+
+Use posix sched_yield instead of pthread_yield.
+pthread_yield is linux specific sched_yield is
+a standard posix function. pthread_yield on linux
+is implemented using sched_yield.
+This makes the jack plugin work on other
+platforms than linux.
+
+Upstream-Status: Backport [commit cfe34c02112c256235b62b45895fc2c401fd874d]
+Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
+---
+ RtMidi.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/RtMidi.cpp b/RtMidi.cpp
+index 6a1c89e670e6..88b55e1880aa 100644
+--- a/RtMidi.cpp
++++ b/RtMidi.cpp
+@@ -3092,6 +3092,7 @@ void MidiOutWinMM :: sendMessage( const unsigned char
*message, size_t size )
+ #include <jack/midiport.h>
+ #include <jack/ringbuffer.h>
+ #include <pthread.h>
++#include <sched.h>
+ #ifdef HAVE_SEMAPHORE
+ #include <semaphore.h>
+ #endif
+@@ -3608,7 +3609,7 @@ void MidiOutJack :: sendMessage( const unsigned char
*message, size_t size )
+ return;
+
+ while ( jack_ringbuffer_write_space(data->buff) < sizeof(nBytes) + size )
+- pthread_yield();
++ sched_yield();
+
+ // Write full message to buffer
+ jack_ringbuffer_write( data->buff, ( char * ) &nBytes, sizeof( nBytes ) );
+--
+2.36.0
+



  • [SM-Commit] GIT changes to master grimoire by Ismael Luceno (27ab9fad51f91c5f5dea9d18a1be290d8d899c00), Ismael Luceno, 07/26/2022

Archive powered by MHonArc 2.6.24.

Top of Page