diff options
author | Menno Duursma <druiloor@zonnet.nl> | 2010-05-13 00:24:56 +0200 |
---|---|---|
committer | David Somero <xgizzmo@slackbuilds.org> | 2010-05-13 00:24:56 +0200 |
commit | 2e1ec1373428703e0e4ee07944f861f067b76120 (patch) | |
tree | 19718edbd10b54263d6426724d2cbd2aa04fe9ee | |
parent | 24a5106fc4979a65cb6e1c758f2e63c9c6a4f23f (diff) |
development/lua: Updated for version 5.1.4
-rw-r--r-- | development/lua/README | 3 | ||||
-rw-r--r-- | development/lua/lua.SlackBuild | 90 | ||||
-rw-r--r-- | development/lua/lua.info | 10 | ||||
-rw-r--r-- | development/lua/slack-desc | 8 |
4 files changed, 63 insertions, 48 deletions
diff --git a/development/lua/README b/development/lua/README index ebd2ec253c4f3..3073c0d962eba 100644 --- a/development/lua/README +++ b/development/lua/README @@ -1,6 +1,3 @@ Lua is a free software light-weight programming language designed for extending applications. Lua is also frequently used as a general-purpose, stand-alone scripting language. - -Note: The download link in the info file is for a patched copy of the -lua source; it has been patched to allow the use of autotools. diff --git a/development/lua/lua.SlackBuild b/development/lua/lua.SlackBuild index 946b79aff119a..0f8d7ac4164a2 100644 --- a/development/lua/lua.SlackBuild +++ b/development/lua/lua.SlackBuild @@ -4,11 +4,16 @@ # Written by Menno Duursma # Modified by the SlackBuilds.org project +# Modified by Aaron W. Hsu + +# This program is free software. It comes without any warranty. +# Granted WTFPL, Version 2, as published by Sam Hocevar. See +# http://sam.zoy.org/wtfpl/COPYING for more details. PRGNAM=lua -VERSION=5.1.4 +VERSION=${VERSION:-5.1.4} ARCH=${ARCH:-i486} -BUILD=${BUILD:-1} +BUILD=${BUILD:-4} TAG=${TAG:-_SBo} CWD=$(pwd) @@ -25,50 +30,64 @@ elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT -cd $TMP || exit 1 +cd $TMP rm -rf $PRGNAM-$VERSION -# Note: You must use the patched source at -# http://slackbuilds.org/sources/12.2/lua-5.1.4_autotools.tar.bz2 -# or this build will fail. -tar xvf $CWD/$PRGNAM-${VERSION}_autotools.tar.bz2|| exit 1 -cd $PRGNAM-$VERSION || exit 1 +tar xvf $CWD/$PRGNAM-${VERSION}.tar.gz +cd $PRGNAM-$VERSION chown -R root:root . -chmod -R a-s,u+rw,go-w+r . -chmod u+x autogen.sh config.guess \ - config.sub configure depcomp \ - install-sh missing - -CFLAGS="$SLKCFLAGS" \ -./configure \ - --with-readline \ - --prefix=/usr \ - --libdir=/usr/lib$LIBDIRSUFFIX || exit 1 - -sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool -sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool - -make -make install DESTDIR=/$PKG - -# Let's make sure all of the library symlinks correctly exist -( cd $PKG/usr/lib$LIBDIRSUFFIX - ln -sf liblua.so.${VERSION} liblua.so.5 - ln -sf liblua.so.${VERSION} liblua.so - chmod 0755 liblua.so.${VERSION} -) + +# Fix up a to-be-installed header and the pkgconfig file +sed -i "s|/usr/local|/usr|" src/luaconf.h +sed -i "s|lib/lua|lib$LIBDIRSUFFIX/lua|" src/luaconf.h +sed -i "s|/usr/local|/usr|" etc/lua.pc +sed -i "s|prefix}/lib|prefix}/lib${LIBDIRSUFFIX}|g" etc/lua.pc + +make linux \ + CFLAGS="$SLKCFLAGS \$(MYCFLAGS)" \ + INSTALL_TOP=/usr \ + INSTALL_LIB=/usr/lib${LIBDIRSUFFIX} \ + INSTALL_LMOD=/usr/share/lua/5.1 \ + INSTALL_CMOD=/usr/lib${LIBDIRSUFFIX}/lua/5.1 + +make linux install \ + CFLAGS="$SLKCFLAGS \$(MYCFLAGS)" \ + INSTALL_TOP=$PKG/usr \ + INSTALL_LIB=$PKG/usr/lib${LIBDIRSUFFIX} \ + INSTALL_LMOD=$PKG/usr/share/lua/5.1 \ + INSTALL_CMOD=$PKG/usr/lib${LIBDIRSUFFIX}/lua/5.1 + +# Now let's build the shared library +mkdir -p shared +cd shared + ar -x $PKG/usr/lib${LIBDIRSUFFIX}/liblua.a + gcc -ldl -lreadline -lhistory -lncurses -shared *.o -o liblua.so.5.1.4 + cp -a liblua.so.5.1.4 $PKG/usr/lib${LIBDIRSUFFIX} + ( cd $PKG/usr/lib${LIBDIRSUFFIX} + ln -s liblua.so.5.1.4 liblua.so.5.1 + ln -s liblua.so.5.1.4 liblua.so.5 + ln -s liblua.so.5.1.4 liblua.so + ) +cd - + +# and install the pkgconfig file +mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig +cat etc/lua.pc > $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/lua.pc ( cd $PKG find . -type f | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ - xargs strip --strip-unneeded 2> /dev/null + xargs strip --strip-unneeded 2> /dev/null || true find . -type f | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ xargs strip --strip-unneeded 2> /dev/null - strip -g usr/lib/*.a + strip -g usr/lib${LIBDIRSUFFIX}/*.a ) ( cd $PKG/usr/man @@ -76,9 +95,6 @@ make install DESTDIR=/$PKG for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done ) -# Remove some empty directories, I can't imagine why these are here. -rm -rf $PKG/usr/share $PKG/usr/lib/lua - mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/{extras,html} cp -a COPYRIGHT HISTORY INSTALL README $PKG/usr/doc/$PRGNAM-$VERSION cp -a doc/*.html doc/logo.gif doc/lua.css $PKG/usr/doc/$PRGNAM-$VERSION/html @@ -89,4 +105,4 @@ mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/development/lua/lua.info b/development/lua/lua.info index 75197e6d4371d..f30c85b012e7a 100644 --- a/development/lua/lua.info +++ b/development/lua/lua.info @@ -1,8 +1,10 @@ PRGNAM="lua" VERSION="5.1.4" HOMEPAGE="http://www.lua.org" -DOWNLOAD="http://slackbuilds.org/sources/12.2/lua-5.1.4_autotools.tar.bz2" -MD5SUM="c20786a6933dba9e952463e227000e8d" -MAINTAINER="Menno E. Duursma" +DOWNLOAD="http://www.lua.org/ftp/lua-5.1.4.tar.gz" +MD5SUM="d0870f2de55d59c1c8419f36e8fac150" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Menno Duursma" EMAIL="druiloor@zonnet.nl" -APPROVED="dsomero,michiel" +APPROVED="dsomero" diff --git a/development/lua/slack-desc b/development/lua/slack-desc index d513d0e197adf..e5f5a065beffd 100644 --- a/development/lua/slack-desc +++ b/development/lua/slack-desc @@ -1,4 +1,4 @@ -W TO EDIT THIS FILE: +# HOW TO EDIT THIS FILE: # The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' # on the right side marks the last column you can put a character in. You must @@ -14,6 +14,6 @@ lua: Lua is dynamically typed, runs by interpreting bytecode for a lua: register-based virtual machine, and has automatic memory management lua: with incremental garbage collection, making it ideal for lua: configuration, scripting, and rapid prototyping. -lua: -lua: This package aditionally contains a liblua.so shared library. -lua: +lua: +lua: +lua: |