pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

llama.cpp: Update to b9405



Module Name:	pkgsrc-wip
Committed By:	Atsushi Toyokura <asteria.at%gmail.com@localhost>
Pushed By:	steleto
Date:		Wed Jun 3 08:44:33 2026 +0900
Changeset:	a709a9a72f039f8e5865c8f09d33ddaead0d22bd

Modified Files:
	llama.cpp/Makefile
	llama.cpp/PLIST
	llama.cpp/distinfo
	llama.cpp/patches/patch-common_common.cpp
Added Files:
	llama.cpp/Makefile.common
Removed Files:
	llama.cpp/TODO
	llama.cpp/patches/patch-vendor_minja_minja.hpp

Log Message:
llama.cpp: Update to b9405

Lots of changes.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=a709a9a72f039f8e5865c8f09d33ddaead0d22bd

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 llama.cpp/Makefile                             | 17 +++--------
 llama.cpp/Makefile.common                      | 10 +++++++
 llama.cpp/PLIST                                | 39 +++++++++++++++++++++++---
 llama.cpp/TODO                                 | 13 ---------
 llama.cpp/distinfo                             |  9 +++---
 llama.cpp/patches/patch-common_common.cpp      | 13 ++-------
 llama.cpp/patches/patch-vendor_minja_minja.hpp | 22 ---------------
 7 files changed, 55 insertions(+), 68 deletions(-)

diffs:
diff --git a/llama.cpp/Makefile b/llama.cpp/Makefile
index aa60167836..f1bd587f90 100644
--- a/llama.cpp/Makefile
+++ b/llama.cpp/Makefile
@@ -1,10 +1,10 @@
 # $NetBSD$
 
-DISTNAME=	llama.cpp-${GITHUB_TAG}
-PKGNAME=	${DISTNAME:S/-b/-0.0.2./}
+.include "../../wip/llama.cpp/Makefile.common"
+
+PKGNAME=	${DISTNAME:S/-b/-${LLAMA_CPP_VAR}./}
 CATEGORIES=	devel
-MASTER_SITES=	${MASTER_SITE_GITHUB:=ggml-org/}
-GITHUB_TAG=	b6959
+LLAMA_CPP_VAR=	0.0.2
 
 MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=	https://github.com/ggerganov/llama.cpp/
@@ -15,19 +15,11 @@ USE_TOOLS+=		git pkg-config
 USE_LANGUAGES=		c c++
 USE_CXX_FEATURES=	c++17
 
-DEPENDS+=	${PYPKGPREFIX}-torch>=2.2:../../math/py-torch
-DEPENDS+=	${PYPKGPREFIX}-numpy>=1.25:../../math/py-numpy
-#DEPENDS+=	${PYPKGPREFIX}-gguf>=0.14:../../math/py-gguf
-#DEPENDS+=	${PYPKGPREFIX}-transformers>=4.35.2:../../math/py-transformers
-DEPENDS+=	${PYPKGPREFIX}-protobuf>=4.21.0:../../devel/py-protobuf
-DEPENDS+=	${PYPKGPREFIX}-sentencepiece>=0.1.98:../../textproc/py-sentencepiece
-
 BLAS_INDEX64=		yes
 BLAS_ACCEPTED=		openblas_pthread #openblas_openmp
 BLAS_C_INTERFACE=	yes
 
 PKGCONFIG_OVERRIDE+=	cmake/llama.pc.in
-REPLACE_PYTHON+=	*.py */*.py */*/*.py
 
 CMAKE_CONFIGURE_ARGS+=	-DGGML_BLAS=ON
 CMAKE_CONFIGURE_ARGS+=	-DGGML_BLAS_VENDOR=OpenBLAS
@@ -45,6 +37,5 @@ SUBST_SED.findblas+=	-e 's,DepBLAS openblas64,DepBLAS ${BLAS_PC},'
 
 .include "../../www/curl/buildlink3.mk"
 .include "../../devel/cmake/build.mk"
-.include "../../lang/python/application.mk"
 .include "../../mk/blas.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/llama.cpp/Makefile.common b/llama.cpp/Makefile.common
new file mode 100644
index 0000000000..4772072c02
--- /dev/null
+++ b/llama.cpp/Makefile.common
@@ -0,0 +1,10 @@
+# $NetBSD$
+#
+# used by wip/llama.cpp/Makefile
+
+.include "../../mk/bsd.prefs.mk"
+
+DISTNAME=	llama.cpp-${GITHUB_TAG}
+MASTER_SITES=	${MASTER_SITE_GITHUB:=ggml-org/}
+GITHUB_PROJECT=	llama.cpp
+GITHUB_TAG=	b9405
diff --git a/llama.cpp/PLIST b/llama.cpp/PLIST
index 1a15bfae88..02f5e933eb 100644
--- a/llama.cpp/PLIST
+++ b/llama.cpp/PLIST
@@ -1,22 +1,26 @@
 @comment $NetBSD$
-bin/convert_hf_to_gguf.py
+bin/llama
 bin/llama-batched
 bin/llama-batched-bench
 bin/llama-bench
 bin/llama-cli
+bin/llama-completion
 bin/llama-convert-llama2c-to-ggml
 bin/llama-cvector-generator
+bin/llama-debug
+bin/llama-debug-template-parser
 bin/llama-diffusion-cli
 bin/llama-embedding
 bin/llama-eval-callback
 bin/llama-export-lora
 bin/llama-finetune
+bin/llama-fit-params
 bin/llama-gen-docs
 bin/llama-gguf
 bin/llama-gguf-hash
 bin/llama-gguf-split
+bin/llama-idle
 bin/llama-imatrix
-bin/llama-logits
 bin/llama-lookahead
 bin/llama-lookup
 bin/llama-lookup-create
@@ -27,14 +31,14 @@ bin/llama-parallel
 bin/llama-passkey
 bin/llama-perplexity
 bin/llama-quantize
+bin/llama-results
 bin/llama-retrieval
-bin/llama-run
-bin/llama-save-load-state
 bin/llama-server
 bin/llama-simple
 bin/llama-simple-chat
 bin/llama-speculative
 bin/llama-speculative-simple
+bin/llama-template-analysis
 bin/llama-tokenize
 bin/llama-tts
 include/ggml-alloc.h
@@ -45,15 +49,19 @@ include/ggml-cpp.h
 include/ggml-cpu.h
 include/ggml-cuda.h
 include/ggml-metal.h
+include/ggml-openvino.h
 include/ggml-opt.h
 include/ggml-rpc.h
 include/ggml-sycl.h
+include/ggml-virtgpu.h
 include/ggml-vulkan.h
 include/ggml-webgpu.h
+include/ggml-zendnn.h
 include/ggml.h
 include/gguf.h
 include/llama-cpp.h
 include/llama.h
+include/mtmd-debug.h
 include/mtmd-helper.h
 include/mtmd.h
 lib/cmake/ggml/ggml-config.cmake
@@ -61,9 +69,32 @@ lib/cmake/ggml/ggml-version.cmake
 lib/cmake/llama/llama-config.cmake
 lib/cmake/llama/llama-version.cmake
 lib/libggml-base.so
+lib/libggml-base.so.0
+lib/libggml-base.so.0.13.0
 lib/libggml-blas.so
+lib/libggml-blas.so.0
+lib/libggml-blas.so.0.13.0
 lib/libggml-cpu.so
+lib/libggml-cpu.so.0
+lib/libggml-cpu.so.0.13.0
 lib/libggml.so
+lib/libggml.so.0
+lib/libggml.so.0.13.0
+lib/libllama-batched-bench-impl.so
+lib/libllama-bench-impl.so
+lib/libllama-cli-impl.so
+lib/libllama-common.so
+lib/libllama-common.so.0
+lib/libllama-common.so.0.0.0
+lib/libllama-completion-impl.so
+lib/libllama-fit-params-impl.so
+lib/libllama-perplexity-impl.so
+lib/libllama-quantize-impl.so
+lib/libllama-server-impl.so
 lib/libllama.so
+lib/libllama.so.0
+lib/libllama.so.0.0.0
 lib/libmtmd.so
+lib/libmtmd.so.0
+lib/libmtmd.so.0.0.0
 lib/pkgconfig/llama.pc
diff --git a/llama.cpp/TODO b/llama.cpp/TODO
deleted file mode 100644
index dc5dd3b2ac..0000000000
--- a/llama.cpp/TODO
+++ /dev/null
@@ -1,13 +0,0 @@
-Test
-
-Add python dependencies:
-torch~=2.1.1
-numpy~=1.24.4
-sentencepiece~=0.2.0
-transformers>=4.40.1,<5.0.0
-gguf>=0.1.0
-protobuf>=4.21.0,<5.0.0
-
-This package has known vulnerabilities, please investigate and fix if possible:
-  CVE-2025-49847, CVE-2025-52566, CVE-2026-21869, CVE-2026-2069,
-  CVE-2026-27940, CVE-2026-33298, CVE-2026-34159
diff --git a/llama.cpp/distinfo b/llama.cpp/distinfo
index 0ade573a52..f9a8e3f7ae 100644
--- a/llama.cpp/distinfo
+++ b/llama.cpp/distinfo
@@ -1,9 +1,8 @@
 $NetBSD$
 
-BLAKE2s (llama.cpp-b6959.tar.gz) = 2fc857bd5c6a2e53f79cbcd30e0d445e619f9801b337b483331561f865707289
-SHA512 (llama.cpp-b6959.tar.gz) = 2fccb2771664fc355cc0d23baf9d037ec6ac553a4e08cb3697f06e9226f8afac6ed8fb266b44fdd7017fa1012171d78bafea72637215e5cd468da36d2f6fc5a0
-Size (llama.cpp-b6959.tar.gz) = 26422088 bytes
-SHA1 (patch-common_common.cpp) = 6ae76ef4008e634dbdd2aa3cb5e3ecbc1a359302
+BLAKE2s (llama.cpp-b9405.tar.gz) = e3c17cae193e0199f48739e4c2a7b93814b5468105e7adab3c07ea5a834e4c62
+SHA512 (llama.cpp-b9405.tar.gz) = b973ca115041710fa759c056c1768b30f63d9870eb35e227ece451502eec45efdf98b8706b07ebe44f61166317104ca29f1ab978ad5caf1968b305c86d11d0be
+Size (llama.cpp-b9405.tar.gz) = 33963595 bytes
+SHA1 (patch-common_common.cpp) = 57a375ff17c8c97cfadd4196b3a368b6abd65ce6
 SHA1 (patch-ggml_src_ggml-cpu_ggml-cpu.cpp) = cc5f9840919818b824eb52585a3c5a8ee40a2835
 SHA1 (patch-src_llama-vocab.cpp) = b97f36b85855ccf1385dfdd9fd5417e1abf77024
-SHA1 (patch-vendor_minja_minja.hpp) = 39f95e903d10801256e65cb40ca9e7be26b92049
diff --git a/llama.cpp/patches/patch-common_common.cpp b/llama.cpp/patches/patch-common_common.cpp
index 86a6ce5996..9e83a242fc 100644
--- a/llama.cpp/patches/patch-common_common.cpp
+++ b/llama.cpp/patches/patch-common_common.cpp
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- common/common.cpp.orig	2025-09-28 06:38:37.000000000 +0000
+--- common/common.cpp.orig	2026-05-29 05:46:11.000000000 +0000
 +++ common/common.cpp
-@@ -410,10 +410,10 @@ std::string string_format(const char * f
+@@ -436,10 +436,10 @@ std::string string_format(const char * f
  std::string string_strip(const std::string & str) {
      size_t start = 0;
      size_t end = str.size();
@@ -15,12 +15,3 @@ $NetBSD$
          end--;
      }
      return str.substr(start, end - start);
-@@ -867,7 +867,7 @@ std::string fs_get_cache_directory() {
-     if (getenv("LLAMA_CACHE")) {
-         cache_directory = std::getenv("LLAMA_CACHE");
-     } else {
--#if defined(__linux__) || defined(__FreeBSD__) || defined(_AIX) || defined(__OpenBSD__)
-+#if defined(__linux__) || defined(__FreeBSD__) || defined(_AIX) || defined(__OpenBSD__) || defined(__NetBSD__)
-         if (std::getenv("XDG_CACHE_HOME")) {
-             cache_directory = std::getenv("XDG_CACHE_HOME");
-         } else if (std::getenv("HOME")) {
diff --git a/llama.cpp/patches/patch-vendor_minja_minja.hpp b/llama.cpp/patches/patch-vendor_minja_minja.hpp
deleted file mode 100644
index 1a1f9347d7..0000000000
--- a/llama.cpp/patches/patch-vendor_minja_minja.hpp
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD$
-
---- vendor/minja/minja.hpp.orig	2025-09-28 09:41:48.334745421 +0000
-+++ vendor/minja/minja.hpp
-@@ -1571,7 +1571,7 @@ public:
-             vargs.expectArgs("title method", {0, 0}, {0, 0});
-             auto res = str;
-             for (size_t i = 0, n = res.size(); i < n; ++i) {
--              if (i == 0 || std::isspace(res[i - 1])) res[i] = std::toupper(res[i]);
-+              if (i == 0 || std::isspace(static_cast<unsigned char>(res[i - 1]))) res[i] = std::toupper(res[i]);
-               else res[i] = std::tolower(res[i]);
-             }
-             return res;
-@@ -1662,7 +1662,7 @@ private:
- 
-     bool consumeSpaces(SpaceHandling space_handling = SpaceHandling::Strip) {
-       if (space_handling == SpaceHandling::Strip) {
--        while (it != end && std::isspace(*it)) ++it;
-+        while (it != end && std::isspace(static_cast<unsigned char>(*it))) ++it;
-       }
-       return true;
-     }


Home | Main Index | Thread Index | Old Index