commit:     cb0cf745e7d4eabbc169d4901811cc7cdd267f5f
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 11 18:57:39 2019 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Thu Apr 11 18:58:19 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb0cf745

games-arcade/performous: Fix building with media-libs/jpeg

Closes: https://bugs.gentoo.org/649280
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 games-arcade/performous/files/performous-1.1-jpeg-9c.patch | 11 +++++++++++
 games-arcade/performous/performous-1.1-r1.ebuild           |  3 ++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/games-arcade/performous/files/performous-1.1-jpeg-9c.patch 
b/games-arcade/performous/files/performous-1.1-jpeg-9c.patch
new file mode 100644
index 00000000000..d878cec07f5
--- /dev/null
+++ b/games-arcade/performous/files/performous-1.1-jpeg-9c.patch
@@ -0,0 +1,11 @@
+--- a/common/image.cc
++++ b/common/image.cc
+@@ -180,7 +180,7 @@
+       }
+       jpeg_create_decompress(&cinfo);
+       jpeg_mem_src(&cinfo, data.data(), data.size());
+-      if (jpeg_read_header(&cinfo, true) != JPEG_HEADER_OK) throw 
std::runtime_error("Cannot read header of " + filename.string());
++      if (jpeg_read_header(&cinfo, TRUE) != JPEG_HEADER_OK) throw 
std::runtime_error("Cannot read header of " + filename.string());
+       jpeg_start_decompress(&cinfo);
+       bitmap.resize(cinfo.output_width, cinfo.output_height);
+       unsigned stride = (bitmap.width * 3 + 3) & ~3;  // Number of bytes per 
row (word-aligned)

diff --git a/games-arcade/performous/performous-1.1-r1.ebuild 
b/games-arcade/performous/performous-1.1-r1.ebuild
index 774e839768c..ed88a66edef 100644
--- a/games-arcade/performous/performous-1.1-r1.ebuild
+++ b/games-arcade/performous/performous-1.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -63,6 +63,7 @@ PATCHES=(
        "${FILESDIR}"/${P}-gentoo.patch
        "${FILESDIR}"/${P}-linguas.patch
        "${FILESDIR}"/${P}-nomancompress.patch
+       "${FILESDIR}"/${P}-jpeg-9c.patch
 )
 
 src_prepare() {

Reply via email to