aboutsummaryrefslogtreecommitdiff
path: root/audio/ocp
diff options
context:
space:
mode:
authorWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-02-04 08:49:32 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-02-04 17:53:43 +0700
commit9182ddf402cf906106adb42c1c1535749e95fe81 (patch)
treee4dbf9dc50889c06e4fec004005147c455f7800a /audio/ocp
parent1c12190b9d55f245eb8b287a057bddea0751ad85 (diff)
audio/ocp: Fix build.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org> Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>
Diffstat (limited to 'audio/ocp')
-rw-r--r--audio/ocp/configure.ac.diff67
-rw-r--r--audio/ocp/ocp.SlackBuild2
2 files changed, 69 insertions, 0 deletions
diff --git a/audio/ocp/configure.ac.diff b/audio/ocp/configure.ac.diff
new file mode 100644
index 0000000000000..906aeb8bb1188
--- /dev/null
+++ b/audio/ocp/configure.ac.diff
@@ -0,0 +1,67 @@
+From 21ebd384f78d9933b6e58554db5726e4b3c42efa Mon Sep 17 00:00:00 2001
+From: Stian Skjelstad <stian.skjelstad@gmail.com>
+Date: Wed, 3 Feb 2021 10:41:31 +0100
+Subject: [PATCH] Do not block unknown compiler-versions. We do deny-list
+ instead of allow-list. Fixes #30
+
+---
+ configure | 16 +++++-----------
+ configure.ac | 14 ++++----------
+ 2 files changed, 9 insertions(+), 21 deletions(-)
+
+diff --git a/configure b/configure
+index 004dad4..59227f1 100755
+--- a/configure
++++ b/configure
+@@ -6470,19 +6470,13 @@ else
+ '')
+ as_fn_error $? "not found" "$LINENO" 5;
+ ;;
+- 2.95.[2-9]|2.95.[2-9][-].*|3.[0-9]|3.[0-9].[0-9]|3.[0-9]|3.[0-9].[0-9]-*|4.*|5.*|6.*|7*|8*|9*|10*)
+- _cc_major=`echo $cc_version | cut -d '.' -f 1`
+- _cc_minor=`echo $cc_version | cut -d '.' -f 2`
+- _cc_mini=`echo $cc_version | cut -d '.' -f 3`
+- if test $_cc_major -gt 2; then
+- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cc_version, ok" >&5
+-$as_echo "$cc_version, ok" >&6; }
+- else
+- as_fn_error $? "$cc_version, bad" "$LINENO" 5
+- fi
++# old GCC versions in the 2.95.xx family are known to produce bad crashing binaries (it is still out there on some old systems. In general the all versions before 3.0 is risky
++ 2.95.[2-9]|2.95.[2-9][-].*)
++ as_fn_error $? "$cc_version, bad" "$LINENO" 5
+ ;;
+ *)
+- as_fn_error $? "$cc_version, bad" "$LINENO" 5
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cc_version, ok" >&5
++$as_echo "$cc_version, ok" >&6; }
+ ;;
+ esac
+ fi
+diff --git a/configure.ac b/configure.ac
+index fdf3f38..57d9138 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -132,18 +132,12 @@ else
+ '')
+ AC_MSG_ERROR([not found]);
+ ;;
+- 2.95.[[2-9]]|2.95.[[2-9]][[-]].*|3.[[0-9]]|3.[[0-9]].[[0-9]]|3.[[0-9]]|3.[[0-9]].[[0-9]]-*|4.*|5.*|6.*|7*|8*|9*|10*)
+- _cc_major=`echo $cc_version | cut -d '.' -f 1`
+- _cc_minor=`echo $cc_version | cut -d '.' -f 2`
+- _cc_mini=`echo $cc_version | cut -d '.' -f 3`
+- if test $_cc_major -gt 2; then
+- AC_MSG_RESULT([$cc_version, ok])
+- else
+- AC_MSG_ERROR([$cc_version, bad])
+- fi
++# old GCC versions in the 2.95.xx family are known to produce bad crashing binaries (it is still out there on some old systems. In general the all versions before 3.0 is risky
++ 2.95.[[2-9]]|2.95.[[2-9]][[-]].*)
++ AC_MSG_ERROR([$cc_version, bad])
+ ;;
+ *)
+- AC_MSG_ERROR([$cc_version, bad])
++ AC_MSG_RESULT([$cc_version, ok])
+ ;;
+ esac
+ fi
diff --git a/audio/ocp/ocp.SlackBuild b/audio/ocp/ocp.SlackBuild
index 8d21d192a04f2..2e77ea34629a0 100644
--- a/audio/ocp/ocp.SlackBuild
+++ b/audio/ocp/ocp.SlackBuild
@@ -79,6 +79,8 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+patch -p1 <$CWD/configure.ac.diff
+autoconf
CFLAGS="$SLKCFLAGS -w -Wl,--allow-multiple-definition" \
./configure \
--prefix=/usr \