[arch-commits] Commit in jack2/trunk (PKGBUILD gcc6.patch)

Bartłomiej Piotrowski bpiotrowski at archlinux.org
Mon Nov 7 09:19:21 UTC 2016


    Date: Monday, November 7, 2016 @ 09:19:20
  Author: bpiotrowski
Revision: 194862

Fix build with GCC 6

Added:
  jack2/trunk/gcc6.patch
Modified:
  jack2/trunk/PKGBUILD

------------+
 PKGBUILD   |   16 +++++++++++----
 gcc6.patch |   62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 74 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-11-07 09:10:09 UTC (rev 194861)
+++ PKGBUILD	2016-11-07 09:19:20 UTC (rev 194862)
@@ -18,11 +18,13 @@
 source=("https://dl.dropbox.com/u/28869550/jack-$pkgver.tar.bz2"
         '99-audio.conf'
         '40-hpet-permissions.rules'
-        'jack1compat.diff')
+        'jack1compat.diff'
+        'gcc6.patch')
 md5sums=('4aeb91d7ae0cabce98355436ed4f217a'
          'ae65b7c9ebe0fff6c918ba9d97ae342d'
          '471aad533ff56c5d3cbbf65ce32cadef'
-         '8c367d60a6375ebacf0d53ad651a0486')
+         '8c367d60a6375ebacf0d53ad651a0486'
+         '2a28b64d7672f9c38dd777e380b81291')
 
 _isbuild() {
   printf "%s\n" ${pkgname[@]} | grep -qx $1
@@ -55,11 +57,17 @@
   #sed -i 's:build/default/html:html:' $_tarname-$pkgver/wscript
 
 
-  # see https://bugs.archlinux.org/task/47839
-  (cd $_tarname-$pkgver && patch -Np1 -i $srcdir/jack1compat.diff)
+  (
+    cd $_tarname-$pkgver
+    patch -Np1 -i $srcdir/gcc6.patch
 
+    # see https://bugs.archlinux.org/task/47839
+    patch -Np1 -i $srcdir/jack1compat.diff
+  )
+
   # we may do 2 different builds
   cp -r $_tarname-$pkgver $_tarname-dbus-$pkgver
+
 }
 
 build() {

Added: gcc6.patch
===================================================================
--- gcc6.patch	                        (rev 0)
+++ gcc6.patch	2016-11-07 09:19:20 UTC (rev 194862)
@@ -0,0 +1,62 @@
+From ff1ed2c4524095055140370c1008a2d9cccc5645 Mon Sep 17 00:00:00 2001
+From: Adrian Knoth <adi at drcomp.erfurt.thur.de>
+Date: Sat, 11 Jun 2016 05:35:07 +0200
+Subject: [PATCH] Fix initialization in test/iodelay.cpp
+
+jack_latency_range_t is
+
+struct _jack_latency_range {
+    jack_nframes_t min;
+    jack_nframes_t max;
+};
+
+and jack_nframes_t is
+
+typedef uint32_t        jack_nframes_t;
+
+so it's unsigned. Initialising it with -1 is invalid (at least in C++14). We cannot use {0, 0}, because latency_cb has
+
+   jack_latency_range_t range;
+   range.min = range.max = 0;
+   if ((range.min != capture_latency.min) || (range.max !=
+       capture_latency.max)) {
+       capture_latency = range;
+   }
+
+so we must not have {0, 0}, otherwise the condition would never be true.
+
+Using UINT32_MAX should be equivalent to the previous -1.
+---
+ tests/iodelay.cpp | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/tests/iodelay.cpp b/tests/iodelay.cpp
+index e1ba63f..1ef470f 100644
+--- a/tests/iodelay.cpp
++++ b/tests/iodelay.cpp
+@@ -20,6 +20,7 @@
+ 
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <stdint.h>
+ #include <math.h>
+ #include <unistd.h>
+ #include <jack/jack.h>
+@@ -167,8 +168,8 @@ static jack_client_t  *jack_handle;
+ static jack_port_t    *jack_capt;
+ static jack_port_t    *jack_play;
+ 
+-jack_latency_range_t   capture_latency = {-1, -1};
+-jack_latency_range_t   playback_latency = {-1, -1};
++jack_latency_range_t   capture_latency = {UINT32_MAX, UINT32_MAX};
++jack_latency_range_t   playback_latency = {UINT32_MAX, UINT32_MAX};
+ 
+ void
+ latency_cb (jack_latency_callback_mode_t mode, void *arg)
+@@ -266,4 +267,4 @@ int main (int ac, char *av [])
+     return 0;
+ }
+ 
+-// --------------------------------------------------------------------------------
+\ No newline at end of file
++// --------------------------------------------------------------------------------



More information about the arch-commits mailing list