summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2013-10-15 14:41:35 +0000
committer Eric Hameleers <alien@slackware.com>2013-10-15 14:41:35 +0000
commitae315ea522380c1d5433ec5f03b0d950295b8c0d (patch)
tree8bf0a63c2e72b9ea3179627f47ef95c2cdf3d234
parentaea63f18da628633cce2b3356cf8d5b59b08ab02 (diff)
downloadasb-ae315ea522380c1d5433ec5f03b0d950295b8c0d.tar.gz
asb-ae315ea522380c1d5433ec5f03b0d950295b8c0d.tar.xz
Update to 5.1.5
-rwxr-xr-xlua/build/lua.SlackBuild36
1 files changed, 20 insertions, 16 deletions
diff --git a/lua/build/lua.SlackBuild b/lua/build/lua.SlackBuild
index 85c303a8..999c200e 100755
--- a/lua/build/lua.SlackBuild
+++ b/lua/build/lua.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# $Id$
-# Copyright 2009, 2011 Eric Hameleers, Eindhoven, NL
+# Copyright 2009, 2011, 2013 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -35,6 +35,9 @@
# 5.1.4-2: 26/Aug/2011 by Eric Hameleers <alien@slackware.com>
# * Rebuilt for Slackware 13.37 using an official patch which
# squashes several bugs.
+# 5.1.5-1: 15/oct/2013 by Eric Hameleers, Eindhoven, NL
+# * Update. Note that Lua 5.2 is incompatible with most programs
+# that use it.
#
# Run 'sh lua.SlackBuild' to build a Slackware package.
# The package (.tgz) and .txt file as well as build logs are created in /tmp .
@@ -45,8 +48,8 @@
# Set initial variables:
PRGNAM=lua
-VERSION=${VERSION:-5.1.4}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-5.1.5}
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:" -j4 "}
TAG=${TAG:-alien}
@@ -61,25 +64,23 @@ TMP=${TMP:-/tmp/build}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-# Input URL: http://www.lua.org/ftp/lua-5.1.4.tar.gz
SOURCE[0]="$SRCDIR/${PRGNAM}-${VERSION}.tar.gz"
SRCURL[0]="http://www.lua.org/ftp/${PRGNAM}-${VERSION}.tar.gz"
-# Official patch to fix several bugs:
-SOURCE[1]="$SRCDIR/patch-${PRGNAM}-${VERSION}-3"
-SRCURL[1]="http://www.lua.org/ftp/patch-${PRGNAM}-${VERSION}-3"
-
##
## --- with a little luck, you won't have to edit below this point --- ##
##
# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
- arm*) export ARCH=arm ;;
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ armv6hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$( uname -m ) ;;
+ *) export ARCH=$MARCH ;;
esac
fi
@@ -90,6 +91,12 @@ case "$ARCH" in
x86_64) SLKCFLAGS="-O2 -fPIC"
SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
;;
+ armv7hl) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ;;
+ armv6hl) SLKCFLAGS="-O2 -march=armv6 -mfpu=vfp -mfloat-abi=hard"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ;;
*) SLKCFLAGS="-O2"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
@@ -153,16 +160,13 @@ echo "Extracting the source archive(s) for $PRGNAM..."
tar -xvf ${SOURCE[0]}
cd ${PRGNAM}-${VERSION}
-# Official patch:
-cat ${SOURCE[1]} | patch -p0 --verbose 2>&1 | tee $OUTPUT/patch-$PRGNAM.log
-
# These fixes are needed to build a sane Slackware package:
sed -i "s/-DLUA_USE_LINUX/\"-DLUA_USE_LINUX $SLKCFLAGS\"/g" src/Makefile
sed -i "s#/lib#/lib${LIBDIRSUFFIX}#g" Makefile
sed -i "/^INSTALL_TOP=/s#/usr/local#/usr#" Makefile
sed -i "/^prefix=/s#/usr/local#/usr#" etc/lua.pc
sed -i "/^#define LUA_ROOT/s#/usr/local/#/usr/#" src/luaconf.h
-cat $SRCDIR/lua-5.1.4-shared.diff | patch -p1 --verbose \
+cat $SRCDIR/lua-${VERSION}-shared.diff | patch -p1 --verbose \
2>&1 | tee $OUTPUT/patch-$PRGNAM.log
chown -R root:root .