Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/games/anki/files/patch-build_ninja__gen_src_archives.rs
16462 views
1
Enable the build for FreeBSD. Technically it would make sense to define
2
corresponding variables, e.g. "FreeBSDX64" for FreeBSD amd64, instead of
3
using the already defined variables.
4
5
The problem here is that new variables have to be defined in other places
6
(= "configure/src/python.rs", "ninja_gen/src/{node,python,protobuf}.rs")
7
and are actually mostly needed to obtain the corresponding binary
8
distributions for Node, Protobuf, and Python.
9
10
Since the latter is already bypassed by setting the environment variables
11
"{NODE,PROTOC,PYTHON,YARN}_BINARY", it makes little sense to patch the
12
other parts of the code for now.
13
14
It probably makes sense to have a generic variable (e.g. "Self::FreeBSD")
15
for all FreeBSD architectures that is used in conjunction with OFFLINE_BUILD
16
to allow building on FreeBSD (and preferably other BSDs) persistently.
17
18
--- build/ninja_gen/src/archives.rs.orig 2025-06-13 08:38:15 UTC
19
+++ build/ninja_gen/src/archives.rs
20
@@ -34,6 +34,8 @@ impl Platform {
21
let os = std::env::consts::OS;
22
let arch = std::env::consts::ARCH;
23
match (os, arch) {
24
+ ("freebsd", "x86_64") => Self::LinuxX64,
25
+ ("freebsd", "aarch64") => Self::LinuxArm,
26
("linux", "x86_64") => Self::LinuxX64,
27
("linux", "aarch64") => Self::LinuxArm,
28
("macos", "x86_64") => Self::MacX64,
29
30