From f2f6fceb0b458d7163e1d6126ec45f861a8f5295 Mon Sep 17 00:00:00 2001 From: John Gebbie Date: Fri, 28 Oct 2022 17:44:34 +0100 Subject: [PATCH] New package: openfst-1.8.2 --- common/shlibs | 1 + srcpkgs/openfst-devel | 1 + srcpkgs/openfst/patches/cross-compile.patch | 23 ++++++++++ srcpkgs/openfst/template | 47 +++++++++++++++++++++ 4 files changed, 72 insertions(+) create mode 120000 srcpkgs/openfst-devel create mode 100644 srcpkgs/openfst/patches/cross-compile.patch create mode 100644 srcpkgs/openfst/template diff --git a/common/shlibs b/common/shlibs index 644676c76ec..0c8744f541a 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4213,3 +4213,4 @@ libtracefs.so.1 libtracefs-1.4.2_1 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 diff --git a/srcpkgs/openfst-devel b/srcpkgs/openfst-devel new file mode 120000 index 00000000000..b4e86ac8d61 --- /dev/null +++ b/srcpkgs/openfst-devel @@ -0,0 +1 @@ +openfst \ No newline at end of file diff --git a/srcpkgs/openfst/patches/cross-compile.patch b/srcpkgs/openfst/patches/cross-compile.patch new file mode 100644 index 00000000000..4014f51dba3 --- /dev/null +++ b/srcpkgs/openfst/patches/cross-compile.patch @@ -0,0 +1,23 @@ +From 256f83e52112a5cd37e37a34beff2c4f0eae4660 Mon Sep 17 00:00:00 2001 +From: Nickolay Shmyrev +Date: Tue, 16 Jun 2020 15:22:19 +0200 +Subject: [PATCH] Don't fail on cross-compile + +--- + configure.ac | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index d52ed02..0f53b4d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -180,7 +180,8 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([ + [AC_MSG_FAILURE(m4_normalize([ + Test float equality failed! + Compile with -msse -mfpmath=sse if using g++. +- ]))]) ++ ]))], ++ [echo "Ignoring test for cross-compilation"]) + + AC_CHECK_LIB([dl], dlopen, [DL_LIBS=-ldl]) + AC_SUBST([DL_LIBS]) diff --git a/srcpkgs/openfst/template b/srcpkgs/openfst/template new file mode 100644 index 00000000000..1e62d249f83 --- /dev/null +++ b/srcpkgs/openfst/template @@ -0,0 +1,47 @@ +# Template file for 'openfst' +pkgname=openfst +version=1.8.2 +revision=1 +# Limiting archs until resolved why a test fails when natively compiling i686: +# https://github.com/kaldi-asr/kaldi/issues/4808 +archs="x86_64* aarch64*" +build_style=gnu-configure +configure_args=" + --disable-bin + --disable-dependency-tracking + --enable-compact-fsts + --enable-compress + --enable-const-fsts + --enable-far + --enable-linear-fsts + --enable-lookahead-fsts + --enable-mpdt + --enable-ngram-fsts + --enable-pdt + --enable-shared + --enable-static + --with-pic +" +hostmakedepends="autoconf automake libtool" +short_desc="Finite-state transducers library" +maintainer="John Gebbie " +license="Apache-2.0" +homepage="https://www.openfst.org" +distfiles="https://www.openfst.org/twiki/pub/FST/FstDownload/openfst-$version.tar.gz" +checksum=de987bf3624721c5d5ba321af95751898e4f4bb41c8a36e2d64f0627656d8b42 + +pre_configure() { + autoreconf -fi +} + +openfst-devel_package() { + depends="${sourcepkg}>=${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove "usr/lib/*.a" + vmove "usr/lib/*.so" + vmove "usr/lib/fst/*.a" + vmove "usr/lib/fst/*.so" + } +}