From 6d1e6571126bda7adf10395c2c5c7a58817556be6d5fa11a1ee8de15f5bd9967 Mon Sep 17 00:00:00 2001 From: Dave Plater Date: Sat, 19 May 2018 13:12:24 +0000 Subject: [PATCH] Accepting request 610625 from home:plater Created aegisub-icu.patch to fix build failure against icu4c-61_1 OBS-URL: https://build.opensuse.org/request/show/610625 OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/aegisub?expand=0&rev=45 --- aegisub-icu.patch | 58 +++++++++++++++++++++++++++++++++++++++++++++++ aegisub.changes | 5 ++++ aegisub.spec | 6 +++-- 3 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 aegisub-icu.patch diff --git a/aegisub-icu.patch b/aegisub-icu.patch new file mode 100644 index 0000000..7063c79 --- /dev/null +++ b/aegisub-icu.patch @@ -0,0 +1,58 @@ +From: Dave Plater +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-05-19 13:36:11.101071666 +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(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, 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 != icu::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 == icu::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-05-19 14:06:59.572174480 +0200 +@@ -265,9 +265,9 @@ agi::fs::path SaveFileSelector(wxString + } + + 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()); diff --git a/aegisub.changes b/aegisub.changes index 177cc5c..cb0b864 100644 --- a/aegisub.changes +++ b/aegisub.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat May 19 13:07:22 UTC 2018 - davejplater@gmail.com + +- Created aegisub-icu.patch to fix build failure against icu4c-61_1 + ------------------------------------------------------------------- Fri Sep 29 12:15:01 UTC 2017 - olaf@aepfle.de diff --git a/aegisub.spec b/aegisub.spec index de7c6d3..1684669 100644 --- a/aegisub.spec +++ b/aegisub.spec @@ -1,7 +1,7 @@ # # spec file for package aegisub # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -31,6 +31,7 @@ Patch2: remove-vendor-luajit-dependency.patch Patch3: icu59.patch Patch4: aegisub-no-optimize.patch Patch5: luabins.patch +Patch6: aegisub-icu.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: gcc-c++ @@ -41,6 +42,7 @@ BuildRequires: libboost_regex-devel BuildRequires: libboost_thread-devel BuildRequires: lua51 BuildRequires: pkgconfig >= 0.20 +BuildRequires: wxWidgets-devel >= 3 BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(ffms2) BuildRequires: pkgconfig(fftw3) >= 3.3 @@ -51,7 +53,6 @@ BuildRequires: pkgconfig(libass) BuildRequires: pkgconfig(libpulse) >= 0.5 BuildRequires: pkgconfig(luajit) BuildRequires: pkgconfig(zlib) -BuildRequires: wxWidgets-devel >= 3 ExcludeArch: ppc ppc64 ppc64le %description @@ -71,6 +72,7 @@ functions with ease. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y') sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" src/version.cpp FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M:%%S')