community/openfst: fix build with gcc 14

This commit is contained in:
mio 2024-09-10 20:13:36 +00:00 committed by Patrycja Rosa
parent 1886989e98
commit 5119861976
2 changed files with 22 additions and 2 deletions

View file

@ -2,7 +2,7 @@
# Maintainer: John Gebbie <me@johngebbie.com>
pkgname=openfst
pkgver=1.8.3
pkgrel=0
pkgrel=1
pkgdesc="Finite-state transducers library"
url="https://www.openfst.org"
# doesn't build on other arches
@ -18,7 +18,8 @@ subpackages="
libfstngram
"
source="https://www.openfst.org/twiki/pub/FST/FstDownload/openfst-$pkgver.tar.gz
fix-check.patch"
fix-check.patch
gcc14.patch"
build() {
CFLAGS="$CFLAGS -O2" \
@ -85,4 +86,5 @@ libfstngram() {
sha512sums="
26717ee019a05412d29ea611af651a443823999aab4e9834d2da7ce67d9aa1434ccacbcd19c0247386129272ddaec286f608be4d118ebef68d74c29a3b861d54 openfst-1.8.3.tar.gz
8826567c4a2627e7115ca2269ddaaca5bab4430a8cb3b163106e524023c55983ba1da490ccba0f1379266f42b87dfcdeb0cbb627cf5183e07a7e5fe84d08ed68 fix-check.patch
1fe1ac83e107f287d2360a4fb43fba2e29634b2c17a491ff5f3828d90cb5e7062826cac16df5cafee507f8f604d8fe30354a7eaa4655cbddd2d18e8b568aec4f gcc14.patch
"

View file

@ -0,0 +1,18 @@
Source: https://src.fedoraproject.org/rpms/openfst/c/2f26919897b1ab2bec7391d50477785acb3b6a7b
---
diff -u --recursive openfst-1.8.3-vanilla/src/include/fst/fst.h openfst-1.8.3/src/include/fst/fst.h
--- openfst-1.8.3-vanilla/src/include/fst/fst.h 2024-01-11 15:32:17.000000000 -0600
+++ openfst-1.8.3/src/include/fst/fst.h 2024-02-08 18:09:12.513678763 -0600
@@ -687,8 +687,10 @@
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_ =
+ fst::WrapUnique(impl.isymbols_ ? impl.isymbols_->Copy() : nullptr);
+ osymbols_ =
+ fst::WrapUnique(impl.osymbols_ ? impl.osymbols_->Copy() : nullptr);
return *this;
}