From 56b064a177b418c5ebbe4238fac125664311f187 Mon Sep 17 00:00:00 2001 From: Nick Sarnie Date: Tue, 18 Sep 2018 20:59:33 -0400 Subject: media-video/aegisub: Fix build against ICU 62 Package-Manager: Portage-2.3.49, Repoman-2.3.10 --- .../aegisub/aegisub-3.2.2_p20160518-r2.ebuild | 4 +- .../aegisub-3.2.2_p20160518-fix-icu62-build.patch | 59 ++++++++++++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-fix-icu62-build.patch (limited to 'media-video/aegisub') diff --git a/media-video/aegisub/aegisub-3.2.2_p20160518-r2.ebuild b/media-video/aegisub/aegisub-3.2.2_p20160518-r2.ebuild index 34d509212bae..d5b623eb234e 100644 --- a/media-video/aegisub/aegisub-3.2.2_p20160518-r2.ebuild +++ b/media-video/aegisub/aegisub-3.2.2_p20160518-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2017 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -59,6 +59,8 @@ PATCHES=( "${FILESDIR}/${PV}/${P}-respect-compiler-flags.patch" "${FILESDIR}/${PV}/${P}-support-system-gtest.patch" "${FILESDIR}/${PV}/${P}-fix-icu59-build.patch" + "${FILESDIR}/${PV}/${P}-fix-icu62-build.patch" + ) aegisub_check_compiler() { diff --git a/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-fix-icu62-build.patch b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-fix-icu62-build.patch new file mode 100644 index 000000000000..47508951e452 --- /dev/null +++ b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-fix-icu62-build.patch @@ -0,0 +1,59 @@ +From d4461f65be5aa440506bd23e90e71aaf8f0ebada Mon Sep 17 00:00:00 2001 +From: sidneys +Date: Sat, 31 Mar 2018 02:57:19 +0200 +Subject: [PATCH] fix(updated-macos-build): prefix icu method calls + (icu::BreakIterator, icu::Locale, icu::UnicodeString) + +--- + libaegisub/common/character_count.cpp | 6 +++--- + src/utils.cpp | 4 ++-- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/libaegisub/common/character_count.cpp b/libaegisub/common/character_count.cpp +index 0b8c70b31..1276f74fb 100644 +--- a/libaegisub/common/character_count.cpp ++++ b/libaegisub/common/character_count.cpp +@@ -36,7 +36,7 @@ icu::BreakIterator& get_break_iterator(const char *ptr, size_t len) { + static std::once_flag token; + std::call_once(token, [&] { + UErrorCode status = U_ZERO_ERROR; +- bi.reset(BreakIterator::createCharacterInstance(Locale::getDefault(), status)); ++ bi.reset(icu::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, Iterator end, int mask) { + + 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 != icu::BreakIterator::DONE; pos = end, end = character_bi.next()) { + if (!mask) + ++count; + else { +@@ -143,7 +143,7 @@ size_t IndexOfCharacter(std::string const& str, size_t n) { + 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 == icu::BreakIterator::DONE) + return str.size(); + if (n == 0) + return pos; +diff --git a/src/utils.cpp b/src/utils.cpp +index 876c4c011..2416aa7a2 100644 +--- a/src/utils.cpp ++++ b/src/utils.cpp +@@ -270,9 +270,9 @@ agi::fs::path SaveFileSelector(wxString const& message, std::string const& optio + } + + wxString LocalizedLanguageName(wxString const& lang) { +- Locale iculoc(lang.c_str()); ++ icu::Locale iculoc(lang.c_str()); + if (!iculoc.isBogus()) { +- UnicodeString ustr; ++ icu::UnicodeString ustr; + iculoc.getDisplayName(iculoc, ustr); + #ifdef _MSC_VER + return wxString(ustr.getBuffer()); + -- cgit v1.2.3-65-gdbad