git: 5808f18403f0 - main - misc/github-copilot-cli: Move to misc/github-copilot-cli-legacy

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sat, 27 Jun 2026 23:45:11 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5808f18403f02ff5abea2f28283e58592ee66b99

commit 5808f18403f02ff5abea2f28283e58592ee66b99
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2026-06-27 23:01:30 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2026-06-27 23:01:30 +0000

    misc/github-copilot-cli: Move to misc/github-copilot-cli-legacy
---
 misc/Makefile                                      |  2 +-
 .../Makefile                                       | 26 ++++------
 .../distinfo                                       |  6 +--
 .../files/launcher.c                               |  0
 .../files/package-lock-keytar.json                 |  0
 .../files/package-lock-node-addon-api.json         |  0
 .../files/package-lock-pty.json                    |  0
 .../files/package-lock-sharp.json                  |  0
 .../files/package-lock.json                        | 56 +++++++++++-----------
 ...tch-node__modules__github_copilot_npm-loader.js |  0
 .../pkg-descr                                      |  0
 .../pkg-plist                                      |  9 ++++
 .../pkg-plist.binary                               |  0
 13 files changed, 49 insertions(+), 50 deletions(-)

diff --git a/misc/Makefile b/misc/Makefile
index 36c0d469f290..35067ad16755 100644
--- a/misc/Makefile
+++ b/misc/Makefile
@@ -175,7 +175,7 @@
     SUBDIR += getopt
     SUBDIR += ggml
     SUBDIR += gimp-help-en
-    SUBDIR += github-copilot-cli
+    SUBDIR += github-copilot-cli-legacy
     SUBDIR += github-copilot-language-server
     SUBDIR += gitlogue
     SUBDIR += gkrellm-gamma
diff --git a/misc/github-copilot-cli/Makefile b/misc/github-copilot-cli-legacy/Makefile
similarity index 88%
rename from misc/github-copilot-cli/Makefile
rename to misc/github-copilot-cli-legacy/Makefile
index 602a1d2f7b2b..984f91c305d3 100644
--- a/misc/github-copilot-cli/Makefile
+++ b/misc/github-copilot-cli-legacy/Makefile
@@ -1,10 +1,9 @@
 PORTNAME=	github-copilot-cli
-DISTVERSION=	1.0.48 # can't be updated before https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295629 is resolved
-PORTREVISION=	1
-PORTEPOCH=	1
+DISTVERSION=	1.0.44
 CATEGORIES=	misc # machine-learning
 DISTFILES=	${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX}
 DIST_SUBDIR=	${PORTNAME}-x # -x is to see if it would fix checksum errors
+PKGNAMESUFFIX=	-legacy
 
 MAINTAINER=	yuri@FreeBSD.org
 COMMENT=	GitHub Copilot CLI brings the power of the coding agent to terminal
@@ -154,21 +153,6 @@ post-patch:
 	${REINPLACE_CMD} -i '' \
 		-e 's|qg.default.createElement(U,{color:e.MUTED},"v",t)|qg.default.createElement(U,{color:e.MUTED},"v","${PORTVERSION}")|g' \
 		${WRKSRC}/node_modules/@github/copilot/index.js
-	# Add FreeBSD platform support to JavaScript sources
-	# The platform detection functions only handle win32, darwin, linux
-	# Add freebsd case so the CLI can run on FreeBSD
-	${REINPLACE_CMD} -i '' \
-		-e 's|default:throw new Error(`Unsupported platform: \$${e}/\$${t}`)|case"freebsd":return`freebsd-$${t}`;default:throw new Error(`Unsupported platform: $${e}/$${t}`)|' \
-		${WRKSRC}/node_modules/@github/copilot/index.js
-	${REINPLACE_CMD} -i '' \
-		-e 's|default:throw new Error(`Unsupported platform: \$${t}/\$${e}`)|case"freebsd":return`freebsd-$${e}`;default:throw new Error(`Unsupported platform: $${t}/$${e}`)|' \
-		${WRKSRC}/node_modules/@github/copilot/app.js
-	${REINPLACE_CMD} -i '' \
-		-e 's|default:throw new Error(`Unsupported platform: \$${t}/\$${e}`)|case"freebsd":return`freebsd-$${e}`;default:throw new Error(`Unsupported platform: $${t}/$${e}`)|' \
-		${WRKSRC}/node_modules/@github/copilot/sdk/index.js
-	${REINPLACE_CMD} -i '' \
-		-e 's|throw new Error(`Unsupported platform: \$${platform}`)|if(platform==='\''freebsd'\'')return'\''.so'\'';throw new Error(`Unsupported platform: $${platform}`)|' \
-		${WRKSRC}/node_modules/@github/copilot/foundry-local-sdk/node_modules/foundry-local-sdk/dist/detail/coreInterop.js
 	# keytar bundles node-addon-api 4.3.0, whose napi.h initializes
 	# TypedArray::unknown_array_type with static_cast<napi_typedarray_type>(-1).
 	# Clang 16+ (FreeBSD 16-CURRENT) rejects this as "not a constant expression"
@@ -218,6 +202,12 @@ do-build:
 	@${STRIP_CMD} ${WRKSRC}/copilot
 .endif	# FLAVOR == binary
 
+x:
+	${FIND} ${STAGEDIR}${PREFIX}/lib/node_modules/${PACKAGE_NAME} -path "*/build/*" -name *.node | ${XARGS} ${STRIP_CMD}
+
+x2:
+	@${STRIP_CMD} ${WRKSRC}/copilot
+
 do-install:
 .if ${FLAVOR} == script
 	# install files
diff --git a/misc/github-copilot-cli/distinfo b/misc/github-copilot-cli-legacy/distinfo
similarity index 80%
rename from misc/github-copilot-cli/distinfo
rename to misc/github-copilot-cli-legacy/distinfo
index 06b9f42cefb9..8f9a609063b0 100644
--- a/misc/github-copilot-cli/distinfo
+++ b/misc/github-copilot-cli-legacy/distinfo
@@ -1,6 +1,6 @@
-TIMESTAMP = 1778800910
-SHA256 (github-copilot-cli-x/github-copilot-cli-1.0.48.tar.gz) = 2989a68cd930a9c7905a369eeefabf23a5e5741ec21bdf2c550598c0506c192b
-SIZE (github-copilot-cli-x/github-copilot-cli-1.0.48.tar.gz) = 71707580
+TIMESTAMP = 1778340659
+SHA256 (github-copilot-cli-x/github-copilot-cli-1.0.44.tar.gz) = b8dc621d29084eabb40c18f41e157ec40482c326c59cc6063e9d6f09ac3d98f0
+SIZE (github-copilot-cli-x/github-copilot-cli-1.0.44.tar.gz) = 56065482
 SHA256 (github-copilot-cli-x/node-v22.19.0-headers.tar.gz) = 183bdc17092336ad21e01a425d238e85db4ee077ae3caa0547ff1fbda07d9bd8
 SIZE (github-copilot-cli-x/node-v22.19.0-headers.tar.gz) = 8750990
 SHA256 (github-copilot-cli-x/pty-1.0.9.tar.gz) = 0f7550a42239ed4deae3429cf1a568aba8683baa829ff40d7b0d3ae751323dd6
diff --git a/misc/github-copilot-cli/files/launcher.c b/misc/github-copilot-cli-legacy/files/launcher.c
similarity index 100%
rename from misc/github-copilot-cli/files/launcher.c
rename to misc/github-copilot-cli-legacy/files/launcher.c
diff --git a/misc/github-copilot-cli/files/package-lock-keytar.json b/misc/github-copilot-cli-legacy/files/package-lock-keytar.json
similarity index 100%
rename from misc/github-copilot-cli/files/package-lock-keytar.json
rename to misc/github-copilot-cli-legacy/files/package-lock-keytar.json
diff --git a/misc/github-copilot-cli/files/package-lock-node-addon-api.json b/misc/github-copilot-cli-legacy/files/package-lock-node-addon-api.json
similarity index 100%
rename from misc/github-copilot-cli/files/package-lock-node-addon-api.json
rename to misc/github-copilot-cli-legacy/files/package-lock-node-addon-api.json
diff --git a/misc/github-copilot-cli/files/package-lock-pty.json b/misc/github-copilot-cli-legacy/files/package-lock-pty.json
similarity index 100%
rename from misc/github-copilot-cli/files/package-lock-pty.json
rename to misc/github-copilot-cli-legacy/files/package-lock-pty.json
diff --git a/misc/github-copilot-cli/files/package-lock-sharp.json b/misc/github-copilot-cli-legacy/files/package-lock-sharp.json
similarity index 100%
rename from misc/github-copilot-cli/files/package-lock-sharp.json
rename to misc/github-copilot-cli-legacy/files/package-lock-sharp.json
diff --git a/misc/github-copilot-cli/files/package-lock.json b/misc/github-copilot-cli-legacy/files/package-lock.json
similarity index 62%
rename from misc/github-copilot-cli/files/package-lock.json
rename to misc/github-copilot-cli-legacy/files/package-lock.json
index 815b9ccabc63..a850adc8c19a 100644
--- a/misc/github-copilot-cli/files/package-lock.json
+++ b/misc/github-copilot-cli-legacy/files/package-lock.json
@@ -8,30 +8,30 @@
       "name": "@github/copilot-installer",
       "version": "1.0.0",
       "dependencies": {
-        "@github/copilot": "^1.0.48"
+        "@github/copilot": "^1.0.44"
       }
     },
     "node_modules/@github/copilot": {
-      "version": "1.0.48",
-      "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.48.tgz",
-      "integrity": "sha512-U5SzyTEq376UU9A4Sd3TEKz+Y2nRUd90cLO4Hc1otaB8yFSy9Ur2UVGcI2/wCoodL3a39k6WbdgNzFxr0gWFRQ==",
+      "version": "1.0.44",
+      "resolved": "https://registry.npmjs.org/@github/copilot/-/copilot-1.0.44.tgz",
+      "integrity": "sha512-wr/GmNOUaJK/giJK5abyB1oTpEowgFKLi+NJnlyAymKiK/GKCaRlJqiX23H2RetM8vD2hDYUFUFm9lTCooGy0g==",
       "license": "SEE LICENSE IN LICENSE.md",
       "bin": {
         "copilot": "npm-loader.js"
       },
       "optionalDependencies": {
-        "@github/copilot-darwin-arm64": "1.0.48",
-        "@github/copilot-darwin-x64": "1.0.48",
-        "@github/copilot-linux-arm64": "1.0.48",
-        "@github/copilot-linux-x64": "1.0.48",
-        "@github/copilot-win32-arm64": "1.0.48",
-        "@github/copilot-win32-x64": "1.0.48"
+        "@github/copilot-darwin-arm64": "1.0.44",
+        "@github/copilot-darwin-x64": "1.0.44",
+        "@github/copilot-linux-arm64": "1.0.44",
+        "@github/copilot-linux-x64": "1.0.44",
+        "@github/copilot-win32-arm64": "1.0.44",
+        "@github/copilot-win32-x64": "1.0.44"
       }
     },
     "node_modules/@github/copilot/node_modules/@github/copilot-darwin-arm64": {
-      "version": "1.0.48",
-      "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.48.tgz",
-      "integrity": "sha512-82MLoMQwPVVFM8EYssihFxSEPUYtZADE8rMzQ3jG9HgRg2qjQSfnHQS1mKe64dlXswZUK/onw6/8kjnW5I4pPg==",
+      "version": "1.0.44",
+      "resolved": "https://registry.npmjs.org/@github/copilot-darwin-arm64/-/copilot-darwin-arm64-1.0.44.tgz",
+      "integrity": "sha512-9NqA5sT2spmNsehxhs51GhXRZIZga5nq+WcMl4LG2QrUPJRDwvHf1bDKqETJUBbYvBY8jONGuTKMRofkMI68YQ==",
       "cpu": [
         "arm64"
       ],
@@ -45,9 +45,9 @@
       }
     },
     "node_modules/@github/copilot/node_modules/@github/copilot-darwin-x64": {
-      "version": "1.0.48",
-      "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.48.tgz",
-      "integrity": "sha512-1VQ5r5F0h8GwboXmZTcutqcJT+iCpPXAF27QqodmpKEvW9aYfG8g9X2kFJOzDZoX+SA3Uaka9qXdYKF2xT6Uog==",
+      "version": "1.0.44",
+      "resolved": "https://registry.npmjs.org/@github/copilot-darwin-x64/-/copilot-darwin-x64-1.0.44.tgz",
+      "integrity": "sha512-QPD8KtXx07SIKILGBl4JDhPyL2Qo0FMmaTYVxR6nkyHkHnFPsUZD6VWGR+T/KMLkcUXFM85Xc1ba9Y27s4nRrQ==",
       "cpu": [
         "x64"
       ],
@@ -61,9 +61,9 @@
       }
     },
     "node_modules/@github/copilot/node_modules/@github/copilot-linux-arm64": {
-      "version": "1.0.48",
-      "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.48.tgz",
-      "integrity": "sha512-PmsGnb0DZlI+Bf53l9HM1PAHHkUcMyB4y8v/7tnC/jDOV5dGF124n0HnDNfJLOLiJGiQGodthIif6QtPaAxpeA==",
+      "version": "1.0.44",
+      "resolved": "https://registry.npmjs.org/@github/copilot-linux-arm64/-/copilot-linux-arm64-1.0.44.tgz",
+      "integrity": "sha512-Z8ScIUP433xS18f68NP9jM9zW320Xzpi2wf7Nig/VyfrwupBy25UTezydQMT0KQHLWTEleHOPcYnASY3HgJXnQ==",
       "cpu": [
         "arm64"
       ],
@@ -77,9 +77,9 @@
       }
     },
     "node_modules/@github/copilot/node_modules/@github/copilot-linux-x64": {
-      "version": "1.0.48",
-      "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.48.tgz",
-      "integrity": "sha512-b2cc4euSlke9fYHXXsS2EL9UYbctN0h4lZvtAcKUDY+RCnpYAQOVBZK+c1R9dQrtsT6Z/yUv7PuFPSs8qdtc2Q==",
+      "version": "1.0.44",
+      "resolved": "https://registry.npmjs.org/@github/copilot-linux-x64/-/copilot-linux-x64-1.0.44.tgz",
+      "integrity": "sha512-KUl6lvJt0HNKaXSx0T0bIWJ3rvrGwgZYMlkDfqMbuMnZatEQJbjPwxmL/IDfp/c0DyKd7K+ajl17wHYcN/hJIQ==",
       "cpu": [
         "x64"
       ],
@@ -93,9 +93,9 @@
       }
     },
     "node_modules/@github/copilot/node_modules/@github/copilot-win32-arm64": {
-      "version": "1.0.48",
-      "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.48.tgz",
-      "integrity": "sha512-VEEOwddtpJ3DTbXGhnK6K8im4ofl9m08q1m/K++sNvWV8wkkOSOQBTiPdyUsuU/TXAoFhb8tZMIJv+6NnMBtMw==",
+      "version": "1.0.44",
+      "resolved": "https://registry.npmjs.org/@github/copilot-win32-arm64/-/copilot-win32-arm64-1.0.44.tgz",
+      "integrity": "sha512-JVJxZJwAc95ZfapgOXjNFwSqrWlvC3heo128L+CDkdZ6lwpD1dTGMHT/6rMMEeo3xjZmMm8tiynfwsHLDgTtvQ==",
       "cpu": [
         "arm64"
       ],
@@ -109,9 +109,9 @@
       }
     },
     "node_modules/@github/copilot/node_modules/@github/copilot-win32-x64": {
-      "version": "1.0.48",
-      "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.48.tgz",
-      "integrity": "sha512-93BzvXLPHTyy1gWBXQY/IWIHor4IAwZuuo7/obG80/Qa6U0WeaN9slz/FBJvrsgVNrrRfEID5Xm3At+S6Kj67Q==",
+      "version": "1.0.44",
+      "resolved": "https://registry.npmjs.org/@github/copilot-win32-x64/-/copilot-win32-x64-1.0.44.tgz",
+      "integrity": "sha512-Yj3KQ/DqwS50PwRtyQITX2mWIVZeJeX+y0faVSMwUUzG1qxmMcme7wimhKOyc4LSV11DpgVB9MSiBw2xys7iww==",
       "cpu": [
         "x64"
       ],
diff --git a/misc/github-copilot-cli/files/patch-node__modules__github_copilot_npm-loader.js b/misc/github-copilot-cli-legacy/files/patch-node__modules__github_copilot_npm-loader.js
similarity index 100%
rename from misc/github-copilot-cli/files/patch-node__modules__github_copilot_npm-loader.js
rename to misc/github-copilot-cli-legacy/files/patch-node__modules__github_copilot_npm-loader.js
diff --git a/misc/github-copilot-cli/pkg-descr b/misc/github-copilot-cli-legacy/pkg-descr
similarity index 100%
rename from misc/github-copilot-cli/pkg-descr
rename to misc/github-copilot-cli-legacy/pkg-descr
diff --git a/misc/github-copilot-cli/pkg-plist b/misc/github-copilot-cli-legacy/pkg-plist
similarity index 96%
rename from misc/github-copilot-cli/pkg-plist
rename to misc/github-copilot-cli-legacy/pkg-plist
index 3dae33ece1ef..5cb1a319deb3 100644
--- a/misc/github-copilot-cli/pkg-plist
+++ b/misc/github-copilot-cli-legacy/pkg-plist
@@ -100,6 +100,11 @@ lib/node_modules/@github/copilot/foundry-local-sdk/node_modules/foundry-local-sd
 lib/node_modules/@github/copilot/foundry-local-sdk/node_modules/foundry-local-sdk/node_modules/adm-zip/zipFile.js
 lib/node_modules/@github/copilot/foundry-local-sdk/node_modules/foundry-local-sdk/script/install-utils.cjs
 lib/node_modules/@github/copilot/index.js
+lib/node_modules/@github/copilot/koffi/build/koffi/freebsd_arm64/koffi.node
+lib/node_modules/@github/copilot/koffi/build/koffi/freebsd_ia32/koffi.node
+lib/node_modules/@github/copilot/koffi/build/koffi/freebsd_%%NODE_ARCH%%/koffi.node
+lib/node_modules/@github/copilot/koffi/index.d.ts
+lib/node_modules/@github/copilot/koffi/index.js
 lib/node_modules/@github/copilot/mxc-bin/arm64/_manifest/spdx_2.2/ESRPClientLogs0505223422747.json
 lib/node_modules/@github/copilot/mxc-bin/arm64/_manifest/spdx_2.2/ESRPClientLogs0505224031447.json
 lib/node_modules/@github/copilot/mxc-bin/arm64/_manifest/spdx_2.2/bsi.cose
@@ -224,6 +229,10 @@ lib/node_modules/@github/copilot/voice-installer.worker.js
 lib/node_modules/@github/copilot/voice-mic.worker.js
 lib/node_modules/@github/copilot/worker/conoutSocketWorker.js
 @dir lib/node_modules/@github/copilot/foundry-local-sdk/node_modules/foundry-local-sdk/prebuilds
+@dir lib/node_modules/@github/copilot/koffi/build/koffi/musl_arm64
+@dir lib/node_modules/@github/copilot/koffi/build/koffi/musl_%%NODE_ARCH%%
+@dir lib/node_modules/@github/copilot/koffi/build/koffi/openbsd_ia32
+@dir lib/node_modules/@github/copilot/koffi/build/koffi/openbsd_%%NODE_ARCH%%
 @dir lib/node_modules/@github/copilot/pvrecorder/node_modules/@picovoice/pvrecorder-node/lib/mac/arm64
 @dir lib/node_modules/@github/copilot/pvrecorder/node_modules/@picovoice/pvrecorder-node/lib/mac/x86_64
 @dir lib/node_modules/@github/copilot/pvrecorder/node_modules/@picovoice/pvrecorder-node/lib/windows/amd64
diff --git a/misc/github-copilot-cli/pkg-plist.binary b/misc/github-copilot-cli-legacy/pkg-plist.binary
similarity index 100%
rename from misc/github-copilot-cli/pkg-plist.binary
rename to misc/github-copilot-cli-legacy/pkg-plist.binary