pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
wip/whisper.cpp: import whisper.cpp-1.7.4pre20241223
Module Name: pkgsrc-wip
Committed By: Ryo ONODERA <ryoon%NetBSD.org@localhost>
Pushed By: ryoon
Date: Wed Dec 25 00:42:53 2024 +0900
Changeset: e39c19038cba3b052c5a73a4bf3d6228d3e53a51
Added Files:
whisper.cpp/DESCR
whisper.cpp/Makefile
whisper.cpp/PLIST
whisper.cpp/distinfo
whisper.cpp/patches/patch-CMakeLists.txt
whisper.cpp/patches/patch-ggml_CMakeLists.txt
Log Message:
wip/whisper.cpp: import whisper.cpp-1.7.4pre20241223
High-performance inference of OpenAI's Whisper automatic speech
recognition (ASR) model
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=e39c19038cba3b052c5a73a4bf3d6228d3e53a51
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
whisper.cpp/DESCR | 2 ++
whisper.cpp/Makefile | 52 +++++++++++++++++++++++++++
whisper.cpp/PLIST | 11 ++++++
whisper.cpp/distinfo | 7 ++++
whisper.cpp/patches/patch-CMakeLists.txt | 13 +++++++
whisper.cpp/patches/patch-ggml_CMakeLists.txt | 15 ++++++++
6 files changed, 100 insertions(+)
diffs:
diff --git a/whisper.cpp/DESCR b/whisper.cpp/DESCR
new file mode 100644
index 0000000000..b07fdf3a9d
--- /dev/null
+++ b/whisper.cpp/DESCR
@@ -0,0 +1,2 @@
+High-performance inference of OpenAI's Whisper automatic speech
+recognition (ASR) model
diff --git a/whisper.cpp/Makefile b/whisper.cpp/Makefile
new file mode 100644
index 0000000000..2912ee8f02
--- /dev/null
+++ b/whisper.cpp/Makefile
@@ -0,0 +1,52 @@
+# $NetBSD$
+
+DISTNAME= whisper.cpp-1.7.4pre20241223
+CATEGORIES= devel
+MASTER_SITES= ${MASTER_SITE_GITHUB:=ggerganov/}
+GITHUB_PROJECT= whisper.cpp
+#GITHUB_TAG= v${PKGVERSION_NOREV}
+GITHUB_TAG= ed09075ca09fa111c0506a415aa6f94c96a5d432
+
+MAINTAINER= ryoon%NetBSD.org@localhost
+HOMEPAGE= https://github.com/ggerganov/whisper.cpp/
+COMMENT= OpenAI's Whisper LLM inference in C/C++
+LICENSE= mit
+
+USE_TOOLS+= pkg-config
+USE_LANGUAGES= c c++
+USE_CXX_FEATURES= c++17
+
+BLAS_INDEX64= yes
+BLAS_ACCEPTED= openblas_pthread openblas_openmp
+BLAS_C_INTERFACE= yes
+
+PKGCONFIG_OVERRIDE+= cmake/whisper.pc.in
+REPLACE_PYTHON+= *.py */*.py */*/*.py
+
+CMAKE_CONFIGURE_ARGS+= -DWHISPER_BUILD_SERVER=ON
+CMAKE_CONFIGURE_ARGS+= -DWHISPER_FFMPEG=ON
+CMAKE_CONFIGURE_ARGS+= -DWHISPER_SDL2=OFF
+CMAKE_CONFIGURE_ARGS+= -DBUILD_SHARED_LIBS=ON
+# XXX
+#CMAKE_CONFIGURE_ARGS+= -DGGML_BLAS=ON
+#CMAKE_CONFIGURE_ARGS+= -DGGML_BLAS_VENDOR=OpenBLAS
+#CMAKE_CONFIGURE_ARGS+= -DBLAS_LIBRARIES=${CBLAS_LIBS:Q}
+CMAKE_CONFIGURE_ARGS+= -DWHISPER_BUILD_TESTS=no
+#CMAKE_CONFIGURE_ARGS+= -DGGML_OPENCL_EMBED_KERNELS=OFF
+#CMAKE_CONFIGURE_ARGS+= -DGGML_OPENCL_PROFILING=OFF
+#CMAKE_CONFIGURE_ARGS+= -DGGML_OPENCL_USE_ADRENO_KERNELS=OFF
+
+# XXX
+SUBST_CLASSES+= findblas
+SUBST_STAGE.findblas= pre-configure
+SUBST_MESSAGE.findblas= Fixing libpci soname
+SUBST_FILES.findblas+= ggml/src/ggml-blas/CMakeLists.txt
+SUBST_SED.findblas+= -e 's,DepBLAS openblas64,DepBLAS ${BLAS_PC},'
+
+#.include "../../devel/SDL2/buildlink3.mk"
+.include "../../multimedia/ffmpeg6/buildlink3.mk"
+.include "../../wip/llama.cpp/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/whisper.cpp/PLIST b/whisper.cpp/PLIST
new file mode 100644
index 0000000000..4622de25b9
--- /dev/null
+++ b/whisper.cpp/PLIST
@@ -0,0 +1,11 @@
+@comment $NetBSD$
+bin/whisper-bench
+bin/whisper-cli
+bin/whisper-server
+include/whisper.h
+lib/cmake/whisper/whisper-config.cmake
+lib/cmake/whisper/whisper-version.cmake
+lib/libwhisper.so
+lib/libwhisper.so.1
+lib/libwhisper.so.1.7.3
+lib/pkgconfig/whisper.pc
diff --git a/whisper.cpp/distinfo b/whisper.cpp/distinfo
new file mode 100644
index 0000000000..2c24a4f5e5
--- /dev/null
+++ b/whisper.cpp/distinfo
@@ -0,0 +1,7 @@
+$NetBSD$
+
+BLAKE2s (whisper.cpp-1.7.4pre20241223-ed09075ca09fa111c0506a415aa6f94c96a5d432.tar.gz) = 7b095f8bec3f4be3f209150d12434bf88589c25cfca732d0a1029d1e00d0d44d
+SHA512 (whisper.cpp-1.7.4pre20241223-ed09075ca09fa111c0506a415aa6f94c96a5d432.tar.gz) = c6f78382b55fd8d0150c39c8fc8cbd2840c463c74ca4e9c82e2792aa41b2c3ee4815d0d6642f535301bd1a5e3aa3b0653931b3267bc92f50ae2624775fccddb1
+Size (whisper.cpp-1.7.4pre20241223-ed09075ca09fa111c0506a415aa6f94c96a5d432.tar.gz) = 5349911 bytes
+SHA1 (patch-CMakeLists.txt) = c83ba3d348fc3f70b00a9ab3ac0c750251436fe3
+SHA1 (patch-ggml_CMakeLists.txt) = 6b35984542f8e1cc1b9aafd897d18a3f8026a203
diff --git a/whisper.cpp/patches/patch-CMakeLists.txt b/whisper.cpp/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..cefaa3fedc
--- /dev/null
+++ b/whisper.cpp/patches/patch-CMakeLists.txt
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- CMakeLists.txt.orig 2024-12-23 08:59:58.392061022 +0000
++++ CMakeLists.txt
+@@ -121,7 +121,7 @@ whisper_option_depr(WARNING WHISPER_
+ #
+
+ if (NOT TARGET ggml)
+- add_subdirectory(ggml)
++# add_subdirectory(ggml)
+ # ... otherwise assume ggml is added by a parent CMakeLists.txt
+ endif()
+ add_subdirectory(src)
diff --git a/whisper.cpp/patches/patch-ggml_CMakeLists.txt b/whisper.cpp/patches/patch-ggml_CMakeLists.txt
new file mode 100644
index 0000000000..074704d455
--- /dev/null
+++ b/whisper.cpp/patches/patch-ggml_CMakeLists.txt
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- ggml/CMakeLists.txt.orig 2024-12-23 09:00:15.190720752 +0000
++++ ggml/CMakeLists.txt
+@@ -248,8 +248,8 @@ set_target_properties(ggml PROPERTIES PU
+ #if (GGML_METAL)
+ # set_target_properties(ggml PROPERTIES RESOURCE "${CMAKE_CURRENT_SOURCE_DIR}/src/ggml-metal.metal")
+ #endif()
+-install(TARGETS ggml LIBRARY PUBLIC_HEADER)
+-install(TARGETS ggml-base LIBRARY)
++#install(TARGETS ggml LIBRARY PUBLIC_HEADER)
++#install(TARGETS ggml-base LIBRARY)
+
+ # FIXME: this should be done in the backend cmake files
+ if (GGML_METAL)
Home |
Main Index |
Thread Index |
Old Index