<pre style='margin:0'>
Christopher Nielsen (mascguy) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/592219698007c21bd9eaf658e4776d4d56e23935">https://github.com/macports/macports-ports/commit/592219698007c21bd9eaf658e4776d4d56e23935</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 59221969800 coeurl: fix build on old systems
</span>59221969800 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 592219698007c21bd9eaf658e4776d4d56e23935
</span>Author: barracuda156 <vital.had@gmail.com>
AuthorDate: Mon Apr 22 00:32:02 2024 +0800
<span style='display:block; white-space:pre;color:#404040;'> coeurl: fix build on old systems
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Co-authored-by: Ryan Carsten Schmidt <ryandesign@macports.org>
</span>---
net/coeurl/Portfile | 7 +++++++
net/coeurl/files/patch-pthread.diff | 31 +++++++++++++++++++++++++++++++
2 files changed, 38 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/coeurl/Portfile b/net/coeurl/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index f1a8ed8f671..b27ccfa5486 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/net/coeurl/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/coeurl/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -24,6 +24,13 @@ meson.wrap_mode default
</span> # Fix subproject wrap file for curl: [provides] should be [provide]
patchfiles-append patch-subproj-curl.diff
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# Backport of:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# https://github.com/gabime/spdlog/commit/c65aa4e4889939c1afa82001db349cac237a13f8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+pre-build {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system -W {*}[glob ${worksrcpath}/subprojects/spdlog-*] \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "/usr/bin/patch -p0 < [shellescape ${filespath}]/patch-pthread.diff"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> depends_build-append \
port:pkgconfig
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/net/coeurl/files/patch-pthread.diff b/net/coeurl/files/patch-pthread.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..4459b54f81a
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/net/coeurl/files/patch-pthread.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,31 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- include/spdlog/details/os-inl.h 2021-03-26 03:00:48.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ include/spdlog/details/os-inl.h 2024-04-22 00:29:01.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -42,6 +42,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <fcntl.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <unistd.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined __APPLE__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include <AvailabilityMacros.h>
</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;'>+ #ifdef __linux__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <sys/syscall.h> //Use gettid() syscall under linux to get thread id
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -336,7 +340,17 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return static_cast<size_t>(::thr_self());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #elif __APPLE__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ uint64_t tid;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if (MAC_OS_X_VERSION_MAX_ALLOWED < 1060) || defined(__POWERPC__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ tid = pthread_mach_thread_np(pthread_self());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#elif MAC_OS_X_VERSION_MIN_REQUIRED < 1060
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (&pthread_threadid_np) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ pthread_threadid_np(nullptr, &tid);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ tid = pthread_mach_thread_np(pthread_self());
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pthread_threadid_np(nullptr, &tid);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return static_cast<size_t>(tid);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else // Default to standard C++11 (other Unix)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return static_cast<size_t>(std::hash<std::thread::id>()(std::this_thread::get_id()));
</span></pre><pre style='margin:0'>
</pre>