diff -Nru libkiwix-0.2.0/debian/changelog libkiwix-0.2.0/debian/changelog --- libkiwix-0.2.0/debian/changelog 2017-10-18 23:09:04.000000000 +0000 +++ libkiwix-0.2.0/debian/changelog 2018-11-18 15:34:26.000000000 +0000 @@ -1,3 +1,10 @@ +libkiwix (0.2.0-1+rpi1) buster-staging; urgency=medium + + * Apply patch from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=913506 + to fix build with new ICU. + + -- Peter Michael Green Sun, 18 Nov 2018 15:34:26 +0000 + libkiwix (0.2.0-1) unstable; urgency=medium * Initial release (Closes: #856552) diff -Nru libkiwix-0.2.0/debian/patches/0004-libkiwix_ICU_63.1.patch libkiwix-0.2.0/debian/patches/0004-libkiwix_ICU_63.1.patch --- libkiwix-0.2.0/debian/patches/0004-libkiwix_ICU_63.1.patch 1970-01-01 00:00:00.000000000 +0000 +++ libkiwix-0.2.0/debian/patches/0004-libkiwix_ICU_63.1.patch 2018-11-18 15:33:26.000000000 +0000 @@ -0,0 +1,158 @@ +Description: fix FTBFS with ICU 63.1 + Add icu namespace. +Author: Laszlo Boszormenyi (GCS) +Last-Update: 2018-11-07 + +--- + +--- libkiwix-0.2.0.orig/include/common/stringTools.h ++++ libkiwix-0.2.0/include/common/stringTools.h +@@ -38,7 +38,7 @@ namespace kiwix { + std::string beautifyFileSize(const unsigned int number); + std::string urlEncode(const std::string &c); + void printStringInHexadecimal(const char *s); +- void printStringInHexadecimal(UnicodeString s); ++ void printStringInHexadecimal(icu::UnicodeString s); + void stringReplacement(std::string& str, const std::string& oldStr, const std::string& newStr); + std::string encodeDiples(const std::string& str); + +--- libkiwix-0.2.0.orig/src/common/regexTools.cpp ++++ libkiwix-0.2.0/src/common/regexTools.cpp +@@ -19,11 +19,11 @@ + + #include + +-std::map regexCache; ++std::map regexCache; + +-RegexMatcher *buildRegex(const std::string ®ex) { +- RegexMatcher *matcher; +- std::map::iterator itr = regexCache.find(regex); ++icu::RegexMatcher *buildRegex(const std::string ®ex) { ++ icu::RegexMatcher *matcher; ++ std::map::iterator itr = regexCache.find(regex); + + /* Regex is in cache */ + if (itr != regexCache.end()) { +@@ -33,8 +33,8 @@ RegexMatcher *buildRegex(const std::stri + /* Regex needs to be parsed (and cached) */ + else { + UErrorCode status = U_ZERO_ERROR; +- UnicodeString uregex = UnicodeString(regex.c_str()); +- matcher = new RegexMatcher(uregex, UREGEX_CASE_INSENSITIVE, status); ++ icu::UnicodeString uregex = icu::UnicodeString(regex.c_str()); ++ matcher = new icu::RegexMatcher(uregex, UREGEX_CASE_INSENSITIVE, status); + regexCache[regex] = matcher; + } + +@@ -47,20 +47,20 @@ void freeRegexCache() { + + bool matchRegex(const std::string &content, const std::string ®ex) { + ucnv_setDefaultName("UTF-8"); +- UnicodeString ucontent = UnicodeString(content.c_str()); +- RegexMatcher *matcher = buildRegex(regex); ++ icu::UnicodeString ucontent = icu::UnicodeString(content.c_str()); ++ icu::RegexMatcher *matcher = buildRegex(regex); + matcher->reset(ucontent); + return matcher->find(); + } + + std::string replaceRegex(const std::string &content, const std::string &replacement, const std::string ®ex) { + ucnv_setDefaultName("UTF-8"); +- UnicodeString ucontent = UnicodeString(content.c_str()); +- UnicodeString ureplacement = UnicodeString(replacement.c_str()); +- RegexMatcher *matcher = buildRegex(regex); ++ icu::UnicodeString ucontent = icu::UnicodeString(content.c_str()); ++ icu::UnicodeString ureplacement = icu::UnicodeString(replacement.c_str()); ++ icu::RegexMatcher *matcher = buildRegex(regex); + matcher->reset(ucontent); + UErrorCode status = U_ZERO_ERROR; +- UnicodeString uresult = matcher->replaceAll(ureplacement, status); ++ icu::UnicodeString uresult = matcher->replaceAll(ureplacement, status); + std::string tmp; + uresult.toUTF8String(tmp); + return tmp; +@@ -68,9 +68,9 @@ std::string replaceRegex(const std::stri + + std::string appendToFirstOccurence(const std::string &content, const std::string regex, const std::string &replacement) { + ucnv_setDefaultName("UTF-8"); +- UnicodeString ucontent = UnicodeString(content.c_str()); +- UnicodeString ureplacement = UnicodeString(replacement.c_str()); +- RegexMatcher *matcher = buildRegex(regex); ++ icu::UnicodeString ucontent = icu::UnicodeString(content.c_str()); ++ icu::UnicodeString ureplacement = icu::UnicodeString(replacement.c_str()); ++ icu::RegexMatcher *matcher = buildRegex(regex); + matcher->reset(ucontent); + + if (matcher->find()) { +--- libkiwix-0.2.0.orig/src/common/stringTools.cpp ++++ libkiwix-0.2.0/src/common/stringTools.cpp +@@ -44,8 +44,8 @@ std::string kiwix::removeAccents(const s + loadICUExternalTables(); + ucnv_setDefaultName("UTF-8"); + UErrorCode status = U_ZERO_ERROR; +- Transliterator *removeAccentsTrans = Transliterator::createInstance("Lower; NFD; [:M:] remove; NFC", UTRANS_FORWARD, status); +- UnicodeString ustring = UnicodeString(text.c_str()); ++ icu::Transliterator *removeAccentsTrans = icu::Transliterator::createInstance("Lower; NFD; [:M:] remove; NFC", UTRANS_FORWARD, status); ++ icu::UnicodeString ustring = icu::UnicodeString(text.c_str()); + removeAccentsTrans->transliterate(ustring); + delete removeAccentsTrans; + std::string unaccentedText; +@@ -79,7 +79,7 @@ std::string kiwix::beautifyFileSize(cons + } + } + +-void kiwix::printStringInHexadecimal(UnicodeString s) { ++void kiwix::printStringInHexadecimal(icu::UnicodeString s) { + std::cout << std::showbase << std::hex; + for (int i=0; i