Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: games-engines/scummvm/files/, games-engines/scummvm/
Date: Mon, 30 Dec 2019 22:38:52
Message-Id: 1577745504.d4b50daa7a356bbf112e37bd712d3d7b29d1c001.chewi@gentoo
1 commit: d4b50daa7a356bbf112e37bd712d3d7b29d1c001
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Mon Dec 30 22:37:09 2019 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Mon Dec 30 22:38:24 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4b50daa
7
8 games-engines/scummvm: Upstream patch for fluidsynth-2.1.0
9
10 Closes: https://bugs.gentoo.org/704230
11 Package-Manager: Portage-2.3.84, Repoman-2.3.20
12 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
13
14 .../scummvm/files/scummvm-2.1.0-fluidsynth.patch | 39 ++++++++++++++++++++++
15 games-engines/scummvm/scummvm-2.1.0.ebuild | 1 +
16 2 files changed, 40 insertions(+)
17
18 diff --git a/games-engines/scummvm/files/scummvm-2.1.0-fluidsynth.patch b/games-engines/scummvm/files/scummvm-2.1.0-fluidsynth.patch
19 new file mode 100644
20 index 00000000000..6b4760e16dd
21 --- /dev/null
22 +++ b/games-engines/scummvm/files/scummvm-2.1.0-fluidsynth.patch
23 @@ -0,0 +1,39 @@
24 +From 68758a879e0c8ecc0d40962516d4e808aa4e15e5 Mon Sep 17 00:00:00 2001
25 +From: D G Turner <digitall@×××××××.org>
26 +Date: Tue, 17 Dec 2019 04:21:04 +0000
27 +Subject: [PATCH] AUDIO: Really Fix Compilation Against Fluidsynth v2.1+
28 +
29 +The previous fix did not work as the forbidden exception had no effect
30 +since scummsys.h and thus forbidden.h had already been included prior
31 +to the fluidsynth header being included. This also meant that undefining
32 +the exception define after the header would have had no effect anyway.
33 +
34 +This new solution was suggest by eriktorbjorn on bug #11278 and should
35 +avoid the need to add an exception which would persist over the entire
36 +source file.
37 +---
38 + audio/softsynth/fluidsynth.cpp | 15 +++++++--------
39 + 1 file changed, 7 insertions(+), 8 deletions(-)
40 +
41 +diff --git a/audio/softsynth/fluidsynth.cpp b/audio/softsynth/fluidsynth.cpp
42 +index 33a74a15247..f8c2412492e 100644
43 +--- a/audio/softsynth/fluidsynth.cpp
44 ++++ b/audio/softsynth/fluidsynth.cpp
45 +@@ -20,10 +20,16 @@
46 + *
47 + */
48 +
49 +-#include "common/scummsys.h"
50 ++#include "config.h"
51 +
52 + #ifdef USE_FLUIDSYNTH
53 +
54 ++// Fluidsynth v2.1+ uses printf in one of it's headers,
55 ++// include/fluidsynth/log.h around line 82 so need to include this
56 ++// prior scummsys.h inclusion and thus forbidden.h
57 ++#include <fluidsynth.h>
58 ++
59 ++#include "common/scummsys.h"
60 + #include "common/config-manager.h"
61 + #include "common/error.h"
62 + #include "common/system.h"
63
64 diff --git a/games-engines/scummvm/scummvm-2.1.0.ebuild b/games-engines/scummvm/scummvm-2.1.0.ebuild
65 index 6b43908481d..06cc2f964fe 100644
66 --- a/games-engines/scummvm/scummvm-2.1.0.ebuild
67 +++ b/games-engines/scummvm/scummvm-2.1.0.ebuild
68 @@ -47,6 +47,7 @@ S="${WORKDIR}/${P/_/}"
69
70 PATCHES=(
71 "${FILESDIR}/${P}-tts_pthread_link.patch"
72 + "${FILESDIR}/${P}-fluidsynth.patch"
73 )
74
75 src_prepare() {