commit:     454aa91a8bbaa5684c72b63cb026fc180070afd7
Author:     Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
AuthorDate: Tue Aug 12 12:59:27 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Sep 11 03:27:02 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=454aa91a

app-misc/anki: fix build w/ dev-lang/rust:1.89.0

Closes: https://bugs.gentoo.org/961732
Signed-off-by: Lucio Sauer <watermanpaint <AT> posteo.net>
Part-of: https://github.com/gentoo/gentoo/pull/43425
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-misc/anki/anki-25.07.3.ebuild                  |  1 +
 app-misc/anki/files/anki-25.07.3-rust-1.89.0.patch | 24 ++++++++++++++++++++++
 2 files changed, 25 insertions(+)

diff --git a/app-misc/anki/anki-25.07.3.ebuild 
b/app-misc/anki/anki-25.07.3.ebuild
index ba93d8224e33..7023b5a6aca6 100644
--- a/app-misc/anki/anki-25.07.3.ebuild
+++ b/app-misc/anki/anki-25.07.3.ebuild
@@ -130,6 +130,7 @@ EPYTEST_PLUGINS=()
 distutils_enable_tests pytest
 
 PATCHES=(
+       "${FILESDIR}"/${P}-rust-1.89.0.patch
        "${FILESDIR}"/24.06.3/remove-yarn.patch
        "${FILESDIR}"/24.04.1/remove-mypy-protobuf.patch
        "${FILESDIR}"/24.04.1/revert-cert-store-hack.patch

diff --git a/app-misc/anki/files/anki-25.07.3-rust-1.89.0.patch 
b/app-misc/anki/files/anki-25.07.3-rust-1.89.0.patch
new file mode 100644
index 000000000000..b2df930ec4d6
--- /dev/null
+++ b/app-misc/anki/files/anki-25.07.3-rust-1.89.0.patch
@@ -0,0 +1,24 @@
+Rust 1.89.0 removes support for lint level attributes for 
`text_direction_codepoint_in_literal` except at the crate level.
+https://github.com/rust-lang/rust/pull/141004
+https://aur.archlinux.org/packages/anki#comment-1035765
+From: Robert H <[email protected]>
+--- a/rslib/i18n/src/generated.rs
++++ b/rslib/i18n/src/generated.rs
+@@ -4,6 +4,5 @@
+ // Include auto-generated content
+ 
+ #![allow(clippy::all)]
+-#![allow(text_direction_codepoint_in_literal)]
+ 
+ include!(concat!(env!("OUT_DIR"), "/strings.rs"));
+--- a/rslib/i18n/src/lib.rs
++++ b/rslib/i18n/src/lib.rs
+@@ -1,6 +1,8 @@
+ // Copyright: Ankitects Pty Ltd and contributors
+ // License: GNU AGPL, version 3 or later; 
http://www.gnu.org/licenses/agpl.html
+ 
++#![allow(text_direction_codepoint_in_literal)]
++
+ mod generated;
+ 
+ use std::borrow::Cow;

Reply via email to