commit:     c8a8324d59b24f3d1d3d2308f2835dc07541f010
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  7 02:22:52 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Feb  7 02:22:52 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8a8324d

games-util/atlas: Fix build with jpeg-9

Closes: https://bugs.gentoo.org/520908
Package-Manager: Portage-2.3.24, Repoman-2.3.6

 .../atlas/atlas-0.5.1_beta_pre20160907.ebuild      |  3 ++-
 .../atlas-0.5.1_beta_pre20160907-jpeg-9.patch      | 27 ++++++++++++++++++++++
 2 files changed, 29 insertions(+), 1 deletion(-)

diff --git a/games-util/atlas/atlas-0.5.1_beta_pre20160907.ebuild 
b/games-util/atlas/atlas-0.5.1_beta_pre20160907.ebuild
index 5d915b19289..4fed6a08e4a 100644
--- a/games-util/atlas/atlas-0.5.1_beta_pre20160907.ebuild
+++ b/games-util/atlas/atlas-0.5.1_beta_pre20160907.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -40,6 +40,7 @@ S=${WORKDIR}/${MY_P}
 
 PATCHES=(
        "${FILESDIR}/${P}-simgear-compilation.patch"
+       "${FILESDIR}/${P}-jpeg-9.patch"
 )
 
 src_prepare() {

diff --git a/games-util/atlas/files/atlas-0.5.1_beta_pre20160907-jpeg-9.patch 
b/games-util/atlas/files/atlas-0.5.1_beta_pre20160907-jpeg-9.patch
new file mode 100644
index 00000000000..639ff821754
--- /dev/null
+++ b/games-util/atlas/files/atlas-0.5.1_beta_pre20160907-jpeg-9.patch
@@ -0,0 +1,27 @@
+Fix build with jpeg-9. Bug # 520908
+
+--- a/src/Image.cxx    2018-02-07 03:19:18.538699623 +0100
++++ b/src/Image.cxx    2018-02-07 03:20:15.105160934 +0100
+@@ -29,11 +29,12 @@
+ 
+ // Other libraries' include files
+ #include <png.h>
+-#include <jpeglib.h>
+ 
+ // Our project's include files
+ #include "misc.hxx"
+ 
++#include <jpeglib.h>
++
+ // This is a constant representing "Not an Elevation" - it is
+ // guaranteed to be less than any possible real elevation value.
+ static const float NanE = -std::numeric_limits<float>::max();
+@@ -266,7 +267,7 @@
+     cinfo.in_color_space = JCS_RGB;
+ 
+     jpeg_set_defaults(&cinfo);
+-    jpeg_set_quality(&cinfo, quality, true);
++    jpeg_set_quality(&cinfo, quality, TRUE);
+ 
+     jpeg_start_compress(&cinfo, TRUE);
+ 

Reply via email to