Path: blob/main/games/anki/files/patch-build_ninja__gen_src_archives.rs
16462 views
Enable the build for FreeBSD. Technically it would make sense to define1corresponding variables, e.g. "FreeBSDX64" for FreeBSD amd64, instead of2using the already defined variables.34The problem here is that new variables have to be defined in other places5(= "configure/src/python.rs", "ninja_gen/src/{node,python,protobuf}.rs")6and are actually mostly needed to obtain the corresponding binary7distributions for Node, Protobuf, and Python.89Since the latter is already bypassed by setting the environment variables10"{NODE,PROTOC,PYTHON,YARN}_BINARY", it makes little sense to patch the11other parts of the code for now.1213It probably makes sense to have a generic variable (e.g. "Self::FreeBSD")14for all FreeBSD architectures that is used in conjunction with OFFLINE_BUILD15to allow building on FreeBSD (and preferably other BSDs) persistently.1617--- build/ninja_gen/src/archives.rs.orig 2025-06-13 08:38:15 UTC18+++ build/ninja_gen/src/archives.rs19@@ -34,6 +34,8 @@ impl Platform {20let os = std::env::consts::OS;21let arch = std::env::consts::ARCH;22match (os, arch) {23+ ("freebsd", "x86_64") => Self::LinuxX64,24+ ("freebsd", "aarch64") => Self::LinuxArm,25("linux", "x86_64") => Self::LinuxX64,26("linux", "aarch64") => Self::LinuxArm,27("macos", "x86_64") => Self::MacX64,282930