Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-emulation/snes9x/files/, games-emulation/snes9x/
Date: Fri, 04 Jan 2019 17:40:22
Message-Id: 1546623596.92170680370d7c953241845837d0d6c7daa36e35.polynomial-c@gentoo
1 commit: 92170680370d7c953241845837d0d6c7daa36e35
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jan 4 17:39:43 2019 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri Jan 4 17:39:56 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92170680
7
8 games-emulation/snes9x: Fixed build with USE="-png".
9
10 Closes: https://bugs.gentoo.org/659900
11 Package-Manager: Portage-2.3.54, Repoman-2.3.12
12 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
13
14 .../snes9x-1.58-without-screenshot_build_fix.patch | 31 ++++++++++++++++++++++
15 games-emulation/snes9x/snes9x-1.58.ebuild | 3 ++-
16 2 files changed, 33 insertions(+), 1 deletion(-)
17
18 diff --git a/games-emulation/snes9x/files/snes9x-1.58-without-screenshot_build_fix.patch b/games-emulation/snes9x/files/snes9x-1.58-without-screenshot_build_fix.patch
19 new file mode 100644
20 index 00000000000..7af1e9e2b90
21 --- /dev/null
22 +++ b/games-emulation/snes9x/files/snes9x-1.58-without-screenshot_build_fix.patch
23 @@ -0,0 +1,31 @@
24 +From 51909e0cb44ee8de346f3edfb2a6c4a8bb97ea1d Mon Sep 17 00:00:00 2001
25 +From: Brandon Wright <bearoso@×××××.com>
26 +Date: Fri, 4 Jan 2019 10:52:11 -0600
27 +Subject: [PATCH] Fix PNG usage without preprocessor check.
28 +
29 +---
30 + shaders/shader_helpers.cpp | 4 ++++
31 + 1 file changed, 4 insertions(+)
32 +
33 +diff --git a/shaders/shader_helpers.cpp b/shaders/shader_helpers.cpp
34 +index b84e6291..a589d39b 100644
35 +--- a/shaders/shader_helpers.cpp
36 ++++ b/shaders/shader_helpers.cpp
37 +@@ -93,6 +93,7 @@ bool loadPngImage(const char* name,
38 + bool& outHasAlpha,
39 + GLubyte** outData)
40 + {
41 ++#ifdef HAVE_LIBPNG
42 + png_structp png_ptr;
43 + png_infop info_ptr;
44 + unsigned int sig_read = 0;
45 +@@ -211,6 +212,9 @@ bool loadPngImage(const char* name,
46 +
47 + /* That's it */
48 + return true;
49 ++#else
50 ++ return false;
51 ++#endif
52 + }
53 +
54 + bool loadTGA(const char* filename, STGA& tgaFile)
55
56 diff --git a/games-emulation/snes9x/snes9x-1.58.ebuild b/games-emulation/snes9x/snes9x-1.58.ebuild
57 index 911de9a90fb..9fd943cac80 100644
58 --- a/games-emulation/snes9x/snes9x-1.58.ebuild
59 +++ b/games-emulation/snes9x/snes9x-1.58.ebuild
60 @@ -1,4 +1,4 @@
61 -# Copyright 1999-2018 Gentoo Authors
62 +# Copyright 1999-2019 Gentoo Authors
63 # Distributed under the terms of the GNU General Public License v2
64
65 EAPI=6
66 @@ -47,6 +47,7 @@ S="${WORKDIR}/${P}/unix"
67 PATCHES=(
68 "${FILESDIR}"/${PN}-1.53-cross-compile.patch
69 "${FILESDIR}"/${PN}-1.58-build-system.patch
70 + "${FILESDIR}"/${P}-without-screenshot_build_fix.patch
71 )
72
73 src_prepare() {