diff -Nru libvoikko-4.1.1/debian/changelog libvoikko-4.1.1/debian/changelog --- libvoikko-4.1.1/debian/changelog 2017-11-20 22:28:44.000000000 +0000 +++ libvoikko-4.1.1/debian/changelog 2018-10-31 01:42:18.000000000 +0000 @@ -1,3 +1,11 @@ +libvoikko (4.1.1-1.1+rpi1) buster-staging; urgency=medium + + * Apply upstream patch for ospell namespace change. + * Bump build-dependency on hfst-ospell-dev since i'm pretty sure this + will break builds with older versions. + + -- Peter Michael Green Wed, 31 Oct 2018 01:42:18 +0000 + libvoikko (4.1.1-1.1) unstable; urgency=medium * Non-maintainer upload. diff -Nru libvoikko-4.1.1/debian/control libvoikko-4.1.1/debian/control --- libvoikko-4.1.1/debian/control 2017-11-20 22:27:19.000000000 +0000 +++ libvoikko-4.1.1/debian/control 2018-10-31 01:42:18.000000000 +0000 @@ -5,7 +5,7 @@ debhelper (>= 9.0.0), dh-autoreconf, dh-python, - hfst-ospell-dev, + hfst-ospell-dev (>= 0.5.0), pkg-config, python3, Standards-Version: 4.0.0 diff -Nru libvoikko-4.1.1/debian/patches/ospell-namespace-change.patch libvoikko-4.1.1/debian/patches/ospell-namespace-change.patch --- libvoikko-4.1.1/debian/patches/ospell-namespace-change.patch 1970-01-01 00:00:00.000000000 +0000 +++ libvoikko-4.1.1/debian/patches/ospell-namespace-change.patch 2018-10-31 01:42:00.000000000 +0000 @@ -0,0 +1,210 @@ +Base on commit c516a6e6a3d0cea878d114dab867bc426b7ecafe from https://github.com/voikko/corevoikko +With path adjustments for the Debian packaging. + +commit c516a6e6a3d0cea878d114dab867bc426b7ecafe +Author: Børre Gaup +Date: Wed Nov 1 12:05:36 2017 +0100 + + Adapt to the namespace changes in hfst-ospell + +diff --git libvoikko/src/grammar/HfstAnalysis.cpp libvoikko/src/grammar/HfstAnalysis.cpp +index 9fd1e84d..229668ab 100644 +--- libvoikko/src/grammar/HfstAnalysis.cpp ++++ libvoikko/src/grammar/HfstAnalysis.cpp +@@ -44,7 +44,7 @@ + #include + + using namespace libvoikko::grammar; +-using namespace hfst_ol; ++using namespace hfst_ospell; + //using namespace hfst; + + namespace libvoikko { +diff --git libvoikko/src/morphology/HfstAnalyzer.cpp libvoikko/src/morphology/HfstAnalyzer.cpp +index e55f1216..e842bc5f 100644 +--- libvoikko/src/morphology/HfstAnalyzer.cpp ++++ libvoikko/src/morphology/HfstAnalyzer.cpp +@@ -45,7 +45,7 @@ HfstAnalyzer::HfstAnalyzer(const string& s) { + return; + } + FILE *fd = fopen(s.c_str(), "rb"); +- t = new hfst_ol::Transducer(fd); ++ t = new hfst_ospell::Transducer(fd); + + } + +@@ -73,10 +73,10 @@ list * HfstAnalyzer::analyze(const char * word, bool fullMorphology) + std::copy(str.begin(), str.end(), writable); + writable[str.size()] = '\0'; + +- hfst_ol::AnalysisQueue q = t->lookup(writable); ++ hfst_ospell::AnalysisQueue q = t->lookup(writable); + + while(q.size() > 0) { +- hfst_ol::StringWeightPair pair = q.top(); ++ hfst_ospell::StringWeightPair pair = q.top(); + string analysis = pair.first; + string tags = analysis.substr(analysis.find("+"),analysis.length()-1); + Analysis * a = new Analysis(); +diff --git libvoikko/src/morphology/HfstAnalyzer.hpp libvoikko/src/morphology/HfstAnalyzer.hpp +index f228b449..17709c82 100644 +--- libvoikko/src/morphology/HfstAnalyzer.hpp ++++ libvoikko/src/morphology/HfstAnalyzer.hpp +@@ -49,7 +49,7 @@ class HfstAnalyzer : public Analyzer { + + HfstAnalyzer & operator = (const HfstAnalyzer & other); + private: +- hfst_ol::Transducer *t; ++ hfst_ospell::Transducer *t; + + HfstAnalyzer(HfstAnalyzer const & other); + +diff --git libvoikko/src/setup/V3DictionaryLoader.cpp libvoikko/src/setup/V3DictionaryLoader.cpp +index 93b17fa8..9d65c156 100644 +--- libvoikko/src/setup/V3DictionaryLoader.cpp ++++ libvoikko/src/setup/V3DictionaryLoader.cpp +@@ -58,15 +58,15 @@ void V3DictionaryLoader::findDictionaries(const string & path) { + // TODO implement null hyphenator + BackendProperties hyphenatorBackend("AnalyzerToFinnishHyphenatorAdapter(currentAnalyzer)", false); + +- hfst_ol::ZHfstOspeller * speller = new hfst_ol::ZHfstOspeller(); ++ hfst_ospell::ZHfstOspeller * speller = new hfst_ospell::ZHfstOspeller(); + try { + speller->read_zhfst(fullPath.c_str()); + } +- catch (hfst_ol::ZHfstZipReadingError& zhzre) { ++ catch (hfst_ospell::ZHfstZipReadingError& zhzre) { + delete speller; + continue; // broken dictionary + } +- const hfst_ol::ZHfstOspellerXmlMetadata spellerMetadata = speller->get_metadata(); ++ const hfst_ospell::ZHfstOspellerXmlMetadata spellerMetadata = speller->get_metadata(); + + LanguageTag language; + language.setBcp47(spellerMetadata.info_.locale_); +diff --git libvoikko/src/setup/V4DictionaryLoader.cpp libvoikko/src/setup/V4DictionaryLoader.cpp +index 8735e11b..58a79a99 100644 +--- libvoikko/src/setup/V4DictionaryLoader.cpp ++++ libvoikko/src/setup/V4DictionaryLoader.cpp +@@ -82,16 +82,16 @@ void V4DictionaryLoader::findDictionaries(const string & path) { + // TODO implement null hyphenator + //cerr << " +found: " << fileName << endl; + +- hfst_ol::ZHfstOspeller * speller = new hfst_ol::ZHfstOspeller(); ++ hfst_ospell::ZHfstOspeller * speller = new hfst_ospell::ZHfstOspeller(); + try { + speller->read_zhfst(fullPath.c_str()); + } +- catch (hfst_ol::ZHfstZipReadingError& zhzre) { ++ catch (hfst_ospell::ZHfstZipReadingError& zhzre) { + delete speller; + //cerr << " -broken :( " << fileName << endl; + continue; // broken dictionary + } +- const hfst_ol::ZHfstOspellerXmlMetadata spellerMetadata = speller->get_metadata(); ++ const hfst_ospell::ZHfstOspellerXmlMetadata spellerMetadata = speller->get_metadata(); + + LanguageTag language; + language.setBcp47(spellerMetadata.info_.locale_); +diff --git libvoikko/src/setup/setup.hpp libvoikko/src/setup/setup.hpp +index 6f29dab9..b680470b 100644 +--- libvoikko/src/setup/setup.hpp ++++ libvoikko/src/setup/setup.hpp +@@ -42,7 +42,7 @@ + #include "setup/Dictionary.hpp" + + // TODO proper abstraction +-namespace hfst_ol { ++namespace hfst_ospell { + class ZHfstOspeller; + } + +@@ -67,7 +67,7 @@ typedef struct { + spellchecker::suggestion::SuggestionGenerator * suggestionGenerator; + hyphenator::Hyphenator * hyphenator; + setup::Dictionary dictionary; +- hfst_ol::ZHfstOspeller* hfst; ++ hfst_ospell::ZHfstOspeller* hfst; + } voikko_options_t; + + } +diff --git libvoikko/src/spellchecker/HfstSpeller.cpp libvoikko/src/spellchecker/HfstSpeller.cpp +index 35d23495..422685e0 100644 +--- libvoikko/src/spellchecker/HfstSpeller.cpp ++++ libvoikko/src/spellchecker/HfstSpeller.cpp +@@ -39,7 +39,7 @@ using namespace std; + using namespace libvoikko::character; + using namespace libvoikko::utils; + +-using hfst_ol::ZHfstOspeller; ++using hfst_ospell::ZHfstOspeller; + + namespace libvoikko { namespace spellchecker { + +@@ -49,7 +49,7 @@ HfstSpeller::HfstSpeller(const string & zhfstFileName, voikko_options_t * voikko + try { + speller->read_zhfst(zhfstFileName.c_str()); + } +- catch (hfst_ol::ZHfstZipReadingError& zhzre) { ++ catch (hfst_ospell::ZHfstZipReadingError& zhzre) { + throw setup::DictionaryException("Error reading ZHFST speller"); + } + } +diff --git libvoikko/src/spellchecker/HfstSpeller.hpp libvoikko/src/spellchecker/HfstSpeller.hpp +index fd079a8e..be94459e 100644 +--- libvoikko/src/spellchecker/HfstSpeller.hpp ++++ libvoikko/src/spellchecker/HfstSpeller.hpp +@@ -49,7 +49,7 @@ class HfstSpeller : public Speller { + void terminate(); + + /** Public for use in HfstSuggestion */ +- hfst_ol::ZHfstOspeller * speller; ++ hfst_ospell::ZHfstOspeller * speller; + private: + /** Return SPELL_FAILED or SPELL_OK depending on whether given word is correct as is. */ + spellresult doSpell(const wchar_t * word, size_t wlen); +diff --git libvoikko/src/spellchecker/HfstSuggestion.cpp libvoikko/src/spellchecker/HfstSuggestion.cpp +index bf65bc74..30fa466f 100644 +--- libvoikko/src/spellchecker/HfstSuggestion.cpp ++++ libvoikko/src/spellchecker/HfstSuggestion.cpp +@@ -41,11 +41,11 @@ + using namespace std; + using namespace libvoikko::utils; + +-using hfst_ol::ZHfstOspeller; ++using hfst_ospell::ZHfstOspeller; + + namespace libvoikko { namespace spellchecker { namespace suggestion { + +-HfstSuggestion::HfstSuggestion(hfst_ol::ZHfstOspeller * speller) : ++HfstSuggestion::HfstSuggestion(hfst_ospell::ZHfstOspeller * speller) : + speller_(speller) { } + + void HfstSuggestion::generate(SuggestionStatus * s) const { +@@ -54,7 +54,7 @@ void HfstSuggestion::generate(SuggestionStatus * s) const { + char * wordUtf8 = StringUtils::utf8FromUcs4(s->getWord(), wlen); + set allSuggs; + bool checkUppercasing = (voikko_casetype(s->getWord(), wlen) == CT_FIRST_UPPER); +- hfst_ol::CorrectionQueue corrections = speller_->suggest(wordUtf8); ++ hfst_ospell::CorrectionQueue corrections = speller_->suggest(wordUtf8); + while (corrections.size() > 0 && !s->shouldAbort()) { + const char * sugUtf8 = corrections.top().first.c_str(); + wchar_t * sugU4 = StringUtils::ucs4FromUtf8(sugUtf8, strlen(sugUtf8)); +diff --git libvoikko/src/spellchecker/HfstSuggestion.hpp libvoikko/src/spellchecker/HfstSuggestion.hpp +index f3e29b77..1217fb45 100644 +--- libvoikko/src/spellchecker/HfstSuggestion.hpp ++++ libvoikko/src/spellchecker/HfstSuggestion.hpp +@@ -45,11 +45,11 @@ namespace libvoikko { namespace spellchecker { namespace suggestion { + */ + class HfstSuggestion : public SuggestionGenerator { + public: +- HfstSuggestion(hfst_ol::ZHfstOspeller * speller); ++ HfstSuggestion(hfst_ospell::ZHfstOspeller * speller); + void generate(SuggestionStatus * s) const; + void terminate(); + private: +- hfst_ol::ZHfstOspeller * speller_; ++ hfst_ospell::ZHfstOspeller * speller_; + }; + + } } } diff -Nru libvoikko-4.1.1/debian/patches/series libvoikko-4.1.1/debian/patches/series --- libvoikko-4.1.1/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ libvoikko-4.1.1/debian/patches/series 2018-10-31 01:39:35.000000000 +0000 @@ -0,0 +1 @@ +ospell-namespace-change.patch