From a401beda5045b0ef45f88b770a81ddc0db7251b8 Mon Sep 17 00:00:00 2001 From: ayhanyalcinsoy Date: Fri, 24 Jul 2015 00:37:53 +0300 Subject: [PATCH] lua:moved into main for pisi 2.0 --- programming/language/lua/actions.py | 34 +++++++ .../language/lua/files/fix-linking.patch | 22 +++++ programming/language/lua/files/install.patch | 47 ++++++++++ .../language/lua/files/liblua.so.patch | 57 ++++++++++++ .../language/lua/files/lua-5.1-dynlib.patch | 42 +++++++++ .../lua/files/lua-5.1-module_paths.patch | 30 ++++++ .../lua/files/lua-5.1-pkgconfig-libdir.patch | 20 ++++ programming/language/lua/files/lua.pc | 20 ++++ programming/language/lua/files/lua.png | Bin 0 -> 529 bytes programming/language/lua/pspec.xml | 86 ++++++++++++++++++ programming/language/lua/translations.xml | 14 +++ 11 files changed, 372 insertions(+) create mode 100644 programming/language/lua/actions.py create mode 100644 programming/language/lua/files/fix-linking.patch create mode 100644 programming/language/lua/files/install.patch create mode 100644 programming/language/lua/files/liblua.so.patch create mode 100644 programming/language/lua/files/lua-5.1-dynlib.patch create mode 100644 programming/language/lua/files/lua-5.1-module_paths.patch create mode 100644 programming/language/lua/files/lua-5.1-pkgconfig-libdir.patch create mode 100644 programming/language/lua/files/lua.pc create mode 100644 programming/language/lua/files/lua.png create mode 100644 programming/language/lua/pspec.xml create mode 100644 programming/language/lua/translations.xml diff --git a/programming/language/lua/actions.py b/programming/language/lua/actions.py new file mode 100644 index 0000000000..30670d6d90 --- /dev/null +++ b/programming/language/lua/actions.py @@ -0,0 +1,34 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file http://www.gnu.org/licenses/gpl.txt + +from pisi.actionsapi import shelltools +from pisi.actionsapi import autotools +from pisi.actionsapi import pisitools +from pisi.actionsapi import get + +major = ".".join(get.srcVERSION().split(".")[:2]) + +def setup(): + pisitools.dosed("src/Makefile", "^CFLAGS.*$", "CFLAGS=%s -fPIC -DLUA_USE_LINUX" % get.CFLAGS()) + pisitools.dosed("src/Makefile", "^MYLDFLAGS.*$", "MYLDFLAGS=%s" % get.LDFLAGS()) + pisitools.dosed("lua.pc", "%VER%", "%s" % major) + pisitools.dosed("lua.pc", "%REL%", "%s" % get.srcVERSION()) + +def build(): + autotools.make("linux") + +def install(): + autotools.rawInstall("INSTALL_TOP=%s/usr INSTALL_MAN=%s/usr/share/man/ TO_LIB='liblua.so liblua.so.5.2 liblua.so.5.2.4'" % (get.installDIR(),get.installDIR())) + + pisitools.insinto("/usr/lib/pkgconfig", "lua.pc") + pisitools.insinto("/usr/lib/pkgconfig", "lua.pc", "lua5.2.pc") + + #free directory + pisitools.removeDir("usr/lib/lua/") + pisitools.removeDir("usr/share/lua/") + + pisitools.dohtml("doc") + pisitools.dodoc("README") \ No newline at end of file diff --git a/programming/language/lua/files/fix-linking.patch b/programming/language/lua/files/fix-linking.patch new file mode 100644 index 0000000000..a7fd03514a --- /dev/null +++ b/programming/language/lua/files/fix-linking.patch @@ -0,0 +1,22 @@ +Index: lua-5.1.4/src/Makefile +=================================================================== +--- lua-5.1.4.orig/src/Makefile ++++ lua-5.1.4/src/Makefile +@@ -53,7 +53,7 @@ $(LUA_A): $(CORE_O) $(LIB_O) + $(RANLIB) $@ + + $(LUA_SO): $(CORE_O) $(LIB_O) +- $(CC) -Wl,-soname=liblua.so.$(V) -shared -o $@ $(MYLDFLAGS) $? $(LIBS) $(LUA_O) ++ $(CC) -Wl,-soname=liblua.so.$(V) -shared -o $@ $(MYLDFLAGS) $? $(LUA_O) $(LIBS) + rm -f liblua.so + ln -fs $@ liblua.so + +@@ -102,7 +102,7 @@ generic: + $(MAKE) all MYCFLAGS= + + linux: +- $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses" ++ $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-ldl -lreadline -lhistory -lncurses" + + macosx: + $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline" diff --git a/programming/language/lua/files/install.patch b/programming/language/lua/files/install.patch new file mode 100644 index 0000000000..dd422ceba0 --- /dev/null +++ b/programming/language/lua/files/install.patch @@ -0,0 +1,47 @@ +--- Makefile~ 2008-08-12 03:40:48.000000000 +0300 ++++ Makefile 2009-01-02 17:16:41.000000000 +0200 +@@ -9,16 +9,16 @@ + + # Where to install. The installation starts in the src and doc directories, + # so take care if INSTALL_TOP is not an absolute path. +-INSTALL_TOP= /usr/local ++INSTALL_TOP= /usr + INSTALL_BIN= $(INSTALL_TOP)/bin + INSTALL_INC= $(INSTALL_TOP)/include + INSTALL_LIB= $(INSTALL_TOP)/lib +-INSTALL_MAN= $(INSTALL_TOP)/man/man1 ++INSTALL_MAN= $(INSTALL_TOP)/share/man/man1 + # + # You probably want to make INSTALL_LMOD and INSTALL_CMOD consistent with + # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h (and also with etc/lua.pc). + INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V +-INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V ++INSTALL_CMOD= $(INSTALL_TOP)/lib + + # How to install. If your install program does not support "-p", then you + # may have to run ranlib on the installed liblua.a (do "make ranlib"). +@@ -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.so.$V + TO_MAN= lua.1 luac.1 + + # Lua version and release. +--- etc/lua.pc~ 2008-08-08 15:46:11.000000000 +0300 ++++ etc/lua.pc 2009-01-02 17:17:32.000000000 +0200 +@@ -8,11 +8,11 @@ + R= 5.1.4 + + # 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 +-INSTALL_MAN= ${prefix}/man/man1 ++INSTALL_MAN= ${prefix}/share/man/man1 + INSTALL_LMOD= ${prefix}/share/lua/${V} + INSTALL_CMOD= ${prefix}/lib/lua/${V} + diff --git a/programming/language/lua/files/liblua.so.patch b/programming/language/lua/files/liblua.so.patch new file mode 100644 index 0000000000..92c1f3ac48 --- /dev/null +++ b/programming/language/lua/files/liblua.so.patch @@ -0,0 +1,57 @@ +diff -ru lua-5.2.1/Makefile lua-5.2.1.new/Makefile +--- lua-5.2.1/Makefile 2012-05-17 16:05:54.000000000 +0200 ++++ lua-5.2.1.new/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 +diff -ru lua-5.2.1/src/luaconf.h lua-5.2.1.new/src/luaconf.h +--- lua-5.2.1/src/luaconf.h 2012-05-11 16:14:42.000000000 +0200 ++++ lua-5.2.1.new/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 \ +diff -ru lua-5.2.1/src/Makefile lua-5.2.1.new/src/Makefile +--- lua-5.2.1/src/Makefile 2012-03-09 17:32:16.000000000 +0100 ++++ lua-5.2.1.new/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 $(MYLDFLAGS) ++ 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/programming/language/lua/files/lua-5.1-dynlib.patch b/programming/language/lua/files/lua-5.1-dynlib.patch new file mode 100644 index 0000000000..f8b95c757d --- /dev/null +++ b/programming/language/lua/files/lua-5.1-dynlib.patch @@ -0,0 +1,42 @@ +--- ./src/Makefile.dynlib 2006-03-22 01:41:49.000000000 +0100 ++++ ./src/Makefile 2006-08-17 10:49:36.000000000 +0200 +@@ -22,6 +22,7 @@ + + PLATS= aix ansi bsd generic linux macosx mingw posix solaris + ++LUA_SO= liblua.so.$(V) + LUA_A= liblua.a + 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 \ +@@ -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_T) $(LUAC_T) $(LUA_SO) + ALL_A= $(LUA_A) + + default: $(PLAT) +@@ -51,6 +52,11 @@ + $(AR) $@ $? + $(RANLIB) $@ + ++$(LUA_SO): $(CORE_O) $(LIB_O) ++ $(CC) -Wl,-soname=liblua.so.$(V) -shared -o $@ $(MYLDFLAGS) $? $(LIBS) $(LUA_O) ++ rm -f liblua.so ++ ln -fs $@ liblua.so ++ + $(LUA_T): $(LUA_O) $(LUA_A) + $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) + +--- ./Makefile.dynlib 2006-06-02 12:53:38.000000000 +0200 ++++ ./Makefile 2006-08-17 10:47:54.000000000 +0200 +@@ -52,7 +52,7 @@ + all: $(PLAT) + + $(PLATS) clean: +- cd src && $(MAKE) $@ ++ cd src && $(MAKE) V=$(V) $@ + + test: dummy + src/lua test/hello.lua diff --git a/programming/language/lua/files/lua-5.1-module_paths.patch b/programming/language/lua/files/lua-5.1-module_paths.patch new file mode 100644 index 0000000000..29ac4c3bf4 --- /dev/null +++ b/programming/language/lua/files/lua-5.1-module_paths.patch @@ -0,0 +1,30 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## src_luaconf.h.dpatch by John V. Belmonte +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Set Lua's default PATH and CPATH. + +@DPATCH@ +diff -urNad trunk~/src/luaconf.h trunk/src/luaconf.h +--- trunk~/src/luaconf.h 2006-02-10 12:44:06.000000000 -0500 ++++ trunk/src/luaconf.h 2006-02-17 21:32:55.000000000 -0500 +@@ -83,13 +83,17 @@ + + #else + #define LUA_ROOT "/usr/local/" ++#define LUA_ROOT2 "/usr/" + #define LUA_LDIR LUA_ROOT "share/lua/5.1/" ++#define LUA_LDIR2 LUA_ROOT2 "share/lua/5.1/" + #define LUA_CDIR LUA_ROOT "lib/lua/5.1/" ++#define LUA_CDIR2 LUA_ROOT2 "lib/lua/5.1/" + #define LUA_PATH_DEFAULT \ + "./?.lua;" LUA_LDIR"?.lua;" LUA_LDIR"?/init.lua;" \ +- LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua" ++ LUA_CDIR"?.lua;" LUA_CDIR"?/init.lua;" \ ++ LUA_LDIR2"?.lua;" LUA_LDIR2"?/init.lua" + #define LUA_CPATH_DEFAULT \ +- "./?.so;" LUA_CDIR"?.so;" LUA_CDIR"loadall.so" ++ "./?.so;" LUA_CDIR"?.so;" LUA_CDIR2"?.so;" LUA_CDIR"loadall.so" + #endif + + diff --git a/programming/language/lua/files/lua-5.1-pkgconfig-libdir.patch b/programming/language/lua/files/lua-5.1-pkgconfig-libdir.patch new file mode 100644 index 0000000000..abf7ad3e40 --- /dev/null +++ b/programming/language/lua/files/lua-5.1-pkgconfig-libdir.patch @@ -0,0 +1,20 @@ +Index: lua-5.1.4/etc/lua.pc +=================================================================== +--- lua-5.1.4.orig/etc/lua.pc ++++ lua-5.1.4/etc/lua.pc +@@ -18,14 +18,13 @@ INSTALL_CMOD= ${prefix}/lib/lua/${V} + + # canonical vars + 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 ++Libs: -llua -lm + Cflags: -I${includedir} + + # (end of lua.pc) diff --git a/programming/language/lua/files/lua.pc b/programming/language/lua/files/lua.pc new file mode 100644 index 0000000000..bf7977bcd7 --- /dev/null +++ b/programming/language/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/programming/language/lua/files/lua.png b/programming/language/lua/files/lua.png new file mode 100644 index 0000000000000000000000000000000000000000..bd644676b7955e42b5d4914174f4d3897cb20f2c GIT binary patch literal 529 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzwj^(N7lwZz_*&vh6HtV+z$3C4 zNPB>>+sSM@kYHJXV>*yl0OR&wbLKKIFwXIGaSVw#yf-{|U5f&b%$a+q@AZ64`W@c=>5`2dJ50)w-~DO`6@BurkHv*W>CrNI0gVH~jG?vm z%&VkazBuXs*kYk1DO4Q2zxKN9g{6!q1DMy|e&Z5l^dRTx*2L}=$9%)Ml?3OW^^?Z0uNfF8Q+Dt6YTpb+&CHhurB+2X-!9y{;zdd(pmyYoz#& zJaWzopR#-1rAaIY-mZ$!|oVfqIi+}ia+n;yVpXEB*WTGZzIA3RqJA2^f%j*4U_48Tu8>V@8 R1OOw9!PC{xWt~$(699mz=2ZXy literal 0 HcmV?d00001 diff --git a/programming/language/lua/pspec.xml b/programming/language/lua/pspec.xml new file mode 100644 index 0000000000..981a9303cc --- /dev/null +++ b/programming/language/lua/pspec.xml @@ -0,0 +1,86 @@ + + + + + lua + http://www.lua.org + + PisiLinux Community + admins@pisilinux.org + + LGPLv2 + library + A light-weight programming language + lua is a powerful light-weight programming language designed for extending applications. + http://www.lua.org/ftp/lua-5.2.4.tar.gz + + lua.pc + + + readline-devel + + + liblua.so.patch + + + + + lua + + readline + + + /usr/lib + /usr/share/man + /usr/share/doc + /usr/bin + /usr/share/pixmaps + + + lua.png + + + + + lua-devel + Development files for lua + + lua + + + /usr/include + /usr/lib/pkgconfig + + + + + + 2015-06-03 + 5.2.4 + Version bump. + Vedat Demir + vedat@pisilinux.org + + + 2015-02-01 + 5.2.3 + Version bump. + Kamil Atlı + suvari@pisilinux.org + + + 2014-05-30 + 5.1.5 + Version bump. + Alihan Öztürk + alihan@pisilinux.org + + + 2010-10-13 + 5.1.4 + First release + Pisi Linux Admins + admins@pisilinux.org + + + diff --git a/programming/language/lua/translations.xml b/programming/language/lua/translations.xml new file mode 100644 index 0000000000..7b1a023b10 --- /dev/null +++ b/programming/language/lua/translations.xml @@ -0,0 +1,14 @@ + + + + lua + Hafif bir programlama dili + lua, uygulamaları genişletmek için tasarlanmış hafif ve güçlü bir programlama dilidir. + Lua es un lenguaje de programación liviano y potente con todas las herramientas imaginables + + + + lua-devel + lua için geliştirme dosyaları + +