]> git.pld-linux.org Git - packages/openfst.git/commitdiff
- updated to 1.5.0 auto/th/openfst-1.5.0-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 27 Dec 2015 11:53:05 +0000 (12:53 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 27 Dec 2015 11:53:05 +0000 (12:53 +0100)
- updated link patch
- added python patch (fix python module install dir and linking)
- enable more extensions, including python binding

openfst-link.patch
openfst-python.patch [new file with mode: 0644]
openfst.spec

index 6b5f4b8f27268ede15d66d4775323d123de8376b..d316fa3ae0a6f4121dcb7df267b7455d8901188a 100644 (file)
@@ -1,40 +1,40 @@
---- openfst-1.3.3/src/lib/Makefile.am.orig     2011-03-12 00:54:41.000000000 +0100
-+++ openfst-1.3.3/src/lib/Makefile.am  2011-04-23 07:04:02.037016345 +0200
-@@ -4,3 +4,4 @@ lib_LTLIBRARIES = libfst.la
+--- openfst-1.5.0/src/lib/Makefile.am.orig     2015-12-26 21:06:48.622906025 +0100
++++ openfst-1.5.0/src/lib/Makefile.am  2015-12-26 22:46:00.295989593 +0100
+@@ -4,3 +4,4 @@
  libfst_la_SOURCES = compat.cc flags.cc fst.cc properties.cc \
- symbol-table.cc util.cc
- libfst_la_LDFLAGS = -version-info 1:0:0
+ symbol-table.cc util.cc symbol-table-ops.cc mapped-file.cc
+ libfst_la_LDFLAGS = -version-info 1:5:0
 +libfst_la_LIBADD = -ldl
---- openfst-1.3.3/src/script/Makefile.am.orig  2011-03-12 00:54:42.000000000 +0100
-+++ openfst-1.3.3/src/script/Makefile.am       2011-04-23 07:04:34.287017545 +0200
+--- openfst-1.5.0/src/script/Makefile.am.orig  2011-03-12 00:54:42.000000000 +0100
++++ openfst-1.5.0/src/script/Makefile.am       2011-04-23 07:04:34.287017545 +0200
 @@ -12,4 +12,5 @@ shortest-path.cc synchronize.cc text-io.
  weight-class.cc
  
- libfstscript_la_LDFLAGS = -version-info 1:0:0
+ libfstscript_la_LDFLAGS = -version-info 1:5:0
 +libfstscript_la_LIBADD = $(top_builddir)/src/lib/libfst.la $(ICU_FLAGS) -ldl
  endif
---- openfst-1.3.3/src/extensions/compact/Makefile.am.orig      2011-03-12 00:54:41.000000000 +0100
-+++ openfst-1.3.3/src/extensions/compact/Makefile.am   2011-05-30 21:11:04.174532124 +0200
+--- openfst-1.5.0/src/extensions/compact/Makefile.am.orig      2011-03-12 00:54:41.000000000 +0100
++++ openfst-1.5.0/src/extensions/compact/Makefile.am   2011-05-30 21:11:04.174532124 +0200
 @@ -6,6 +6,7 @@
  
  libfstcompact_la_SOURCES = compact8_acceptor-fst.cc compact8_string-fst.cc compact8_unweighted-fst.cc compact8_unweighted_acceptor-fst.cc compact8_weighted_string-fst.cc compact16_acceptor-fst.cc compact16_string-fst.cc compact16_unweighted-fst.cc compact16_unweighted_acceptor-fst.cc compact16_weighted_string-fst.cc compact64_acceptor-fst.cc compact64_string-fst.cc compact64_unweighted-fst.cc compact64_unweighted_acceptor-fst.cc compact64_weighted_string-fst.cc
- libfstcompact_la_LDFLAGS = -version-info 1:0:0
+ libfstcompact_la_LDFLAGS = -version-info 1:5:0
 +libfstcompact_la_LIBADD = $(top_builddir)/src/lib/libfst.la -ldl
  
  compact8_acceptor_fst_la_SOURCES = compact8_acceptor-fst.cc
  compact8_acceptor_fst_la_LDFLAGS = -module
---- openfst-1.3.3/src/extensions/const/Makefile.am.orig        2011-03-12 00:54:41.000000000 +0100
-+++ openfst-1.3.3/src/extensions/const/Makefile.am     2011-05-30 21:12:20.464534677 +0200
+--- openfst-1.5.0/src/extensions/const/Makefile.am.orig        2011-03-12 00:54:41.000000000 +0100
++++ openfst-1.5.0/src/extensions/const/Makefile.am     2011-05-30 21:12:20.464534677 +0200
 @@ -6,6 +6,7 @@
  
  libfstconst_la_SOURCES = const8-fst.cc const16-fst.cc const64-fst.cc
- libfstconst_la_LDFLAGS = -version-info 1:0:0
+ libfstconst_la_LDFLAGS = -version-info 1:5:0
 +libfstconst_la_LIBADD = $(top_builddir)/src/lib/libfst.la -ldl
  
  const8_fst_la_SOURCES = const8-fst.cc
  const8_fst_la_LDFLAGS = -module
---- openfst-1.3.3/src/extensions/far/Makefile.am.orig  2011-03-12 00:54:41.000000000 +0100
-+++ openfst-1.3.3/src/extensions/far/Makefile.am       2011-05-30 21:15:13.067873790 +0200
+--- openfst-1.5.0/src/extensions/far/Makefile.am.orig  2011-03-12 00:54:41.000000000 +0100
++++ openfst-1.5.0/src/extensions/far/Makefile.am       2011-05-30 21:15:13.067873790 +0200
 @@ -4,7 +4,7 @@
  libfstdir = @libfstdir@
  
 @@ -15,6 +15,7 @@
  if HAVE_SCRIPT
  libfstfarscript_la_SOURCES = farscript.cc compile-strings.cc main.cc
- libfstfarscript_la_LDFLAGS = -version-info 1:0:0
+ libfstfarscript_la_LDFLAGS = -version-info 1:5:0
 +libfstfarscript_la_LIBADD = libfstfar.la $(top_builddir)/src/lib/libfst.la $(ICU_LIBS) -ldl
  endif
  
  if HAVE_BIN
---- openfst-1.3.3/src/extensions/lookahead/Makefile.am.orig    2011-03-12 00:54:41.000000000 +0100
-+++ openfst-1.3.3/src/extensions/lookahead/Makefile.am 2011-05-30 21:16:34.171209838 +0200
+--- openfst-1.5.0/src/extensions/lookahead/Makefile.am.orig    2011-03-12 00:54:41.000000000 +0100
++++ openfst-1.5.0/src/extensions/lookahead/Makefile.am 2011-05-30 21:16:34.171209838 +0200
 @@ -8,6 +8,7 @@
  libfstlookahead_la_SOURCES = arc_lookahead-fst.cc ilabel_lookahead-fst.cc \
  olabel_lookahead-fst.cc
- libfstlookahead_la_LDFLAGS = -version-info 0:0:0
+ libfstlookahead_la_LDFLAGS = -version-info 1:5:0
 +libfstlookahead_la_LIBADD = $(top_builddir)/src/lib/libfst.la -ldl
  
  arc_lookahead_fst_la_SOURCES = arc_lookahead-fst.cc
  arc_lookahead_fst_la_LDFLAGS = -module
---- openfst-1.3.3/src/extensions/pdt/Makefile.am.orig  2011-03-12 00:54:41.000000000 +0100
-+++ openfst-1.3.3/src/extensions/pdt/Makefile.am       2011-05-30 21:18:50.077881058 +0200
+--- openfst-1.5.0/src/extensions/pdt/Makefile.am.orig  2011-03-12 00:54:41.000000000 +0100
++++ openfst-1.5.0/src/extensions/pdt/Makefile.am       2011-05-30 21:18:50.077881058 +0200
 @@ -32,4 +32,5 @@
  libfst_LTLIBRARIES = libfstpdtscript.la
  libfstpdtscript_la_SOURCES = pdtscript.cc
- libfstpdtscript_la_LDFLAGS = -version-info 1:0:0
+ libfstpdtscript_la_LDFLAGS = -version-info 1:5:0
 +libfstpdtscript_la_LIBADD = $(top_builddir)/src/script/libfstscript.la $(top_builddir)/src/lib/libfst.la -ldl
  endif
diff --git a/openfst-python.patch b/openfst-python.patch
new file mode 100644 (file)
index 0000000..f16f4f9
--- /dev/null
@@ -0,0 +1,16 @@
+--- openfst-1.5.0/src/extensions/python/Makefile.am.orig       2015-07-01 02:58:24.000000000 +0200
++++ openfst-1.5.0/src/extensions/python/Makefile.am    2015-12-27 10:40:49.034189720 +0100
+@@ -1,11 +1,10 @@
+-python_LTLIBRARIES = fst.la
++pyexec_LTLIBRARIES = fst.la
+-pyexec_LTILIBRARIES = fst.la
+ fst_la_SOURCES = fst.cc
+ fst_la_CPPFLAGS = -I$(srcdir)/../../include $(PYTHON_CPPFLAGS)
+ fst_la_LDFLAGS = $(PYTHON_LDFLAGS) -avoid-version -module
+ fst_la_LIBADD = ../../script/libfstscript.la ../../lib/libfst.la \
+-                                                              -lfstscript -lfst -lm -ldl
++                                                              -lm -ldl
+ # NB: we use the Cython-generated .cc, rather than the .pyx source file, so 
+ # modifications to the .pyx will not influence the build.
index 8f60eb563c19b2806800a054bc84cae0fa458060..bcf4544a9078a53065733d7b19c1e6d18645d72f 100644 (file)
@@ -1,20 +1,26 @@
+#
+# Conditional build:
+%bcond_without python          # python extensions
+%bcond_without static_libs     # static library
+#
 Summary:       OpenFst - library for finite state transducers development
 Summary(pl.UTF-8):     OpenFst - biblioteka do programowania automatów skończonych z wyjściem
 Name:          openfst
-Version:       1.3.3
+Version:       1.5.0
 Release:       1
 License:       Apache v2.0
 Group:         Libraries
 #Source0Download: http://www.openfst.org/twiki/bin/view/FST/FstDownload
 Source0:       http://www.openfst.org/twiki/pub/FST/FstDownload/%{name}-%{version}.tar.gz
-# Source0-md5: c7ba9e791eba501bb9d5b95ccc6e5231
+# Source0-md5: a24fee5ffe28744c6fb7b1a49e0006c4
 Patch0:                %{name}-link.patch
+Patch1:                %{name}-python.patch
 URL:           http://www.openfst.org/
 BuildRequires: autoconf >= 2.50
 BuildRequires: automake
-BuildRequires: libstdc++-devel >= 6:4.1
+BuildRequires: libstdc++-devel >= 6:4.7
 BuildRequires: libtool >= 2:1.5
-BuildRequires: sed >= 4.0
+%{?with_python:BuildRequires:  python-devel >= 1:2.7}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 # modules dlopened from libfst refer to symbols from the library
@@ -33,7 +39,7 @@ Summary:      Header files for OpenFst library
 Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki OpenFst
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
-Requires:      libstdc++-devel >= 6:4.1
+Requires:      libstdc++-devel >= 6:4.7
 
 %description devel
 Header files for OpenFst library.
@@ -53,12 +59,23 @@ Static OpenFst library.
 %description static -l pl.UTF-8
 Statyczna biblioteka OpenFst.
 
+%package -n python-openfst
+Summary:       Python binding for OpenFst
+Summary(pl.UTF-8):     Wiązanie Pythona do biblioteki OpenFst
+Group:         Libraries/Python
+Requires:      %{name} = %{version}-%{release}
+Requires:      python-libs >= 1:2.7
+
+%description -n python-openfst
+Python binding for OpenFst.
+
+%description -n python-openfst -l pl.UTF-8
+Wiązanie Pythona do biblioteki OpenFst.
+
 %prep
 %setup -q
 %patch0 -p1
-
-# kill am portability warning (there is -Werror)
-%{__sed} -i -e '/AC_PROG_LIBTOOL/iAM_PROG_AR' configure.ac
+%patch1 -p1
 
 %build
 %{__libtoolize}
@@ -68,12 +85,16 @@ Statyczna biblioteka OpenFst.
 %{__automake}
 %configure \
        --enable-compact-fsts \
+       --enable-compress \
        --enable-const-fsts \
        --enable-far \
+       --enable-linear-fsts \
        --enable-lookahead-fsts \
+       --enable-mpdt \
        --enable-ngram-fsts \
        --enable-pdt \
-       --enable-static
+       --enable-python \
+       %{?with_static_libs:--enable-static}
 
 %{__make}
 
@@ -83,7 +104,12 @@ rm -rf $RPM_BUILD_ROOT
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/fst/*.{la,a}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/fst/*.la \
+       %{?with_python:$RPM_BUILD_ROOT%{py_sitedir}/fst.la}
+%if %{with static_libs}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/fst/*.a \
+       %{?with_python:$RPM_BUILD_ROOT%{py_sitedir}/fst.a}
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -96,6 +122,7 @@ rm -rf $RPM_BUILD_ROOT
 %doc AUTHORS COPYING NEWS README
 %attr(755,root,root) %{_bindir}/far*
 %attr(755,root,root) %{_bindir}/fst*
+%attr(755,root,root) %{_bindir}/mpdt*
 %attr(755,root,root) %{_bindir}/pdt*
 %attr(755,root,root) %{_libdir}/libfst.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libfst.so.1
@@ -112,7 +139,15 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libfstscript.la
 %{_includedir}/fst
 
+%if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libfst.a
 %{_libdir}/libfstscript.a
+%endif
+
+%if %{with python}
+%files -n python-openfst
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py_sitedir}/fst.so
+%endif
This page took 0.090893 seconds and 4 git commands to generate.