From a71f3cb95775d9101545aba8933776c0632008a8 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 10 Oct 2013 11:04:26 +0200 Subject: [PATCH] lua: update to 5.2.2 (close #182). --- common/shlibs | 3 +- srcpkgs/lua/files/lua.pc | 20 +++++++++ srcpkgs/lua/patches/liblua.so.patch | 54 ++++++++++++++++++++++++ srcpkgs/lua/patches/lua-5.1-cflags.diff | 13 ------ srcpkgs/lua/patches/lua-arch.patch | 55 ------------------------- srcpkgs/lua/template | 31 +++++++------- 6 files changed, 89 insertions(+), 87 deletions(-) create mode 100644 srcpkgs/lua/files/lua.pc create mode 100644 srcpkgs/lua/patches/liblua.so.patch delete mode 100644 srcpkgs/lua/patches/lua-5.1-cflags.diff delete mode 100644 srcpkgs/lua/patches/lua-arch.patch diff --git a/common/shlibs b/common/shlibs index c42df256ad..c4cd1122b6 100644 --- a/common/shlibs +++ b/common/shlibs @@ -767,8 +767,7 @@ libgiblib.so.1 giblib-1.2.4_1 libgc.so.1 gc-7.1_1 libgslcblas.so.0 gsl-1.15_1 libgsl.so.0 gsl-1.15_1 -liblua.so.5 lua-5.1.4_1 -liblua.so lua-5.1.4_1 +liblua.so.5.2 lua-5.2.2_1 libburn.so.4 libburn-0.7.2_1 libgdkmm-2.4.so.1 gtkmm2-2.24.0_1 libgtkmm-2.4.so.1 gtkmm2-2.24.0_1 diff --git a/srcpkgs/lua/files/lua.pc b/srcpkgs/lua/files/lua.pc new file mode 100644 index 0000000000..bf7977bcd7 --- /dev/null +++ b/srcpkgs/lua/files/lua.pc @@ -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} diff --git a/srcpkgs/lua/patches/liblua.so.patch b/srcpkgs/lua/patches/liblua.so.patch new file mode 100644 index 0000000000..6677d24cc8 --- /dev/null +++ b/srcpkgs/lua/patches/liblua.so.patch @@ -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) + diff --git a/srcpkgs/lua/patches/lua-5.1-cflags.diff b/srcpkgs/lua/patches/lua-5.1-cflags.diff deleted file mode 100644 index db658aecad..0000000000 --- a/srcpkgs/lua/patches/lua-5.1-cflags.diff +++ /dev/null @@ -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 diff --git a/srcpkgs/lua/patches/lua-arch.patch b/srcpkgs/lua/patches/lua-arch.patch deleted file mode 100644 index cc1f3ce1ba..0000000000 --- a/srcpkgs/lua/patches/lua-arch.patch +++ /dev/null @@ -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 \ diff --git a/srcpkgs/lua/template b/srcpkgs/lua/template index a759eec9e5..f04164f184 100644 --- a/srcpkgs/lua/template +++ b/srcpkgs/lua/template @@ -1,15 +1,14 @@ # Template file for 'lua' pkgname=lua -version=5.1.5 -revision=2 -patch_args="-Np1" -distfiles="http://www.lua.org/ftp/$pkgname-$version.tar.gz" +version=5.2.2 +revision=1 makedepends="ncurses-devel readline-devel" -short_desc="Lua is a powerful, fast, lightweight, embeddable scripting language." -maintainer="Robert Djubek " +short_desc="Powerful, fast, lightweight, embeddable scripting language" +maintainer="Juan RP " homepage="http://www.lua.org" license="MIT" -checksum=2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333 +distfiles="http://www.lua.org/ftp/$pkgname-$version.tar.gz" +checksum=3fd67de3f5ed133bf312906082fa524545c6b9e1b952e8215ffbd27113f49f00 long_desc=" Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua @@ -19,32 +18,30 @@ long_desc=" rapid prototyping." do_build() { - export CFLAGS="$CFLAGS -fPIC" - make CC="$CC" RANLIB="$RANLIB" \ + sed "s/%VER%/${version%.*}/g;s/%REL%/$version/g" ${FILESDIR}/lua.pc > lua.pc + make CFLAGS="$CFLAGS -fPIC" CC="$CC" RANLIB="$RANLIB" \ INSTALL_DATA="cp -d" LUA_SO=liblua.so ${makejobs} linux } do_install() { 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 -Dm 644 etc/lua.pc ${DESTDIR}/usr/lib/pkgconfig/lua.pc - install -Dm644 COPYRIGHT \ - ${DESTDIR}/usr/share/licenses/${pkgname}/COPYRIGHT + + vinstall lua.pc 644 usr/lib/pkgconfig # Install the documentation - mkdir -p ${DESTDIR}/usr/share/doc/lua + vmkdir 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() { depends="ncurses-devel readline-devel lua>=${version}" short_desc+=" - development files" - pkg_install() { vmove usr/include vmove "usr/lib/*.a" + vmove "usr/lib/*.so" vmove usr/lib/pkgconfig vmove usr/share/doc } @@ -52,6 +49,6 @@ lua-devel_package() { lua_package() { pkg_install() { - vmove usr + vmove all } }