media-sound/jack2: fix compilation with GCC 7
authorKarl Linden <karl.j.linden@gmail.com>
Sun, 3 Dec 2017 19:32:19 +0000 (20:32 +0100)
committerAlexis Ballier <aballier@gentoo.org>
Mon, 4 Dec 2017 09:29:52 +0000 (10:29 +0100)
Closes: https://bugs.gentoo.org/629570
Package-Manager: Portage-2.3.16, Repoman-2.3.6

media-sound/jack2/files/jack2-1.9.11_rc1-gcc7.patch [new file with mode: 0644]
media-sound/jack2/jack2-1.9.11_rc1-r1.ebuild

diff --git a/media-sound/jack2/files/jack2-1.9.11_rc1-gcc7.patch b/media-sound/jack2/files/jack2-1.9.11_rc1-gcc7.patch
new file mode 100644 (file)
index 0000000..dcde5fb
--- /dev/null
@@ -0,0 +1,19 @@
+commit f7bccdca651592cc4082b28fd4a01ed6ef8ab655
+Author: Kjetil Matheussen <k.s.matheussen@notam02.no>
+Date:   Sat Jul 15 13:21:59 2017 +0200
+
+    Tests: Fix compilation with gcc7
+
+diff --git a/tests/test.cpp b/tests/test.cpp
+index 8a8a8117..d2ef9a05 100644
+--- a/tests/test.cpp
++++ b/tests/test.cpp
+@@ -479,7 +479,7 @@ int process4(jack_nframes_t nframes, void *arg)
+       jack_nframes_t delta_time = cur_time - last_time;
+       Log("calling process4 callback : jack_frame_time = %ld delta_time = %ld\n", cur_time, delta_time);
+-      if (delta_time > 0  && (jack_nframes_t)abs(delta_time - cur_buffer_size) > tolerance) {
++      if (delta_time > 0  && abs((int64_t)delta_time - (int64_t)cur_buffer_size) > (int64_t)tolerance) {
+               printf("!!! ERROR !!! jack_frame_time seems to return incorrect values cur_buffer_size = %d, delta_time = %d tolerance %d\n", cur_buffer_size, delta_time, tolerance);
+       }
index 0823bd254c5ab33d0cd873948fc30254407b0666..3b62bb738cce5fc0cb29da5ef7af5841d52dd749 100644 (file)
@@ -49,6 +49,10 @@ RDEPEND="${CDEPEND}
 
 DOCS=( ChangeLog README README_NETJACK2 TODO )
 
+PATCHES=(
+       "${FILESDIR}"/${P}-gcc7.patch
+)
+
 src_prepare() {
        default
        multilib_copy_sources