commit:     e22fc38985047ca60503b0eac793c9a16648d5ba
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 26 09:49:43 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Aug 26 09:50:05 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e22fc389

media-sound/timidity++: Fix build with GCC-5

Closes: https://bugs.gentoo.org/606894
Package-Manager: Portage-2.3.48, Repoman-2.3.10

 .../timidity++/files/timidity++-2.14.0-gcc5.patch  | 31 ++++++++++++++++++++++
 media-sound/timidity++/timidity++-2.14.0-r3.ebuild |  1 +
 2 files changed, 32 insertions(+)

diff --git a/media-sound/timidity++/files/timidity++-2.14.0-gcc5.patch 
b/media-sound/timidity++/files/timidity++-2.14.0-gcc5.patch
new file mode 100644
index 00000000000..50d64e3bcbb
--- /dev/null
+++ b/media-sound/timidity++/files/timidity++-2.14.0-gcc5.patch
@@ -0,0 +1,31 @@
+Upstream commit 6e189f6073e979ceccaf05c3bb5f495a1b9ed87e
+
+inline, defaults to "extern inline" with newer gcc versions
+
+With newer versions of gcc, "inline" defaults to extern, and not static if
+not specified. This causes linking problems at the end of the compile. Most
+of this occurences are fixed (or #ifdef'ed away) except these two small
+ones in timidity/mfi.c
+
+Signed-off-by: Stian Skjelstad <stian.skjelstad@...>
+
+--- a/timidity/mfi.c   2004-02-17 17:02:18.000000000 +0100 
++++ b/timidity/mfi.c   2017-02-14 04:41:24.000000000 +0100 
+@@ -344,7 +344,7 @@
+ #define SEND_LASTNOTEINFO(lni, ch)                            if 
(LASTNOTEINFO_HAS_DATA((lni)[ch])) SendLastNoteInfo(lni, ch);
+ #define SEND_AND_CLEAR_LASTNOTEINFO(lni, ch)  if 
(LASTNOTEINFO_HAS_DATA((lni)[ch])) { SendLastNoteInfo(lni, ch); (lni)[ch].on = 
NO_LAST_NOTE_INFO; }
+ 
+-inline void StoreLastNoteInfo(LastNoteInfo *info, int channel, int time, int 
duration, int note, int velocity)
++static inline void StoreLastNoteInfo(LastNoteInfo *info, int channel, int 
time, int duration, int note, int velocity)
+ {
+       info[channel].on = time;
+       info[channel].off = time + duration;
+@@ -352,7 +352,7 @@
+       info[channel].velocity = velocity;
+ }
+ 
+-inline void SendLastNoteInfo(const LastNoteInfo *info, int channel)
++static inline void SendLastNoteInfo(const LastNoteInfo *info, int channel)
+ {
+       NOTE_BUF_EV_DEBUGSTR(channel, info[channel].on, 
note_name[info[channel].note % 12], info[channel].note / 12, 
info[channel].velocity, info[channel].off);
+       MIDIEVENT(info[channel].on, ME_NOTEON, channel, info[channel].note, 
info[channel].velocity);

diff --git a/media-sound/timidity++/timidity++-2.14.0-r3.ebuild 
b/media-sound/timidity++/timidity++-2.14.0-r3.ebuild
index 5a1770ebcfd..e754067be07 100644
--- a/media-sound/timidity++/timidity++-2.14.0-r3.ebuild
+++ b/media-sound/timidity++/timidity++-2.14.0-r3.ebuild
@@ -63,6 +63,7 @@ PATCHES=(
        "${FILESDIR}"/${P}-configure-flags.patch
        "${FILESDIR}"/${P}-pkg-config.patch
        "${FILESDIR}"/${P}-CVE-2017-1154{6,7}.patch
+       "${FILESDIR}"/${P}-gcc5.patch # bug 606894
 )
 
 src_prepare() {

Reply via email to