<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/9d993022977e52dd2bde67935e61e1033dd256a0">https://github.com/macports/macports-ports/commit/9d993022977e52dd2bde67935e61e1033dd256a0</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 9d993022977 tio: replace post-patch with upstream fix, revbump to pick changes
</span>9d993022977 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 9d993022977e52dd2bde67935e61e1033dd256a0
</span>Author: aeiouaeiouaeiouaeiouaeiouaeiou <aeioudev@outlook.com>
AuthorDate: Tue Jul 23 02:17:33 2024 +0300
<span style='display:block; white-space:pre;color:#404040;'> tio: replace post-patch with upstream fix, revbump to pick changes
</span>---
comms/tio/Portfile | 13 ++++---------
comms/tio/files/patch-socket.diff | 34 ++++++++++++++++++++++++++++++++++
2 files changed, 38 insertions(+), 9 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/comms/tio/Portfile b/comms/tio/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 0cd8e4b432d..f1e75c1d309 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/comms/tio/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/comms/tio/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -10,7 +10,7 @@ legacysupport.newest_darwin_requires_legacy 15
</span>
github.setup tio tio 3.6 v
github.tarball_from releases
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 1
</span>
categories comms
installs_libs no
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -31,14 +31,9 @@ checksums rmd160 d403f8d5d371a8d6020a85c1ce5c7ecc729c5f27 \
</span> sha256 04a91686f8a19f157b885a7c146a138b4cff6a3fb8dba48723d1fdad15c61167 \
size 3458048
<span style='display:block; white-space:pre;background:#ffe0e0;'>-# https://lists.apple.com/archives/macnetworkprog/2002/Dec/msg00091.html
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# After (!) 18 years, it has only been implemented in macOS Big Sur
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-if {${os.platform} eq "darwin" && ${os.major} < 20} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- post-patch {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- reinplace "s|MSG_NOSIGNAL|SO_NOSIGPIPE|" \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ${worksrcpath}/src/socket.c
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- }
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# https://github.com/tio/tio/issues/265
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# remove this patch in the next release
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append patch-socket.diff
</span>
depends_build-append path:bin/pkg-config:pkgconfig
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/comms/tio/files/patch-socket.diff b/comms/tio/files/patch-socket.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..cda27291b41
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/comms/tio/files/patch-socket.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,34 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 6163bc392bd353c2157d3e5a29bf914ada541100 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Martin Lund <martin.lund@keep-it-simple.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Sat, 20 Jul 2024 08:23:59 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] Fix socket send call on platforms without MSG_NOSIGNAL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+To fix build issue encountered on MacOS Catalina but may apply to other
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+platforms.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/socket.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/socket.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -226,7 +226,11 @@ void socket_configure(void)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exit(EXIT_FAILURE);
</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;'>++#if defined(SO_NOSIGPIPE) && !defined(MSG_NOSIGNAL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR | SO_NOSIGPIPE, &optval, sizeof(optval)))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval)))
</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;'>+ tio_error_printf("Failed to set socket options (%s)", strerror(errno));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exit(EXIT_FAILURE);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -270,7 +274,12 @@ void socket_write(char input_char)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (clientfds[i] != -1)
</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;'>++#if defined(SO_NOSIGPIPE) && !defined(MSG_NOSIGNAL)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (send(clientfds[i], &input_char, 1, 0) <= 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (send(clientfds[i], &input_char, 1, MSG_NOSIGNAL) <= 0)
</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;'>+ tio_error_printf_silent("Failed to write to socket (%s)", strerror(errno));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ close(clientfds[i]);
</span></pre><pre style='margin:0'>
</pre>