From 38c70edf673ae180b6f737f7980c1a248eee71e1 Mon Sep 17 00:00:00 2001 From: "riseproject-dev[bot]" <330740410+riseproject-dev[bot]@users.noreply.github.com> Date: Thu, 29 Oct 2026 08:55:37 +0000 Subject: [PATCH 1/2] anki: Add versions 26.9, 26.9.1, 26.9.2, 26.9.3 Signed-off-by: riseproject-dev[bot] <330740410+riseproject-dev[bot]@users.noreply.github.com> --- docs/packages/anki.yaml | 4 + ...001-build-add-riscv64-linux-platform.patch | 115 ++++++++++++++++++ ...001-build-add-riscv64-linux-platform.patch | 115 ++++++++++++++++++ ...001-build-add-riscv64-linux-platform.patch | 115 ++++++++++++++++++ ...001-build-add-riscv64-linux-platform.patch | 115 ++++++++++++++++++ 5 files changed, 464 insertions(+) create mode 100644 patches/anki/26.9.1/0001-build-add-riscv64-linux-platform.patch create mode 100644 patches/anki/26.9.2/0001-build-add-riscv64-linux-platform.patch create mode 100644 patches/anki/26.9.3/0001-build-add-riscv64-linux-platform.patch create mode 100644 patches/anki/26.9/0001-build-add-riscv64-linux-platform.patch diff --git a/docs/packages/anki.yaml b/docs/packages/anki.yaml index 34a680472ce6..fce7af5c40c4 100644 --- a/docs/packages/anki.yaml +++ b/docs/packages/anki.yaml @@ -9,3 +9,7 @@ versions: - filename: anki-26.8.1-cp310-abi3-manylinux_2_39_riscv64.whl sha256: 6cb7fb3bc2cfae4265aa13adb5b0393996ae7658c6b6868302d5cd13390e1090 requires-python: '>=3.10' +- version: '26.9' +- version: 26.9.1 +- version: 26.9.2 +- version: 26.9.3 diff --git a/patches/anki/26.9.1/0001-build-add-riscv64-linux-platform.patch b/patches/anki/26.9.1/0001-build-add-riscv64-linux-platform.patch new file mode 100644 index 000000000000..9fcda6ec4a30 --- /dev/null +++ b/patches/anki/26.9.1/0001-build-add-riscv64-linux-platform.patch @@ -0,0 +1,115 @@ +Upstream-Status: To upstream [not yet submitted] + +Add a riscv64 Linux platform to the build system + +Platform::current() panics on any arch other than x86_64/aarch64, so +configure cannot run on riscv64 at all. Add a LinuxRiscv variant: rustls +like the other Linux targets, the riscv64gc Rust triple, uv's riscv64gc +release archive, and a manylinux_2_39_riscv64 wheel tag. protoc and node +publish no riscv64 binary, so protoc requires PROTOC_BINARY, and node +reuses the x86_64 entry (only reached without NODE_BINARY), the same way +LinuxArm already reuses the x86_64 clang-format binary. + +diff --git a/build/configure/src/python.rs b/build/configure/src/python.rs +index 947582f..a8e4fe8 100644 +--- a/build/configure/src/python.rs ++++ b/build/configure/src/python.rs +@@ -155,6 +155,7 @@ impl BuildAction for BuildWheel { + let platform_tag = match platform { + Platform::LinuxX64 => "manylinux_2_35_x86_64", + Platform::LinuxArm => "manylinux_2_35_aarch64", ++ Platform::LinuxRiscv => "manylinux_2_39_riscv64", + Platform::MacX64 => "macosx_12_0_x86_64", + Platform::MacArm => "macosx_12_0_arm64", + Platform::WindowsX64 => "win_amd64", +diff --git a/build/ninja_gen/src/archives.rs b/build/ninja_gen/src/archives.rs +index 3d2120b..ca6852d 100644 +--- a/build/ninja_gen/src/archives.rs ++++ b/build/ninja_gen/src/archives.rs +@@ -23,6 +23,7 @@ pub struct OnlineArchive { + pub enum Platform { + LinuxX64, + LinuxArm, ++ LinuxRiscv, + MacX64, + MacArm, + WindowsX64, +@@ -36,6 +37,7 @@ impl Platform { + match (os, arch) { + ("linux", "x86_64") => Self::LinuxX64, + ("linux", "aarch64") => Self::LinuxArm, ++ ("linux", "riscv64") => Self::LinuxRiscv, + ("macos", "x86_64") => Self::MacX64, + ("macos", "aarch64") => Self::MacArm, + ("windows", "x86_64") => Self::WindowsX64, +@@ -49,7 +51,7 @@ impl Platform { + // On Linux, wheels are not allowed to link to OpenSSL, and linking setup + // caused pain for AnkiDroid in the past. On other platforms, we stick to + // native libraries, for smaller binaries. +- Platform::LinuxX64 | Platform::LinuxArm => "rustls", ++ Platform::LinuxX64 | Platform::LinuxArm | Platform::LinuxRiscv => "rustls", + _ => "native-tls", + } + } +@@ -58,6 +60,7 @@ impl Platform { + match self { + Platform::LinuxX64 => "x86_64-unknown-linux-gnu", + Platform::LinuxArm => "aarch64-unknown-linux-gnu", ++ Platform::LinuxRiscv => "riscv64gc-unknown-linux-gnu", + Platform::MacX64 => "x86_64-apple-darwin", + Platform::MacArm => "aarch64-apple-darwin", + Platform::WindowsX64 => "x86_64-pc-windows-msvc", +diff --git a/build/ninja_gen/src/node.rs b/build/ninja_gen/src/node.rs +index b6731e2..608f29b 100644 +--- a/build/ninja_gen/src/node.rs ++++ b/build/ninja_gen/src/node.rs +@@ -18,7 +18,8 @@ use crate::input::BuildInput; + + pub fn node_archive(platform: Platform) -> OnlineArchive { + match platform { +- Platform::LinuxX64 => OnlineArchive { ++ // todo: nodejs.org publishes no riscv64 build; set NODE_BINARY ++ Platform::LinuxX64 | Platform::LinuxRiscv => OnlineArchive { + url: "https://nodejs.org/dist/v22.17.0/node-v22.17.0-linux-x64.tar.xz", + sha256: "325c0f1261e0c61bcae369a1274028e9cfb7ab7949c05512c5b1e630f7e80e12", + }, +diff --git a/build/ninja_gen/src/protobuf.rs b/build/ninja_gen/src/protobuf.rs +index 1198f65..eaba26b 100644 +--- a/build/ninja_gen/src/protobuf.rs ++++ b/build/ninja_gen/src/protobuf.rs +@@ -31,6 +31,9 @@ pub fn protoc_archive(platform: Platform) -> OnlineArchive { + sha256: "6c554de11cea04c56ebf8e45b54434019b1cd85223d4bbd25c282425e306ecc2", + } + }, ++ Platform::LinuxRiscv => { ++ panic!("protoc publishes no riscv64 binary; set PROTOC_BINARY") ++ } + Platform::MacX64 | Platform::MacArm => { + OnlineArchive { + url: "https://github.com/protocolbuffers/protobuf/releases/download/v31.1/protoc-31.1-osx-universal_binary.zip", +@@ -54,7 +57,7 @@ fn clang_format_archive(platform: Platform) -> OnlineArchive { + sha256: "64060bc4dbca30d0d96aab9344e2783008b16e1cae019a2532f1126ca5ec5449", + } + } +- Platform::LinuxArm => { ++ Platform::LinuxArm | Platform::LinuxRiscv => { + // todo: replace with arm64 binary + OnlineArchive { + url: "https://github.com/ankitects/clang-format-binaries/releases/download/anki-2021-01-09/clang-format_linux_x86_64.zip", +diff --git a/build/ninja_gen/src/python.rs b/build/ninja_gen/src/python.rs +index 16c61f7..755ca13 100644 +--- a/build/ninja_gen/src/python.rs ++++ b/build/ninja_gen/src/python.rs +@@ -37,6 +37,12 @@ pub fn uv_archive(platform: Platform) -> OnlineArchive { + sha256: "eee8dd658d20e5ac85fec9c2326b6cbc9d83a1eef09ef07433e58698ac849591", + } + }, ++ Platform::LinuxRiscv => { ++ OnlineArchive { ++ url: "https://github.com/astral-sh/uv/releases/download/0.11.8/uv-riscv64gc-unknown-linux-gnu.tar.gz", ++ sha256: "dd43289c567fda3ca59ec714ffca09125f1149289448667f36a4bb7c29c859be", ++ } ++ }, + Platform::MacX64 => { + OnlineArchive { + url: "https://github.com/astral-sh/uv/releases/download/0.11.8/uv-x86_64-apple-darwin.tar.gz", diff --git a/patches/anki/26.9.2/0001-build-add-riscv64-linux-platform.patch b/patches/anki/26.9.2/0001-build-add-riscv64-linux-platform.patch new file mode 100644 index 000000000000..9fcda6ec4a30 --- /dev/null +++ b/patches/anki/26.9.2/0001-build-add-riscv64-linux-platform.patch @@ -0,0 +1,115 @@ +Upstream-Status: To upstream [not yet submitted] + +Add a riscv64 Linux platform to the build system + +Platform::current() panics on any arch other than x86_64/aarch64, so +configure cannot run on riscv64 at all. Add a LinuxRiscv variant: rustls +like the other Linux targets, the riscv64gc Rust triple, uv's riscv64gc +release archive, and a manylinux_2_39_riscv64 wheel tag. protoc and node +publish no riscv64 binary, so protoc requires PROTOC_BINARY, and node +reuses the x86_64 entry (only reached without NODE_BINARY), the same way +LinuxArm already reuses the x86_64 clang-format binary. + +diff --git a/build/configure/src/python.rs b/build/configure/src/python.rs +index 947582f..a8e4fe8 100644 +--- a/build/configure/src/python.rs ++++ b/build/configure/src/python.rs +@@ -155,6 +155,7 @@ impl BuildAction for BuildWheel { + let platform_tag = match platform { + Platform::LinuxX64 => "manylinux_2_35_x86_64", + Platform::LinuxArm => "manylinux_2_35_aarch64", ++ Platform::LinuxRiscv => "manylinux_2_39_riscv64", + Platform::MacX64 => "macosx_12_0_x86_64", + Platform::MacArm => "macosx_12_0_arm64", + Platform::WindowsX64 => "win_amd64", +diff --git a/build/ninja_gen/src/archives.rs b/build/ninja_gen/src/archives.rs +index 3d2120b..ca6852d 100644 +--- a/build/ninja_gen/src/archives.rs ++++ b/build/ninja_gen/src/archives.rs +@@ -23,6 +23,7 @@ pub struct OnlineArchive { + pub enum Platform { + LinuxX64, + LinuxArm, ++ LinuxRiscv, + MacX64, + MacArm, + WindowsX64, +@@ -36,6 +37,7 @@ impl Platform { + match (os, arch) { + ("linux", "x86_64") => Self::LinuxX64, + ("linux", "aarch64") => Self::LinuxArm, ++ ("linux", "riscv64") => Self::LinuxRiscv, + ("macos", "x86_64") => Self::MacX64, + ("macos", "aarch64") => Self::MacArm, + ("windows", "x86_64") => Self::WindowsX64, +@@ -49,7 +51,7 @@ impl Platform { + // On Linux, wheels are not allowed to link to OpenSSL, and linking setup + // caused pain for AnkiDroid in the past. On other platforms, we stick to + // native libraries, for smaller binaries. +- Platform::LinuxX64 | Platform::LinuxArm => "rustls", ++ Platform::LinuxX64 | Platform::LinuxArm | Platform::LinuxRiscv => "rustls", + _ => "native-tls", + } + } +@@ -58,6 +60,7 @@ impl Platform { + match self { + Platform::LinuxX64 => "x86_64-unknown-linux-gnu", + Platform::LinuxArm => "aarch64-unknown-linux-gnu", ++ Platform::LinuxRiscv => "riscv64gc-unknown-linux-gnu", + Platform::MacX64 => "x86_64-apple-darwin", + Platform::MacArm => "aarch64-apple-darwin", + Platform::WindowsX64 => "x86_64-pc-windows-msvc", +diff --git a/build/ninja_gen/src/node.rs b/build/ninja_gen/src/node.rs +index b6731e2..608f29b 100644 +--- a/build/ninja_gen/src/node.rs ++++ b/build/ninja_gen/src/node.rs +@@ -18,7 +18,8 @@ use crate::input::BuildInput; + + pub fn node_archive(platform: Platform) -> OnlineArchive { + match platform { +- Platform::LinuxX64 => OnlineArchive { ++ // todo: nodejs.org publishes no riscv64 build; set NODE_BINARY ++ Platform::LinuxX64 | Platform::LinuxRiscv => OnlineArchive { + url: "https://nodejs.org/dist/v22.17.0/node-v22.17.0-linux-x64.tar.xz", + sha256: "325c0f1261e0c61bcae369a1274028e9cfb7ab7949c05512c5b1e630f7e80e12", + }, +diff --git a/build/ninja_gen/src/protobuf.rs b/build/ninja_gen/src/protobuf.rs +index 1198f65..eaba26b 100644 +--- a/build/ninja_gen/src/protobuf.rs ++++ b/build/ninja_gen/src/protobuf.rs +@@ -31,6 +31,9 @@ pub fn protoc_archive(platform: Platform) -> OnlineArchive { + sha256: "6c554de11cea04c56ebf8e45b54434019b1cd85223d4bbd25c282425e306ecc2", + } + }, ++ Platform::LinuxRiscv => { ++ panic!("protoc publishes no riscv64 binary; set PROTOC_BINARY") ++ } + Platform::MacX64 | Platform::MacArm => { + OnlineArchive { + url: "https://github.com/protocolbuffers/protobuf/releases/download/v31.1/protoc-31.1-osx-universal_binary.zip", +@@ -54,7 +57,7 @@ fn clang_format_archive(platform: Platform) -> OnlineArchive { + sha256: "64060bc4dbca30d0d96aab9344e2783008b16e1cae019a2532f1126ca5ec5449", + } + } +- Platform::LinuxArm => { ++ Platform::LinuxArm | Platform::LinuxRiscv => { + // todo: replace with arm64 binary + OnlineArchive { + url: "https://github.com/ankitects/clang-format-binaries/releases/download/anki-2021-01-09/clang-format_linux_x86_64.zip", +diff --git a/build/ninja_gen/src/python.rs b/build/ninja_gen/src/python.rs +index 16c61f7..755ca13 100644 +--- a/build/ninja_gen/src/python.rs ++++ b/build/ninja_gen/src/python.rs +@@ -37,6 +37,12 @@ pub fn uv_archive(platform: Platform) -> OnlineArchive { + sha256: "eee8dd658d20e5ac85fec9c2326b6cbc9d83a1eef09ef07433e58698ac849591", + } + }, ++ Platform::LinuxRiscv => { ++ OnlineArchive { ++ url: "https://github.com/astral-sh/uv/releases/download/0.11.8/uv-riscv64gc-unknown-linux-gnu.tar.gz", ++ sha256: "dd43289c567fda3ca59ec714ffca09125f1149289448667f36a4bb7c29c859be", ++ } ++ }, + Platform::MacX64 => { + OnlineArchive { + url: "https://github.com/astral-sh/uv/releases/download/0.11.8/uv-x86_64-apple-darwin.tar.gz", diff --git a/patches/anki/26.9.3/0001-build-add-riscv64-linux-platform.patch b/patches/anki/26.9.3/0001-build-add-riscv64-linux-platform.patch new file mode 100644 index 000000000000..9fcda6ec4a30 --- /dev/null +++ b/patches/anki/26.9.3/0001-build-add-riscv64-linux-platform.patch @@ -0,0 +1,115 @@ +Upstream-Status: To upstream [not yet submitted] + +Add a riscv64 Linux platform to the build system + +Platform::current() panics on any arch other than x86_64/aarch64, so +configure cannot run on riscv64 at all. Add a LinuxRiscv variant: rustls +like the other Linux targets, the riscv64gc Rust triple, uv's riscv64gc +release archive, and a manylinux_2_39_riscv64 wheel tag. protoc and node +publish no riscv64 binary, so protoc requires PROTOC_BINARY, and node +reuses the x86_64 entry (only reached without NODE_BINARY), the same way +LinuxArm already reuses the x86_64 clang-format binary. + +diff --git a/build/configure/src/python.rs b/build/configure/src/python.rs +index 947582f..a8e4fe8 100644 +--- a/build/configure/src/python.rs ++++ b/build/configure/src/python.rs +@@ -155,6 +155,7 @@ impl BuildAction for BuildWheel { + let platform_tag = match platform { + Platform::LinuxX64 => "manylinux_2_35_x86_64", + Platform::LinuxArm => "manylinux_2_35_aarch64", ++ Platform::LinuxRiscv => "manylinux_2_39_riscv64", + Platform::MacX64 => "macosx_12_0_x86_64", + Platform::MacArm => "macosx_12_0_arm64", + Platform::WindowsX64 => "win_amd64", +diff --git a/build/ninja_gen/src/archives.rs b/build/ninja_gen/src/archives.rs +index 3d2120b..ca6852d 100644 +--- a/build/ninja_gen/src/archives.rs ++++ b/build/ninja_gen/src/archives.rs +@@ -23,6 +23,7 @@ pub struct OnlineArchive { + pub enum Platform { + LinuxX64, + LinuxArm, ++ LinuxRiscv, + MacX64, + MacArm, + WindowsX64, +@@ -36,6 +37,7 @@ impl Platform { + match (os, arch) { + ("linux", "x86_64") => Self::LinuxX64, + ("linux", "aarch64") => Self::LinuxArm, ++ ("linux", "riscv64") => Self::LinuxRiscv, + ("macos", "x86_64") => Self::MacX64, + ("macos", "aarch64") => Self::MacArm, + ("windows", "x86_64") => Self::WindowsX64, +@@ -49,7 +51,7 @@ impl Platform { + // On Linux, wheels are not allowed to link to OpenSSL, and linking setup + // caused pain for AnkiDroid in the past. On other platforms, we stick to + // native libraries, for smaller binaries. +- Platform::LinuxX64 | Platform::LinuxArm => "rustls", ++ Platform::LinuxX64 | Platform::LinuxArm | Platform::LinuxRiscv => "rustls", + _ => "native-tls", + } + } +@@ -58,6 +60,7 @@ impl Platform { + match self { + Platform::LinuxX64 => "x86_64-unknown-linux-gnu", + Platform::LinuxArm => "aarch64-unknown-linux-gnu", ++ Platform::LinuxRiscv => "riscv64gc-unknown-linux-gnu", + Platform::MacX64 => "x86_64-apple-darwin", + Platform::MacArm => "aarch64-apple-darwin", + Platform::WindowsX64 => "x86_64-pc-windows-msvc", +diff --git a/build/ninja_gen/src/node.rs b/build/ninja_gen/src/node.rs +index b6731e2..608f29b 100644 +--- a/build/ninja_gen/src/node.rs ++++ b/build/ninja_gen/src/node.rs +@@ -18,7 +18,8 @@ use crate::input::BuildInput; + + pub fn node_archive(platform: Platform) -> OnlineArchive { + match platform { +- Platform::LinuxX64 => OnlineArchive { ++ // todo: nodejs.org publishes no riscv64 build; set NODE_BINARY ++ Platform::LinuxX64 | Platform::LinuxRiscv => OnlineArchive { + url: "https://nodejs.org/dist/v22.17.0/node-v22.17.0-linux-x64.tar.xz", + sha256: "325c0f1261e0c61bcae369a1274028e9cfb7ab7949c05512c5b1e630f7e80e12", + }, +diff --git a/build/ninja_gen/src/protobuf.rs b/build/ninja_gen/src/protobuf.rs +index 1198f65..eaba26b 100644 +--- a/build/ninja_gen/src/protobuf.rs ++++ b/build/ninja_gen/src/protobuf.rs +@@ -31,6 +31,9 @@ pub fn protoc_archive(platform: Platform) -> OnlineArchive { + sha256: "6c554de11cea04c56ebf8e45b54434019b1cd85223d4bbd25c282425e306ecc2", + } + }, ++ Platform::LinuxRiscv => { ++ panic!("protoc publishes no riscv64 binary; set PROTOC_BINARY") ++ } + Platform::MacX64 | Platform::MacArm => { + OnlineArchive { + url: "https://github.com/protocolbuffers/protobuf/releases/download/v31.1/protoc-31.1-osx-universal_binary.zip", +@@ -54,7 +57,7 @@ fn clang_format_archive(platform: Platform) -> OnlineArchive { + sha256: "64060bc4dbca30d0d96aab9344e2783008b16e1cae019a2532f1126ca5ec5449", + } + } +- Platform::LinuxArm => { ++ Platform::LinuxArm | Platform::LinuxRiscv => { + // todo: replace with arm64 binary + OnlineArchive { + url: "https://github.com/ankitects/clang-format-binaries/releases/download/anki-2021-01-09/clang-format_linux_x86_64.zip", +diff --git a/build/ninja_gen/src/python.rs b/build/ninja_gen/src/python.rs +index 16c61f7..755ca13 100644 +--- a/build/ninja_gen/src/python.rs ++++ b/build/ninja_gen/src/python.rs +@@ -37,6 +37,12 @@ pub fn uv_archive(platform: Platform) -> OnlineArchive { + sha256: "eee8dd658d20e5ac85fec9c2326b6cbc9d83a1eef09ef07433e58698ac849591", + } + }, ++ Platform::LinuxRiscv => { ++ OnlineArchive { ++ url: "https://github.com/astral-sh/uv/releases/download/0.11.8/uv-riscv64gc-unknown-linux-gnu.tar.gz", ++ sha256: "dd43289c567fda3ca59ec714ffca09125f1149289448667f36a4bb7c29c859be", ++ } ++ }, + Platform::MacX64 => { + OnlineArchive { + url: "https://github.com/astral-sh/uv/releases/download/0.11.8/uv-x86_64-apple-darwin.tar.gz", diff --git a/patches/anki/26.9/0001-build-add-riscv64-linux-platform.patch b/patches/anki/26.9/0001-build-add-riscv64-linux-platform.patch new file mode 100644 index 000000000000..9fcda6ec4a30 --- /dev/null +++ b/patches/anki/26.9/0001-build-add-riscv64-linux-platform.patch @@ -0,0 +1,115 @@ +Upstream-Status: To upstream [not yet submitted] + +Add a riscv64 Linux platform to the build system + +Platform::current() panics on any arch other than x86_64/aarch64, so +configure cannot run on riscv64 at all. Add a LinuxRiscv variant: rustls +like the other Linux targets, the riscv64gc Rust triple, uv's riscv64gc +release archive, and a manylinux_2_39_riscv64 wheel tag. protoc and node +publish no riscv64 binary, so protoc requires PROTOC_BINARY, and node +reuses the x86_64 entry (only reached without NODE_BINARY), the same way +LinuxArm already reuses the x86_64 clang-format binary. + +diff --git a/build/configure/src/python.rs b/build/configure/src/python.rs +index 947582f..a8e4fe8 100644 +--- a/build/configure/src/python.rs ++++ b/build/configure/src/python.rs +@@ -155,6 +155,7 @@ impl BuildAction for BuildWheel { + let platform_tag = match platform { + Platform::LinuxX64 => "manylinux_2_35_x86_64", + Platform::LinuxArm => "manylinux_2_35_aarch64", ++ Platform::LinuxRiscv => "manylinux_2_39_riscv64", + Platform::MacX64 => "macosx_12_0_x86_64", + Platform::MacArm => "macosx_12_0_arm64", + Platform::WindowsX64 => "win_amd64", +diff --git a/build/ninja_gen/src/archives.rs b/build/ninja_gen/src/archives.rs +index 3d2120b..ca6852d 100644 +--- a/build/ninja_gen/src/archives.rs ++++ b/build/ninja_gen/src/archives.rs +@@ -23,6 +23,7 @@ pub struct OnlineArchive { + pub enum Platform { + LinuxX64, + LinuxArm, ++ LinuxRiscv, + MacX64, + MacArm, + WindowsX64, +@@ -36,6 +37,7 @@ impl Platform { + match (os, arch) { + ("linux", "x86_64") => Self::LinuxX64, + ("linux", "aarch64") => Self::LinuxArm, ++ ("linux", "riscv64") => Self::LinuxRiscv, + ("macos", "x86_64") => Self::MacX64, + ("macos", "aarch64") => Self::MacArm, + ("windows", "x86_64") => Self::WindowsX64, +@@ -49,7 +51,7 @@ impl Platform { + // On Linux, wheels are not allowed to link to OpenSSL, and linking setup + // caused pain for AnkiDroid in the past. On other platforms, we stick to + // native libraries, for smaller binaries. +- Platform::LinuxX64 | Platform::LinuxArm => "rustls", ++ Platform::LinuxX64 | Platform::LinuxArm | Platform::LinuxRiscv => "rustls", + _ => "native-tls", + } + } +@@ -58,6 +60,7 @@ impl Platform { + match self { + Platform::LinuxX64 => "x86_64-unknown-linux-gnu", + Platform::LinuxArm => "aarch64-unknown-linux-gnu", ++ Platform::LinuxRiscv => "riscv64gc-unknown-linux-gnu", + Platform::MacX64 => "x86_64-apple-darwin", + Platform::MacArm => "aarch64-apple-darwin", + Platform::WindowsX64 => "x86_64-pc-windows-msvc", +diff --git a/build/ninja_gen/src/node.rs b/build/ninja_gen/src/node.rs +index b6731e2..608f29b 100644 +--- a/build/ninja_gen/src/node.rs ++++ b/build/ninja_gen/src/node.rs +@@ -18,7 +18,8 @@ use crate::input::BuildInput; + + pub fn node_archive(platform: Platform) -> OnlineArchive { + match platform { +- Platform::LinuxX64 => OnlineArchive { ++ // todo: nodejs.org publishes no riscv64 build; set NODE_BINARY ++ Platform::LinuxX64 | Platform::LinuxRiscv => OnlineArchive { + url: "https://nodejs.org/dist/v22.17.0/node-v22.17.0-linux-x64.tar.xz", + sha256: "325c0f1261e0c61bcae369a1274028e9cfb7ab7949c05512c5b1e630f7e80e12", + }, +diff --git a/build/ninja_gen/src/protobuf.rs b/build/ninja_gen/src/protobuf.rs +index 1198f65..eaba26b 100644 +--- a/build/ninja_gen/src/protobuf.rs ++++ b/build/ninja_gen/src/protobuf.rs +@@ -31,6 +31,9 @@ pub fn protoc_archive(platform: Platform) -> OnlineArchive { + sha256: "6c554de11cea04c56ebf8e45b54434019b1cd85223d4bbd25c282425e306ecc2", + } + }, ++ Platform::LinuxRiscv => { ++ panic!("protoc publishes no riscv64 binary; set PROTOC_BINARY") ++ } + Platform::MacX64 | Platform::MacArm => { + OnlineArchive { + url: "https://github.com/protocolbuffers/protobuf/releases/download/v31.1/protoc-31.1-osx-universal_binary.zip", +@@ -54,7 +57,7 @@ fn clang_format_archive(platform: Platform) -> OnlineArchive { + sha256: "64060bc4dbca30d0d96aab9344e2783008b16e1cae019a2532f1126ca5ec5449", + } + } +- Platform::LinuxArm => { ++ Platform::LinuxArm | Platform::LinuxRiscv => { + // todo: replace with arm64 binary + OnlineArchive { + url: "https://github.com/ankitects/clang-format-binaries/releases/download/anki-2021-01-09/clang-format_linux_x86_64.zip", +diff --git a/build/ninja_gen/src/python.rs b/build/ninja_gen/src/python.rs +index 16c61f7..755ca13 100644 +--- a/build/ninja_gen/src/python.rs ++++ b/build/ninja_gen/src/python.rs +@@ -37,6 +37,12 @@ pub fn uv_archive(platform: Platform) -> OnlineArchive { + sha256: "eee8dd658d20e5ac85fec9c2326b6cbc9d83a1eef09ef07433e58698ac849591", + } + }, ++ Platform::LinuxRiscv => { ++ OnlineArchive { ++ url: "https://github.com/astral-sh/uv/releases/download/0.11.8/uv-riscv64gc-unknown-linux-gnu.tar.gz", ++ sha256: "dd43289c567fda3ca59ec714ffca09125f1149289448667f36a4bb7c29c859be", ++ } ++ }, + Platform::MacX64 => { + OnlineArchive { + url: "https://github.com/astral-sh/uv/releases/download/0.11.8/uv-x86_64-apple-darwin.tar.gz", From ea3d63f3a7bdaad46fe8c0399afb373e3ded928f Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Sun, 1 Nov 2026 16:06:46 +0100 Subject: [PATCH 2/2] build-anki: install mock for the pylib tests pylib/tests/test_notes.py and test_tags.py import mock, which is not pulled in by the anki wheel and so was missing from the test venv. --- .github/workflows/build-anki.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-anki.yml b/.github/workflows/build-anki.yml index bd62ff6e3c42..11c34c95cf90 100644 --- a/.github/workflows/build-anki.yml +++ b/.github/workflows/build-anki.yml @@ -167,7 +167,7 @@ jobs: PIP_ONLY_BINARY: orjson,protobuf run: | /opt/python/${{ matrix.python }}-${{ matrix.python }}/bin/python -m venv /venv - /venv/bin/pip install dist/anki-*.whl pytest==8.4.1 + /venv/bin/pip install dist/anki-*.whl pytest==8.4.1 mock /venv/bin/python -c "import anki._rsbridge as m; assert m.__file__.endswith('.so'), m.__file__" # Upstream's check:pytest:pylib. Staged out of the checkout so pylib/anki does