From 218b6c3c8a1726e7cc6490e1b93bcbb34753dab0 Mon Sep 17 00:00:00 2001 From: B. Watson Date: Thu, 22 Jun 2017 16:29:44 -0400 Subject: audio/caps: Fix build for -current. Signed-off-by: B. Watson --- audio/caps/caps.SlackBuild | 4 ++++ audio/caps/gcc7fix.diff | 12 ++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 audio/caps/gcc7fix.diff (limited to 'audio') diff --git a/audio/caps/caps.SlackBuild b/audio/caps/caps.SlackBuild index e82ba01443..f197d318d1 100644 --- a/audio/caps/caps.SlackBuild +++ b/audio/caps/caps.SlackBuild @@ -6,6 +6,8 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20170622 bkw: fix build on -current + PRGNAM=caps VERSION=${VERSION:-0.9.24} BUILD=${BUILD:-1} @@ -55,6 +57,8 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +patch -p1 < $CWD/gcc7fix.diff + if [ "$FORCE_SLACK_CFLAGS" = "yes" ]; then make OPTS="$SLKCFLAGS" ARCH="" else diff --git a/audio/caps/gcc7fix.diff b/audio/caps/gcc7fix.diff new file mode 100644 index 0000000000..13080687d8 --- /dev/null +++ b/audio/caps/gcc7fix.diff @@ -0,0 +1,12 @@ +diff -Naur caps-0.9.24/AutoFilter.cc caps-0.9.24.patched/AutoFilter.cc +--- caps-0.9.24/AutoFilter.cc 2014-11-10 03:12:26.000000000 -0500 ++++ caps-0.9.24.patched/AutoFilter.cc 2017-06-22 16:26:26.421820579 -0400 +@@ -69,7 +69,7 @@ + void + AutoFilter::cycle (uint frames) + { +- div_t qr = div (frames, blocksize); ++ div_t qr = div ((int)frames, (int)blocksize); + int blocks = qr.quot; + if (qr.rem) ++blocks; + double over_blocks = 1./blocks; -- cgit v1.2.3