From bcd560f573aa07b52b3cd8c29e8614eb7560d3e2 Mon Sep 17 00:00:00 2001 From: Lukc Date: Sun, 16 Jan 2011 14:03:28 +0100 Subject: Recette de Lua ajoutée. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/.footprint | 25 +++++++++++++++++ lua/.md5sum | 2 ++ lua/.sha256sum | 2 ++ lua/Pkgfile | 43 +++++++++++++++++++++++++++++ lua/lua.diff | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 159 insertions(+) create mode 100644 lua/.footprint create mode 100644 lua/.md5sum create mode 100644 lua/.sha256sum create mode 100644 lua/Pkgfile create mode 100644 lua/lua.diff diff --git a/lua/.footprint b/lua/.footprint new file mode 100644 index 0000000..3ae3944 --- /dev/null +++ b/lua/.footprint @@ -0,0 +1,25 @@ +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/bin/ +-rwxr-xr-x root/root usr/bin/lua +-rwxr-xr-x root/root usr/bin/luac +drwxr-xr-x root/root usr/include/ +-rw-r--r-- root/root usr/include/lauxlib.h +-rw-r--r-- root/root usr/include/lua.h +-rw-r--r-- root/root usr/include/lua.hpp +-rw-r--r-- root/root usr/include/luaconf.h +-rw-r--r-- root/root usr/include/lualib.h +drwxr-xr-x root/root usr/lib/ +-rw-r--r-- root/root usr/lib/liblua.a +lrwxrwxrwx root/root usr/lib/liblua.so -> liblua.so.5.1 +-rw-r--r-- root/root usr/lib/liblua.so.5.1 +drwxr-xr-x root/root usr/lib/lua/ +drwxr-xr-x root/root usr/lib/lua/5.1/ +drwxr-xr-x root/root usr/lib/pkgconfig/ +-rw-r--r-- root/root usr/lib/pkgconfig/lua.pc +drwxr-xr-x root/root usr/man/ +drwxr-xr-x root/root usr/man/man1/ +-rw-r--r-- root/root usr/man/man1/lua.1.gz +-rw-r--r-- root/root usr/man/man1/luac.1.gz +drwxr-xr-x root/root usr/share/ +drwxr-xr-x root/root usr/share/lua/ +drwxr-xr-x root/root usr/share/lua/5.1/ diff --git a/lua/.md5sum b/lua/.md5sum new file mode 100644 index 0000000..4a55ab6 --- /dev/null +++ b/lua/.md5sum @@ -0,0 +1,2 @@ +d0870f2de55d59c1c8419f36e8fac150 lua-5.1.4.tar.gz +f7986425312caab2ec666bc32acb4996 lua.diff diff --git a/lua/.sha256sum b/lua/.sha256sum new file mode 100644 index 0000000..bd050b4 --- /dev/null +++ b/lua/.sha256sum @@ -0,0 +1,2 @@ +b038e225eaf2a5b57c9bcc35cd13aa8c6c8288ef493d52970c9545074098af3a lua-5.1.4.tar.gz +abd25008ed3e968915cdd82e3a436798e27e5541d7c05ec4bae01a7ed84150e4 lua.diff diff --git a/lua/Pkgfile b/lua/Pkgfile new file mode 100644 index 0000000..3b7b6b8 --- /dev/null +++ b/lua/Pkgfile @@ -0,0 +1,43 @@ +description="A powerful, fast, lightweight, embeddable scripting language." +longdesc="Lua combines simple procedural syntax with powerful data description +constructs based on associative arrays and extensible semantics. Lua is +dynamically typed, runs by interpreting bytecode for a register-based +virtual machine, and has automatic memory management with incremental +garbage collection, making it ideal for configuration, scripting, and +rapid prototyping." +url=http://www.lua.org +packager="Tilman Sauerbeck " +maintainer="Lukc " +lastver="wcat http://www.lua.org/ftp/ | grep '\.tar\.gz' | sed -e 's/\.tar\.gz.*//;s/.*lua-//;/all/d' | tail -n 1" +license=MIT +depends=() + +name=lua +version=5.1.4 +release=1 +source=( + http://www.lua.org/ftp/$name-$version.tar.gz + $name.diff +) + +# XXX: À faire +# - Compilation croisée. +# - Construction statique. +# - Installation dans des préfixes alternatifs. +# - Filer le paquet à Kooda ? + +build() { + cd $name-$version + + patch -Np1 -i $SRC/$name.diff + + make linux + make INSTALL_TOP=$PKG/usr install + + install -D -m 0644 etc/lua.pc $PKG/usr/lib/pkgconfig/lua.pc + if [[ "$mandir" != "/usr/man" ]]; then + mkdir -p $PKG$mandir + mv $PKG/usr/man/* $PKG$mandir/ + rmdir $PKG/usr/man + fi +} diff --git a/lua/lua.diff b/lua/lua.diff new file mode 100644 index 0000000..da2f59a --- /dev/null +++ b/lua/lua.diff @@ -0,0 +1,87 @@ +Somewhat based on Arch Linux' Lua patch. + +diff -aur lua-5.1.2.orig/Makefile lua-5.1.2/Makefile +--- lua-5.1.2.orig/Makefile 2007-03-25 16:44:39.000000000 +0200 ++++ lua-5.1.2/Makefile 2007-04-09 20:22:39.100496674 +0200 +@@ -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.5.1 + TO_MAN= lua.1 luac.1 + + # Lua version and release. +@@ -65,6 +65,7 @@ + cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) + cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) ++ ln -s liblua.so.5.1 $(INSTALL_LIB)/liblua.so + + ranlib: + cd src && cd $(INSTALL_LIB) && $(RANLIB) $(TO_LIB) + +diff -aur lua-5.1.2.orig/etc/lua.pc lua-5.1.2/etc/lua.pc +--- lua-5.1.2.orig/etc/lua.pc 2007-03-23 20:58:49.000000000 +0100 ++++ lua-5.1.2/etc/lua.pc 2007-04-09 20:00:26.642825529 +0200 +@@ -8,7 +8,7 @@ + R= 5.1.2 + + # 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 -aur lua-5.1.2.orig/src/Makefile lua-5.1.2/src/Makefile +--- lua-5.1.2.orig/src/Makefile 2007-03-25 16:49:23.000000000 +0200 ++++ lua-5.1.2/src/Makefile 2007-04-09 20:20:37.073542755 +0200 +@@ -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 +@@ -23,6 +24,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 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 +38,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 +53,10 @@ + $(AR) $@ $? + $(RANLIB) $@ + ++$(LUA_SO): $(CORE_O) $(LIB_O) ++ $(CC) -shared -Wl,-soname,liblua.so -o $@.5.1 $? $(MYLDFLAGS) ++ ln -s $@.5.1 $@ ++ + $(LUA_T): $(LUA_O) $(LUA_A) + $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) + +diff -aur lua-5.1.2.orig/src/luaconf.h lua-5.1.2/src/luaconf.h +--- lua-5.1.2.orig/src/luaconf.h 2007-03-24 04:01:55.000000000 +0100 ++++ lua-5.1.2/src/luaconf.h 2007-04-09 20:01:00.274480800 +0200 +@@ -94,7 +94,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 \ -- cgit v1.2.3-54-g00ecf