<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/a318030cbf0463313559336c4972bb53a477503f">https://github.com/macports/macports-ports/commit/a318030cbf0463313559336c4972bb53a477503f</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 a318030cbf0 uvw: add -static and -headers subports
</span>a318030cbf0 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit a318030cbf0463313559336c4972bb53a477503f
</span>Author: barracuda156 <vital.had@gmail.com>
AuthorDate: Tue Aug 8 19:34:23 2023 +0800
<span style='display:block; white-space:pre;color:#404040;'> uvw: add -static and -headers subports
</span>---
devel/uvw/Portfile | 62 ++++++++++++++++--
devel/uvw/files/patch-libuv-1.46.diff | 120 ++++++++++++++++++++++++++++++++++
2 files changed, 177 insertions(+), 5 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/uvw/Portfile b/devel/uvw/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index dcb2c7bc01e..a22bdee717e 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/devel/uvw/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/uvw/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -20,8 +20,30 @@ checksums sha256 b93d7cc841ace369f5930953f1b00a008597682a8690950f
</span> rmd160 4e1ce2497a5c4eb30c46697a65595004b7d21c55 \
size 106022
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# uvw upstream may not match the libuv version used by Macports, and some ports may require to be up-to-date with upstream.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Having a single uvw port leads into trouble due to potential, and likely, incompatibilities: https://github.com/oxen-io/lokinet/issues/2197
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# So we offer header-only and static lib variants which are intended to be up-to-date, while letting the main variant to lag behind,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# tracking Macports libuv. Notice, while subports mutually conflict, the main port can co-exist with either of the former.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set upstream_vvw 3.2.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set upstream_luv 1.46
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+subport uvw-static {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ github.setup skypjack uvw ${upstream_vvw} v _libuv_v${upstream_luv}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ conflicts uvw-headers
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fetch.type git
</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;'>+subport uvw-headers {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ github.setup skypjack uvw ${upstream_vvw} v _libuv_v${upstream_luv}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ conflicts uvw-static
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ checksums rmd160 d6579c2b1fc6bdf43aadd20ee2ce9f999225c16e \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 67b1c002f51750264db7686ee99e3330e188d9337dc7ebc0e2e2d41210973c31 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 106942
</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;background:#ffe0e0;'>-depends_lib-append port:libuv
</span>
compiler.cxx_standard 2017
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -29,15 +51,45 @@ configure.pre_args-replace \
</span> -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON \
-DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF
<span style='display:block; white-space:pre;background:#ffe0e0;'>-configure.args-append -DBUILD_DOCS:BOOL=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.args-append -DBUILD_DOCS:BOOL=OFF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${subport} eq ${name}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_lib-append port:libuv
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span> -DBUILD_TESTING:BOOL=ON \
-DBUILD_UVW_SHARED_LIB:BOOL=ON \
-DFIND_LIBUV:BOOL=ON
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # FIXME: two tests fail on ppc: https://github.com/skypjack/uvw/issues/286
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test.run yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} elseif {${subport} eq "uvw-static"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DBUILD_UVW_LIBS:BOOL=ON \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DFETCH_LIBUV:BOOL=ON
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ post-configure {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Sources of libuv are fetched during configure, so magic is needed.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system -W ${cmake.build_dir}/_deps/libuv-src "patch -p0 < [shellescape ${filespath}/patch-libuv-${upstream_luv}.diff]"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} elseif {${subport} eq "uvw-headers"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DBUILD_UVW_LIBS:BOOL=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DFETCH_LIBUV:BOOL=OFF
</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 {${subport} eq "uvw-static" || ${subport} eq "uvw-headers"} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set uvw_libexec ${prefix}/libexec/uvw/
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.pre_args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DBUILD_TESTING:BOOL=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DBUILD_UVW_SHARED_LIB:BOOL=OFF \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCMAKE_INSTALL_INCLUDEDIR:STRING=${uvw_libexec}include \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DCMAKE_INSTALL_LIBDIR:STRING=${uvw_libexec}lib \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DFIND_LIBUV:BOOL=OFF
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pre-destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -d ${destroot}${uvw_libexec}
</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;'>+
</span> platform powerpc {
configure.args-append \
-DUSE_LIBCPP:BOOL=OFF
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-# FIXME: two tests fail on ppc: https://github.com/skypjack/uvw/issues/286
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-test.run yes
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/uvw/files/patch-libuv-1.46.diff b/devel/uvw/files/patch-libuv-1.46.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..7ffbcecf15c
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/uvw/files/patch-libuv-1.46.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,120 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 97b062503185cbafaf80cb5ec1da1c1c953411e1 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: Tue, 8 Aug 2023 19:03:03 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] Fix libuv
</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/unix/darwin-proctitle.c | 2 ++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/unix/fs.c | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/unix/process.c | 10 +++++++---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/unix/tty.c | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ src/unix/udp.c | 2 ++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 5 files changed, 13 insertions(+), 5 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/unix/darwin-proctitle.c src/unix/darwin-proctitle.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 5288083e..c1aa0531 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/unix/darwin-proctitle.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/unix/darwin-proctitle.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -41,9 +41,11 @@ static int uv__pthread_setname_np(const char* name) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ strncpy(namebuf, name, sizeof(namebuf) - 1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ namebuf[sizeof(namebuf) - 1] = '\0';
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if TARGET_OS_IPHONE || (MAC_OS_X_VERSION_MIN_REQUIRED >= 1060)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ err = pthread_setname_np(namebuf);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (err)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return UV__ERR(err);
</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;'>+ return 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/unix/fs.c src/unix/fs.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 6b051c12..18e274cf 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/unix/fs.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/unix/fs.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1410,7 +1410,7 @@ static void uv__to_stat(struct stat* src, uv_stat_t* dst) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dst->st_blksize = src->st_blksize;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dst->st_blocks = src->st_blocks;
</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;'>++#if defined(__APPLE__) && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1050)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dst->st_atim.tv_sec = src->st_atimespec.tv_sec;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dst->st_atim.tv_nsec = src->st_atimespec.tv_nsec;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dst->st_mtim.tv_sec = src->st_mtimespec.tv_sec;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/unix/process.c src/unix/process.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index dd58c18d..35aa9b1b 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/unix/process.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/unix/process.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -36,7 +36,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <poll.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 <spawn.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# if MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# include <spawn.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # include <paths.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # include <sys/kauth.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # include <sys/types.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -407,7 +409,7 @@ static void uv__process_child_init(const uv_process_options_t* options,
</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;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#if defined(__APPLE__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(__APPLE__) && (MAC_OS_X_VERSION_MIN_REQUIRED >= 1050)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ typedef struct uv__posix_spawn_fncs_tag {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ struct {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int (*addchdir_np)(const posix_spawn_file_actions_t *, const char *);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -608,9 +610,11 @@ static int uv__spawn_set_posix_spawn_file_actions(
</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;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (fd == use_fd)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ err = posix_spawn_file_actions_addinherit_np(actions, fd);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ err = posix_spawn_file_actions_adddup2(actions, use_fd, fd);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ assert(err != ENOSYS);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (err != 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -859,7 +863,7 @@ static int uv__spawn_and_init_child(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int exec_errorno;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ssize_t r;
</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;'>++#if defined(__APPLE__) && (MAC_OS_X_VERSION_MIN_REQUIRED >= 1050)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ uv_once(&posix_spawn_init_once, uv__spawn_init_posix_spawn);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Special child process spawn case for macOS Big Sur (11.0) onwards
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/unix/tty.c src/unix/tty.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index d099bdb3..899e3a66 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/unix/tty.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/unix/tty.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -85,7 +85,7 @@ static int uv__tty_is_slave(const int fd) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int dummy;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ result = ioctl(fd, TIOCGPTN, &dummy) != 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-#elif defined(__APPLE__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#elif defined(__APPLE__) && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1050)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ char dummy[256];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ result = ioctl(fd, TIOCPTYGNAME, &dummy) != 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git src/unix/udp.c src/unix/udp.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index c2814512..cba9e821 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/unix/udp.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/unix/udp.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -892,6 +892,7 @@ static int uv__udp_set_membership6(uv_udp_t* handle,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ !defined(__ANDROID__) && \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ !defined(__DragonFly__) && \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ !defined(__QNX__) && \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (!defined(__APPLE__) || (MAC_OS_X_VERSION_MAX_ALLOWED >= 1070)) && \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ !defined(__GNU__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static int uv__udp_set_source_membership4(uv_udp_t* handle,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const struct sockaddr_in* multicast_addr,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1083,6 +1084,7 @@ int uv_udp_set_source_membership(uv_udp_t* handle,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ !defined(__ANDROID__) && \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ !defined(__DragonFly__) && \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ !defined(__QNX__) && \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (!defined(__APPLE__) || (MAC_OS_X_VERSION_MAX_ALLOWED >= 1070)) && \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ !defined(__GNU__)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int err;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ union uv__sockaddr mcast_addr;
</span></pre><pre style='margin:0'>
</pre>