media-sound/klick: Fix build with gcc6
authorHarri Nieminen <moikkis@gmail.com>
Sat, 4 Mar 2017 13:08:43 +0000 (15:08 +0200)
committerDavid Seifert <soap@gentoo.org>
Tue, 7 Mar 2017 09:10:09 +0000 (10:10 +0100)
Patch from Peter Levine <plevine457@gmail.com>

Package-Manager: Portage-2.3.4, Repoman-2.3.2
Closes: https://github.com/gentoo/gentoo/pull/4119

media-sound/klick/files/klick-0.12.2-gcc6.patch [new file with mode: 0644]
media-sound/klick/klick-0.12.2.ebuild

diff --git a/media-sound/klick/files/klick-0.12.2-gcc6.patch b/media-sound/klick/files/klick-0.12.2-gcc6.patch
new file mode 100644 (file)
index 0000000..c8c0712
--- /dev/null
@@ -0,0 +1,44 @@
+--- klick-0.12.2/src/metronome_map.hh.old      2016-09-21 22:17:41.364102201 -0400
++++ klick-0.12.2/src/metronome_map.hh  2016-09-21 22:28:50.611858765 -0400
+@@ -48,7 +48,7 @@
+     virtual void timebase_callback(position_t *);
+   private:
+-    static double const TICKS_PER_BEAT = 1920.0;
++    static double const TICKS_PER_BEAT;
+     // transport position
+     nframes_t _current;
+--- klick-0.12.2/src/metronome_map.cc.old      2016-09-21 22:27:01.551067088 -0400
++++ klick-0.12.2/src/metronome_map.cc  2016-09-21 22:28:49.027158380 -0400
+@@ -195,3 +195,5 @@
+         p->beats_per_minute = _pos.map_entry().tempi[n];
+     }
+ }
++
++double const MetronomeMap::TICKS_PER_BEAT = 1920.0;
+--- klick-0.12.2/src/metronome_simple.hh.old   2016-09-21 22:18:57.674628602 -0400
++++ klick-0.12.2/src/metronome_simple.hh       2016-09-21 22:29:04.307859355 -0400
+@@ -58,9 +58,9 @@
+   private:
+-    static int const MAX_TAPS = 5;
+-    static float const MAX_TAP_AGE = 3.0;
+-    static float const TAP_DIFF = 0.2;
++    static int const MAX_TAPS;
++    static float const MAX_TAP_AGE;
++    static float const TAP_DIFF;
+     float _tempo;
+     float _tempo_increment, _tempo_start, _tempo_limit;
+--- klick-0.12.2/src/metronome_simple.cc.old   2016-09-21 22:27:24.883846428 -0400
++++ klick-0.12.2/src/metronome_simple.cc       2016-09-21 22:28:46.015859632 -0400
+@@ -217,3 +217,7 @@
+     _frame += nframes;
+ }
++
++int const MetronomeSimple::MAX_TAPS = 5;
++float const MetronomeSimple::MAX_TAP_AGE = 3.0;
++float const MetronomeSimple::TAP_DIFF = 0.2;
index dd759d3f215c386d73804fa76aff0314b736369b..9a853d94a0a59db9e367d51275892d369f566c29 100644 (file)
@@ -1,7 +1,7 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="6"
+EAPI=6
 
 inherit scons-utils toolchain-funcs
 
@@ -23,7 +23,10 @@ RDEPEND="dev-libs/boost
 DEPEND="${RDEPEND}
        virtual/pkgconfig"
 
-PATCHES=( "${FILESDIR}"/${P}-sconstruct.patch )
+PATCHES=(
+       "${FILESDIR}"/${P}-sconstruct.patch
+       "${FILESDIR}"/${P}-gcc6.patch
+)
 
 HTML_DOCS=( doc/manual.html )