1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-07-04 22:24:32 +03:00

Add lua package

git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1066 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nico 2005-05-26 21:28:31 +00:00
parent cea8e58f67
commit 2cc310a5c9
10 changed files with 298 additions and 0 deletions

View File

@ -12,6 +12,7 @@ source "package/iptables/Config.in"
comment "Applications"
source "package/haserl/Config.in"
source "package/lcd4linux/Config.in"
source "package/lua/Config.in"
source "package/microperl/Config.in"
source "package/monit/Config.in"
source "package/osiris/Config.in"

View File

@ -47,6 +47,7 @@ package-$(BR2_PACKAGE_LIBPTHREAD) += libpthread
package-$(BR2_PACKAGE_LIBTOOL) += libtool
package-$(BR2_PACKAGE_LIBUSB) += libusb
package-$(BR2_PACKAGE_LIGHTTPD) += lighttpd
package-$(BR2_PACKAGE_LUA) += lua
package-$(BR2_PACKAGE_LZO) += lzo
package-$(BR2_PACKAGE_MARADNS) += maradns
package-$(BR2_PACKAGE_MATRIXSSL) += matrixssl

119
package/lua/Config.in Normal file
View File

@ -0,0 +1,119 @@
menu "lua - LUA programming language"
config BR2_PACKAGE_LUA
bool
default n
depends BR2_PACKAGE_LUA_INTERPRETER || BR2_PACKAGE_LUA_COMPILER || BR2_PACKAGE_LIBLUA
config BR2_PACKAGE_LUA_INTERPRETER
tristate "lua - LUA programming language interpreter"
# default m if CONFIG_DEVEL
default n
select BR2_PACKAGE_LUA
select BR2_PACKAGE_LIBLUA
help
Lua is a powerful light-weight programming language designed for extending
applications. Lua is also frequently used as a general-purpose, stand-alone
language. Lua is free software.
Lua combines simple procedural syntax with powerful data description
constructs based on associative arrays and extensible semantics. Lua is
dynamically typed, interpreted from bytecodes, and has automatic memory
management with garbage collection, making it ideal for configuration,
scripting, and rapid prototyping.
Lua is implemented as a small library of C functions, written in ANSI C, and
compiles unmodified in all known platforms. The implementation goals are
simplicity, efficiency, portability, and low embedding cost. The result is a
fast language engine with small footprint, making it ideal in embedded systems
too.
http://www.lua.org/
This package contains the LUA language interpreter.
config BR2_PACKAGE_LUA_COMPILER
tristate "luac - LUA programming language compiler"
# default m if CONFIG_DEVEL
default n
select BR2_PACKAGE_LUA
select BR2_PACKAGE_LIBLUA
help
Lua is a powerful light-weight programming language designed for extending
applications. Lua is also frequently used as a general-purpose, stand-alone
language. Lua is free software.
Lua combines simple procedural syntax with powerful data description
constructs based on associative arrays and extensible semantics. Lua is
dynamically typed, interpreted from bytecodes, and has automatic memory
management with garbage collection, making it ideal for configuration,
scripting, and rapid prototyping.
Lua is implemented as a small library of C functions, written in ANSI C, and
compiles unmodified in all known platforms. The implementation goals are
simplicity, efficiency, portability, and low embedding cost. The result is a
fast language engine with small footprint, making it ideal in embedded systems
too.
http://www.lua.org/
This package contains the LUA language compiler.
config BR2_PACKAGE_LUA_EXAMPLES
tristate "lua-examples - LUA programming language examples"
# default m if CONFIG_DEVEL
default n
select BR2_PACKAGE_LUA
select BR2_PACKAGE_LUA_INTERPRETER
help
Lua is a powerful light-weight programming language designed for extending
applications. Lua is also frequently used as a general-purpose, stand-alone
language. Lua is free software.
Lua combines simple procedural syntax with powerful data description
constructs based on associative arrays and extensible semantics. Lua is
dynamically typed, interpreted from bytecodes, and has automatic memory
management with garbage collection, making it ideal for configuration,
scripting, and rapid prototyping.
Lua is implemented as a small library of C functions, written in ANSI C, and
compiles unmodified in all known platforms. The implementation goals are
simplicity, efficiency, portability, and low embedding cost. The result is a
fast language engine with small footprint, making it ideal in embedded systems
too.
http://www.lua.org/
This package contains LUA language examples.
config BR2_PACKAGE_LIBLUA
tristate "liblua - LUA programming language shared libraries"
# default m if CONFIG_DEVEL
default n
select BR2_PACKAGE_LUA
help
Lua is a powerful light-weight programming language designed for extending
applications. Lua is also frequently used as a general-purpose, stand-alone
language. Lua is free software.
Lua combines simple procedural syntax with powerful data description
constructs based on associative arrays and extensible semantics. Lua is
dynamically typed, interpreted from bytecodes, and has automatic memory
management with garbage collection, making it ideal for configuration,
scripting, and rapid prototyping.
Lua is implemented as a small library of C functions, written in ANSI C, and
compiles unmodified in all known platforms. The implementation goals are
simplicity, efficiency, portability, and low embedding cost. The result is a
fast language engine with small footprint, making it ideal in embedded systems
too.
http://www.lua.org/
This package contains the LUA shared libraries, needed by other programs.
endmenu

97
package/lua/Makefile Normal file
View File

@ -0,0 +1,97 @@
# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=lua
PKG_VERSION:=5.0.2
PKG_RELEASE:=1
PKG_MD5SUM:= dea74646b7e5c621fef7174df83c34b1
PKG_SOURCE_URL:=http://www.lua.org/ftp/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_CAT:=zcat
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
include $(TOPDIR)/package/rules.mk
$(eval $(call PKG_template,LIBLUA,liblua,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,LUA_INTERPRETER,lua,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,LUA_COMPILER,luac,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(eval $(call PKG_template,LUA_EXAMPLES,lua-examples,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
$(PKG_BUILD_DIR)/.configured:
touch $@
$(PKG_BUILD_DIR)/.built:
$(MAKE) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CROSS)gcc" \
LD="$(TARGET_CROSS)ld" \
AR="$(TARGET_CROSS)ar rcu" \
RANLIB="$(TARGET_CROSS)ranlib" \
INSTALL_ROOT=/usr \
MYCFLAGS="-I$(STAGING_DIR)/usr/include $(TARGET_CFLAGS)" \
MYLDFLAGS="-L$(STAGING_DIR)/usr/lib" \
all so
# 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) \
CC="$(TARGET_CROSS)gcc" \
LD="$(TARGET_CROSS)ld" \
AR="$(TARGET_CROSS)ar rcu" \
RANLIB="$(TARGET_CROSS)ranlib" \
INSTALL_ROOT=/usr \
MYCFLAGS="-I$(STAGING_DIR)/usr/include $(TARGET_CFLAGS)" \
MYLDFLAGS="-L$(STAGING_DIR)/usr/lib" \
all
rm -rf $(PKG_INSTALL_DIR)
mkdir -p $(PKG_INSTALL_DIR)
$(MAKE) -C $(PKG_BUILD_DIR) \
INSTALL_ROOT="$(PKG_INSTALL_DIR)/usr" \
install soinstall
touch $@
$(IPKG_LIBLUA):
install -d -m0755 $(IDIR_LIBLUA)/usr/lib
cp -fp $(PKG_INSTALL_DIR)/usr/lib/liblua{,lib}.so.* $(IDIR_LIBLUA)/usr/lib/
$(RSTRIP) $(IDIR_LIBLUA)
$(IPKG_BUILD) $(IDIR_LIBLUA) $(PACKAGE_DIR)
$(IPKG_LUA_INTERPRETER):
install -d -m0755 $(IDIR_LUA_INTERPRETER)/usr/bin
cp -fp $(PKG_INSTALL_DIR)/usr/bin/lua $(IDIR_LUA_INTERPRETER)/usr/bin/
$(RSTRIP) $(IDIR_LUA_INTERPRETER)
$(IPKG_BUILD) $(IDIR_LUA_INTERPRETER) $(PACKAGE_DIR)
$(IPKG_LUA_COMPILER):
install -d -m0755 $(IDIR_LUA_COMPILER)/usr/bin
cp -fp $(PKG_INSTALL_DIR)/usr/bin/luac $(IDIR_LUA_COMPILER)/usr/bin/
$(RSTRIP) $(IDIR_LUA_COMPILER)
$(IPKG_BUILD) $(IDIR_LUA_COMPILER) $(PACKAGE_DIR)
$(IPKG_LUA_EXAMPLES):
install -d -m0755 $(IDIR_LUA_EXAMPLES)/usr/share/lua/examples
install -m0644 $(PKG_BUILD_DIR)/test/*.lua \
$(IDIR_LUA_EXAMPLES)/usr/share/lua/examples/
$(RSTRIP) $(IDIR_LUA_EXAMPLES)
$(IPKG_BUILD) $(IDIR_LUA_EXAMPLES) $(PACKAGE_DIR)
$(STAGING_DIR)/usr/lib/liblua.so: $(PKG_BUILD_DIR)/.built
mkdir -p $(STAGING_DIR)/usr/include
cp -fp $(PKG_INSTALL_DIR)/usr/include/lua{,lib}.h $(STAGING_DIR)/usr/include/
cp -fp $(PKG_INSTALL_DIR)/usr/include/lauxlib.h $(STAGING_DIR)/usr/include/
mkdir -p $(STAGING_DIR)/usr/lib
cp -fp $(PKG_INSTALL_DIR)/usr/lib/liblua{,lib}.{a,so*} $(STAGING_DIR)/usr/lib/
touch $@
install-dev: $(STAGING_DIR)/usr/lib/liblua.so
uninstall-dev:
rm -rf \
$(STAGING_DIR)/usr/include/lua{,lib}.h \
$(STAGING_DIR)/usr/include/lauxlib.h \
$(STAGING_DIR)/usr/lib/liblua{,lib}.{a,so*} \
compile: install-dev
clean: uninstall-dev

View File

@ -0,0 +1,8 @@
Package: liblua
Priority: optional
Section: libs
Version: [TBDL]
Architecture: [TBDL]
Maintainer: Nico <nthill@free.fr>
Source: http://openwrt.org/cgi-bin/viewcvs.cgi/openwrt/package/lua/
Description: LUA programming language shared libraries

View File

@ -0,0 +1,9 @@
Package: lua-examples
Priority: optional
Section: devel
Version: [TBDL]
Architecture: [TBDL]
Maintainer: Nico <nthill@free.fr>
Source: http://nthill.free.fr/openwrt/sources/lua/
Description: LUA programming language examples
Depends: lua

View File

@ -0,0 +1,9 @@
Package: lua
Priority: optional
Section: admin
Version: [TBDL]
Architecture: [TBDL]
Maintainer: Nico <nthill@free.fr>
Source: http://nthill.free.fr/openwrt/sources/lua/
Description: LUA programming language interpreter
Depends: liblua

View File

@ -0,0 +1,9 @@
Package: luac
Priority: optional
Section: devel
Version: [TBDL]
Architecture: [TBDL]
Maintainer: Nico <nthill@free.fr>
Source: http://nthill.free.fr/openwrt/sources/lua/
Description: LUA programming language compiler
Depends: liblua

View File

@ -0,0 +1,31 @@
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

@ -0,0 +1,14 @@
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