aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Spencer <idlemoor@slackbuilds.org>2016-01-23 14:18:37 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-01-26 18:58:51 +0700
commitb061414ba2917ba0433bfeb0bb00c35964d73e43 (patch)
tree48f054f801233e121f044118e3b47330cd333748
parent9daeef70968326b6e61d7b281effa72909b525fc (diff)
graphics/Alchemy: Fixed build on i586.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
-rw-r--r--graphics/Alchemy/Alchemy.SlackBuild31
1 files changed, 12 insertions, 19 deletions
diff --git a/graphics/Alchemy/Alchemy.SlackBuild b/graphics/Alchemy/Alchemy.SlackBuild
index b1108caa3cb1..9763f41871ba 100644
--- a/graphics/Alchemy/Alchemy.SlackBuild
+++ b/graphics/Alchemy/Alchemy.SlackBuild
@@ -27,10 +27,17 @@ VERSION=${VERSION:-008}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-case "$( uname -m )" in
- i?86) ARCH=i686 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
+ARCH=${ARCH:-$(uname -m)}
+case "$ARCH" in
+ i?86) SRCSUFFIX=""
+ LIBDIRSUFFIX=""
+ ;;
+ x86_64) SRCSUFFIX="-x86_64"
+ LIBDIRSUFFIX="64"
+ ;;
+ *) echo "$ARCH is not supported"
+ exit 1
+ ;;
esac
CWD=$(pwd)
@@ -38,20 +45,6 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
set -e
rm -rf $PKG
@@ -71,7 +64,7 @@ mkdir -p $PKG/usr/share/$PRGNAM
cp -r {modules,shapes} $PKG/usr/share/$PRGNAM
cp {Alchemy,Alchemy.jar,AlchemyOpenGL} $PKG/usr/share/$PRGNAM
mkdir -p $PKG/lib$LIBDIRSUFFIX
-cp lib/libjpen-2-2-$ARCH.so $PKG/lib$LIBDIRSUFFIX/
+cp lib/libjpen-2-2$SRCSUFFIX.so $PKG/lib$LIBDIRSUFFIX/
mkdir -p $PKG/usr/bin
cp $CWD/files/{alchemy,alchemyOpenGL} $PKG/usr/bin
chmod +x $PKG/usr/bin/*