aboutsummaryrefslogtreecommitdiff
path: root/development
diff options
context:
space:
mode:
authorMenno E. Duursma <druiloor@zonnet.nl>2010-05-12 17:38:37 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-12 17:38:37 +0200
commit9ff736a1e9fe1b0511b54fc48febd0225329fd38 (patch)
tree14e0b5ba40b5163c43c25a31c2782648b78ea0fa /development
parentc42391c0b55925fa58bd37f60e2e4553488958ab (diff)
development/lua: Updated for version 5.1.4
Diffstat (limited to 'development')
-rw-r--r--development/lua/README3
-rw-r--r--development/lua/lua-5.1.4-shared.diff71
-rw-r--r--development/lua/lua.SlackBuild44
-rw-r--r--development/lua/lua.info6
4 files changed, 34 insertions, 90 deletions
diff --git a/development/lua/README b/development/lua/README
index 3073c0d962eba..ebd2ec253c4f3 100644
--- a/development/lua/README
+++ b/development/lua/README
@@ -1,3 +1,6 @@
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-5.1.4-shared.diff b/development/lua/lua-5.1.4-shared.diff
deleted file mode 100644
index e4083916c36e1..0000000000000
--- a/development/lua/lua-5.1.4-shared.diff
+++ /dev/null
@@ -1,71 +0,0 @@
-diff -Nur lua-5.1.4.orig/Makefile lua-5.1.4/Makefile
---- lua-5.1.4.orig/Makefile 2008-08-11 19:40:48.000000000 -0500
-+++ lua-5.1.4/Makefile 2008-10-28 11:05:20.258085554 -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 -Nur lua-5.1.4.orig/src/Makefile lua-5.1.4/src/Makefile
---- lua-5.1.4.orig/src/Makefile 2008-01-19 13:37:58.000000000 -0600
-+++ lua-5.1.4/src/Makefile 2008-10-28 11:08:46.895111523 -0500
-@@ -18,11 +18,17 @@
- MYLDFLAGS=
- MYLIBS=
-
-+# Shared object info
-+MAJOR= 5
-+MINOR= 1
-+REL= 4
-+
- # == 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
index 7c9de43283417..946b79aff119a 100644
--- a/development/lua/lua.SlackBuild
+++ b/development/lua/lua.SlackBuild
@@ -18,44 +18,56 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP || exit 1
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
+# 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
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
-# 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
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --with-readline \
+ --prefix=/usr \
+ --libdir=/usr/lib$LIBDIRSUFFIX || exit 1
-make linux
-make install INSTALL_TOP=$PKG/usr || 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
-# Install the pkg-config file so other apps can find LUA
-# Also, fix the prefix path in lua.pc
-mkdir -p $PKG/usr/lib/pkgconfig
-sed 's|prefix= /usr/local|prefix= /usr|' etc/lua.pc > \
- $PKG/usr/lib/pkgconfig/lua.pc
+make
+make install DESTDIR=/$PKG
# Let's make sure all of the library symlinks correctly exist
-( cd $PKG/usr/lib
+( 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}
)
( 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
+ 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
strip -g usr/lib/*.a
)
diff --git a/development/lua/lua.info b/development/lua/lua.info
index 1e6b0e7f166ad..75197e6d4371d 100644
--- a/development/lua/lua.info
+++ b/development/lua/lua.info
@@ -1,8 +1,8 @@
PRGNAM="lua"
VERSION="5.1.4"
HOMEPAGE="http://www.lua.org"
-DOWNLOAD="http://www.lua.org/ftp/lua-5.1.4.tar.gz"
-MD5SUM="d0870f2de55d59c1c8419f36e8fac150"
+DOWNLOAD="http://slackbuilds.org/sources/12.2/lua-5.1.4_autotools.tar.bz2"
+MD5SUM="c20786a6933dba9e952463e227000e8d"
MAINTAINER="Menno E. Duursma"
EMAIL="druiloor@zonnet.nl"
-APPROVED="rworkman"
+APPROVED="dsomero,michiel"