summaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2012-07-03 17:42:05 +0000
committerjoerg <joerg@pkgsrc.org>2012-07-03 17:42:05 +0000
commitc14769d27efe342d58fc843e53a2d8ae3bbdc0c8 (patch)
tree755497d520995fa5e457d38d2ffb6d3dde70864d /math
parentfb83a1457f59e71608c0c6533aa98d527d09ff95 (diff)
downloadpkgsrc-c14769d27efe342d58fc843e53a2d8ae3bbdc0c8.tar.gz
Fix template usage.
Diffstat (limited to 'math')
-rw-r--r--math/openfst/distinfo13
-rw-r--r--math/openfst/patches/patch-src_include_fst_cache.h27
-rw-r--r--math/openfst/patches/patch-src_include_fst_compact-fst.h34
-rw-r--r--math/openfst/patches/patch-src_include_fst_compose.h31
-rw-r--r--math/openfst/patches/patch-src_include_fst_const-fst.h15
-rw-r--r--math/openfst/patches/patch-src_include_fst_determinize.h31
-rw-r--r--math/openfst/patches/patch-src_include_fst_difference.h13
-rw-r--r--math/openfst/patches/patch-src_include_fst_factor-weight.h54
-rw-r--r--math/openfst/patches/patch-src_include_fst_map.h84
-rw-r--r--math/openfst/patches/patch-src_include_fst_replace.h72
-rw-r--r--math/openfst/patches/patch-src_include_fst_synchronize.h53
-rw-r--r--math/openfst/patches/patch-src_include_fst_vector-fst.h101
12 files changed, 527 insertions, 1 deletions
diff --git a/math/openfst/distinfo b/math/openfst/distinfo
index e35500e0a98..47b37406e05 100644
--- a/math/openfst/distinfo
+++ b/math/openfst/distinfo
@@ -1,5 +1,16 @@
-$NetBSD: distinfo,v 1.1.1.1 2009/11/03 17:53:44 wiz Exp $
+$NetBSD: distinfo,v 1.2 2012/07/03 17:42:05 joerg Exp $
SHA1 (openfst-1.1.tar.gz) = b070f84a981dfadc4c049f505bd3406a43dfa55d
RMD160 (openfst-1.1.tar.gz) = 45657bb11f91ffdce5261ff6f4c103c164cc161b
Size (openfst-1.1.tar.gz) = 513404 bytes
+SHA1 (patch-src_include_fst_cache.h) = 6a29b49f07b61a0ed9d9e2349805b836c45a25bc
+SHA1 (patch-src_include_fst_compact-fst.h) = f1a2b9ec65d3c8be4d0574c96fa5e5a52c9e680c
+SHA1 (patch-src_include_fst_compose.h) = 4fb25482929aecf37e69d9b6c23491f5512554f8
+SHA1 (patch-src_include_fst_const-fst.h) = 758b60a5238f9f6f4a1a5a05c5abc41d81faa3a2
+SHA1 (patch-src_include_fst_determinize.h) = 825ad312b52933d981a1ea8dd7103da90b1f3e80
+SHA1 (patch-src_include_fst_difference.h) = e66c128b621d1be4f9b7501d969cd2097f32aa04
+SHA1 (patch-src_include_fst_factor-weight.h) = 88229131e6de6daf950f85db32b1dbcbf4507733
+SHA1 (patch-src_include_fst_map.h) = 7c46539d7b72f1f24ea275bfff1678bbb64f932c
+SHA1 (patch-src_include_fst_replace.h) = 87604a022040f3f825eede69c36917b37b515cda
+SHA1 (patch-src_include_fst_synchronize.h) = 8a43aab991bf48f1e656d4e47dea8f0326d12773
+SHA1 (patch-src_include_fst_vector-fst.h) = 51178b6757e89e5c18807ec8521223dacaeb6c16
diff --git a/math/openfst/patches/patch-src_include_fst_cache.h b/math/openfst/patches/patch-src_include_fst_cache.h
new file mode 100644
index 00000000000..01dc7934b6b
--- /dev/null
+++ b/math/openfst/patches/patch-src_include_fst_cache.h
@@ -0,0 +1,27 @@
+$NetBSD: patch-src_include_fst_cache.h,v 1.1 2012/07/03 17:42:05 joerg Exp $
+
+--- src/include/fst/cache.h.orig 2012-07-03 09:45:36.000000000 +0000
++++ src/include/fst/cache.h
+@@ -138,11 +138,11 @@ class CacheBaseImpl : public VectorFstBa
+ while (NumStates() <= s) // Add state to main cache
+ AddState(0);
+ if (!VectorFstBaseImpl<S>::GetState(s)) {
+- SetState(s, new S);
++ this->SetState(s, new S);
+ if (cache_first_state_id_ != kNoStateId) { // Forget 1st cached state
+ while (NumStates() <= cache_first_state_id_)
+ AddState(0);
+- SetState(cache_first_state_id_, cache_first_state_);
++ this->SetState(cache_first_state_id_, cache_first_state_);
+ if (cache_gc_) {
+ cache_states_.push_back(cache_first_state_id_);
+ cache_size_ += sizeof(S) +
+@@ -296,7 +296,7 @@ class CacheBaseImpl : public VectorFstBa
+ (free_recent || !(state->flags & kCacheRecent)) && s != current) {
+ cache_size_ -= sizeof(S) + state->arcs.capacity() * sizeof(Arc);
+ delete state;
+- SetState(s, 0);
++ this->SetState(s, 0);
+ cache_states_.erase(siter++);
+ } else {
+ state->flags &= ~kCacheRecent;
diff --git a/math/openfst/patches/patch-src_include_fst_compact-fst.h b/math/openfst/patches/patch-src_include_fst_compact-fst.h
new file mode 100644
index 00000000000..f9ba484907c
--- /dev/null
+++ b/math/openfst/patches/patch-src_include_fst_compact-fst.h
@@ -0,0 +1,34 @@
+$NetBSD: patch-src_include_fst_compact-fst.h,v 1.1 2012/07/03 17:42:05 joerg Exp $
+
+--- src/include/fst/compact-fst.h.orig 2012-07-03 09:45:14.000000000 +0000
++++ src/include/fst/compact-fst.h
+@@ -484,7 +484,7 @@ class CompactFstImpl : public CacheImpl<
+
+ StateId Start() {
+ if (!HasStart()) {
+- SetStart(data_->Start());
++ this->SetStart(data_->Start());
+ }
+ return CacheImpl<A>::Start();
+ }
+@@ -497,7 +497,7 @@ class CompactFstImpl : public CacheImpl<
+ arc = compactor_->Expand(s, data_->Compacts(compactor_->Size() == -1
+ ? data_->States(s)
+ : s * compactor_->Size()));
+- SetFinal(s, arc.ilabel == kNoLabel ? arc.weight : Weight::Zero());
++ this->SetFinal(s, arc.ilabel == kNoLabel ? arc.weight : Weight::Zero());
+ }
+ return CacheImpl<A>::Final(s);
+ }
+@@ -566,9 +566,9 @@ class CompactFstImpl : public CacheImpl<
+ for (size_t i = begin; i < end; ++i) {
+ const Arc &arc = compactor_->Expand(s, data_->Compacts(i));
+ if (arc.ilabel == kNoLabel) continue;
+- AddArc(s, arc);
++ this->AddArc(s, arc);
+ }
+- SetArcs(s);
++ this->SetArcs(s);
+ }
+
+ private:
diff --git a/math/openfst/patches/patch-src_include_fst_compose.h b/math/openfst/patches/patch-src_include_fst_compose.h
new file mode 100644
index 00000000000..b55ef7f1af9
--- /dev/null
+++ b/math/openfst/patches/patch-src_include_fst_compose.h
@@ -0,0 +1,31 @@
+$NetBSD: patch-src_include_fst_compose.h,v 1.1 2012/07/03 17:42:05 joerg Exp $
+
+--- src/include/fst/compose.h.orig 2012-07-03 09:50:13.000000000 +0000
++++ src/include/fst/compose.h
+@@ -114,7 +114,7 @@ class ComposeFstImplBase : public CacheI
+ if (!HasStart()) {
+ StateId start = ComputeStart();
+ if (start != kNoStateId) {
+- SetStart(start);
++ this->SetStart(start);
+ }
+ }
+ return CacheImpl<A>::Start();
+@@ -123,7 +123,7 @@ class ComposeFstImplBase : public CacheI
+ Weight Final(StateId s) {
+ if (!HasFinal(s)) {
+ Weight final = ComputeFinal(s);
+- SetFinal(s, final);
++ this->SetFinal(s, final);
+ }
+ return CacheImpl<A>::Final(s);
+ }
+@@ -266,7 +266,7 @@ class ComposeFstImpl : public ComposeFst
+ for (ArcIterator< Fst<A> > iterb(*fstb, sb); !iterb.Done(); iterb.Next())
+ MatchArc(s, matchera, iterb.Value(), match_input);
+
+- SetArcs(s);
++ this->SetArcs(s);
+ }
+
+ // Matches a single transition from 'fstb' against 'fata' at 's'.
diff --git a/math/openfst/patches/patch-src_include_fst_const-fst.h b/math/openfst/patches/patch-src_include_fst_const-fst.h
new file mode 100644
index 00000000000..ea055cc8fab
--- /dev/null
+++ b/math/openfst/patches/patch-src_include_fst_const-fst.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-src_include_fst_const-fst.h,v 1.1 2012/07/03 17:42:05 joerg Exp $
+
+--- src/include/fst/const-fst.h.orig 2012-07-03 09:46:39.000000000 +0000
++++ src/include/fst/const-fst.h
+@@ -139,8 +139,8 @@ ConstFstImpl<A, U>::ConstFstImpl(const F
+ SetType(type);
+ uint64 copy_properties = fst.Properties(kCopyProperties, true);
+ SetProperties(copy_properties | kStaticProperties);
+- SetInputSymbols(fst.InputSymbols());
+- SetOutputSymbols(fst.OutputSymbols());
++ this->SetInputSymbols(fst.InputSymbols());
++ this->SetOutputSymbols(fst.OutputSymbols());
+ start_ = fst.Start();
+
+ // Count # of states and arcs.
diff --git a/math/openfst/patches/patch-src_include_fst_determinize.h b/math/openfst/patches/patch-src_include_fst_determinize.h
new file mode 100644
index 00000000000..7b51a737779
--- /dev/null
+++ b/math/openfst/patches/patch-src_include_fst_determinize.h
@@ -0,0 +1,31 @@
+$NetBSD: patch-src_include_fst_determinize.h,v 1.1 2012/07/03 17:42:05 joerg Exp $
+
+--- src/include/fst/determinize.h.orig 2012-07-03 09:55:10.000000000 +0000
++++ src/include/fst/determinize.h
+@@ -171,7 +171,7 @@ class DeterminizeFstImplBase : public Ca
+ if (!HasStart()) {
+ StateId start = ComputeStart();
+ if (start != kNoStateId) {
+- SetStart(start);
++ this->SetStart(start);
+ }
+ }
+ return CacheImpl<A>::Start();
+@@ -180,7 +180,7 @@ class DeterminizeFstImplBase : public Ca
+ Weight Final(StateId s) {
+ if (!HasFinal(s)) {
+ Weight final = ComputeFinal(s);
+- SetFinal(s, final);
++ this->SetFinal(s, final);
+ }
+ return CacheImpl<A>::Final(s);
+ }
+@@ -363,7 +363,7 @@ class DeterminizeFsaImpl : public Determ
+ liter != label_map.end();
+ ++liter)
+ AddArc(s, liter->first, liter->second);
+- SetArcs(s);
++ this->SetArcs(s);
+ }
+
+ private:
diff --git a/math/openfst/patches/patch-src_include_fst_difference.h b/math/openfst/patches/patch-src_include_fst_difference.h
new file mode 100644
index 00000000000..5e4e94d8639
--- /dev/null
+++ b/math/openfst/patches/patch-src_include_fst_difference.h
@@ -0,0 +1,13 @@
+$NetBSD: patch-src_include_fst_difference.h,v 1.1 2012/07/03 17:42:05 joerg Exp $
+
+--- src/include/fst/difference.h.orig 2012-07-03 09:58:16.000000000 +0000
++++ src/include/fst/difference.h
+@@ -95,7 +95,7 @@ class DifferenceFst : public ComposeFst<
+ copts.matcher2 = new R(cfst, MATCH_INPUT, ComplementFst<A>::kRhoLabel,
+ opts.matcher2);
+
+- SetImpl(Init(fst1, cfst, copts));
++ this->SetImpl(this->Init(fst1, cfst, copts));
+
+ uint64 props1 = fst1.Properties(kFstProperties, false);
+ uint64 props2 = fst2.Properties(kFstProperties, false);
diff --git a/math/openfst/patches/patch-src_include_fst_factor-weight.h b/math/openfst/patches/patch-src_include_fst_factor-weight.h
new file mode 100644
index 00000000000..a8af563b3d4
--- /dev/null
+++ b/math/openfst/patches/patch-src_include_fst_factor-weight.h
@@ -0,0 +1,54 @@
+$NetBSD: patch-src_include_fst_factor-weight.h,v 1.1 2012/07/03 17:42:05 joerg Exp $
+
+--- src/include/fst/factor-weight.h.orig 2012-07-03 09:54:33.000000000 +0000
++++ src/include/fst/factor-weight.h
+@@ -215,7 +215,7 @@ class FactorWeightFstImpl
+ if (s == kNoStateId)
+ return kNoStateId;
+ StateId start = FindState(Element(fst_->Start(), Weight::One()));
+- SetStart(start);
++ this->SetStart(start);
+ }
+ return CacheImpl<A>::Start();
+ }
+@@ -229,9 +229,9 @@ class FactorWeightFstImpl
+ : (Weight) Times(e.weight, fst_->Final(e.state));
+ FactorIterator f(w);
+ if (!(mode_ & kFactorFinalWeights) || f.Done())
+- SetFinal(s, w);
++ this->SetFinal(s, w);
+ else
+- SetFinal(s, Weight::Zero());
++ this->SetFinal(s, Weight::Zero());
+ }
+ return CacheImpl<A>::Final(s);
+ }
+@@ -298,13 +298,13 @@ class FactorWeightFstImpl
+ FactorIterator fit(w);
+ if (!(mode_ & kFactorArcWeights) || fit.Done()) {
+ StateId d = FindState(Element(arc.nextstate, Weight::One()));
+- AddArc(s, Arc(arc.ilabel, arc.olabel, w, d));
++ this->AddArc(s, Arc(arc.ilabel, arc.olabel, w, d));
+ } else {
+ for (; !fit.Done(); fit.Next()) {
+ const pair<Weight, Weight> &p = fit.Value();
+ StateId d = FindState(Element(arc.nextstate,
+ p.second.Quantize(delta_)));
+- AddArc(s, Arc(arc.ilabel, arc.olabel, p.first, d));
++ this->AddArc(s, Arc(arc.ilabel, arc.olabel, p.first, d));
+ }
+ }
+ }
+@@ -322,10 +322,10 @@ class FactorWeightFstImpl
+ const pair<Weight, Weight> &p = fit.Value();
+ StateId d = FindState(Element(kNoStateId,
+ p.second.Quantize(delta_)));
+- AddArc(s, Arc(final_ilabel_, final_olabel_, p.first, d));
++ this->AddArc(s, Arc(final_ilabel_, final_olabel_, p.first, d));
+ }
+ }
+- SetArcs(s);
++ this->SetArcs(s);
+ }
+
+ private:
diff --git a/math/openfst/patches/patch-src_include_fst_map.h b/math/openfst/patches/patch-src_include_fst_map.h
new file mode 100644
index 00000000000..bb7164afa70
--- /dev/null
+++ b/math/openfst/patches/patch-src_include_fst_map.h
@@ -0,0 +1,84 @@
+$NetBSD: patch-src_include_fst_map.h,v 1.1 2012/07/03 17:42:05 joerg Exp $
+
+--- src/include/fst/map.h.orig 2012-07-03 09:55:26.000000000 +0000
++++ src/include/fst/map.h
+@@ -336,7 +336,7 @@ class MapFstImpl : public CacheImpl<B> {
+
+ StateId Start() {
+ if (!HasStart())
+- SetStart(FindOState(fst_->Start()));
++ this->SetStart(FindOState(fst_->Start()));
+ return CacheImpl<B>::Start();
+ }
+
+@@ -348,24 +348,24 @@ class MapFstImpl : public CacheImpl<B> {
+ B final_arc = (*mapper_)(A(0, 0, fst_->Final(FindIState(s)),
+ kNoStateId));
+ CHECK(final_arc.ilabel == 0 && final_arc.olabel == 0);
+- SetFinal(s, final_arc.weight);
++ this->SetFinal(s, final_arc.weight);
+ break;
+ }
+ case MAP_ALLOW_SUPERFINAL: {
+ if (s == superfinal_) {
+- SetFinal(s, Weight::One());
++ this->SetFinal(s, Weight::One());
+ } else {
+ B final_arc = (*mapper_)(A(0, 0, fst_->Final(FindIState(s)),
+ kNoStateId));
+ if (final_arc.ilabel == 0 && final_arc.olabel == 0)
+- SetFinal(s, final_arc.weight);
++ this->SetFinal(s, final_arc.weight);
+ else
+- SetFinal(s, Weight::Zero());
++ this->SetFinal(s, Weight::Zero());
+ }
+ break;
+ }
+ case MAP_REQUIRE_SUPERFINAL: {
+- SetFinal(s, s == superfinal_ ? Weight::One() : Weight::Zero());
++ this->SetFinal(s, s == superfinal_ ? Weight::One() : Weight::Zero());
+ break;
+ }
+ }
+@@ -399,14 +399,14 @@ class MapFstImpl : public CacheImpl<B> {
+
+ void Expand(StateId s) {
+ // Add exiting arcs.
+- if (s == superfinal_) { SetArcs(s); return; }
++ if (s == superfinal_) { this->SetArcs(s); return; }
+
+ for (ArcIterator< Fst<A> > aiter(*fst_, FindIState(s));
+ !aiter.Done(); aiter.Next()) {
+ A aarc(aiter.Value());
+ aarc.nextstate = FindOState(aarc.nextstate);
+ const B& barc = (*mapper_)(aarc);
+- AddArc(s, barc);
++ this->AddArc(s, barc);
+ }
+
+ // Check for superfinal arcs.
+@@ -422,7 +422,7 @@ class MapFstImpl : public CacheImpl<B> {
+ if (superfinal_ == kNoStateId)
+ superfinal_ = nstates_++;
+ final_arc.nextstate = superfinal_;
+- AddArc(s, final_arc);
++ this->AddArc(s, final_arc);
+ }
+ break;
+ }
+@@ -431,12 +431,12 @@ class MapFstImpl : public CacheImpl<B> {
+ kNoStateId));
+ if (final_arc.ilabel != 0 || final_arc.olabel != 0 ||
+ final_arc.weight != B::Weight::Zero())
+- AddArc(s, B(final_arc.ilabel, final_arc.olabel,
++ this->AddArc(s, B(final_arc.ilabel, final_arc.olabel,
+ final_arc.weight, superfinal_));
+ break;
+ }
+ }
+- SetArcs(s);
++ this->SetArcs(s);
+ }
+
+ private:
diff --git a/math/openfst/patches/patch-src_include_fst_replace.h b/math/openfst/patches/patch-src_include_fst_replace.h
new file mode 100644
index 00000000000..5e87721e435
--- /dev/null
+++ b/math/openfst/patches/patch-src_include_fst_replace.h
@@ -0,0 +1,72 @@
+$NetBSD: patch-src_include_fst_replace.h,v 1.1 2012/07/03 17:42:05 joerg Exp $
+
+--- src/include/fst/replace.h.orig 2012-07-03 10:02:47.000000000 +0000
++++ src/include/fst/replace.h
+@@ -424,16 +424,16 @@ class ReplaceFstImpl : public CacheImpl<
+
+ // return final weight of state (kInfWeight means state is not final)
+ Weight Final(StateId s) {
+- if (!HasFinal(s)) {
++ if (!this->HasFinal(s)) {
+ const StateTuple& tuple = state_table_->Tuple(s);
+ const StackPrefix& stack = stackprefix_array_[tuple.prefix_id];
+ const Fst<A>* fst = fst_array_[tuple.fst_id];
+ StateId fst_state = tuple.fst_state;
+
+ if (fst->Final(fst_state) != Weight::Zero() && stack.Depth() == 0)
+- SetFinal(s, fst->Final(fst_state));
++ this->SetFinal(s, fst->Final(fst_state));
+ else
+- SetFinal(s, Weight::Zero());
++ this->SetFinal(s, Weight::Zero());
+ }
+ return CacheImpl<A>::Final(s);
+ }
+@@ -471,7 +471,7 @@ class ReplaceFstImpl : public CacheImpl<
+ const Fst<A>* fst = fst_array_[tuple.fst_id];
+ StateId fst_state = tuple.fst_state;
+ if (fst_state == kNoStateId) {
+- SetArcs(s);
++ this->SetArcs(s);
+ return;
+ }
+
+@@ -483,7 +483,7 @@ class ReplaceFstImpl : public CacheImpl<
+
+ StateId nextstate = state_table_->FindState(
+ StateTuple(prefix_id, top.fst_id, top.nextstate));
+- AddArc(s, A(0, 0, fst->Final(fst_state), nextstate));
++ this->AddArc(s, A(0, 0, fst->Final(fst_state), nextstate));
+ }
+
+ // extend arcs leaving the state
+@@ -493,7 +493,7 @@ class ReplaceFstImpl : public CacheImpl<
+ if (arc.olabel == 0) { // expand local fst
+ StateId nextstate = state_table_->FindState(
+ StateTuple(tuple.prefix_id, tuple.fst_id, arc.nextstate));
+- AddArc(s, A(arc.ilabel, arc.olabel, arc.weight, nextstate));
++ this->AddArc(s, A(arc.ilabel, arc.olabel, arc.weight, nextstate));
+ } else {
+ // check for non terminal
+ typename NonTerminalHash::const_iterator it =
+@@ -511,17 +511,17 @@ class ReplaceFstImpl : public CacheImpl<
+ StateId nt_nextstate = state_table_->FindState(
+ StateTuple(nt_prefix, nonterminal, nt_start));
+ Label ilabel = (epsilon_on_replace_) ? 0 : arc.ilabel;
+- AddArc(s, A(ilabel, 0, arc.weight, nt_nextstate));
++ this->AddArc(s, A(ilabel, 0, arc.weight, nt_nextstate));
+ }
+ } else {
+ StateId nextstate = state_table_->FindState(
+ StateTuple(tuple.prefix_id, tuple.fst_id, arc.nextstate));
+- AddArc(s, A(arc.ilabel, arc.olabel, arc.weight, nextstate));
++ this->AddArc(s, A(arc.ilabel, arc.olabel, arc.weight, nextstate));
+ }
+ }
+ }
+
+- SetArcs(s);
++ this->SetArcs(s);
+ }
+
+
diff --git a/math/openfst/patches/patch-src_include_fst_synchronize.h b/math/openfst/patches/patch-src_include_fst_synchronize.h
new file mode 100644
index 00000000000..d715652ec4e
--- /dev/null
+++ b/math/openfst/patches/patch-src_include_fst_synchronize.h
@@ -0,0 +1,53 @@
+$NetBSD: patch-src_include_fst_synchronize.h,v 1.1 2012/07/03 17:42:05 joerg Exp $
+
+--- src/include/fst/synchronize.h.orig 2012-07-03 10:05:34.000000000 +0000
++++ src/include/fst/synchronize.h
+@@ -111,7 +111,7 @@ class SynchronizeFstImpl
+ return kNoStateId;
+ const String *empty = FindString(new String());
+ StateId start = FindState(Element(fst_->Start(), empty, empty));
+- SetStart(start);
++ this->SetStart(start);
+ }
+ return CacheImpl<A>::Start();
+ }
+@@ -121,9 +121,9 @@ class SynchronizeFstImpl
+ const Element &e = elements_[s];
+ Weight w = e.state == kNoStateId ? Weight::One() : fst_->Final(e.state);
+ if ((w != Weight::Zero()) && (e.istring)->empty() && (e.ostring)->empty())
+- SetFinal(s, w);
++ this->SetFinal(s, w);
+ else
+- SetFinal(s, Weight::Zero());
++ this->SetFinal(s, Weight::Zero());
+ }
+ return CacheImpl<A>::Final(s);
+ }
+@@ -230,13 +230,13 @@ class SynchronizeFstImpl
+ const String *istring = Cdr(e.istring, arc.ilabel);
+ const String *ostring = Cdr(e.ostring, arc.olabel);
+ StateId d = FindState(Element(arc.nextstate, istring, ostring));
+- AddArc(s, Arc(Car(e.istring, arc.ilabel),
++ this->AddArc(s, Arc(Car(e.istring, arc.ilabel),
+ Car(e.ostring, arc.olabel), arc.weight, d));
+ } else {
+ const String *istring = Concat(e.istring, arc.ilabel);
+ const String *ostring = Concat(e.ostring, arc.olabel);
+ StateId d = FindState(Element(arc.nextstate, istring, ostring));
+- AddArc(s, Arc(0 , 0, arc.weight, d));
++ this->AddArc(s, Arc(0 , 0, arc.weight, d));
+ }
+ }
+
+@@ -246,9 +246,9 @@ class SynchronizeFstImpl
+ const String *istring = Cdr(e.istring);
+ const String *ostring = Cdr(e.ostring);
+ StateId d = FindState(Element(kNoStateId, istring, ostring));
+- AddArc(s, Arc(Car(e.istring), Car(e.ostring), w, d));
++ this->AddArc(s, Arc(Car(e.istring), Car(e.ostring), w, d));
+ }
+- SetArcs(s);
++ this->SetArcs(s);
+ }
+
+ private:
diff --git a/math/openfst/patches/patch-src_include_fst_vector-fst.h b/math/openfst/patches/patch-src_include_fst_vector-fst.h
new file mode 100644
index 00000000000..85c1345ca4f
--- /dev/null
+++ b/math/openfst/patches/patch-src_include_fst_vector-fst.h
@@ -0,0 +1,101 @@
+$NetBSD: patch-src_include_fst_vector-fst.h,v 1.1 2012/07/03 17:42:05 joerg Exp $
+
+--- src/include/fst/vector-fst.h.orig 2012-07-03 09:43:16.000000000 +0000
++++ src/include/fst/vector-fst.h
+@@ -199,9 +199,9 @@ class VectorFstImpl : public VectorFstBa
+
+ static VectorFstImpl<A> *Read(istream &strm, const FstReadOptions &opts);
+
+- size_t NumInputEpsilons(StateId s) const { return GetState(s)->niepsilons; }
++ size_t NumInputEpsilons(StateId s) const { return this->GetState(s)->niepsilons; }
+
+- size_t NumOutputEpsilons(StateId s) const { return GetState(s)->noepsilons; }
++ size_t NumOutputEpsilons(StateId s) const { return this->GetState(s)->noepsilons; }
+
+ bool Write(ostream &strm, const FstWriteOptions &opts) const;
+
+@@ -213,7 +213,7 @@ class VectorFstImpl : public VectorFstBa
+ }
+
+ void SetFinal(StateId s, Weight w) {
+- Weight ow = Final(s);
++ Weight ow = this->Final(s);
+ if (ow != Weight::Zero() && ow != Weight::One())
+ SetProperties(Properties() & ~kWeighted);
+ BaseImpl::SetFinal(s, w);
+@@ -232,7 +232,7 @@ class VectorFstImpl : public VectorFstBa
+ }
+
+ void AddArc(StateId s, const A &arc) {
+- VectorState<A> *state = GetState(s);
++ VectorState<A> *state = this->GetState(s);
+ if (arc.ilabel != arc.olabel) {
+ SetProperties(Properties() | kNotAcceptor);
+ SetProperties(Properties() & ~kAcceptor);
+@@ -290,21 +290,21 @@ class VectorFstImpl : public VectorFstBa
+ }
+
+ void DeleteArcs(StateId s, size_t n) {
+- const vector<A> &arcs = GetState(s)->arcs;
++ const vector<A> &arcs = this->GetState(s)->arcs;
+ for (size_t i = 0; i < n; ++i) {
+ size_t j = arcs.size() - i - 1;
+ if (arcs[j].ilabel == 0)
+- --GetState(s)->niepsilons;
++ --this->GetState(s)->niepsilons;
+ if (arcs[j].olabel == 0)
+- --GetState(s)->noepsilons;
++ --this->GetState(s)->noepsilons;
+ }
+ BaseImpl::DeleteArcs(s, n);
+ SetProperties(Properties() & kDeleteArcsProperties);
+ }
+
+ void DeleteArcs(StateId s) {
+- GetState(s)->niepsilons = 0;
+- GetState(s)->noepsilons = 0;
++ this->GetState(s)->niepsilons = 0;
++ this->GetState(s)->noepsilons = 0;
+ BaseImpl::DeleteArcs(s);
+ SetProperties(Properties() & kDeleteArcsProperties);
+ }
+@@ -324,8 +324,8 @@ template <class A>
+ VectorFstImpl<A>::VectorFstImpl(const Fst<A> &fst) {
+ SetType("vector");
+ SetProperties(fst.Properties(kCopyProperties, false) | kStaticProperties);
+- SetInputSymbols(fst.InputSymbols());
+- SetOutputSymbols(fst.OutputSymbols());
++ this->SetInputSymbols(fst.InputSymbols());
++ this->SetOutputSymbols(fst.OutputSymbols());
+ BaseImpl::SetStart(fst.Start());
+
+ for (StateIterator< Fst<A> > siter(fst);
+@@ -334,16 +334,16 @@ VectorFstImpl<A>::VectorFstImpl(const Fs
+ StateId s = siter.Value();
+ BaseImpl::AddState();
+ BaseImpl::SetFinal(s, fst.Final(s));
+- ReserveArcs(s, fst.NumArcs(s));
++ this->ReserveArcs(s, fst.NumArcs(s));
+ for (ArcIterator< Fst<A> > aiter(fst, s);
+ !aiter.Done();
+ aiter.Next()) {
+ const A &arc = aiter.Value();
+ BaseImpl::AddArc(s, arc);
+ if (arc.ilabel == 0)
+- ++GetState(s)->niepsilons;
++ ++this->GetState(s)->niepsilons;
+ if (arc.olabel == 0)
+- ++GetState(s)->noepsilons;
++ ++this->GetState(s)->noepsilons;
+ }
+ }
+ }
+@@ -427,7 +427,7 @@ bool VectorFstImpl<A>::Write(ostream &st
+ WriteHeader(strm, opts, kFileVersion, &hdr);
+
+ for (StateId s = 0; s < NumStates(); ++s) {
+- const VectorState<A> *state = GetState(s);
++ const VectorState<A> *state = this->GetState(s);
+ state->final.Write(strm);
+ int64 narcs = state->arcs.size();
+ WriteType(strm, narcs);