git: 12d8f60fab70 - main - misc/opencode: update to 2.1.0

From: Oleksii Samorukov <samm_at_FreeBSD.org>
Date: Tue, 20 Oct 2026 15:47:11 UTC
The branch main has been updated by samm:

URL: https://cgit.FreeBSD.org/ports/commit/?id=12d8f60fab7008c90265e74c0997b314684c7cee

commit 12d8f60fab7008c90265e74c0997b314684c7cee
Author:     Oleksii Samorukov <samm@FreeBSD.org>
AuthorDate: 2026-10-20 15:46:50 +0000
Commit:     Oleksii Samorukov <samm@FreeBSD.org>
CommitDate: 2026-10-20 15:46:57 +0000

    misc/opencode: update to 2.1.0
---
 misc/opencode/Makefile                             | 11 ++++-----
 misc/opencode/distinfo                             | 14 +++++------
 misc/opencode/files/opencode-pty-baseline.patch    | 28 ----------------------
 misc/opencode/files/opencode-pty-build.rs.patch    | 15 +-----------
 .../patch-packages_cli_script_opencode-pty.ts      | 17 ++++++++-----
 misc/opencode/files/setup-opentui-freebsd.py       |  2 +-
 6 files changed, 25 insertions(+), 62 deletions(-)

diff --git a/misc/opencode/Makefile b/misc/opencode/Makefile
index 117efa0378f8..f90529f1beaf 100644
--- a/misc/opencode/Makefile
+++ b/misc/opencode/Makefile
@@ -1,7 +1,6 @@
 PORTNAME=	opencode
 DISTVERSIONPREFIX=	v
-DISTVERSION=	2.0.32
-PORTREVISION=	1
+DISTVERSION=	2.1.0
 CATEGORIES=	misc
 
 # Upstream ships no FreeBSD builds of OpenTUI's Zig core, fff's Rust cdylib, the
@@ -11,9 +10,9 @@ CATEGORIES=	misc
 # files/setup-*-freebsd.py, files/*.patch and files/webui-wasm-package.json.
 #
 # OPENTUI_VERSION and FFF_VERSION must match the pinned @opentui/core and
-# @ff-labs/fff-bun releases (packages/cli/package.json, packages/core/package.json)
-# or the native FFI ABI breaks.
-OPENTUI_VERSION=	0.5.17
+# @ff-labs/fff-bun releases (the root package.json catalog and
+# packages/core/package.json) or the native FFI ABI breaks.
+OPENTUI_VERSION=	0.6.6
 FFF_VERSION=	0.10.5
 #
 # opencode-pty is the persistent terminal daemon the client spawns.  Its version
@@ -21,7 +20,7 @@ FFF_VERSION=	0.10.5
 # as the bundled client (packages/cli/package.json, packages/core/package.json),
 # and GHOSTTY_REVISION must match its ghostty-revision file, or the client
 # rejects the daemon as a protocol mismatch.
-OPENCODE_PTY_VERSION=	0.2.0
+OPENCODE_PTY_VERSION=	0.3.1
 GHOSTTY_REVISION=	ab0b9da9e88fcb4b0533a1854e84628f663930af
 
 MASTER_SITES=	https://registry.npmjs.org/@ff-labs/fff-bun/-/:fffbun
diff --git a/misc/opencode/distinfo b/misc/opencode/distinfo
index aba8491e44ef..c049e364fe40 100644
--- a/misc/opencode/distinfo
+++ b/misc/opencode/distinfo
@@ -1,4 +1,4 @@
-TIMESTAMP = 1792475737
+TIMESTAMP = 1792491194
 SHA256 (opencode/fff-bun-0.10.5.tgz) = 16afa70bcb078c9b28378545396298f73a67fc10e7ff7bba4f9ff1d0462c27f0
 SIZE (opencode/fff-bun-0.10.5.tgz) = 83121
 SHA256 (opencode/rust/crates/ahash-0.8.12.crate) = 5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75
@@ -741,13 +741,13 @@ SHA256 (opencode/rust/crates/zmij-1.0.21.crate) = b8848ee67ecc8aedbaf3e4122217af
 SIZE (opencode/rust/crates/zmij-1.0.21.crate) = 26665
 SHA256 (opencode/rust/crates/zmij-1.0.23.crate) = 29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b
 SIZE (opencode/rust/crates/zmij-1.0.23.crate) = 28612
-SHA256 (opencode/anomalyco-opencode-v2.0.32_GH0.tar.gz) = d9e080eae0965104dfe3857aabbc8ce976e9aeaa62110ce101bc1a107d243d97
-SIZE (opencode/anomalyco-opencode-v2.0.32_GH0.tar.gz) = 79782481
-SHA256 (opencode/anomalyco-opentui-v0.5.17_GH0.tar.gz) = f272f54f96ff230a188c9cf9f593105c6e784f0a14fdbcb7169e523d9c9b7a96
-SIZE (opencode/anomalyco-opentui-v0.5.17_GH0.tar.gz) = 30017526
+SHA256 (opencode/anomalyco-opencode-v2.1.0_GH0.tar.gz) = c2e3f3b1684c93e61efb5bf94ea3dec62f6cfaf9b4930e5103ab49b37d3b2a39
+SIZE (opencode/anomalyco-opencode-v2.1.0_GH0.tar.gz) = 79690631
+SHA256 (opencode/anomalyco-opentui-v0.6.6_GH0.tar.gz) = 9c7539a47c73f11022fcb81840fb7856342804a3d133a8e2a0a8cbe0c66a4fed
+SIZE (opencode/anomalyco-opentui-v0.6.6_GH0.tar.gz) = 31020853
 SHA256 (opencode/dmtrKovalenko-fff-v0.10.5_GH0.tar.gz) = db50fa8aaabb77211f8dbeb4d77dc8852e0ee52070e40bfd9ef5af44ac50accc
 SIZE (opencode/dmtrKovalenko-fff-v0.10.5_GH0.tar.gz) = 2798793
-SHA256 (opencode/anomalyco-opencode-pty-v0.2.0_GH0.tar.gz) = 7fc1d1ebf4b74cd1b2a83f059afa29a899990b85cf078e73b703004370a52754
-SIZE (opencode/anomalyco-opencode-pty-v0.2.0_GH0.tar.gz) = 72121
+SHA256 (opencode/anomalyco-opencode-pty-v0.3.1_GH0.tar.gz) = 101efcfde719cd9ead649d1fc1e1c31a31e89c854bf63b9cd2e977a7661f18a0
+SIZE (opencode/anomalyco-opencode-pty-v0.3.1_GH0.tar.gz) = 108956
 SHA256 (opencode/ghostty-org-ghostty-ab0b9da9e88fcb4b0533a1854e84628f663930af_GH0.tar.gz) = 651ffa67e98060bc41aac04fcab45f71fb9998eb265957d85a89218ecf94d50b
 SIZE (opencode/ghostty-org-ghostty-ab0b9da9e88fcb4b0533a1854e84628f663930af_GH0.tar.gz) = 38024504
diff --git a/misc/opencode/files/opencode-pty-baseline.patch b/misc/opencode/files/opencode-pty-baseline.patch
deleted file mode 100644
index a9d9f1583e2f..000000000000
--- a/misc/opencode/files/opencode-pty-baseline.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff --git a/misc/opencode/files/opencode-pty-build.rs.patch b/misc/opencode/files/opencode-pty-build.rs.patch
-index 203a6b308..ac2555d6a 100644
---- a/misc/opencode/files/opencode-pty-build.rs.patch
-+++ b/misc/opencode/files/opencode-pty-build.rs.patch
-@@ -5,6 +5,9 @@ HEAD matches ghostty-revision.  The port vendors Ghostty as a checksum-pinned
- tarball, so skip the Git revision assertions when there is no repository to
- compare against.
- 
-+Honor OPENCODE_ZIG_CPU when invoking Zig, so the port's baseline CPU setting
-+actually applies to the vendored Ghostty build.
-+
- --- a/build.rs
- +++ b/build.rs
- @@ -53,32 +53,33 @@
-@@ -67,3 +70,13 @@ compare against.
-  
-      let target = env::var("TARGET").expect("TARGET");
-      let install = out.join("ghostty-install");
-+@@ -98,6 +99,9 @@
-+     });
-+     build.arg("--prefix").arg(&install);
-+     build.arg("--cache-dir").arg(out.join("zig-cache"));
-++    if let Ok(cpu) = env::var("OPENCODE_ZIG_CPU") {
-++        build.arg(format!("-Dcpu={cpu}"));
-++    }
-+     if env::var("HOST").as_deref() != Ok(target.as_str()) {
-+         let zig_target = match target.as_str() {
-+             "x86_64-unknown-linux-gnu" => "x86_64-linux-gnu",
diff --git a/misc/opencode/files/opencode-pty-build.rs.patch b/misc/opencode/files/opencode-pty-build.rs.patch
index ac2555d6ae51..d692424ef6a6 100644
--- a/misc/opencode/files/opencode-pty-build.rs.patch
+++ b/misc/opencode/files/opencode-pty-build.rs.patch
@@ -5,12 +5,9 @@ HEAD matches ghostty-revision.  The port vendors Ghostty as a checksum-pinned
 tarball, so skip the Git revision assertions when there is no repository to
 compare against.
 
-Honor OPENCODE_ZIG_CPU when invoking Zig, so the port's baseline CPU setting
-actually applies to the vendored Ghostty build.
-
 --- a/build.rs
 +++ b/build.rs
-@@ -53,32 +53,33 @@
+@@ -54,32 +54,33 @@
  
      // The checked-in declarations must match the native headers exactly.
      // Local overrides are useful for builds, but not for silently changing ABI.
@@ -70,13 +67,3 @@ actually applies to the vendored Ghostty build.
  
      let target = env::var("TARGET").expect("TARGET");
      let install = out.join("ghostty-install");
-@@ -98,6 +99,9 @@
-     });
-     build.arg("--prefix").arg(&install);
-     build.arg("--cache-dir").arg(out.join("zig-cache"));
-+    if let Ok(cpu) = env::var("OPENCODE_ZIG_CPU") {
-+        build.arg(format!("-Dcpu={cpu}"));
-+    }
-     if env::var("HOST").as_deref() != Ok(target.as_str()) {
-         let zig_target = match target.as_str() {
-             "x86_64-unknown-linux-gnu" => "x86_64-linux-gnu",
diff --git a/misc/opencode/files/patch-packages_cli_script_opencode-pty.ts b/misc/opencode/files/patch-packages_cli_script_opencode-pty.ts
index 9854ba29ce7b..a9446042c039 100644
--- a/misc/opencode/files/patch-packages_cli_script_opencode-pty.ts
+++ b/misc/opencode/files/patch-packages_cli_script_opencode-pty.ts
@@ -1,18 +1,23 @@
 Teach OpenCode's CLI build about the FreeBSD opencode-pty daemon.
 
-resolveOpencodePty only embeds a native opencode-pty binary for darwin and
-linux, so a FreeBSD build ships without one and the client fails to spawn the
-persistent terminal daemon at runtime.  Accept the freebsd platform so the
+resolveOpencodePty only embeds a native opencode-pty binary for darwin, linux
+and win32, so a FreeBSD build ships without one and the client fails to spawn
+the persistent terminal daemon at runtime.  Accept the freebsd platform so the
 binary passed via OPENCODE_PTY_BIN is embedded into the executable.
 
 --- packages/cli/script/opencode-pty.ts.orig
 +++ packages/cli/script/opencode-pty.ts
-@@ -19,7 +19,8 @@
+@@ -19,7 +19,13 @@
  const pty = createRequire(core.resolve("@opencode-ai/pty/package.json"))
  
  export async function resolveOpencodePty(target: Target): Promise<OpencodePtyAsset | undefined> {
--  if (target.platform !== "darwin" && target.platform !== "linux") return undefined
-+  if (target.platform !== "darwin" && target.platform !== "linux" && target.platform !== "freebsd")
+-  if (target.platform !== "darwin" && target.platform !== "linux" && target.platform !== "win32") return undefined
++  if (
++    target.platform !== "darwin" &&
++    target.platform !== "linux" &&
++    target.platform !== "win32" &&
++    target.platform !== "freebsd"
++  )
 +    return undefined
    if (target.arch !== "arm64" && target.arch !== "x64") return undefined
  
diff --git a/misc/opencode/files/setup-opentui-freebsd.py b/misc/opencode/files/setup-opentui-freebsd.py
index 05394d5bf78b..0ae4a29a705d 100644
--- a/misc/opencode/files/setup-opentui-freebsd.py
+++ b/misc/opencode/files/setup-opentui-freebsd.py
@@ -137,7 +137,7 @@ def create_platform_package(root: str, lib: str, version: str, arch: str) -> str
 def main() -> int:
     root = sys.argv[1]
     lib = sys.argv[2]
-    version = sys.argv[3] if len(sys.argv) > 3 else "0.5.17"
+    version = sys.argv[3] if len(sys.argv) > 3 else "0.6.6"
     arch = sys.argv[4] if len(sys.argv) > 4 else "x64"
     if arch not in ("x64", "arm64"):
         raise SystemExit(f"unsupported arch tag: {arch}")