[openfst] New upstream version. Drop unnecessary spec file elements (%clean, etc.).
Jerry James
jjames at fedoraproject.org
Wed Nov 9 16:20:44 UTC 2011
commit ce61fe6d371bf81a836d5b5daeaf82e374d1040e
Author: Jerry James <loganjerry at gmail.com>
Date: Wed Nov 9 09:20:23 2011 -0700
New upstream version.
Drop unnecessary spec file elements (%clean, etc.).
.gitignore | 2 +-
openfst-format.patch | 104 +++++++++++++++++++++++--------------------------
openfst.spec | 78 ++++++++++++++++++-------------------
sources | 2 +-
4 files changed, 89 insertions(+), 97 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 5768550..179ca93 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,2 @@
-/openfst-1.2.7.tar.gz
/openfst-man.tar.xz
+/openfst-1.2.8.tar.gz
diff --git a/openfst-format.patch b/openfst-format.patch
index e2c8519..2ded428 100644
--- a/openfst-format.patch
+++ b/openfst-format.patch
@@ -1,6 +1,5 @@
-diff -durp src.orig/include/fst/extensions/pdt/info.h src/include/fst/extensions/pdt/info.h
---- src.orig/include/fst/extensions/pdt/info.h 2011-02-04 18:57:20.000000000 -0700
-+++ src/include/fst/extensions/pdt/info.h 2011-02-24 11:59:51.729229125 -0700
+--- ./src/include/fst/extensions/pdt/info.h.orig 2011-11-08 12:49:51.000000000 -0700
++++ ./src/include/fst/extensions/pdt/info.h 2011-11-09 08:28:18.039302148 -0700
@@ -147,21 +147,21 @@ void PrintPdtInfo(const PdtInfo<A> &pdti
pdtinfo.FstType().c_str());
fprintf(fp, "%-50s%s\n", "arc type",
@@ -31,22 +30,26 @@ diff -durp src.orig/include/fst/extensions/pdt/info.h src/include/fst/extensions
pdtinfo.NumCloseParenStates());
}
-diff -durp src.orig/include/fst/script/draw-impl.h src/include/fst/script/draw-impl.h
---- src.orig/include/fst/script/draw-impl.h 2011-02-04 18:57:22.000000000 -0700
-+++ src/include/fst/script/draw-impl.h 2011-02-24 12:00:15.705531528 -0700
-@@ -127,7 +127,7 @@ template <class A> class FstDrawer {
- PrintString(symbol);
- } else {
- char sid[kLineLen];
-- snprintf(sid, kLineLen, "%lld", id);
-+ snprintf(sid, kLineLen, "%" PRId64, id);
- PrintString(sid);
- }
- }
-diff -durp src.orig/include/fst/script/info-impl.h src/include/fst/script/info-impl.h
---- src.orig/include/fst/script/info-impl.h 2011-02-04 18:57:22.000000000 -0700
-+++ src/include/fst/script/info-impl.h 2011-02-24 12:02:19.041519396 -0700
-@@ -230,19 +230,19 @@ void PrintFstInfo(const FstInfo<A> &fsti
+--- ./src/include/fst/types.h.orig 2011-03-11 16:54:41.000000000 -0700
++++ ./src/include/fst/types.h 2011-11-09 08:28:18.056302130 -0700
+@@ -18,12 +18,13 @@
+ // Various type definitions (mostly for Google compatibility).
+
+ #include <cstdlib> // for ssize_t
+-#include <stdint.h> // *int*_t
+
+ #include <fst/compat.h> // for DISALLOW_COPY_AND_ASSIGN
+
+ #ifndef FST_LIB_TYPES_H__
+ #define FST_LIB_TYPES_H__
++#define __STDC_FORMAT_MACROS
++#include <inttypes.h> // *int*_t
+
+ typedef int8_t int8;
+ typedef int16_t int16;
+--- ./src/include/fst/script/info-impl.h.orig 2011-11-08 12:49:52.000000000 -0700
++++ ./src/include/fst/script/info-impl.h 2011-11-09 08:28:18.055302131 -0700
+@@ -236,19 +236,19 @@ void PrintFstInfo(const FstInfo<A> &fsti
if (!fstinfo.LongInfo())
return;
@@ -73,7 +76,7 @@ diff -durp src.orig/include/fst/script/info-impl.h src/include/fst/script/info-i
fstinfo.NumOutputEpsilons());
string arc_type = "";
-@@ -254,19 +254,19 @@ void PrintFstInfo(const FstInfo<A> &fsti
+@@ -260,19 +260,19 @@ void PrintFstInfo(const FstInfo<A> &fsti
arc_type = "output-epsilon ";
string accessible_label = "# of " + arc_type + "accessible states";
@@ -98,28 +101,31 @@ diff -durp src.orig/include/fst/script/info-impl.h src/include/fst/script/info-i
fstinfo.NumScc());
fprintf(fp, "%-50s%c\n", "input matcher",
-diff -durp src.orig/include/fst/types.h src/include/fst/types.h
---- src.orig/include/fst/types.h 2010-09-03 13:02:47.000000000 -0600
-+++ src/include/fst/types.h 2011-02-24 12:03:32.616653299 -0700
-@@ -18,12 +18,13 @@
- // Various type definitions (mostly for Google compatibility).
-
- #include <cstdlib> // for ssize_t
--#include <stdint.h> // *int*_t
-
- #include <fst/compat.h> // for DISALLOW_COPY_AND_ASSIGN
-
- #ifndef FST_LIB_TYPES_H__
- #define FST_LIB_TYPES_H__
-+#define __STDC_FORMAT_MACROS
-+#include <inttypes.h> // *int*_t
+--- ./src/include/fst/script/draw-impl.h.orig 2011-11-08 12:49:51.000000000 -0700
++++ ./src/include/fst/script/draw-impl.h 2011-11-09 08:28:18.040302147 -0700
+@@ -140,7 +140,7 @@ template <class A> class FstDrawer {
+ PrintString(nsymbol);
+ } else {
+ char sid[kLineLen];
+- snprintf(sid, kLineLen, "%lld", id);
++ snprintf(sid, kLineLen, "%" PRId64, id);
+ PrintString(sid);
+ }
+ }
+--- ./src/lib/util.cc.orig 2011-11-08 12:49:48.000000000 -0700
++++ ./src/lib/util.cc 2011-11-09 08:28:18.057302129 -0700
+@@ -39,7 +39,7 @@ int64 StrToInt64(const string &s, const
+ void Int64ToStr(int64 n, string *s) {
+ const int kNumLen = 128;
+ char nstr[kNumLen];
+- snprintf(nstr, kNumLen, "%lld", n);
++ snprintf(nstr, kNumLen, "%" PRId64, n);
+ *s += nstr;
+ }
- typedef int8_t int8;
- typedef int16_t int16;
-diff -durp src.orig/lib/symbol-table.cc src/lib/symbol-table.cc
---- src.orig/lib/symbol-table.cc 2011-02-04 18:57:18.000000000 -0700
-+++ src/lib/symbol-table.cc 2011-02-24 12:04:32.775939305 -0700
-@@ -85,7 +85,7 @@ void SymbolTableImpl::MaybeRecomputeChec
+--- ./src/lib/symbol-table.cc.orig 2011-11-08 12:49:48.000000000 -0700
++++ ./src/lib/symbol-table.cc 2011-11-09 08:28:18.056302130 -0700
+@@ -87,7 +87,7 @@ void SymbolTableImpl::MaybeRecomputeChec
labeled_check_sum_.Reset();
char line[kLineLen];
for (int64 key = 0; key < dense_key_limit_; ++key) {
@@ -128,7 +134,7 @@ diff -durp src.orig/lib/symbol-table.cc src/lib/symbol-table.cc
labeled_check_sum_.Update(line);
}
for (map<int64, const char*>::const_iterator it =
-@@ -93,7 +93,7 @@ void SymbolTableImpl::MaybeRecomputeChec
+@@ -95,7 +95,7 @@ void SymbolTableImpl::MaybeRecomputeChec
it != key_map_.end();
++it) {
if (it->first >= dense_key_limit_) {
@@ -137,7 +143,7 @@ diff -durp src.orig/lib/symbol-table.cc src/lib/symbol-table.cc
labeled_check_sum_.Update(line);
}
}
-@@ -226,7 +226,7 @@ void SymbolTable::AddTable(const SymbolT
+@@ -228,7 +228,7 @@ void SymbolTable::AddTable(const SymbolT
bool SymbolTable::WriteText(ostream &strm) const {
for (SymbolTableIterator iter(*this); !iter.Done(); iter.Next()) {
char line[kLineLen];
@@ -146,15 +152,3 @@ diff -durp src.orig/lib/symbol-table.cc src/lib/symbol-table.cc
iter.Symbol().c_str(), FLAGS_fst_field_separator[0],
iter.Value());
strm.write(line, strlen(line));
-diff -durp src.orig/lib/util.cc src/lib/util.cc
---- src.orig/lib/util.cc 2011-02-04 18:57:18.000000000 -0700
-+++ src/lib/util.cc 2011-02-24 12:04:57.944405852 -0700
-@@ -39,7 +39,7 @@ int64 StrToInt64(const string &s, const
- void Int64ToStr(int64 n, string *s) {
- const int kNumLen = 128;
- char nstr[kNumLen];
-- snprintf(nstr, kNumLen, "%lld", n);
-+ snprintf(nstr, kNumLen, "%" PRId64, n);
- *s += nstr;
- }
-
diff --git a/openfst.spec b/openfst.spec
index 50385d3..76439c5 100644
--- a/openfst.spec
+++ b/openfst.spec
@@ -1,6 +1,6 @@
Name: openfst
-Version: 1.2.7
-Release: 3%{?dist}
+Version: 1.2.8
+Release: 1%{?dist}
Summary: Weighted finite-state transducer library
Group: Development/Libraries
@@ -21,25 +21,26 @@ Patch0: openfst-format.patch
BuildRequires: libicu-devel%{?_isa}
%description
-OpenFst is a library for constructing, combining, optimizing, and searching
-weighted finite-state transducers (FSTs). Weighted finite-state transducers
-are automata where each transition has an input label, an output label, and a
-weight. The more familiar finite-state acceptor is represented as a
-transducer with each transition's input and output label equal. Finite-state
-acceptors are used to represent sets of strings (specifically, regular or
-rational sets); finite-state transducers are used to represent binary
-relations between pairs of strings (specifically, rational transductions).
-The weights can be used to represent the cost of taking a particular
-transition.
+OpenFst is a library for constructing, combining, optimizing, and
+searching weighted finite-state transducers (FSTs). Weighted
+finite-state transducers are automata where each transition has an input
+label, an output label, and a weight. The more familiar finite-state
+acceptor is represented as a transducer with each transition's input and
+output label equal. Finite-state acceptors are used to represent sets
+of strings (specifically, regular or rational sets); finite-state
+transducers are used to represent binary relations between pairs of
+strings (specifically, rational transductions). The weights can be used
+to represent the cost of taking a particular transition.
FSTs have key applications in speech recognition and synthesis, machine
translation, optical character recognition, pattern matching, string
processing, machine learning, information extraction and retrieval among
-others. Often a weighted transducer is used to represent a probabilistic
-model (e.g., an n-gram model, pronunciation model). FSTs can be optimized by
-determinization and minimization, models can be applied to hypothesis sets
-(also represented as automata) or cascaded by finite-state composition, and
-the best results can be selected by shortest-path algorithms.
+others. Often a weighted transducer is used to represent a
+probabilistic model (e.g., an n-gram model, pronunciation model). FSTs
+can be optimized by determinization and minimization, models can be
+applied to hypothesis sets (also represented as automata) or cascaded by
+finite-state composition, and the best results can be selected by
+shortest-path algorithms.
%package devel
Summary: Development files for OpenFst
@@ -47,7 +48,8 @@ Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
-This package includes the necessary files to develop systems with OpenFst.
+This package includes the necessary files to develop systems with
+OpenFst.
%package tools
Summary: Command-line tools for working with FSTs
@@ -64,20 +66,20 @@ functionality.
# Add missing linkage, remove unnecessary linkage, and make sure libraries
# are built in the correct order so linkage is possible.
-sed -e 's|^LIBS = |LIBS = -ldl|' -i src/lib/Makefile.in
-sed -e 's|^LIBS = |LIBS = ../lib/libfst.la -ldl|' -i src/script/Makefile.in
-sed -e 's|^LIBS = |LIBS = ../../lib/libfst.la -ldl|' \
+sed -e 's|^LIBS =|LIBS = -ldl|' -i src/lib/Makefile.in
+sed -e 's|^LIBS =|LIBS = ../lib/libfst.la -ldl|' -i src/script/Makefile.in
+sed -e 's|^LIBS =|LIBS = ../../lib/libfst.la -ldl|' \
-i src/extensions/compact/Makefile.in
-sed -e 's|^LIBS = |LIBS = ../../lib/libfst.la -ldl|' \
+sed -e 's|^LIBS =|LIBS = ../../lib/libfst.la -ldl|' \
-i src/extensions/const/Makefile.in
-sed -e 's|^LIBS = |LIBS = ../../lib/libfst.la -ldl|' \
+sed -e 's|^LIBS =|LIBS = ../../lib/libfst.la -ldl|' \
-i src/extensions/lookahead/Makefile.in
-sed -e 's|^LIBS = |LIBS = ../../lib/libfst.la -ldl|' \
- -e 's|^libfstpdtscript_la_LIBADD.*|libfstpdtscript_la_LIBADD = ../../script/libfstscript.la|' \
+sed -e 's|^LIBS =|LIBS = ../../lib/libfst.la -ldl|' \
+ -e 's|^\(libfstpdtscript_la_LIBADD =\).*|\1 ../../script/libfstscript.la|' \
-i src/extensions/pdt/Makefile.in
sed -e 's|-lm -ldl|-ldl|' \
- -e 's|^libfstfarscript_la_LIBADD.*|libfstfarscript_la_LIBADD = ../../lib/libfs libfstfar.la -ldl -licuuc|' \
- -e 's|^@HAVE_SCRIPT_TRUE at libfst_LTLIBRARIES =.*|@HAVE_SCRIPT_TRUE at libfst_LTLIBRARIES = libfstfar.la libfstfarscript.la|' \
+ -e 's|^\(libfstfarscript_la_LIBADD =\).*|\1 ../../lib/libfst.la libfstfar.la -ldl -licuuc|' \
+ -e 's|^\(@HAVE_SCRIPT_TRUE at libfst_LTLIBRARIES =\).*|\1 libfstfar.la libfstfarscript.la|' \
-i src/extensions/far/Makefile.in
%build
@@ -90,17 +92,15 @@ sed -e 's|-lm -ldl|-ldl|' \
sed -i 's|^ICU_LIBS.*|ICU_LIBS = -licui18n -licuuc -licudata -lpthread -ldl|' \
Makefile src/extensions/Makefile src/extensions/far/Makefile
-# Libtool thinks that EVERYTHING must be linked with -lm.
-sed -i 's/-lstdc++ -lm/-lstdc++/' libtool
-
-# Get rid of undesirable hardcoded rpaths
-sed -i -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
- -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
+# Get rid of undesirable hardcoded rpaths; also libtool thinks -lm is necessary
+sed -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
+ -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
+ -e 's|-lstdc++ -lm|-lstdc++|' \
+ -i libtool
make %{?_smp_mflags}
%install
-rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
# Get rid of libtool files
@@ -130,33 +130,31 @@ mv $RPM_BUILD_ROOT%{_libdir}/fst/libfstpdtscript* $RPM_BUILD_ROOT%{_libdir}
ln -s ../libfstpdtscript.so $RPM_BUILD_ROOT%{_libdir}/fst/libfstpdtscript.so
ln -s ../libfstpdtscript.so.0 $RPM_BUILD_ROOT%{_libdir}/fst/libfstpdtscript.so.0
-%clean
-rm -rf $RPM_BUILD_ROOT
-
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
-%defattr(-,root,root,-)
%doc AUTHORS COPYING NEWS README
%dir %{_libdir}/fst
%{_libdir}/fst/*.so.*
%{_libdir}/*.so.*
%files devel
-%defattr(-,root,root,-)
%{_includedir}/fst
%{_libdir}/fst/*.so
%{_libdir}/*.so
%files tools
-%defattr(-,root,root,-)
%{_bindir}/*
%{_mandir}/man1/*
%config(noreplace) %{_sysconfdir}/bash_completion.d
%changelog
+* Wed Nov 9 2011 Jerry James <loganjerry at gmail.com> - 1.2.8-1
+- New upstream version
+- Drop unnecessary spec file elements (%%clean, etc.)
+
* Thu Sep 8 2011 Jerry James <loganjerry at gmail.com> - 1.2.7-3
- Rebuild for new icu.
diff --git a/sources b/sources
index cb3cd23..6491462 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-97196a97d2a1ec88d612321e64dac2e4 openfst-1.2.7.tar.gz
+c9ee659947315d8f4eb6d6227779b3a9 openfst-1.2.8.tar.gz
084e16fe2f167c8f30e03b695fe394f4 openfst-man.tar.xz
More information about the scm-commits
mailing list