<pre style='margin:0'>
Vadym-Valdis Yudaiev (judaew) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/0379c87280faa1a14758cb61a52fb4e6d5922a97">https://github.com/macports/macports-ports/commit/0379c87280faa1a14758cb61a52fb4e6d5922a97</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 0379c87280f spdlog: fix for systems without pthread_threadid_np
</span>0379c87280f is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 0379c87280faa1a14758cb61a52fb4e6d5922a97
</span>Author: Sergey Fedorov <vital.had@gmail.com>
AuthorDate: Fri Apr 28 04:55:21 2023 +0800
<span style='display:block; white-space:pre;color:#404040;'> spdlog: fix for systems without pthread_threadid_np
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Fixes: https://trac.macports.org/ticket/67212
</span>---
devel/spdlog/Portfile | 3 +++
devel/spdlog/files/patch-pthread.diff | 32 ++++++++++++++++++++++++++++++++
2 files changed, 35 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/spdlog/Portfile b/devel/spdlog/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 515b57fc039..c22a5d6497c 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/spdlog/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/spdlog/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -24,3 +24,6 @@ long_description {*}${description}
</span>
compiler.cxx_standard 2011
compiler.thread_local_storage yes
<span style='display:block; white-space:pre;background:#e0ffe0;'>+
</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;'>+patchfiles patch-pthread.diff
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/spdlog/files/patch-pthread.diff b/devel/spdlog/files/patch-pthread.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..69a9810ccff
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/spdlog/files/patch-pthread.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,32 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- include/spdlog/details/os-inl.h.orig 2022-11-03 05:13:08.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ include/spdlog/details/os-inl.h 2023-04-28 04:51:00.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -60,6 +60,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif // unix
</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;'>+ #ifndef __has_feature // Clang - feature checking macros.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # define __has_feature(x) 0 // Compatibility with non-clang compilers.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -353,7 +357,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;'>+- pthread_threadid_np(nullptr, &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>