repo/gentoo:master commit in: dev-python/ast-serialize/files/, dev-python/ast-serialize/

Michał Górny <[email protected]>
Newsgroups gmane.linux.gentoo.cvs
Message-ID <1786805381.7b6c2489b7e9a40aeb37f4325e878db8e0abfec4.mgorny@gentoo>
commit:     7b6c2489b7e9a40aeb37f4325e878db8e0abfec4
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 15 14:49:18 2026 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Aug 15 14:49:41 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7b6c2489

dev-python/ast-serialize: Workaround the ppc32 build failure

Bug: https://github.com/mypyc/ast_serialize/issues/68
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../ast-serialize/ast-serialize-0.8.0.ebuild       |  8 +++++++
 dev-python/ast-serialize/files/get-size2-ppc.patch | 27 ++++++++++++++++++++++
 2 files changed, 35 insertions(+)

diff --git a/dev-python/ast-serialize/ast-serialize-0.8.0.ebuild b/dev-python/ast-serialize/ast-serialize-0.8.0.ebuild
index 49018273d6e1..cd48db714c39 100644
--- a/dev-python/ast-serialize/ast-serialize-0.8.0.ebuild
+++ b/dev-python/ast-serialize/ast-serialize-0.8.0.ebuild
@@ -230,6 +230,14 @@ src_unpack() {
 	cargo_src_unpack
 }
 
+src_prepare() {
+	default
+
+	# hack around https://github.com/mypyc/ast_serialize/issues/68
+	cd "${ECARGO_VENDOR}"/get-size2-* || die
+	eapply "${FILESDIR}/get-size2-ppc.patch"
+}
+
 python_test_all() {
 	cargo_src_test
 }

diff --git a/dev-python/ast-serialize/files/get-size2-ppc.patch b/dev-python/ast-serialize/files/get-size2-ppc.patch
new file mode 100644
index 000000000000..a4e4ce65b1e2
--- /dev/null
+++ b/dev-python/ast-serialize/files/get-size2-ppc.patch
@@ -0,0 +1,27 @@
+diff '--color=auto' -dupr old/src/impls/primitives.rs get-size2-0.8.0/src/impls/primitives.rs
+--- old/src/impls/primitives.rs	2026-08-15 16:43:00.804672506 +0200
++++ get-size2-0.8.0/src/impls/primitives.rs	2026-08-15 16:43:22.885502883 +0200
+@@ -5,8 +5,8 @@ use std::num::{
+     NonZeroU16, NonZeroU32, NonZeroU64, NonZeroU128, NonZeroUsize,
+ };
+ use std::sync::atomic::{
+-    AtomicBool, AtomicI8, AtomicI16, AtomicI32, AtomicI64, AtomicIsize, AtomicU8, AtomicU16,
+-    AtomicU32, AtomicU64, AtomicUsize, Ordering,
++    AtomicBool, AtomicI8, AtomicI16, AtomicI32, AtomicIsize, AtomicU8, AtomicU16,
++    AtomicU32, AtomicUsize, Ordering,
+ };
+ use std::time::{Duration, Instant, SystemTime};
+ 
+@@ -46,12 +46,10 @@ impl GetSize for AtomicBool {}
+ impl GetSize for AtomicI8 {}
+ impl GetSize for AtomicI16 {}
+ impl GetSize for AtomicI32 {}
+-impl GetSize for AtomicI64 {}
+ impl GetSize for AtomicIsize {}
+ impl GetSize for AtomicU8 {}
+ impl GetSize for AtomicU16 {}
+ impl GetSize for AtomicU32 {}
+-impl GetSize for AtomicU64 {}
+ impl GetSize for AtomicUsize {}
+ impl GetSize for Ordering {}
+ impl GetSize for std::cmp::Ordering {}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.