git: 360291d06f31 - main - japanese/fcitx5-karukan: fix build on powerpc64*

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Thu, 24 Sep 2026 12:54:29 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=360291d06f31ab044b4ce77c8503a3b933b5d04c

commit 360291d06f31ab044b4ce77c8503a3b933b5d04c
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-09-19 09:42:19 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-09-24 12:53:48 +0000

    japanese/fcitx5-karukan: fix build on powerpc64*
    
    Allows to build when CARGO_CFG_TARGET_FEATURE is empty, as is the case
    on powerpc64*.
---
 .../patch-cargo-crates_llama-cpp-sys-2-0.1.156_build.rs  | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/japanese/fcitx5-karukan/files/patch-cargo-crates_llama-cpp-sys-2-0.1.156_build.rs b/japanese/fcitx5-karukan/files/patch-cargo-crates_llama-cpp-sys-2-0.1.156_build.rs
index b2cf65fb66fb..990754c6d686 100644
--- a/japanese/fcitx5-karukan/files/patch-cargo-crates_llama-cpp-sys-2-0.1.156_build.rs
+++ b/japanese/fcitx5-karukan/files/patch-cargo-crates_llama-cpp-sys-2-0.1.156_build.rs
@@ -44,7 +44,17 @@
              if build_shared_libs {
                  (&["lib"], &["so"])
              } else {
-@@ -869,7 +872,7 @@ fn main() {
+@@ -714,8 +717,7 @@ fn main() {
+         }
+ 
+         // I expect this env var to always be present
+-        let features = std::env::var("CARGO_CFG_TARGET_FEATURE")
+-            .expect("Env var CARGO_CFG_TARGET_FEATURE not found.");
++        let features = std::env::var("CARGO_CFG_TARGET_FEATURE").unwrap_or_default();
+         debug_log!("Compiling with target features: {}", features);
+ 
+         // list of rust target_features here:
+@@ -869,7 +871,7 @@ fn main() {
          println!("cargo:rustc-link-lib=android");
      }
  
@@ -53,7 +63,7 @@
          && target_triple.contains("aarch64")
          && target_cpu != Some("native".into())
      {
-@@ -905,7 +908,7 @@ fn main() {
+@@ -905,7 +907,7 @@ fn main() {
                      config.cxxflag("/FS");
                  }
              }
@@ -62,7 +72,7 @@
                  // If we are not using system provided vulkan SDK, add vulkan libs for linking
                  if let Ok(vulkan_path) = env::var("VULKAN_SDK") {
                      let vulkan_lib_path = Path::new(&vulkan_path).join("lib");
-@@ -1363,6 +1366,14 @@ fn main() {
+@@ -1363,6 +1365,14 @@ fn main() {
                  println!("cargo:rustc-link-lib=static=stdc++");
              } else {
                  println!("cargo:rustc-link-lib=dylib=stdc++");