Github messages for voidlinux
 help / color / mirror / Atom feed
From: JohnGebbie <JohnGebbie@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] vosk-api: update to 0.3.45
Date: Fri, 10 Feb 2023 15:13:55 +0100	[thread overview]
Message-ID: <20230210141355.wu5dP-02Vh53D-r_tpFe5-x-a_Ntl4QY8UODSetJlJU@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-42091@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1250 bytes --]

There is an updated pull request by JohnGebbie against master on the void-packages repository

https://github.com/JohnGebbie/void-packages vosk-api
https://github.com/void-linux/void-packages/pull/42091

vosk-api: update to 0.3.45
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/42091.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-vosk-api-42091.patch --]
[-- Type: text/x-diff, Size: 7077 bytes --]

From 8fb3e9ca918ef335f78e2516441953915145c4a1 Mon Sep 17 00:00:00 2001
From: John Gebbie <me@johngebbie.com>
Date: Sun, 5 Feb 2023 12:10:37 +0000
Subject: [PATCH 1/2] vosk-api: update to 0.3.45.

---
 common/shlibs             | 2 +-
 srcpkgs/vosk-api/template | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/common/shlibs b/common/shlibs
index 59444164928b..bc77277ce8d1 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4213,7 +4213,7 @@ libtracecmd.so.1 libtracecmd-3.1.2_1
 libkshark.so.2 libkshark-2.1.1_1
 libcpp-hocon.so.0.3.0 cpp-hocon-0.3.0_5
 libfst.so.25 openfst-1.8.2_1
-libvosk.so vosk-api-0.3.43_1
+libvosk.so vosk-api-0.3.45_1
 libdspy-1.so.1 d-spy-1.4.0_1
 libpanel-1.so.1 libpanel-1.0.1_1
 libqrtr.so.1 qrtr-ns-1.0_1
diff --git a/srcpkgs/vosk-api/template b/srcpkgs/vosk-api/template
index b86c74452b95..41d53e654042 100644
--- a/srcpkgs/vosk-api/template
+++ b/srcpkgs/vosk-api/template
@@ -1,12 +1,12 @@
 # Template file for 'vosk-api'
 pkgname=vosk-api
-version=0.3.43
+version=0.3.45
 revision=1
 create_wrksrc=yes
 build_wrksrc="vosk-api-${version}/src"
 # Vosk is built with their own vendored version of Kaldi which has no releases
 # of its own, so the commit must be determined by the date of the vosk release.
-_kaldi_commit=ecb4b47159501ef0d67888633e65b8fc0c1f79d1
+_kaldi_commit=93ef0019b847272a239fbb485ef97f29feb1d587
 build_style=gnu-makefile
 make_use_env=yes
 make_build_args="KALDI_ROOT=../../kaldi HAVE_OPENBLAS_NO_F2C=1 HAVE_OPENBLAS_CLAPACK=0"
@@ -18,8 +18,8 @@ homepage="https://alphacephei.com/vosk"
 distfiles="https://github.com/alphacep/vosk-api/archive/v${version}/vosk-api-${version}.tar.gz
  https://github.com/alphacep/kaldi/archive/${_kaldi_commit}.tar.gz
  https://alphacephei.com/vosk/models/vosk-model-small-en-us-0.15.zip"
-checksum="50fa82bfbfe3fc5be868237c84ac180eb55da0b65b1803bf022899673afda024
- 39cadd5a351a5513e3e4e1f71ac4b4f018a592a856a55f1d32c159e22e799f64
+checksum="930fb9cfa6c1b3035d3730feee7d670fb893caa0c71bd2159ee7623102674c26
+ f47a996af546884a8e1cb961323b796c5c238c1bbeabaf657bb300b760e431b2
  30f26242c4eb449f948e42cb302dd7a686cb29a3423a8367f99ff41780942498"
 shlib_provides="libvosk.so"
 patch_args="-Np1 -d ${pkgname}-${version}"

From e94c889204e5be75bbda82e642bfc5a9d2db6a52 Mon Sep 17 00:00:00 2001
From: John Gebbie <me@johngebbie.com>
Date: Fri, 10 Feb 2023 14:04:45 +0000
Subject: [PATCH 2/2] vosk-api: use dynamic openblas lib

---
 srcpkgs/vosk-api/patches/vosk-lapack.patch   | 41 --------------------
 srcpkgs/vosk-api/patches/vosk-openblas.patch | 41 ++++++++++++++++++++
 srcpkgs/vosk-api/template                    |  6 +--
 3 files changed, 44 insertions(+), 44 deletions(-)
 delete mode 100644 srcpkgs/vosk-api/patches/vosk-lapack.patch
 create mode 100644 srcpkgs/vosk-api/patches/vosk-openblas.patch

diff --git a/srcpkgs/vosk-api/patches/vosk-lapack.patch b/srcpkgs/vosk-api/patches/vosk-lapack.patch
deleted file mode 100644
index 1b2fd6bd6c1d..000000000000
--- a/srcpkgs/vosk-api/patches/vosk-lapack.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-https://github.com/alphacep/vosk-api/pull/1215
-From 6c28207334bb1281d98a94f799757fdfa8f6b336 Mon Sep 17 00:00:00 2001
-From: John Gebbie <me@johngebbie.com>
-Date: Sat, 3 Dec 2022 17:53:21 +0000
-Subject: [PATCH] Add OPENBLAS_NO_F2C math library option
-
----
- src/Makefile | 13 +++++++++++++
- 1 file changed, 13 insertions(+)
-
-diff --git a/src/Makefile b/src/Makefile
-index cd697b15..97654883 100644
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -7,6 +7,7 @@ CUDA_ROOT?=/usr/local/cuda
- USE_SHARED?=0
- # Math libraries
- HAVE_OPENBLAS_CLAPACK?=1
-+HAVE_OPENBLAS_NO_F2C?=0
- HAVE_MKL?=0
- HAVE_ACCELERATE=0
- HAVE_CUDA?=0
-@@ -80,6 +81,18 @@ ifeq ($(HAVE_OPENBLAS_CLAPACK), 1)
-     endif
- endif
- 
-+ifeq ($(HAVE_OPENBLAS_NO_F2C), 1)
-+    CFLAGS += -I$(OPENBLAS_ROOT)/include
-+    ifeq ($(USE_SHARED), 0)
-+        LIBS += \
-+            $(OPENBLAS_ROOT)/lib/libopenblas.a \
-+            $(OPENBLAS_ROOT)/lib/liblapack.a \
-+            $(OPENBLAS_ROOT)/lib/libblas.a
-+    else
-+        LDFLAGS += -lopenblas -llapack -lblas
-+    endif
-+endif
-+
- ifeq ($(HAVE_MKL), 1)
-     CFLAGS += -DHAVE_MKL=1 -I$(MKL_ROOT)/include
-     LDFLAGS += -L$(MKL_ROOT)/lib/intel64 -Wl,-rpath=$(MKL_ROOT)/lib/intel64 -lmkl_rt -lmkl_intel_lp64 -lmkl_core -lmkl_sequential
diff --git a/srcpkgs/vosk-api/patches/vosk-openblas.patch b/srcpkgs/vosk-api/patches/vosk-openblas.patch
new file mode 100644
index 000000000000..2e3e473534a4
--- /dev/null
+++ b/srcpkgs/vosk-api/patches/vosk-openblas.patch
@@ -0,0 +1,41 @@
+https://github.com/alphacep/vosk-api/pull/1268
+From fd7a05c279d8a221afb7cf48df5a5dd9baf0c9d4 Mon Sep 17 00:00:00 2001
+From: John Gebbie <me@johngebbie.com>
+Date: Thu, 9 Feb 2023 18:45:53 +0000
+Subject: [PATCH] Add OPENBLAS math library option
+
+---
+ src/Makefile | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/src/Makefile b/src/Makefile
+index cd697b1..d821022 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -7,6 +7,7 @@ CUDA_ROOT?=/usr/local/cuda
+ USE_SHARED?=0
+ # Math libraries
+ HAVE_OPENBLAS_CLAPACK?=1
++HAVE_OPENBLAS?=0
+ HAVE_MKL?=0
+ HAVE_ACCELERATE=0
+ HAVE_CUDA?=0
+@@ -80,6 +81,15 @@ ifeq ($(HAVE_OPENBLAS_CLAPACK), 1)
+     endif
+ endif
+ 
++ifeq ($(HAVE_OPENBLAS), 1)
++    CFLAGS += -I$(OPENBLAS_ROOT)/include
++    ifeq ($(USE_SHARED), 0)
++        LIBS += $(OPENBLAS_ROOT)/lib/libopenblas.a
++    else
++        LDFLAGS += -lopenblas -lgfortan
++    endif
++endif
++
+ ifeq ($(HAVE_MKL), 1)
+     CFLAGS += -DHAVE_MKL=1 -I$(MKL_ROOT)/include
+     LDFLAGS += -L$(MKL_ROOT)/lib/intel64 -Wl,-rpath=$(MKL_ROOT)/lib/intel64 -lmkl_rt -lmkl_intel_lp64 -lmkl_core -lmkl_sequential
+-- 
+2.38.3
+
diff --git a/srcpkgs/vosk-api/template b/srcpkgs/vosk-api/template
index 41d53e654042..6082a6de0b5e 100644
--- a/srcpkgs/vosk-api/template
+++ b/srcpkgs/vosk-api/template
@@ -10,7 +10,7 @@ _kaldi_commit=93ef0019b847272a239fbb485ef97f29feb1d587
 build_style=gnu-makefile
 make_use_env=yes
 make_build_args="KALDI_ROOT=../../kaldi HAVE_OPENBLAS_NO_F2C=1 HAVE_OPENBLAS_CLAPACK=0"
-makedepends="blas-devel lapack-devel openblas-devel libgomp-devel openfst-devel"
+makedepends="libgfortran openblas-devel libgomp-devel openfst-devel"
 short_desc="Offline speech recognition toolkit"
 maintainer="John Gebbie <me@johngebbie.com>"
 license="Apache-2.0"
@@ -41,7 +41,7 @@ post_extract() {
 
 pre_build() {
 	cd "${wrksrc}/kaldi/src"
-	./configure ${CROSS_BUILD:+--host="${XBPS_CROSS_TRIPLET}"} --mathlib=OPENBLAS_NO_F2C --shared --use-cuda=no
+	./configure ${CROSS_BUILD:+--host="${XBPS_CROSS_TRIPLET}"} --mathlib=OPENBLAS --shared --use-cuda=no
 	make online2 lm rnnlm
 }
 
@@ -57,7 +57,7 @@ do_check() {
 	cd "${wrksrc}/vosk-api-${version}/c"
 	ln -sf "${wrksrc}/vosk-model-small-en-us-0.15" model
 	ln -sf ../python/example/test.wav .
-	ldflags="-fopenmp -L../src -lvosk -ldl -lpthread -Wl,-rpath,../src"
+	ldflags="-fopenmp -L../src -lvosk -ldl -lpthread -lopenblas -lgfortran -Wl,-rpath,../src"
 	if [ "$XBPS_TARGET_LIBC" = musl ]; then
 		ldflags+=" -lexecinfo"
 	fi

  parent reply	other threads:[~2023-02-10 14:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-05 12:18 [PR PATCH] " JohnGebbie
2023-02-05 12:28 ` [PR PATCH] [Updated] " JohnGebbie
2023-02-05 12:45 ` JohnGebbie
2023-02-05 12:59 ` JohnGebbie
2023-02-05 13:08 ` JohnGebbie
2023-02-05 13:20 ` JohnGebbie
2023-02-05 13:26 ` JohnGebbie
2023-02-05 14:30 ` JohnGebbie
2023-02-05 16:59 ` JohnGebbie
2023-02-05 19:42 ` JohnGebbie
2023-02-09 14:39 ` JohnGebbie
2023-02-10 14:13 ` JohnGebbie [this message]
2023-02-10 14:44 ` [PR PATCH] [Updated] " JohnGebbie
2023-02-11 11:26 ` JohnGebbie
2023-02-11 13:51 ` JohnGebbie
2023-02-11 15:02 ` JohnGebbie
2023-02-11 16:05 ` JohnGebbie
2023-02-11 16:06 ` JohnGebbie
2023-02-14 20:29 ` [PR PATCH] [Merged]: " paper42

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230210141355.wu5dP-02Vh53D-r_tpFe5-x-a_Ntl4QY8UODSetJlJU@z \
    --to=johngebbie@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).