summaryrefslogtreecommitdiffstats
path: root/carla
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2021-05-01 20:31:15 +0000
committer Eric Hameleers <alien@slackware.com>2021-05-01 20:31:15 +0000
commit3dcb70b3b9a4470d448f96e536b06f58101c2895 (patch)
tree6054ad9ac0f3e8762d39efeb0d88d4f4596546c4 /carla
parentfb0cd387b2a1a535cbb0c9aceda8c68e8972d73e (diff)
downloadasb-3dcb70b3b9a4470d448f96e536b06f58101c2895.tar.gz
asb-3dcb70b3b9a4470d448f96e536b06f58101c2895.tar.xz
carla: first determine ARCH before using it
Diffstat (limited to 'carla')
-rwxr-xr-xcarla/build/carla.SlackBuild23
1 files changed, 12 insertions, 11 deletions
diff --git a/carla/build/carla.SlackBuild b/carla/build/carla.SlackBuild
index 940dca58..89b8b484 100755
--- a/carla/build/carla.SlackBuild
+++ b/carla/build/carla.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# $Id$
-# Copyright 2020 Eric Hameleers, Eindhoven, NL
+# Copyright 2020, 2021 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -54,6 +54,17 @@ TAG=${TAG:-alien}
DOCS="INSTALL.md README.md doc/*"
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
# Determine whether we have the tools to compile the Windows VST support:
if [ "$ARCH" == "x86_64" ]; then
WIN_COMPILERS="x86_64-w64-mingw32-gcc i686-w64-mingw32-gcc winegcc"
@@ -90,16 +101,6 @@ SRCURL="https://github.com/falkTX/${PRGNAM}/archive/v${VERSION}.tar.gz"
## --- with a little luck, you won't have to edit below this point --- ##
##
-# Automatically determine the architecture we're building on:
-if [ -z "$ARCH" ]; then
- case "$(uname -m)" in
- i?86) ARCH=i586 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) ARCH=$(uname -m) ;;
- esac
- export ARCH
-fi
# Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
case "$ARCH" in
i?86) SLKCFLAGS="-O2 -march=${ARCH} -mtune=i686"