Upgrade lua to 5.1.1 #734

git-svn-id: svn://svn.openwrt.org/openwrt/packages@5911 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
florian 2006-12-28 00:43:37 +00:00
parent b7b9183822
commit 2657effd05
4 changed files with 71 additions and 52 deletions

View 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

View File

@ -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

View File

@ -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

View File

@ -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