<pre style='margin:0'>
Herby Gillot (herbygillot) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/6db0461202566f8243ec8f41fdfd2799018fa7c6">https://github.com/macports/macports-ports/commit/6db0461202566f8243ec8f41fdfd2799018fa7c6</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 6db04612025 libdispatch-legacy: minor fix-ups
</span>6db04612025 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 6db0461202566f8243ec8f41fdfd2799018fa7c6
</span>Author: barracuda156 <vital.had@gmail.com>
AuthorDate: Sat Apr 13 21:56:39 2024 +0800
<span style='display:block; white-space:pre;color:#404040;'> libdispatch-legacy: minor fix-ups
</span>---
devel/libdispatch-legacy/Portfile | 19 ++++++++-
.../files/patch-no-crashreporter_info.diff | 47 ++++++++++++++++++++++
.../files/patch-pthread-overcommit.diff | 13 ++++++
3 files changed, 78 insertions(+), 1 deletion(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/libdispatch-legacy/Portfile b/devel/libdispatch-legacy/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index ed78d61a4c9..06b79f1b215 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/libdispatch-legacy/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/libdispatch-legacy/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5,9 +5,11 @@ PortGroup xcode 1.0
</span>
name libdispatch-legacy
version 84.5.5
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 2
</span> categories devel
platforms {darwin < 11}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# TODO: ppc64 is not yet supported in 10.6 SDK.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+supported_archs i386 ppc x86_64
</span> license Apache-2
maintainers {@barracuda156 gmail.com:vital.had} openmaintainer
description Grand Central Dispatch for PowerPC systems and pre-Snow Leopard x86
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -64,6 +66,21 @@ patch.dir ${workpath}
</span> patchfiles-append patch-project.pbxproj.diff
patchfiles-append pthread_threadid_np-expose-on-PowerPC.diff
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# This is not clear why __crashreporter_info__ does not work, it allegedly exists in 10.5+,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# but other libs may fail to link with libdispatch if this symbol is used:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Undefined symbols: "___crashreporter_info__", referenced from:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# ___crashreporter_info__$non_lazy_ptr in libdispatch.a(semaphore.o)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# However, it is only used in a single instance for debugging info.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# We can verily live without that.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append patch-no-crashreporter_info.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# The following symbol is not supported in libpthreads for powerpc.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# So we may get something like this:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Undefined symbols: "_pthread_workqueue_attr_setovercommit_np", referenced from:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# __dispatch_root_queues_init in libdispatch.a(queue.o)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# FIXME: perhaps it can be borrowed or reimplemented.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# See: https://people.freebsd.org/~sson/thrworkq/pthread_workqueue_2009_12_14.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append patch-pthread-overcommit.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> worksrcdir ${workpath}/${LIBDISPATCH}
compiler.blacklist apple* macports*
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/libdispatch-legacy/files/patch-no-crashreporter_info.diff b/devel/libdispatch-legacy/files/patch-no-crashreporter_info.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..39e43f6b083
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/libdispatch-legacy/files/patch-no-crashreporter_info.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,47 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- libdispatch-84.5.5/src/internal.h 2021-10-06 13:21:40.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ libdispatch-84.5.5/src/internal.h 2024-04-13 21:38:05.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -264,7 +264,6 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // 2) A hand crafted call to mach_msg*() screwed up. Use MIG.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define DISPATCH_VERIFY_MIG(x) do { \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if ((x) == MIG_REPLY_MISMATCH) { \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- __crashreporter_info__ = "MIG_REPLY_MISMATCH"; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _dispatch_hardware_crash(); \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } while (0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -272,24 +271,20 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if defined(__x86_64__) || defined(__i386__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // total hack to ensure that return register of a function is not trashed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define DISPATCH_CRASH(x) do { \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- asm("mov %1, %0" : "=m" (__crashreporter_info__) : "c" ("BUG IN LIBDISPATCH: " x)); \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _dispatch_hardware_crash(); \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } while (0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define DISPATCH_CLIENT_CRASH(x) do { \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- asm("mov %1, %0" : "=m" (__crashreporter_info__) : "c" ("BUG IN CLIENT OF LIBDISPATCH: " x)); \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _dispatch_hardware_crash(); \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } while (0)
</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;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define DISPATCH_CRASH(x) do { \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- __crashreporter_info__ = "BUG IN LIBDISPATCH: " x; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _dispatch_hardware_crash(); \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } while (0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define DISPATCH_CLIENT_CRASH(x) do { \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- __crashreporter_info__ = "BUG IN CLIENT OF LIBDISPATCH: " x; \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ _dispatch_hardware_crash(); \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } while (0)
</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;'>+--- libdispatch-84.5.5/src/os_shims.h 2021-10-06 13:21:40.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ libdispatch-84.5.5/src/os_shims.h 2024-04-13 21:36:45.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -31,7 +31,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <pthread_machdep.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <pthread_workqueue.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-__private_extern__ const char *__crashreporter_info__;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++// extern const char *__crashreporter_info__;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static const unsigned long dispatch_queue_key = __PTK_LIBDISPATCH_KEY0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static const unsigned long dispatch_sema4_key = __PTK_LIBDISPATCH_KEY1;
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/libdispatch-legacy/files/patch-pthread-overcommit.diff b/devel/libdispatch-legacy/files/patch-pthread-overcommit.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..3df0479e0a8
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/libdispatch-legacy/files/patch-pthread-overcommit.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,13 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- libdispatch-84.5.5/src/queue.c 2021-10-06 13:21:40.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ libdispatch-84.5.5/src/queue.c 2024-04-13 20:44:43.000000000 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1160,8 +1160,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (i = 0; i < DISPATCH_ROOT_QUEUE_COUNT; i++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ r = pthread_workqueue_attr_setqueuepriority_np(&pwq_attr, _dispatch_rootq2wq_pri(i));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dispatch_assume_zero(r);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef __POWERPC__
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ r = pthread_workqueue_attr_setovercommit_np(&pwq_attr, i & 1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dispatch_assume_zero(r);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // some software hangs if the non-overcommitting queues do not overcommit when threads block
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!(i & 1)) {
</span></pre><pre style='margin:0'>
</pre>