diff options
Diffstat (limited to 'source.local/ap/mpg123/mpg123.SlackBuild')
-rwxr-xr-x | source.local/ap/mpg123/mpg123.SlackBuild | 62 |
1 files changed, 34 insertions, 28 deletions
diff --git a/source.local/ap/mpg123/mpg123.SlackBuild b/source.local/ap/mpg123/mpg123.SlackBuild index 61cc066..02c515f 100755 --- a/source.local/ap/mpg123/mpg123.SlackBuild +++ b/source.local/ap/mpg123/mpg123.SlackBuild @@ -23,54 +23,60 @@ PKGNAM=mpg123 -VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +VERSION=${VERSION:-1.14.4} BUILD=${BUILD:-1} NUMJOBS=${NUMJOBS:-" -j7 "} -# Automatically determine the architecture we're building on: -MARCH=$( uname -m ) -if [ -z "$ARCH" ]; then - case "$MARCH" in - i?86) export ARCH=i486 ;; - armv7hl) export ARCH=$MARCH ;; - arm*) export ARCH=arm ;; - # Unless $ARCH is already set, use uname -m for all other archs: - *) export ARCH=$MARCH ;; - esac +if [ -e $CWD/machine.conf ]; then + . $CWD/machine.conf ] +elif [ -e /etc/slackbuild/machine.conf ]; then + . /etc/slackbuild/machine.conf ] +else + # Automatically determine the architecture we're building on: + if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac + fi + # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX: + if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" + elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" + elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" + else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" + fi fi +case "$ARCH" in + arm*) TARGET=$ARCH-slackware-linux-gnueabi ;; + *) TARGET=$ARCH-slackware-linux ;; +esac + if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" - LIBDIRSUFFIX="" CPUTARGET="x86" elif [ "$ARCH" = "s390" ]; then - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" CPUTARGET="" elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" CPUTARGET="x86-64" elif [ "$ARCH" = "arm" ]; then - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" CPUTARGET="arm_nofpu" elif [ "$ARCH" = "armv7hl" ]; then - SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16" - LIBDIRSUFFIX="" CPUTARGET="generic_fpu" else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" CPUTARGET="generic_fpu" fi -case "$ARCH" in - arm*) TARGET=$ARCH-slackware-linux-gnueabi ;; - *) TARGET=$ARCH-slackware-linux ;; -esac - # configure --help shows the following re TARGET: # --with-cpu=i386_fpu Use code optimized for i386 processors with floating point arithmetic # --with-cpu=i386_nofpu Use code optimized for i386 processors with fixed point arithmetic (experimental) |