summaryrefslogtreecommitdiff
path: root/misc/shimmy/files
diff options
context:
space:
mode:
Diffstat (limited to 'misc/shimmy/files')
-rw-r--r--misc/shimmy/files/llama-cpp-rs/patch-llama-cpp-sys-2_build.rs38
-rw-r--r--misc/shimmy/files/patch-Cargo.toml17
-rw-r--r--misc/shimmy/files/patch-cargo-crates_sys-info-0.9.1_c_info.h24
3 files changed, 79 insertions, 0 deletions
diff --git a/misc/shimmy/files/llama-cpp-rs/patch-llama-cpp-sys-2_build.rs b/misc/shimmy/files/llama-cpp-rs/patch-llama-cpp-sys-2_build.rs
new file mode 100644
index 000000000000..de8f6436d05a
--- /dev/null
+++ b/misc/shimmy/files/llama-cpp-rs/patch-llama-cpp-sys-2_build.rs
@@ -0,0 +1,38 @@
+--- llama-cpp-sys-2/build.rs.orig 2025-09-12 14:16:40 UTC
++++ llama-cpp-sys-2/build.rs
+@@ -20,6 +20,7 @@ enum TargetOs {
+ Apple(AppleVariant),
+ Linux,
+ Android,
++ FreeBSD,
+ }
+
+ macro_rules! debug_log {
+@@ -55,6 +56,8 @@ fn parse_target_os() -> Result<(TargetOs, String), Str
+ Ok((TargetOs::Android, target))
+ } else if target.contains("linux") {
+ Ok((TargetOs::Linux, target))
++ } else if target.contains("freebsd") {
++ Ok((TargetOs::FreeBSD, target))
+ } else {
+ Err(target)
+ }
+@@ -632,7 +635,7 @@ fn main() {
+ config.cflag("/FS");
+ config.cxxflag("/FS");
+ }
+- TargetOs::Linux => {
++ TargetOs::Linux | TargetOs::FreeBSD => {
+ println!("cargo:rustc-link-lib=vulkan");
+ }
+ _ => (),
+@@ -738,6 +741,9 @@ fn main() {
+ }
+ TargetOs::Linux => {
+ println!("cargo:rustc-link-lib=dylib=stdc++");
++ }
++ TargetOs::FreeBSD => {
++ println!("cargo:rustc-link-lib=dylib=c++");
+ }
+ TargetOs::Apple(variant) => {
+ println!("cargo:rustc-link-lib=framework=Foundation");
diff --git a/misc/shimmy/files/patch-Cargo.toml b/misc/shimmy/files/patch-Cargo.toml
new file mode 100644
index 000000000000..02c923822f41
--- /dev/null
+++ b/misc/shimmy/files/patch-Cargo.toml
@@ -0,0 +1,17 @@
+--- Cargo.toml.orig 2025-09-23 13:26:34 UTC
++++ Cargo.toml
+@@ -98,11 +98,11 @@ reqwest = { version = "0.11", features = ["json", "rus
+ reqwest = { version = "0.11", features = ["json", "rustls-tls"], default-features = false }
+
+ # llama.cpp bindings (optional) - using forked version with macOS ARM64 i8mm fix
+-llama-cpp-2 = { version = "0.1.118", optional = true, default-features = false }
++#llama-cpp-2 = { version = "0.1.118", optional = true, default-features = false }
+
+ # Use forked llama-cpp-2 with macOS ARM64 i8mm compatibility fix
+-[patch.crates-io]
+-llama-cpp-2 = { git = "https://github.com/Michael-A-Kuykendall/llama-cpp-rs.git", branch = "fix-macos-arm64-i8mm", package = "llama-cpp-2" }
++#[patch.crates-io]
++llama-cpp-2 = { git = "https://github.com/Michael-A-Kuykendall/llama-cpp-rs.git", branch = "fix-macos-arm64-i8mm", package = "llama-cpp-2", optional = true, default-features = false }
+
+ [dev-dependencies]
+ tokio-tungstenite = "0.20"
diff --git a/misc/shimmy/files/patch-cargo-crates_sys-info-0.9.1_c_info.h b/misc/shimmy/files/patch-cargo-crates_sys-info-0.9.1_c_info.h
new file mode 100644
index 000000000000..c29933a825bb
--- /dev/null
+++ b/misc/shimmy/files/patch-cargo-crates_sys-info-0.9.1_c_info.h
@@ -0,0 +1,24 @@
+--- cargo-crates/sys-info-0.9.1/c/info.h.orig 2025-09-19 02:42:40 UTC
++++ cargo-crates/sys-info-0.9.1/c/info.h
+@@ -1,6 +1,8 @@
+ #ifndef INFO_H_
+ #define INFO_H_
+
++#include <stdint.h>
++
+ typedef struct LoadAvg {
+ double one;
+ double five;
+@@ -28,10 +30,10 @@ unsigned int get_cpu_num(void);
+ const char *get_os_release(void);
+
+ unsigned int get_cpu_num(void);
+-unsigned long get_cpu_speed(void);
++uint64_t get_cpu_speed(void);
+
+ LoadAvg get_loadavg(void);
+-unsigned long get_proc_total(void);
++uint64_t get_proc_total(void);
+
+ MemInfo get_mem_info(void);
+ DiskInfo get_disk_info(void);