<pre style='margin:0'>
Perry E. Metzger (pmetzger) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/5aade5737214145d6bfdfded4c09bca82f0b0d12">https://github.com/macports/macports-ports/commit/5aade5737214145d6bfdfded4c09bca82f0b0d12</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 5aade5737214145d6bfdfded4c09bca82f0b0d12
</span>Author: barracuda156 <vital.had@gmail.com>
AuthorDate: Sat Jan 20 12:50:18 2024 +0800
<span style='display:block; white-space:pre;color:#404040;'> libsoundio: support testing, patch for older systems
</span>---
audio/libsoundio/Portfile | 15 +++++++++++++
...NOTE_TRIGGER-conditionally-use-EV_TRIGGER.patch | 26 ++++++++++++++++++++++
2 files changed, 41 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/audio/libsoundio/Portfile b/audio/libsoundio/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index ba213f151bd..f6713212a21 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/audio/libsoundio/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/audio/libsoundio/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -26,6 +26,9 @@ long_description ${name} is a lightweight abstraction \
</span> on your behalf\; instead exposing the raw power \
of the underlying backend.
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# https://github.com/andrewrk/libsoundio/pull/272
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append 0001-os.c-use-NOTE_TRIGGER-conditionally-use-EV_TRIGGER.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # uses C11
compiler.c_standard 2011
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -53,7 +56,19 @@ variant jack description {Enable Jack support} {
</span>
# error: use of undeclared identifier 'kAudioObjectPropertyScopeInput'
# 10.8+ https://developer.apple.com/documentation/coreaudio/1494464-anonymous/kaudioobjectpropertyscopeinput?language=objc
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# https://github.com/andrewrk/libsoundio/issues/290
</span> if {${os.platform} eq "darwin" && ${os.major} < 12} {
configure.args-replace -DENABLE_COREAUDIO=ON -DENABLE_COREAUDIO=OFF
default_variants-append +pulseaudio
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant tests description {Enable testing} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace -DBUILD_TESTS=OFF -DBUILD_TESTS=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test.run yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test.dir ${cmake.build_dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # To ensure it does not pick libsoundio which may be installed in the prefix:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test.env DYLD_LIBRARY_PATH=${test.dir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test.cmd "./unit_tests && ./overflow && ./underflow"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test.target
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/audio/libsoundio/files/0001-os.c-use-NOTE_TRIGGER-conditionally-use-EV_TRIGGER.patch b/audio/libsoundio/files/0001-os.c-use-NOTE_TRIGGER-conditionally-use-EV_TRIGGER.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..47d01632add
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/audio/libsoundio/files/0001-os.c-use-NOTE_TRIGGER-conditionally-use-EV_TRIGGER.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,26 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From f88e80dc277676d75ea66eb6a8fcb88121e54e32 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: barracuda156 <vital.had@gmail.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Fri, 25 Nov 2022 14:11:28 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] os.c: use NOTE_TRIGGER conditionally, use EV_TRIGGER as a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fallback
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/os.c | 4 ++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 4 insertions(+)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/os.c src/os.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 36d1c0a..7381d78 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/os.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/os.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -419,7 +419,11 @@ void soundio_os_cond_signal(struct SoundIoOsCond *cond,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ memset(&kev, 0, sizeof(kev));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ kev.ident = notify_ident;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ kev.filter = EVFILT_USER;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(NOTE_TRIGGER)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ kev.fflags = NOTE_TRIGGER;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#elif defined(EV_TRIGGER)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ kev.flags = EV_TRIGGER;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (kevent(cond->kq_id, &kev, 1, NULL, 0, &timeout) == -1) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (errno == EINTR)
</span></pre><pre style='margin:0'>
</pre>