commit 803c7e3270ef859efb50af3875e99e6e6beff65fe2c0c92a9d1161b16eae595b Author: Atri Bhattacharya Date: Wed Apr 20 11:34:50 2022 +0000 Accepting request 971071 from home:jengelh:dev +15.3 build OBS-URL: https://build.opensuse.org/request/show/971071 OBS-URL: https://build.opensuse.org/package/show/science/openfst?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/i586-80bitfp.patch b/i586-80bitfp.patch new file mode 100644 index 0000000..80159f2 --- /dev/null +++ b/i586-80bitfp.patch @@ -0,0 +1,43 @@ +From: Jan Engelhardt +Date: 2022-04-14 16:00:12.633272404 +0200 + +Modeled upon a similar patch for opensuse's ICU package. + +--- + configure.ac | 4 ++-- + src/include/fst/float-weight.h | 4 +++- + 2 files changed, 5 insertions(+), 3 deletions(-) + +Index: openfst-1.8.2/configure.ac +=================================================================== +--- openfst-1.8.2.orig/configure.ac ++++ openfst-1.8.2/configure.ac +@@ -156,11 +156,11 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([ + #include + + template +- bool FloatEqIsReflexive(T m) { ++ bool FloatEqIsReflexive(volatile T m) { + volatile T x = 1.111; + x *= m; + +- T y = 1.111; ++ volatile T y = 1.111; + y *= m; + + return x == y; +Index: openfst-1.8.2/src/include/fst/float-weight.h +=================================================================== +--- openfst-1.8.2.orig/src/include/fst/float-weight.h ++++ openfst-1.8.2/src/include/fst/float-weight.h +@@ -117,7 +117,9 @@ constexpr bool operator==(const FloatWei + // register may cause it to compare unequal to that same weight when + // stored to memory. This breaks =='s reflexivity, in turn breaking + // NaturalLess. +-#error "Please compile with -msse -mfpmath=sse, or equivalent." ++// So, store it in memory. ++ volatile T a = w1.Value(), b = w2.Value(); ++ return a == b; + #endif + return w1.Value() == w2.Value(); + } diff --git a/openfst-1.8.2.tar.gz b/openfst-1.8.2.tar.gz new file mode 100644 index 0000000..a925e28 --- /dev/null +++ b/openfst-1.8.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de987bf3624721c5d5ba321af95751898e4f4bb41c8a36e2d64f0627656d8b42 +size 1342793 diff --git a/openfst.changes b/openfst.changes new file mode 100644 index 0000000..6068775 --- /dev/null +++ b/openfst.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Mon Jul 5 09:33:46 UTC 2021 - Jan Engelhardt + +- Initial package for build.opensuse.org (version 1.8.1) +- Add i586-80bitfp.patch diff --git a/openfst.spec b/openfst.spec new file mode 100644 index 0000000..9b8c1d8 --- /dev/null +++ b/openfst.spec @@ -0,0 +1,89 @@ +# +# spec file for package openfst +# +# Copyright (c) 2022 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define lname libfst25 +Name: openfst +Version: 1.8.2 +Release: 0 +Summary: Weighted finite-state transducer library +License: Apache-2.0 +Group: Development/Libraries/C and C++ +URL: http://www.openfst.org/ +Source: http://www.openfst.org/twiki/pub/FST/FstDownload/%name-%version.tar.gz +Patch1: i586-80bitfp.patch +%if 0%{?suse_version} && 0%{?suse_version} < 1550 +BuildRequires: gcc10-c++ >= 8.1.0 +%else +BuildRequires: gcc-c++ >= 8.1.0 +%endif +BuildRequires: libtool +BuildRequires: pkgconfig(zlib) + +%description +OpenFst is a library for constructing, combining, optimizing and +searching weighted finite-state transducers (FSTs). + +%package -n %lname +Summary: Development files for OpenFST +Group: System/Libraries + +%description -n %lname +OpenFST is a library for constructing, combining, optimizing and +searching weighted finite-state transducers (FSTs). + +This package requires SSE on 32-bit x86 to function. + +%package devel +Summary: Development files for OpenFST +Group: Development/Libraries/C and C++ +Requires: %lname = %version-%release + +%description devel +OpenFST is a library for constructing, combining, optimizing and +searching weighted finite-state transducers (FSTs). + +%prep +%autosetup -p1 + +%build +%if 0%{?suse_version} && 0%{?suse_version} < 1550 +export CXX=g++-10 +%endif +autoreconf -fi +%configure +%make_build + +%install +%make_install +find %buildroot/%_libdir -type f -name "*.la" -print -delete + +%post -n %lname -p /sbin/ldconfig +%postun -n %lname -p /sbin/ldconfig + +%files +%license COPYING +%_bindir/fst* + +%files -n %lname +%_libdir/lib*.so.25* + +%files devel +%_includedir/fst/ +%_libdir/*.so + +%changelog