commit: 237fa224e002bc112273ecc5897020967bdeb546
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 27 08:46:24 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Apr 27 08:46:24 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=237fa224
dev-python/uv: Backport a ppc fix for tokio-tar dep
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/uv/files/tokio-tar-0.3.1-ppc.patch | 35 +++++++++++++++++++++++++++
dev-python/uv/uv-0.1.38.ebuild | 10 ++++++++
2 files changed, 45 insertions(+)
diff --git a/dev-python/uv/files/tokio-tar-0.3.1-ppc.patch
b/dev-python/uv/files/tokio-tar-0.3.1-ppc.patch
new file mode 100644
index 000000000000..cb3c2f93cf57
--- /dev/null
+++ b/dev-python/uv/files/tokio-tar-0.3.1-ppc.patch
@@ -0,0 +1,35 @@
+diff --git a/src/archive.rs b/src/archive.rs
+index 63f4293..986a146 100644
+--- a/src/archive.rs
++++ b/src/archive.rs
+@@ -3,12 +3,13 @@ use std::{
+ collections::VecDeque,
+ path::Path,
+ pin::Pin,
+- sync::{
+- atomic::{AtomicU64, Ordering},
+- Arc,
+- },
++ sync::Arc,
+ task::{Context, Poll},
+ };
++use portable_atomic::{
++ AtomicU64,
++ Ordering,
++};
+ use tokio::{
+ io::{self, AsyncRead as Read, AsyncReadExt},
+ sync::Mutex,
+diff -dup a/Cargo.toml b/Cargo.toml
+--- a/Cargo.toml 2024-04-27 10:39:21.186708179 +0200
++++ b/Cargo.toml 2024-04-27 10:39:37.940402613 +0200
+@@ -43,6 +43,9 @@ version = "0.2"
+ [dependencies.futures-core]
+ version = "0.3"
+
++[dependencies.portable-atomic]
++version = "1"
++
+ [dependencies.tokio]
+ version = "1"
+ features = [
diff --git a/dev-python/uv/uv-0.1.38.ebuild b/dev-python/uv/uv-0.1.38.ebuild
index 793b60d2c541..64b8639100cb 100644
--- a/dev-python/uv/uv-0.1.38.ebuild
+++ b/dev-python/uv/uv-0.1.38.ebuild
@@ -80,6 +80,16 @@ pkg_setup() {
check_space
}
+src_prepare() {
+ default
+
+ # https://github.com/vorot93/tokio-tar/pull/23
+ # (fortunately uv already depends on portable-atomic, so we don't
+ # have to fight Cargo.lock)
+ cd "${WORKDIR}/cargo_home/gentoo/tokio-tar-0.3.1" || die
+ eapply "${FILESDIR}/tokio-tar-0.3.1-ppc.patch"
+}
+
src_configure() {
local myfeatures=(
# from upstream defaults