mirror of
https://git.freebsd.org/ports.git
synced 2026-06-02 11:08:52 +00:00
misc/nanocoder: update 1.25.2 → 1.27.0
This commit is contained in:
+3
-33
@@ -1,5 +1,5 @@
|
||||
PORTNAME= nanocoder
|
||||
DISTVERSION= 1.25.2
|
||||
DISTVERSION= 1.27.0
|
||||
CATEGORIES= misc # machine-learning
|
||||
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
|
||||
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
|
||||
@@ -10,29 +10,18 @@ WWW= https://github.com/Nano-Collective/nanocoder
|
||||
|
||||
LICENSE= MIT
|
||||
|
||||
.for arch in armv6 armv7 i386 mips powerpc powerpcspe
|
||||
BROKEN_${arch}= compilation fails on 32-bit platforms: https://github.com/withcatai/node-llama-cpp/issues/593
|
||||
.endfor
|
||||
|
||||
FETCH_DEPENDS= npm:www/npm \
|
||||
jq:textproc/jq \
|
||||
${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss
|
||||
BUILD_DEPENDS= npm:www/npm
|
||||
|
||||
USES= cmake:indirect ninja:build nodejs:run
|
||||
USES= nodejs:run
|
||||
|
||||
PACKAGE_NAME= @nanocollective/nanocoder
|
||||
|
||||
LLAMA_CPP_RELEASE= b8390
|
||||
MASTER_SITES_llama_cpp= https://github.com/ggml-org/llama.cpp/archive/refs/tags/
|
||||
DISTFILES+= ${LLAMA_CPP_RELEASE}${EXTRACT_SUFX}:llama_cpp
|
||||
|
||||
NODE_LLAMA_CPP_DIR= ${WRKSRC}/node_modules/@nanocollective/nanocoder/node_modules/node-llama-cpp
|
||||
|
||||
FETCH_SCRIPT= ${PORTSDIR}/Tools/scripts/npmjs-fetch-with-dependencies.sh
|
||||
|
||||
NODE_ARCH= ${ARCH:S/amd64/x64/:S/aarch64/arm64/:S/i386/ia32/:S/powerpc64le/ppc64/:S/powerpc64/ppc64/:C/armv[67]/arm/} # modeled after electron.mk
|
||||
PLIST_SUB= NODE_ARCH=${NODE_ARCH}
|
||||
NO_BUILD= yes
|
||||
|
||||
do-fetch:
|
||||
@if ! [ -f ${DISTDIR}/${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX} ]; then \
|
||||
@@ -44,23 +33,6 @@ do-fetch:
|
||||
${DISTDIR}/${PORTNAME}-${DISTVERSION}${EXTRACT_SUFX}; \
|
||||
fi
|
||||
|
||||
post-fetch:
|
||||
@if ! [ -f ${DISTDIR}/${LLAMA_CPP_RELEASE}${EXTRACT_SUFX} ]; then \
|
||||
cd ${DISTDIR} && \
|
||||
${FETCH_CMD} \
|
||||
${MASTER_SITES_llama_cpp}${LLAMA_CPP_RELEASE}${EXTRACT_SUFX}; \
|
||||
fi
|
||||
|
||||
post-extract:
|
||||
@tar -xzf ${DISTDIR}/${LLAMA_CPP_RELEASE}${EXTRACT_SUFX} \
|
||||
-C ${NODE_LLAMA_CPP_DIR}/llama/
|
||||
@${MV} ${NODE_LLAMA_CPP_DIR}/llama/llama.cpp-${LLAMA_CPP_RELEASE} \
|
||||
${NODE_LLAMA_CPP_DIR}/llama/llama.cpp
|
||||
|
||||
do-build:
|
||||
@cd ${WRKSRC} && \
|
||||
npm rebuild --nodedir=${LOCALBASE}
|
||||
|
||||
do-install:
|
||||
# install files
|
||||
cd ${WRKSRC} && \
|
||||
@@ -71,8 +43,6 @@ do-install:
|
||||
@${REINPLACE_CMD} -i '' \
|
||||
-e "s|#!/usr/bin/env node|#!${PREFIX}/bin/node|" \
|
||||
${STAGEDIR}${PREFIX}/lib/node_modules/@nanocollective/nanocoder/node_modules/cli-highlight/dist/cli.js
|
||||
# delete cmake files: CMake*
|
||||
${FIND} ${STAGEDIR}${PREFIX}/lib/node_modules/@nanocollective/nanocoder/node_modules/node-llama-cpp/ -name 'CMake*' | ${XARGS} ${RM} -r
|
||||
# set exec bit
|
||||
@${CHMOD} +x ${STAGEDIR}${PREFIX}/lib/node_modules/.bin/${PORTNAME}
|
||||
# create symlink in bin
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
TIMESTAMP = 1777322999
|
||||
SHA256 (nanocoder-1.25.2.tar.gz) = 8aaf8ca4762092fb7e163843c2ee4b97325b320bb4a80030bfb15f52a0331919
|
||||
SIZE (nanocoder-1.25.2.tar.gz) = 62076126
|
||||
SHA256 (b8390.tar.gz) = eb2483c96c4355b1451b023cc46b79b669daa4f04ec6b3bba668ceb8230de507
|
||||
SIZE (b8390.tar.gz) = 29559770
|
||||
TIMESTAMP = 1780260586
|
||||
SHA256 (nanocoder-1.27.0.tar.gz) = ac8aa9f19f023c0fd4988f42473d0b524145d31b31db8d939a2047c4641e3c04
|
||||
SIZE (nanocoder-1.27.0.tar.gz) = 29935011
|
||||
|
||||
Generated
+232
-1658
File diff suppressed because it is too large
Load Diff
@@ -1,19 +0,0 @@
|
||||
-- patch out git clone for llama-cpp
|
||||
|
||||
--- node_modules/@nanocollective/nanocoder/node_modules/node-llama-cpp/dist/bindings/utils/cloneLlamaCppRepo.js.orig 2026-03-30 16:53:20 UTC
|
||||
+++ node_modules/@nanocollective/nanocoder/node_modules/node-llama-cpp/dist/bindings/utils/cloneLlamaCppRepo.js
|
||||
@@ -123,11 +123,11 @@ export async function isLlamaCppRepoCloned(waitForLock
|
||||
await waitForLockfileRelease({ resourcePath: llamaCppDirectory });
|
||||
else if (await isLockfileActive({ resourcePath: llamaCppDirectory }))
|
||||
return false;
|
||||
- const [repoGitExists, releaseInfoFileExists] = await Promise.all([
|
||||
- fs.pathExists(path.join(llamaCppDirectory, ".git")),
|
||||
+ const [repoDirExists, releaseInfoFileExists] = await Promise.all([
|
||||
+ fs.pathExists(llamaCppDirectory),
|
||||
fs.pathExists(llamaCppDirectoryInfoFilePath)
|
||||
]);
|
||||
- return repoGitExists && releaseInfoFileExists;
|
||||
+ return repoDirExists && releaseInfoFileExists;
|
||||
}
|
||||
export async function ensureLlamaCppRepoIsCloned({ progressLogs = true } = {}) {
|
||||
if (await isLlamaCppRepoCloned(true))
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
--- node_modules/@nanocollective/nanocoder/node_modules/node-llama-cpp/llama/llama.cpp/ggml/src/ggml-cpu/CMakeLists.txt.orig 2026-04-22 10:10:30 UTC
|
||||
+++ node_modules/@nanocollective/nanocoder/node_modules/node-llama-cpp/llama/llama.cpp/ggml/src/ggml-cpu/CMakeLists.txt
|
||||
@@ -403,8 +403,6 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
|
||||
list(APPEND ARCH_FLAGS -mcpu=power9)
|
||||
elseif (${CMAKE_SYSTEM_PROCESSOR} MATCHES "ppc64le")
|
||||
list(APPEND ARCH_FLAGS -mcpu=powerpc64le -mtune=native)
|
||||
- else()
|
||||
- list(APPEND ARCH_FLAGS -mcpu=native -mtune=native -mpowerpc64)
|
||||
endif()
|
||||
elseif(GGML_CPU_ALL_VARIANTS)
|
||||
# Begin with the lowest baseline
|
||||
+856
-5324
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user