diff options
Diffstat (limited to 'source/d/pmake')
-rwxr-xr-x | source/d/pmake/pmake.SlackBuild | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/source/d/pmake/pmake.SlackBuild b/source/d/pmake/pmake.SlackBuild index a5d1e27e..23cc58d4 100755 --- a/source/d/pmake/pmake.SlackBuild +++ b/source/d/pmake/pmake.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2006-2009 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2006-2011 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,8 +23,17 @@ PKGNAM=pmake VERSION=${VERSION:-1.111} -ARCH=${ARCH:-x86_64} -BUILD=${BUILD:-3} +BUILD=${BUILD:-4} + +# 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 CWD=$(pwd) TMP=${TMP:-/tmp} @@ -42,6 +51,8 @@ elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2 -Wall -DMACHINE_ARCH=\\\"${ARCH}\\\" -DHAVE_SETENV -DHAVE_STRERROR -DHAVE_STRDUP -DHAVE_STRFTIME -DHAVE_VSNPRINTF -D_GNU_SOURCE" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC -Wall -DMACHINE_ARCH=\\\"${ARCH}\\\" -DHAVE_SETENV -DHAVE_STRERROR -DHAVE_STRDUP -DHAVE_STRFTIME -DHAVE_VSNPRINTF -D_GNU_SOURCE" +else + SLKCFLAGS="-O2 -Wall -DMACHINE_ARCH=\\\"${ARCH}\\\" -DHAVE_SETENV -DHAVE_STRERROR -DHAVE_STRDUP -DHAVE_STRFTIME -DHAVE_VSNPRINTF -D_GNU_SOURCE" fi cd $TMP |