diff options
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/machine-learning.scm | 4 | ||||
-rw-r--r-- | gnu/packages/patches/openfst-for-vosk-fix-unique-ptr.patch | 24 |
3 files changed, 28 insertions, 1 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index bae630ff60..8a381701e0 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1982,6 +1982,7 @@ dist_patch_DATA = \ %D%/packages/patches/openbox-add-fix-for-glib2-exposed-segfault.patch \ %D%/packages/patches/openbox-python3.patch \ %D%/packages/patches/openexr-2-gcc-14.patch \ + %D%/packages/patches/openfst-for-vosk-fix-unique-ptr.patch \ %D%/packages/patches/openjdk-currency-time-bomb.patch \ %D%/packages/patches/openjdk-currency-time-bomb2.patch \ %D%/packages/patches/openjdk-9-pointer-comparison.patch \ diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 91c1616bc7..6fc4610720 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -1036,7 +1036,9 @@ optimizing, and searching weighted finite-state transducers (FSTs).") (uri (string-append "http://www.openfst.org/twiki/pub/FST/" "FstDownload/openfst-" version ".tar.gz")) (sha256 - (base32 "0h2lfhhihg63b804hrcljnkggijbjmp84i5g8q735wb09y9z2c4p")))) + (base32 "0h2lfhhihg63b804hrcljnkggijbjmp84i5g8q735wb09y9z2c4p")) + (patches + (search-patches "openfst-for-vosk-fix-unique-ptr.patch")))) (arguments '(#:configure-flags '("--enable-shared" "--enable-far" "--enable-ngram-fsts" diff --git a/gnu/packages/patches/openfst-for-vosk-fix-unique-ptr.patch b/gnu/packages/patches/openfst-for-vosk-fix-unique-ptr.patch new file mode 100644 index 0000000000..f6949a070f --- /dev/null +++ b/gnu/packages/patches/openfst-for-vosk-fix-unique-ptr.patch @@ -0,0 +1,24 @@ +From 879f09d2ac799cca99b78de3442194ebbe29d24a Mon Sep 17 00:00:00 2001 +From: Nickolay Shmyrev <nshmyrev@gmail.com> +Date: Fri, 23 Aug 2024 16:10:49 +0200 +Subject: [PATCH] Proper assign to unique_ptr + +--- + src/include/fst/fst.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/include/fst/fst.h b/src/include/fst/fst.h +index 80e394808..57cf1fd68 100644 +--- a/src/include/fst/fst.h ++++ b/src/include/fst/fst.h +@@ -701,8 +701,8 @@ class FstImpl { + properties_.store(impl.properties_.load(std::memory_order_relaxed), + std::memory_order_relaxed); + type_ = impl.type_; +- isymbols_ = impl.isymbols_ ? impl.isymbols_->Copy() : nullptr; +- osymbols_ = impl.osymbols_ ? impl.osymbols_->Copy() : nullptr; ++ isymbols_.reset(impl.isymbols_ ? impl.isymbols_->Copy() : nullptr); ++ osymbols_.reset(impl.osymbols_ ? impl.osymbols_->Copy() : nullptr); + return *this; + } + |