lua: update to 5.2.2 (close #182).

This commit is contained in:
Juan RP 2013-10-10 11:04:26 +02:00
parent 74469285f2
commit a71f3cb957
6 changed files with 89 additions and 87 deletions

View file

@ -767,8 +767,7 @@ libgiblib.so.1 giblib-1.2.4_1
libgc.so.1 gc-7.1_1 libgc.so.1 gc-7.1_1
libgslcblas.so.0 gsl-1.15_1 libgslcblas.so.0 gsl-1.15_1
libgsl.so.0 gsl-1.15_1 libgsl.so.0 gsl-1.15_1
liblua.so.5 lua-5.1.4_1 liblua.so.5.2 lua-5.2.2_1
liblua.so lua-5.1.4_1
libburn.so.4 libburn-0.7.2_1 libburn.so.4 libburn-0.7.2_1
libgdkmm-2.4.so.1 gtkmm2-2.24.0_1 libgdkmm-2.4.so.1 gtkmm2-2.24.0_1
libgtkmm-2.4.so.1 gtkmm2-2.24.0_1 libgtkmm-2.4.so.1 gtkmm2-2.24.0_1

20
srcpkgs/lua/files/lua.pc Normal file
View file

@ -0,0 +1,20 @@
V=%VER%
R=%REL%
prefix=/usr
INSTALL_BIN=${prefix}/bin
INSTALL_INC=${prefix}/include
INSTALL_LIB=${prefix}/lib
INSTALL_MAN=${prefix}/man/man1
INSTALL_LMOD=${prefix}/share/lua/${V}
INSTALL_CMOD=${prefix}/lib/lua/${V}
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: Lua
Description: An Extensible Extension Language
Version: ${R}
Requires:
Libs: -L${libdir} -llua -lm
Cflags: -I${includedir}

View file

@ -0,0 +1,54 @@
--- Makefile 2012-05-17 16:05:54.000000000 +0200
+++ Makefile 2012-09-12 22:39:07.162748096 +0200
@@ -52,7 +52,7 @@
all: $(PLAT)
$(PLATS) clean:
- cd src && $(MAKE) $@
+ cd src && $(MAKE) $@ V=$(V) R=$(R)
test: dummy
src/lua -v
--- src/luaconf.h 2012-05-11 16:14:42.000000000 +0200
+++ src/luaconf.h 2012-09-12 22:40:27.986622772 +0200
@@ -100,7 +100,7 @@
#else /* }{ */
#define LUA_VDIR LUA_VERSION_MAJOR "." LUA_VERSION_MINOR "/"
-#define LUA_ROOT "/usr/local/"
+#define LUA_ROOT "/usr/"
#define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR
#define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR
#define LUA_PATH_DEFAULT \
--- src/Makefile 2012-03-09 17:32:16.000000000 +0100
+++ src/Makefile 2012-09-12 22:38:08.591386896 +0200
@@ -29,6 +29,7 @@
PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
LUA_A= liblua.a
+LUA_SO= liblua.so
CORE_O= lapi.o lcode.o lctype.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
@@ -43,7 +44,7 @@
LUAC_O= luac.o
ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O)
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
+ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO)
ALL_A= $(LUA_A)
# Targets start here.
@@ -59,6 +60,12 @@
$(AR) $@ $(BASE_O)
$(RANLIB) $@
+$(LUA_SO): $(CORE_O) $(LIB_O)
+ $(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(LDFLAGS)
+ ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V)
+ ln -sf $(LUA_SO).$(R) $(LUA_SO)
+
+
$(LUA_T): $(LUA_O) $(LUA_A)
$(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)

View file

@ -1,13 +0,0 @@
diff -Naur lua-5.1.orig/src/Makefile lua-5.1/src/Makefile
--- lua-5.1.orig/src/Makefile 2006-02-16 16:45:09.000000000 +0100
+++ lua-5.1/src/Makefile 2006-03-01 14:55:29.000000000 +0100
@@ -8,7 +8,8 @@
PLAT= none
CC= gcc
-CFLAGS= -O2 -Wall $(MYCFLAGS)
+CFLAGS ?= -O2 -Wall
+CFLAGS += $(MYCFLAGS)
AR= ar rcu
RANLIB= ranlib
RM= rm -f

View file

@ -1,55 +0,0 @@
diff -ur lua-5.1.orig/etc/lua.pc lua-5.1/etc/lua.pc
--- lua-5.1.orig/etc/lua.pc 2006-03-21 11:51:53.000000000 +0100
+++ lua-5.1/etc/lua.pc 2006-03-21 11:52:05.000000000 +0100
@@ -6,7 +6,7 @@
V= 5.1
# grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/'
-prefix= /usr/local
+prefix= /usr
INSTALL_BIN= ${prefix}/bin
INSTALL_INC= ${prefix}/include
INSTALL_LIB= ${prefix}/lib
diff -ur lua-5.1.orig/src/Makefile lua-5.1/src/Makefile
--- lua-5.1.orig/src/Makefile 2006-03-21 11:51:53.000000000 +0100
+++ lua-5.1/src/Makefile 2006-03-21 11:52:09.000000000 +0100
@@ -23,6 +23,7 @@
PLATS= aix ansi bsd generic linux macosx mingw posix solaris
LUA_A= liblua.a
+LUA_SO= 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,7 +37,7 @@
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_SO) $(LUA_T) $(LUAC_T)
ALL_A= $(LUA_A)
default: $(PLAT)
@@ -51,6 +52,10 @@
$(AR) $@ $?
$(RANLIB) $@
+$(LUA_SO): $(CORE_O) $(LIB_O)
+ $(CC) -shared -ldl -Wl,-soname,liblua.so -o $@.5.1 $? -lm $(MYLDFLAGS)
+ ln -s $@.5.1 $@
+
$(LUA_T): $(LUA_O) $(LUA_A)
$(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
diff -ur lua-5.1.orig/src/luaconf.h lua-5.1/src/luaconf.h
--- lua-5.1.orig/src/luaconf.h 2006-03-21 11:51:53.000000000 +0100
+++ lua-5.1/src/luaconf.h 2006-03-21 11:52:05.000000000 +0100
@@ -82,7 +82,7 @@
".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll"
#else
-#define LUA_ROOT "/usr/local/"
+#define LUA_ROOT "/usr/"
#define LUA_LDIR LUA_ROOT "share/lua/5.1/"
#define LUA_CDIR LUA_ROOT "lib/lua/5.1/"
#define LUA_PATH_DEFAULT \

View file

@ -1,15 +1,14 @@
# Template file for 'lua' # Template file for 'lua'
pkgname=lua pkgname=lua
version=5.1.5 version=5.2.2
revision=2 revision=1
patch_args="-Np1"
distfiles="http://www.lua.org/ftp/$pkgname-$version.tar.gz"
makedepends="ncurses-devel readline-devel" makedepends="ncurses-devel readline-devel"
short_desc="Lua is a powerful, fast, lightweight, embeddable scripting language." short_desc="Powerful, fast, lightweight, embeddable scripting language"
maintainer="Robert Djubek <envy1988@gmail.com>" maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://www.lua.org" homepage="http://www.lua.org"
license="MIT" license="MIT"
checksum=2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333 distfiles="http://www.lua.org/ftp/$pkgname-$version.tar.gz"
checksum=3fd67de3f5ed133bf312906082fa524545c6b9e1b952e8215ffbd27113f49f00
long_desc=" long_desc="
Lua combines simple procedural syntax with powerful data description Lua combines simple procedural syntax with powerful data description
constructs based on associative arrays and extensible semantics. Lua constructs based on associative arrays and extensible semantics. Lua
@ -19,32 +18,30 @@ long_desc="
rapid prototyping." rapid prototyping."
do_build() { do_build() {
export CFLAGS="$CFLAGS -fPIC" sed "s/%VER%/${version%.*}/g;s/%REL%/$version/g" ${FILESDIR}/lua.pc > lua.pc
make CC="$CC" RANLIB="$RANLIB" \ make CFLAGS="$CFLAGS -fPIC" CC="$CC" RANLIB="$RANLIB" \
INSTALL_DATA="cp -d" LUA_SO=liblua.so ${makejobs} linux INSTALL_DATA="cp -d" LUA_SO=liblua.so ${makejobs} linux
} }
do_install() { do_install() {
make INSTALL_DATA="cp -d" INSTALL_TOP="${DESTDIR}/usr" \ make INSTALL_DATA="cp -d" INSTALL_TOP="${DESTDIR}/usr" \
TO_LIB="liblua.a liblua.so liblua.so.5.1" \ TO_LIB="liblua.a liblua.so liblua.so.5.2 liblua.so.5.2.1" \
INSTALL_MAN="${DESTDIR}/usr/share/man/man1" install INSTALL_MAN="${DESTDIR}/usr/share/man/man1" install
install -Dm 644 etc/lua.pc ${DESTDIR}/usr/lib/pkgconfig/lua.pc
install -Dm644 COPYRIGHT \ vinstall lua.pc 644 usr/lib/pkgconfig
${DESTDIR}/usr/share/licenses/${pkgname}/COPYRIGHT
# Install the documentation # Install the documentation
mkdir -p ${DESTDIR}/usr/share/doc/lua vmkdir usr/share/doc/lua
cp -R doc/* ${DESTDIR}/usr/share/doc/lua cp -R doc/* ${DESTDIR}/usr/share/doc/lua
cd ${DESTDIR}/usr/lib && ln -sf liblua.so.5.1 liblua.so.5
} }
lua-devel_package() { lua-devel_package() {
depends="ncurses-devel readline-devel lua>=${version}" depends="ncurses-devel readline-devel lua>=${version}"
short_desc+=" - development files" short_desc+=" - development files"
pkg_install() { pkg_install() {
vmove usr/include vmove usr/include
vmove "usr/lib/*.a" vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig vmove usr/lib/pkgconfig
vmove usr/share/doc vmove usr/share/doc
} }
@ -52,6 +49,6 @@ lua-devel_package() {
lua_package() { lua_package() {
pkg_install() { pkg_install() {
vmove usr vmove all
} }
} }