diff options
author | Menno E. Duursma <druiloor@zonnet.nl> | 2010-05-11 14:05:51 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-11 14:05:51 +0200 |
commit | 4a5a6fa95bb110bf9c8d672536d9ea9a402bfa33 (patch) | |
tree | b44c72588370508c93dc227507302a3a53753925 /development | |
parent | 72b6de39b2d3348070251abc3776a4f546b195ad (diff) | |
download | slackbuilds-4a5a6fa95bb110bf9c8d672536d9ea9a402bfa33.tar.gz |
development/lua: Initial import
Diffstat (limited to 'development')
-rw-r--r-- | development/lua/README | 4 | ||||
-rw-r--r-- | development/lua/lua-5.1.2-shared.diff | 71 | ||||
-rw-r--r-- | development/lua/lua.SlackBuild | 71 | ||||
-rw-r--r-- | development/lua/lua.info | 8 | ||||
-rw-r--r-- | development/lua/slack-desc | 11 |
5 files changed, 165 insertions, 0 deletions
diff --git a/development/lua/README b/development/lua/README new file mode 100644 index 0000000000..c4b92e5c1a --- /dev/null +++ b/development/lua/README @@ -0,0 +1,4 @@ +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. + diff --git a/development/lua/lua-5.1.2-shared.diff b/development/lua/lua-5.1.2-shared.diff new file mode 100644 index 0000000000..84b286aa65 --- /dev/null +++ b/development/lua/lua-5.1.2-shared.diff @@ -0,0 +1,71 @@ +diff -Naur lua-5.1.2.orig/Makefile lua-5.1.2/Makefile +--- lua-5.1.2.orig/Makefile 2007-03-25 09:44:39.000000000 -0500 ++++ lua-5.1.2/Makefile 2007-04-05 09:49:38.000000000 -0500 +@@ -43,7 +43,7 @@ + # What to install. + TO_BIN= lua luac + TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp +-TO_LIB= liblua.a ++TO_LIB= liblua.a liblua.so.$R + TO_MAN= lua.1 luac.1 + + # Lua version and release. +diff -Naur lua-5.1.2.orig/src/Makefile lua-5.1.2/src/Makefile +--- lua-5.1.2.orig/src/Makefile 2007-03-25 09:49:23.000000000 -0500 ++++ lua-5.1.2/src/Makefile 2007-04-05 09:57:48.000000000 -0500 +@@ -18,11 +18,17 @@ + MYLDFLAGS= + MYLIBS= + ++# Shared object info ++MAJOR= 5 ++MINOR= 1 ++REL= 2 ++ + # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE ========= + + PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris + + LUA_A= liblua.a ++LUA_S= liblua.so + CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \ + lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \ + lundump.o lvm.o lzio.o +@@ -36,8 +42,9 @@ + LUAC_O= luac.o print.o + + ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O) +-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) ++ALL_T= $(LUA_A) $(LUA_S) $(LUA_T) $(LUAC_T) + ALL_A= $(LUA_A) ++ALL_S= $(LUA_S) + + default: $(PLAT) + +@@ -47,10 +54,17 @@ + + a: $(ALL_A) + ++s: $(ALL_S) ++ + $(LUA_A): $(CORE_O) $(LIB_O) + $(AR) $@ $? + $(RANLIB) $@ + ++$(LUA_S): $(CORE_O) $(LIB_O) ++ gcc -shared -fPIC -Wl,-soname -Wl,$(LUA_S).$(MAJOR) \ ++ -o $(LUA_S).$(MAJOR).$(MINOR).$(REL) $^ $(LIBS) ++ ln -s $(LUA_S).$(MAJOR).$(MINOR).$(REL) $(LUA_S) ++ + $(LUA_T): $(LUA_O) $(LUA_A) + $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) + +@@ -58,7 +72,7 @@ + $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) + + clean: +- $(RM) $(ALL_T) $(ALL_O) ++ $(RM) $(ALL_T) $(ALL_O) $(LUA_S) $(LUA_S).$(MAJOR).$(MINOR).$(REL) + + depend: + @$(CC) $(CFLAGS) -MM l*.c print.c diff --git a/development/lua/lua.SlackBuild b/development/lua/lua.SlackBuild new file mode 100644 index 0000000000..a07cc67c33 --- /dev/null +++ b/development/lua/lua.SlackBuild @@ -0,0 +1,71 @@ +#!/bin/sh + +# Slackware build script for Lua + +# Written by Menno Duursma +# Modified by the SlackBuilds.org project + +PRGNAM=lua +VERSION=5.1.2 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +fi + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP || exit 1 +rm -rf $PRGNAM-$VERSION +tar xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1 +cd $PRGNAM-$VERSION || exit 1 +chown -R root:root . +chmod -R a-s,u+rw,go-w+r . + +# Apply patch to make it compile the lib into a shared object +cat $CWD/$PRGNAM-$VERSION-shared.diff | patch -p1 || exit 1 + +# Let's use our custom CFLAGS from above +sed -i "s/-DLUA_USE_LINUX/\"-DLUA_USE_LINUX $SLKCFLAGS\"/g" src/Makefile || exit 1 + +make linux +make install INSTALL_TOP=$PKG/usr || exit 1 + +# Let's make sure all of the library symlinks correctly exist +( cd $PKG/usr/lib + ln -sf liblua.so.5.1.2 liblua.so + ln -sf liblua.so.5.1.2 liblua.so.5 +) + +( cd $PKG + find . -type f | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . -type f | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +) + +( cd $PKG/usr/man + find . -type f -exec gzip -9 {} \; + 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 +cp -a etc test $PKG/usr/doc/$PRGNAM-$VERSION/extras +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +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 diff --git a/development/lua/lua.info b/development/lua/lua.info new file mode 100644 index 0000000000..f8f2152afb --- /dev/null +++ b/development/lua/lua.info @@ -0,0 +1,8 @@ +PRGNAM="lua" +VERSION="5.1.2" +HOMEPAGE="http://www.lua.org" +DOWNLOAD="http://www.lua.org/ftp/lua-5.1.2.tar.gz" +MD5SUM="687ce4c2a1ddff18f1008490fdc4e5e0" +MAINTAINER="Menno E. Duursma" +EMAIL="druiloor@zonnet.nl" +APPROVED="rworkman,elohim" diff --git a/development/lua/slack-desc b/development/lua/slack-desc new file mode 100644 index 0000000000..08e3bb2ac6 --- /dev/null +++ b/development/lua/slack-desc @@ -0,0 +1,11 @@ +lua: Lua - a lightweight programming language engine +lua: +lua: Lua is designed and implemented by PUC-Rio, the Pontifical Catholic +lua: University of Rio de Janeiro in Brazil. Lua was born and raised at +lua: Tecgraf, the Computer Graphics Technology Group of PUC-Rio, and is +lua: now housed at Lua.org. Both Tecgraf and Lua.org are laboratories +lua: of the Department of Computer Science. +lua: +lua: This package aditionally contains a liblua.so DLL +lua: +lua: |