Upgrade lua to 5.1.1 #734
authorFlorian Fainelli <florian@openwrt.org>
Thu, 28 Dec 2006 00:43:37 +0000 (00:43 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Thu, 28 Dec 2006 00:43:37 +0000 (00:43 +0000)
SVN-Revision: 5911

lang/lua/Makefile
lang/lua/patches/lua-5.0.2-config.patch [deleted file]
lang/lua/patches/lua-5.0.2-soname.patch [deleted file]
lang/lua/patches/lua-5.1.1-so.patch [new file with mode: 0644]

index 151c1f0e46f47979c2bcba8ea9376f806cd790c2..780e3fc32ad4a80ab67b3042d8c6cdd2d7afea30 100644 (file)
@@ -9,7 +9,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lua
-PKG_VERSION:=5.0.2
+PKG_VERSION:=5.1.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=http://www.lua.org/ftp/ \
        http://ftp.gwdg.de/pub/languages/lua/ \
        http://mirrors.dotsrc.org/lua/ \
        http://www.tecgraf.puc-rio.br/lua/ftp/
-PKG_MD5SUM:= dea74646b7e5c621fef7174df83c34b1
+PKG_MD5SUM:=22f4f912f20802c11006fe9b84d5c461
 PKG_CAT:=zcat
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
@@ -48,7 +48,7 @@ endef
 
 define Package/lua
   $(call Package/lua/Default)
-  DEPENDS:=+liblua
+  DEPENDS:=+liblua +libreadline +libncurses
   TITLE+= (interpreter)
   DESCRIPTION+=\\\
        \\\
@@ -85,7 +85,8 @@ define Build/Compile
                INSTALL_ROOT=/usr \
                MYCFLAGS="-I$(STAGING_DIR)/usr/include $(TARGET_CFLAGS)" \
                MYLDFLAGS="-L$(STAGING_DIR)/usr/lib" \
-               all so
+               PKG_VERSION=$(PKG_VERSION) \
+               all linux 
        # remove statically linked binaries, so that they will get linked against shlib this time
        rm -f $(PKG_BUILD_DIR)/bin/lua{,c}
        $(MAKE) -C $(PKG_BUILD_DIR) \
@@ -96,12 +97,12 @@ define Build/Compile
                INSTALL_ROOT=/usr \
                MYCFLAGS="-I$(STAGING_DIR)/usr/include $(TARGET_CFLAGS)" \
                MYLDFLAGS="-L$(STAGING_DIR)/usr/lib" \
-               all
+               all linux
        rm -rf $(PKG_INSTALL_DIR)
        mkdir -p $(PKG_INSTALL_DIR)
        $(MAKE) -C $(PKG_BUILD_DIR) \
-               INSTALL_ROOT="$(PKG_INSTALL_DIR)/usr" \
-               install soinstall
+               INSTALL_TOP="$(PKG_INSTALL_DIR)/usr" \
+               install
 endef
 
 define Build/InstallDev
diff --git a/lang/lua/patches/lua-5.0.2-config.patch b/lang/lua/patches/lua-5.0.2-config.patch
deleted file mode 100644 (file)
index fa5b0e7..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-diff -ruN lua-5.0.2-orig/config lua-5.0.2-1/config
---- lua-5.0.2-orig/config      2003-04-11 16:00:41.000000000 +0200
-+++ lua-5.0.2-1/config 2005-05-25 11:23:35.000000000 +0200
-@@ -25,15 +25,15 @@
- # interface (e.g., Linux, Solaris, IRIX, BSD, AIX, HPUX, and probably others),
- # uncomment the next two lines.
- #
--#LOADLIB= -DUSE_DLOPEN=1
--#DLLIB= -ldl
-+LOADLIB= -DUSE_DLOPEN=1
-+DLLIB= -ldl
- #
- # In Linux with gcc, you should also uncomment the next definition for
- # MYLDFLAGS, which passes -E (= -export-dynamic) to the linker. This option
- # allows dynamic libraries to link back to the `lua' program, so that they do
- # not need the Lua libraries. (Other systems may have an equivalent facility.)
- #
--#MYLDFLAGS= -Wl,-E
-+MYLDFLAGS= -Wl,-E
- #
- # On Windows systems. support for dynamic loading is enabled by default.
- # To disable this support, uncomment the next line.
-@@ -142,7 +142,7 @@
- # This should work in all Unix systems, but you may want to add options.
- #
--STRIP= strip
-+STRIP= /bin/true
- # ------------------------------------------------------------------ install
diff --git a/lang/lua/patches/lua-5.0.2-soname.patch b/lang/lua/patches/lua-5.0.2-soname.patch
deleted file mode 100644 (file)
index 3364ff6..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -ruN lua-5.0.2-orig/Makefile lua-5.0.2-1/Makefile
---- lua-5.0.2-orig/Makefile    2004-03-12 02:50:55.000000000 +0100
-+++ lua-5.0.2-1/Makefile       2005-05-25 11:41:44.000000000 +0200
-@@ -38,8 +38,8 @@
- # shared libraries (for Linux)
- so:
--      ld -o lib/liblua.so.$V -shared src/*.o
--      ld -o lib/liblualib.so.$V -shared src/lib/*.o
-+      $(LD) -o lib/liblua.so.$V -shared -soname="liblua.so.$V" src/*.o
-+      $(LD) -o lib/liblualib.so.$V -shared -soname="liblualib.so.$V" src/lib/*.o
-       cd lib; ln -fs liblua.so.$V liblua.so; ln -fs liblualib.so.$V liblualib.so
- # binaries using shared libraries
diff --git a/lang/lua/patches/lua-5.1.1-so.patch b/lang/lua/patches/lua-5.1.1-so.patch
new file mode 100644 (file)
index 0000000..fe6147e
--- /dev/null
@@ -0,0 +1,63 @@
+diff -urN lua-5.1.1/Makefile lua-5.1.1.new/Makefile
+--- lua-5.1.1/Makefile 2006-06-02 12:53:38.000000000 +0200
++++ lua-5.1.1.new/Makefile     2006-12-28 01:40:18.000000000 +0100
+@@ -42,7 +42,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 liblualib.a liblua.so liblua.so.$R liblualib.so.$R
+ TO_MAN= lua.1 luac.1
+ # Lua version and release.
+diff -urN lua-5.1.1/src/Makefile lua-5.1.1.new/src/Makefile
+--- lua-5.1.1/src/Makefile     2006-03-22 01:41:49.000000000 +0100
++++ lua-5.1.1.new/src/Makefile 2006-12-28 01:39:29.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,8 +37,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_SO) $(LUA_T) $(LUAC_T)
+ ALL_A= $(LUA_A)
++ALL_SO= $(LUA_SO)
+ default: $(PLAT)
+@@ -47,10 +49,19 @@
+ a:    $(ALL_A)
++so:   $(ALL_SO)
++
+ $(LUA_A): $(CORE_O) $(LIB_O)
+       $(AR) $@ $?
++      $(AR) liblualib.a $?
+       $(RANLIB) $@
++      $(RANLIB) liblualib.a
++$(LUA_SO): $(CORE_O) $(LIB_O)
++      $(LD) -o $@.$(PKG_VERSION) -shared -soname="$@.$(PKG_VERSION)" $?
++      $(LD) -o liblualib.so.$(PKG_VERSION) -shared -soname="liblualib.so.$(PKG_VERSION)" $?
++      ln -fs $@.$(PKG_VERSION) $@; ln -fs liblualib.so.$(PKG_VERSION) liblualib.so
++      
+ $(LUA_T): $(LUA_O) $(LUA_A)
+       $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
+@@ -92,7 +103,7 @@
+       $(MAKE) all MYCFLAGS=
+ linux:
+-      $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
++      $(MAKE) all MYCFLAGS+=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
+ macosx:
+       $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX