summaryrefslogtreecommitdiffstats
path: root/source.local/ap/zsh/zsh.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source.local/ap/zsh/zsh.SlackBuild')
-rwxr-xr-xsource.local/ap/zsh/zsh.SlackBuild62
1 files changed, 30 insertions, 32 deletions
diff --git a/source.local/ap/zsh/zsh.SlackBuild b/source.local/ap/zsh/zsh.SlackBuild
index 72b7daa..7e11014 100755
--- a/source.local/ap/zsh/zsh.SlackBuild
+++ b/source.local/ap/zsh/zsh.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011, 2012 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,38 +24,39 @@
PKGNAM=zsh
-VERSION=${VERSION:-$(echo ${PKGNAM}-4.*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+VERSION=${VERSION:-5.0.2}
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
-fi
-
-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"
-elif [ "$ARCH" = "armv7hl" ]; then
- SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
- LIBDIRSUFFIX=""
+if [ -e $CWD/machine.conf ]; then
+ . $CWD/machine.conf ]
+elif [ -e /etc/slackbuild/machine.conf ]; then
+ . /etc/slackbuild/machine.conf ]
else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
+ # 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
@@ -81,9 +82,6 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# fix regex crash:
-zcat $CWD/zsh.regex.oh.bah.diff.gz | patch -p0 --verbose || exit 1
-
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
@@ -97,7 +95,7 @@ make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
mv $PKG/usr/bin $PKG
-( cd $PKG/bin ; ln -sf zsh $PKGNAM-$VERSION )
+( cd $PKG/bin ; ln -sf zsh zsh-$VERSION )
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null