Dave Plater
48c1b8e563
Use portable namespace in aegisub-icu.patch. OBS-URL: https://build.opensuse.org/request/show/615158 OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/aegisub?expand=0&rev=48
59 lines
2.2 KiB
Diff
59 lines
2.2 KiB
Diff
From: Dave Plater <davejplater@gmail.com>
|
|
Date: 2018-05-19 14:49:00 +0200
|
|
Subject: Factory build failure
|
|
References: icu4c-61_1
|
|
Upstream: Bug tracker not accessable.
|
|
|
|
It seems that icu 61.1 needs icu namespace specified for functions but
|
|
didn't in the past.
|
|
|
|
|
|
|
|
Index: libaegisub/common/character_count.cpp
|
|
===================================================================
|
|
--- libaegisub/common/character_count.cpp.orig 2014-12-08 02:07:09.000000000 +0200
|
|
+++ libaegisub/common/character_count.cpp 2018-06-08 09:19:09.591507615 +0200
|
|
@@ -36,7 +36,7 @@ icu::BreakIterator& get_break_iterator(c
|
|
static std::once_flag token;
|
|
std::call_once(token, [&] {
|
|
UErrorCode status = U_ZERO_ERROR;
|
|
- bi.reset(BreakIterator::createCharacterInstance(Locale::getDefault(), status));
|
|
+ bi.reset(U_ICU_NAMESPACE::BreakIterator::createCharacterInstance(icu::Locale::getDefault(), status));
|
|
if (U_FAILURE(status)) throw agi::InternalError("Failed to create character iterator");
|
|
});
|
|
|
|
@@ -58,7 +58,7 @@ size_t count_in_range(Iterator begin, It
|
|
|
|
size_t count = 0;
|
|
auto pos = character_bi.first();
|
|
- for (auto end = character_bi.next(); end != BreakIterator::DONE; pos = end, end = character_bi.next()) {
|
|
+ for (auto end = character_bi.next(); end != U_ICU_NAMESPACE::BreakIterator::DONE; pos = end, end = character_bi.next()) {
|
|
if (!mask)
|
|
++count;
|
|
else {
|
|
@@ -143,7 +143,7 @@ size_t IndexOfCharacter(std::string cons
|
|
auto& bi = get_break_iterator(&str[0], str.size());
|
|
|
|
for (auto pos = bi.first(), end = bi.next(); ; --n, pos = end, end = bi.next()) {
|
|
- if (end == BreakIterator::DONE)
|
|
+ if (end == U_ICU_NAMESPACE::BreakIterator::DONE)
|
|
return str.size();
|
|
if (n == 0)
|
|
return pos;
|
|
Index: src/utils.cpp
|
|
===================================================================
|
|
--- src/utils.cpp.orig 2018-05-19 12:35:15.069871773 +0200
|
|
+++ src/utils.cpp 2018-06-08 09:22:06.796104985 +0200
|
|
@@ -265,9 +265,9 @@ agi::fs::path SaveFileSelector(wxString
|
|
}
|
|
|
|
wxString LocalizedLanguageName(wxString const& lang) {
|
|
- Locale iculoc(lang.c_str());
|
|
+ U_ICU_NAMESPACE::Locale iculoc(lang.c_str());
|
|
if (!iculoc.isBogus()) {
|
|
- UnicodeString ustr;
|
|
+ U_ICU_NAMESPACE::UnicodeString ustr;
|
|
iculoc.getDisplayName(iculoc, ustr);
|
|
#ifdef _MSC_VER
|
|
return wxString(ustr.getBuffer());
|