dev-libs/libuv: Sync with Gentoo

It's from Gentoo commit 4f2af276017530099965ad9a89cdf0341d0246d1.
This commit is contained in:
Flatcar Buildbot 2024-04-22 07:11:30 +00:00 committed by Krzesimir Nowak
parent c1987dfffc
commit c89e33ed34
5 changed files with 0 additions and 172 deletions

View File

@ -1,3 +1,2 @@
DIST libuv-1.47.0.tar.gz 1316016 BLAKE2B 6c530f8625366a9bf3f99ac4eb6b3bf3d4f6a05f98848e08cdab884934d79862cf8e79dd2d506ec734d701faab517eba2215063dce4b4216add5cfd6bfebd82e SHA512 3d0e76c4e29c5de14fddda07409f8db30dc64261d1c0bdfce7f70eb8f5ac911707fe662e81c4f117e4068cb0728158fc2b8255f8aa497c0f688e46c7fb93a5b3
DIST libuv-1.48.0.tar.gz 1314877 BLAKE2B 7595797ab732109516ce280fa2efa3474e82e78890087408c7f5b1457ce8f44e53878581bb8d473795e298d7390dd8a269dd2e8970e10b50a2c0bbe1cce187cc SHA512 7ae3a4c02f654a26056db1541e52ccc4c54aaea39c33585f0cf6949af997d0a0a29f30a294c8df6e92f6f6af7ce64c2766b1a2cc67f342e3e139cd55b7326c94
DIST libuv-1.48.0.tar.gz.sig 833 BLAKE2B f0982f7723fa81afe3fe668fc4497fb182a6093f38b185aba4f7359a3248062e7953acaba3f7fd739c9ff5b590664e4b7b81ee138442ffccd46c989c0a10345b SHA512 3a6441bb250badb7bb54a102dd7a1cf47ee4e0ed93ff0369c5b6a4b1e5440e613d85530f19c9ebdc586a97dfe1e06af09e2f90c13448e875dbaee1c703efa955

View File

@ -1,26 +0,0 @@
From 4785ad6337aac8b78224291f0848f25fc8cb41c9 Mon Sep 17 00:00:00 2001
From: Sergey Fedorov <vital.had@gmail.com>
Date: Sat, 18 Nov 2023 16:57:40 +0800
Subject: [PATCH] unix: unbreak macOS < 10.14 (#4230)
From fc70430b09c49032d41ae97db26da10e20941e75 Mon Sep 17 00:00:00 2001
From: Bo Anderson <mail@boanderson.me>
Date: Fri, 24 Nov 2023 10:17:52 +0000
Subject: [PATCH] unix: correct pwritev conditional (#4233)
diff --git a/src/unix/fs.c b/src/unix/fs.c
index 891306daedc..4de0643a6c3 100644
--- a/src/unix/fs.c
+++ b/src/unix/fs.c
@@ -84,7 +84,9 @@
#if defined(__CYGWIN__) || \
(defined(__HAIKU__) && B_HAIKU_VERSION < B_HAIKU_VERSION_1_PRE_BETA_5) || \
- (defined(__sun) && !defined(__illumos__))
+ (defined(__sun) && !defined(__illumos__)) || \
+ (defined(__APPLE__) && !TARGET_OS_IPHONE && \
+ MAC_OS_X_VERSION_MIN_REQUIRED < 110000)
#define preadv(fd, bufs, nbufs, off) \
pread(fd, (bufs)->iov_base, (bufs)->iov_len, off)
#define pwritev(fd, bufs, nbufs, off) \

View File

@ -1,32 +0,0 @@
https://github.com/libuv/libuv/commit/f1444293652cf5478a67b9305271d73ad6d36232
From f1444293652cf5478a67b9305271d73ad6d36232 Mon Sep 17 00:00:00 2001
From: matoro <12038583+matoro@users.noreply.github.com>
Date: Wed, 15 Nov 2023 17:57:06 -0500
Subject: [PATCH] linux: disable io_uring on hppa below kernel 6.1.51 (#4224)
First kernel with support is 6.1, was only fully functional from .51
onwards: https://lore.kernel.org/all/cb912694-b1fe-dbb0-4d8c-d608f3526905@gmx.de/
Co-authored-by: matoro <matoro@users.noreply.github.com>
--- a/src/unix/linux.c
+++ b/src/unix/linux.c
@@ -487,8 +487,16 @@ static int uv__use_io_uring(void) {
use = atomic_load_explicit(&use_io_uring, memory_order_relaxed);
if (use == 0) {
+ use = uv__kernel_version() >=
+#if defined(__hppa__)
+ /* io_uring first supported on parisc in 6.1, functional in .51 */
+ /* https://lore.kernel.org/all/cb912694-b1fe-dbb0-4d8c-d608f3526905@gmx.de/ */
+ /* 6.1.51 */ 0x060133
+#else
/* Older kernels have a bug where the sqpoll thread uses 100% CPU. */
- use = uv__kernel_version() >= /* 5.10.186 */ 0x050ABA ? 1 : -1;
+ /* 5.10.186 */ 0x050ABA
+#endif
+ ? 1 : -1;
/* But users can still enable it if they so desire. */
val = getenv("UV_USE_IO_URING");

View File

@ -1,54 +0,0 @@
https://github.com/libuv/libuv/issues/4211
https://github.com/libuv/libuv/pull/4220
https://github.com/libuv/libuv/commit/54d8364c2406758b572621af381f1d83e01ae46c
From 54d8364c2406758b572621af381f1d83e01ae46c Mon Sep 17 00:00:00 2001
From: Ben Noordhuis <info@bnoordhuis.nl>
Date: Tue, 14 Nov 2023 22:09:30 +0100
Subject: [PATCH] test: check if ipv6 link-local traffic is routable (#4220)
Fixes: https://github.com/libuv/libuv/issues/4211
--- a/test/test-tcp-connect6-error.c
+++ b/test/test-tcp-connect6-error.c
@@ -23,6 +23,7 @@
#include "task.h"
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
static int connect_cb_called = 0;
@@ -75,9 +76,13 @@ TEST_IMPL(tcp_connect6_error_fault) {
TEST_IMPL(tcp_connect6_link_local) {
+ uv_interface_address_t* ifs;
+ uv_interface_address_t* p;
struct sockaddr_in6 addr;
uv_connect_t req;
uv_tcp_t server;
+ int ok;
+ int n;
if (!can_ipv6())
RETURN_SKIP("IPv6 not supported");
@@ -90,6 +95,18 @@ TEST_IMPL(tcp_connect6_link_local) {
RETURN_SKIP("Test does not currently work in QEMU");
#endif /* defined(__QEMU__) */
+ /* Check there's an interface that routes link-local (fe80::/10) traffic. */
+ ASSERT_OK(uv_interface_addresses(&ifs, &n));
+ for (p = ifs; p < &ifs[n]; p++)
+ if (p->address.address6.sin6_family == AF_INET6)
+ if (!memcmp(&p->address.address6.sin6_addr, "\xfe\x80", 2))
+ break;
+ ok = (p < &ifs[n]);
+ uv_free_interface_addresses(ifs, n);
+
+ if (!ok)
+ RETURN_SKIP("IPv6 link-local traffic not supported");
+
ASSERT_OK(uv_ip6_addr("fe80::0bad:babe", 1337, &addr));
ASSERT_OK(uv_tcp_init(uv_default_loop(), &server));

View File

@ -1,59 +0,0 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools
DESCRIPTION="Cross-platform asychronous I/O"
HOMEPAGE="https://github.com/libuv/libuv"
if [[ ${PV} = 9999* ]]; then
EGIT_REPO_URI="https://github.com/libuv/libuv.git"
inherit git-r3
else
SRC_URI="https://github.com/libuv/libuv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
fi
LICENSE="BSD BSD-2 ISC MIT"
SLOT="0/1"
BDEPEND="
dev-build/libtool
virtual/pkgconfig
"
PATCHES=(
"${FILESDIR}"/${P}-ipv6-tests.patch
"${FILESDIR}"/${P}-hppa-kernel.patch
"${FILESDIR}"/${P}-darwin17.patch # upstream
)
src_prepare() {
default
echo "m4_define([UV_EXTRA_AUTOMAKE_FLAGS], [serial-tests])" \
> m4/libuv-extra-automake-flags.m4 || die
if [[ ${CHOST} == *-darwin* && ${CHOST##*darwin} -le 9 ]] ; then
eapply "${FILESDIR}"/${PN}-1.41.0-darwin.patch
fi
# Upstream fails to ship a configure script
eautoreconf
}
src_configure() {
local myeconfargs=(
cc_cv_cflags__g=no
)
econf "${myeconfargs[@]}"
}
src_install() {
default
find "${ED}" -name '*.la' -delete || die
}