Gentoo Archives: gentoo-commits

From: Nick Sarnie <sarnex@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/aegisub/files/3.2.2_p20160518/, media-video/aegisub/
Date: Wed, 19 Sep 2018 01:02:30
Message-Id: 1537318773.56b064a177b418c5ebbe4238fac125664311f187.sarnex@gentoo
1 commit: 56b064a177b418c5ebbe4238fac125664311f187
2 Author: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
3 AuthorDate: Wed Sep 19 00:59:33 2018 +0000
4 Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 19 00:59:33 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56b064a1
7
8 media-video/aegisub: Fix build against ICU 62
9
10 Package-Manager: Portage-2.3.49, Repoman-2.3.10
11
12 .../aegisub/aegisub-3.2.2_p20160518-r2.ebuild | 4 +-
13 .../aegisub-3.2.2_p20160518-fix-icu62-build.patch | 59 ++++++++++++++++++++++
14 2 files changed, 62 insertions(+), 1 deletion(-)
15
16 diff --git a/media-video/aegisub/aegisub-3.2.2_p20160518-r2.ebuild b/media-video/aegisub/aegisub-3.2.2_p20160518-r2.ebuild
17 index 34d509212ba..d5b623eb234 100644
18 --- a/media-video/aegisub/aegisub-3.2.2_p20160518-r2.ebuild
19 +++ b/media-video/aegisub/aegisub-3.2.2_p20160518-r2.ebuild
20 @@ -1,4 +1,4 @@
21 -# Copyright 1999-2017 Gentoo Foundation
22 +# Copyright 1999-2018 Gentoo Foundation
23 # Distributed under the terms of the GNU General Public License v2
24
25 EAPI=6
26 @@ -59,6 +59,8 @@ PATCHES=(
27 "${FILESDIR}/${PV}/${P}-respect-compiler-flags.patch"
28 "${FILESDIR}/${PV}/${P}-support-system-gtest.patch"
29 "${FILESDIR}/${PV}/${P}-fix-icu59-build.patch"
30 + "${FILESDIR}/${PV}/${P}-fix-icu62-build.patch"
31 +
32 )
33
34 aegisub_check_compiler() {
35
36 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
37 new file mode 100644
38 index 00000000000..47508951e45
39 --- /dev/null
40 +++ b/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-fix-icu62-build.patch
41 @@ -0,0 +1,59 @@
42 +From d4461f65be5aa440506bd23e90e71aaf8f0ebada Mon Sep 17 00:00:00 2001
43 +From: sidneys <sidneys.github.io@×××××××.com>
44 +Date: Sat, 31 Mar 2018 02:57:19 +0200
45 +Subject: [PATCH] fix(updated-macos-build): prefix icu method calls
46 + (icu::BreakIterator, icu::Locale, icu::UnicodeString)
47 +
48 +---
49 + libaegisub/common/character_count.cpp | 6 +++---
50 + src/utils.cpp | 4 ++--
51 + 2 files changed, 5 insertions(+), 5 deletions(-)
52 +
53 +diff --git a/libaegisub/common/character_count.cpp b/libaegisub/common/character_count.cpp
54 +index 0b8c70b31..1276f74fb 100644
55 +--- a/libaegisub/common/character_count.cpp
56 ++++ b/libaegisub/common/character_count.cpp
57 +@@ -36,7 +36,7 @@ icu::BreakIterator& get_break_iterator(const char *ptr, size_t len) {
58 + static std::once_flag token;
59 + std::call_once(token, [&] {
60 + UErrorCode status = U_ZERO_ERROR;
61 +- bi.reset(BreakIterator::createCharacterInstance(Locale::getDefault(), status));
62 ++ bi.reset(icu::BreakIterator::createCharacterInstance(icu::Locale::getDefault(), status));
63 + if (U_FAILURE(status)) throw agi::InternalError("Failed to create character iterator");
64 + });
65 +
66 +@@ -58,7 +58,7 @@ size_t count_in_range(Iterator begin, Iterator end, int mask) {
67 +
68 + size_t count = 0;
69 + auto pos = character_bi.first();
70 +- for (auto end = character_bi.next(); end != BreakIterator::DONE; pos = end, end = character_bi.next()) {
71 ++ for (auto end = character_bi.next(); end != icu::BreakIterator::DONE; pos = end, end = character_bi.next()) {
72 + if (!mask)
73 + ++count;
74 + else {
75 +@@ -143,7 +143,7 @@ size_t IndexOfCharacter(std::string const& str, size_t n) {
76 + auto& bi = get_break_iterator(&str[0], str.size());
77 +
78 + for (auto pos = bi.first(), end = bi.next(); ; --n, pos = end, end = bi.next()) {
79 +- if (end == BreakIterator::DONE)
80 ++ if (end == icu::BreakIterator::DONE)
81 + return str.size();
82 + if (n == 0)
83 + return pos;
84 +diff --git a/src/utils.cpp b/src/utils.cpp
85 +index 876c4c011..2416aa7a2 100644
86 +--- a/src/utils.cpp
87 ++++ b/src/utils.cpp
88 +@@ -270,9 +270,9 @@ agi::fs::path SaveFileSelector(wxString const& message, std::string const& optio
89 + }
90 +
91 + wxString LocalizedLanguageName(wxString const& lang) {
92 +- Locale iculoc(lang.c_str());
93 ++ icu::Locale iculoc(lang.c_str());
94 + if (!iculoc.isBogus()) {
95 +- UnicodeString ustr;
96 ++ icu::UnicodeString ustr;
97 + iculoc.getDisplayName(iculoc, ustr);
98 + #ifdef _MSC_VER
99 + return wxString(ustr.getBuffer());
100 +