public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Lars Wendler" <polynomial-c@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: games-simulation/openttd/, games-simulation/openttd/files/
Date: Fri, 21 Sep 2018 11:37:13 +0000 (UTC)	[thread overview]
Message-ID: <1537529825.d0c2fcd0affe96e988eefb31f7c561d6fc12a3af.polynomial-c@gentoo> (raw)

commit:     d0c2fcd0affe96e988eefb31f7c561d6fc12a3af
Author:     Stefan Strogin <stefan.strogin <AT> gmail <DOT> com>
AuthorDate: Wed Sep 19 21:01:44 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Sep 21 11:37:05 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0c2fcd0

games-simulation/openttd: fix compilation with icu-62.1

Closes: https://bugs.gentoo.org/666578
Package-Manager: Portage-2.3.49, Repoman-2.3.10
Signed-off-by: Stefan Strogin <stefan.strogin <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/9922

 .../openttd/files/openttd-1.8.0-icu62.patch        | 99 ++++++++++++++++++++++
 games-simulation/openttd/openttd-1.8.0.ebuild      |  1 +
 2 files changed, 100 insertions(+)

diff --git a/games-simulation/openttd/files/openttd-1.8.0-icu62.patch b/games-simulation/openttd/files/openttd-1.8.0-icu62.patch
new file mode 100644
index 00000000000..9ba907fa47e
--- /dev/null
+++ b/games-simulation/openttd/files/openttd-1.8.0-icu62.patch
@@ -0,0 +1,99 @@
+From 55bf7628e299ef2c143e9ac97e87817b5eda3239 Mon Sep 17 00:00:00 2001
+From: Stefan Strogin <stefan.strogin@gmail.com>
+Date: Wed, 19 Sep 2018 23:52:10 +0300
+Subject: [PATCH] Fix #6854: Compilation with ICU 62
+
+---
+ src/gfx_layout.cpp | 18 +++++++++---------
+ src/gfx_layout.h   |  2 +-
+ 2 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/src/gfx_layout.cpp b/src/gfx_layout.cpp
+index f5463d401..e13ece0e7 100644
+--- a/src/gfx_layout.cpp
++++ b/src/gfx_layout.cpp
+@@ -126,7 +126,7 @@ static size_t AppendToBuffer(UChar *buff, const UChar *buffer_last, WChar c)
+  * Wrapper for doing layouts with ICU.
+  */
+ class ICUParagraphLayout : public AutoDeleteSmallVector<ParagraphLayouter::Line *, 4>, public ParagraphLayouter {
+-	ParagraphLayout *p; ///< The actual ICU paragraph layout.
++	icu::ParagraphLayout *p; ///< The actual ICU paragraph layout.
+ public:
+ 	/** Helper for GetLayouter, to get the right type. */
+ 	typedef UChar CharType;
+@@ -135,10 +135,10 @@ public:
+ 
+ 	/** Visual run contains data about the bit of text with the same font. */
+ 	class ICUVisualRun : public ParagraphLayouter::VisualRun {
+-		const ParagraphLayout::VisualRun *vr; ///< The actual ICU vr.
++		const icu::ParagraphLayout::VisualRun *vr; ///< The actual ICU vr.
+ 
+ 	public:
+-		ICUVisualRun(const ParagraphLayout::VisualRun *vr) : vr(vr) { }
++		ICUVisualRun(const icu::ParagraphLayout::VisualRun *vr) : vr(vr) { }
+ 
+ 		const Font *GetFont() const          { return (const Font*)vr->getFont(); }
+ 		int GetGlyphCount() const            { return vr->getGlyphCount(); }
+@@ -150,10 +150,10 @@ public:
+ 
+ 	/** A single line worth of VisualRuns. */
+ 	class ICULine : public AutoDeleteSmallVector<ICUVisualRun *, 4>, public ParagraphLayouter::Line {
+-		ParagraphLayout::Line *l; ///< The actual ICU line.
++		icu::ParagraphLayout::Line *l; ///< The actual ICU line.
+ 
+ 	public:
+-		ICULine(ParagraphLayout::Line *l) : l(l)
++		ICULine(icu::ParagraphLayout::Line *l) : l(l)
+ 		{
+ 			for (int i = 0; i < l->countRuns(); i++) {
+ 				*this->Append() = new ICUVisualRun(l->getVisualRun(i));
+@@ -173,13 +173,13 @@ public:
+ 		}
+ 	};
+ 
+-	ICUParagraphLayout(ParagraphLayout *p) : p(p) { }
++	ICUParagraphLayout(icu::ParagraphLayout *p) : p(p) { }
+ 	~ICUParagraphLayout() { delete p; }
+ 	void Reflow() { p->reflow(); }
+ 
+ 	ParagraphLayouter::Line *NextLine(int max_width)
+ 	{
+-		ParagraphLayout::Line *l = p->nextLine(max_width);
++		icu::ParagraphLayout::Line *l = p->nextLine(max_width);
+ 		return l == NULL ? NULL : new ICULine(l);
+ 	}
+ };
+@@ -196,7 +196,7 @@ static ParagraphLayouter *GetParagraphLayout(UChar *buff, UChar *buff_end, FontM
+ 	}
+ 
+ 	/* Fill ICU's FontRuns with the right data. */
+-	FontRuns runs(fontMapping.Length());
++	icu::FontRuns runs(fontMapping.Length());
+ 	for (FontMap::iterator iter = fontMapping.Begin(); iter != fontMapping.End(); iter++) {
+ 		runs.add(iter->second, iter->first);
+ 	}
+@@ -204,7 +204,7 @@ static ParagraphLayouter *GetParagraphLayout(UChar *buff, UChar *buff_end, FontM
+ 	LEErrorCode status = LE_NO_ERROR;
+ 	/* ParagraphLayout does not copy "buff", so it must stay valid.
+ 	 * "runs" is copied according to the ICU source, but the documentation does not specify anything, so this might break somewhen. */
+-	ParagraphLayout *p = new ParagraphLayout(buff, length, &runs, NULL, NULL, NULL, _current_text_dir == TD_RTL ? UBIDI_DEFAULT_RTL : UBIDI_DEFAULT_LTR, false, status);
++	icu::ParagraphLayout *p = new icu::ParagraphLayout(buff, length, &runs, NULL, NULL, NULL, _current_text_dir == TD_RTL ? UBIDI_DEFAULT_RTL : UBIDI_DEFAULT_LTR, false, status);
+ 	if (status != LE_NO_ERROR) {
+ 		delete p;
+ 		return NULL;
+diff --git a/src/gfx_layout.h b/src/gfx_layout.h
+index 0a21d9b0c..028f5be63 100644
+--- a/src/gfx_layout.h
++++ b/src/gfx_layout.h
+@@ -21,7 +21,7 @@
+ 
+ #ifdef WITH_ICU_LAYOUT
+ #include "layout/ParagraphLayout.h"
+-#define ICU_FONTINSTANCE : public LEFontInstance
++#define ICU_FONTINSTANCE : public icu::LEFontInstance
+ #else /* WITH_ICU_LAYOUT */
+ #define ICU_FONTINSTANCE
+ #endif /* WITH_ICU_LAYOUT */
+-- 
+2.19.0
+

diff --git a/games-simulation/openttd/openttd-1.8.0.ebuild b/games-simulation/openttd/openttd-1.8.0.ebuild
index 2d97c8bf081..7daebea4a2c 100644
--- a/games-simulation/openttd/openttd-1.8.0.ebuild
+++ b/games-simulation/openttd/openttd-1.8.0.ebuild
@@ -52,6 +52,7 @@ S="${WORKDIR}/${MY_P}"
 PATCHES=(
 	"${FILESDIR}"/${PN}-1.6.0-cflags.patch
 	"${FILESDIR}"/${PN}-1.8.0-icu61.patch
+	"${FILESDIR}"/${PN}-1.8.0-icu62.patch
 )
 
 src_configure() {


             reply	other threads:[~2018-09-21 11:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-21 11:37 Lars Wendler [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-01-28 12:21 [gentoo-commits] repo/gentoo:master commit in: games-simulation/openttd/, games-simulation/openttd/files/ Sam James
2025-01-28  6:23 Sam James
2024-11-11  7:13 Sam James
2022-04-12 20:59 Conrad Kostecki
2022-04-10 13:24 Conrad Kostecki
2020-11-11 11:22 Lars Wendler
2019-04-03 12:23 Lars Wendler
2019-04-03 12:20 Lars Wendler
2018-07-16  9:08 Lars Wendler
2017-07-18 23:06 Lars Wendler
2016-04-05  1:03 Michael Sterrett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1537529825.d0c2fcd0affe96e988eefb31f7c561d6fc12a3af.polynomial-c@gentoo \
    --to=polynomial-c@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox