Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-geosciences/mapnik/, sci-geosciences/mapnik/files/
Date: Tue, 16 Oct 2018 17:43:22
Message-Id: 1539711779.1c619fe0dcb8c7ebe7ac573f552977127cc2a5ba.asturm@gentoo
1 commit: 1c619fe0dcb8c7ebe7ac573f552977127cc2a5ba
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Tue Oct 16 17:42:09 2018 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 16 17:42:59 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c619fe0
7
8 sci-geosciences/mapnik: Fix build with ICU 61
9
10 Closes: https://bugs.gentoo.org/668618
11 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
12 Package-Manager: Portage-2.3.51, Repoman-2.3.11
13
14 .../mapnik/files/mapnik-3.0.18-icu-61.patch | 54 ++++++++++++++++++++++
15 sci-geosciences/mapnik/mapnik-3.0.18.ebuild | 3 +-
16 2 files changed, 56 insertions(+), 1 deletion(-)
17
18 diff --git a/sci-geosciences/mapnik/files/mapnik-3.0.18-icu-61.patch b/sci-geosciences/mapnik/files/mapnik-3.0.18-icu-61.patch
19 new file mode 100644
20 index 00000000000..1330fe6c0fb
21 --- /dev/null
22 +++ b/sci-geosciences/mapnik/files/mapnik-3.0.18-icu-61.patch
23 @@ -0,0 +1,54 @@
24 +From 1ddfe6c315487a802f2ea38119255a203a25913c Mon Sep 17 00:00:00 2001
25 +From: Raul Marin <git@×××.ninja>
26 +Date: Tue, 3 Apr 2018 13:18:03 +0200
27 +Subject: [PATCH] Qualify ICU types explicitly
28 +
29 +ICU 61 has dropped the global `using namespace icu;`
30 +http://site.icu-project.org/download/61#TOC-Migration-Issues
31 +---
32 + include/mapnik/text/scrptrun.hpp | 2 +-
33 + src/text/text_layout.cpp | 4 +++-
34 + 2 files changed, 4 insertions(+), 2 deletions(-)
35 +
36 +diff --git a/include/mapnik/text/scrptrun.hpp b/include/mapnik/text/scrptrun.hpp
37 +index 2161c510d9..c219a2a0d3 100644
38 +--- a/include/mapnik/text/scrptrun.hpp
39 ++++ b/include/mapnik/text/scrptrun.hpp
40 +@@ -37,7 +37,7 @@ struct ParenStackEntry
41 + UScriptCode scriptCode = USCRIPT_INVALID_CODE;
42 + };
43 +
44 +-class ScriptRun : public UObject {
45 ++class ScriptRun : public icu::UObject {
46 + public:
47 + ScriptRun();
48 +
49 +diff --git a/src/text/text_layout.cpp b/src/text/text_layout.cpp
50 +index 663cbe11aa..ecf02ab8e3 100644
51 +--- a/src/text/text_layout.cpp
52 ++++ b/src/text/text_layout.cpp
53 +@@ -207,6 +207,7 @@ void text_layout::layout()
54 + // At the end everything that is left over is added as the final line.
55 + void text_layout::break_line_icu(std::pair<unsigned, unsigned> && line_limits)
56 + {
57 ++ using BreakIterator = icu::BreakIterator;
58 + text_line line(line_limits.first, line_limits.second);
59 + shape_text(line);
60 +
61 +@@ -228,7 +229,7 @@ void text_layout::break_line_icu(std::pair<unsigned, unsigned> && line_limits)
62 + }
63 +
64 + mapnik::value_unicode_string const& text = itemizer_.text();
65 +- Locale locale; // TODO: Is the default constructor correct?
66 ++ icu::Locale locale; // TODO: Is the default constructor correct?
67 + UErrorCode status = U_ZERO_ERROR;
68 + std::unique_ptr<BreakIterator> breakitr(BreakIterator::createLineInstance(locale, status));
69 +
70 +@@ -336,6 +337,7 @@ inline int adjust_last_break_position (int pos, bool repeat_wrap_char)
71 +
72 + void text_layout::break_line(std::pair<unsigned, unsigned> && line_limits)
73 + {
74 ++ using BreakIterator = icu::BreakIterator;
75 + text_line line(line_limits.first, line_limits.second);
76 + shape_text(line);
77 + double scaled_wrap_width = wrap_width_ * scale_factor_;
78
79 diff --git a/sci-geosciences/mapnik/mapnik-3.0.18.ebuild b/sci-geosciences/mapnik/mapnik-3.0.18.ebuild
80 index 8c0db9a6c0b..5a5a4d1e20f 100644
81 --- a/sci-geosciences/mapnik/mapnik-3.0.18.ebuild
82 +++ b/sci-geosciences/mapnik/mapnik-3.0.18.ebuild
83 @@ -1,4 +1,4 @@
84 -# Copyright 1999-2018 Gentoo Foundation
85 +# Copyright 1999-2018 Gentoo Authors
86 # Distributed under the terms of the GNU General Public License v2
87
88 EAPI=6
89 @@ -48,6 +48,7 @@ PATCHES=(
90 "${FILESDIR}/${PN}-2.2.0-configure-only-once.patch"
91 "${FILESDIR}/${PN}-2.2.0-dont-run-ldconfig.patch"
92 "${FILESDIR}/${PN}-3.0.18-scons.patch"
93 + "${FILESDIR}/${PN}-3.0.18-icu-61.patch"
94 )
95
96 src_prepare() {