luasocket: variant for lua5.1 and lua5.3
Updating luasocket package that is compatible with, and built against, lua version 5.3 and 5.1. I made the following modifications: Makefile - Set the LUAV environment variable in the build variant. Set an include path in the lua build so that that lua headers could be found. Also using the make install target as everything is put in the correct place automatically for the lua 5.3 build. The lua 5.1 build still uses the old install method because when I was testing using the "install" target the lua5.1 interpreter was unable to locate resources. So that is why there are two install methods. Built and tested on BCM5301X. Signed-off-by: Colby Whitney <colby.whitney@luxul.com>
This commit is contained in:
parent
5de3d6c220
commit
0c0b74618c
1 changed files with 39 additions and 5 deletions
|
@ -22,20 +22,44 @@ PKG_LICENSE_FILES:=LICENSE
|
|||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/luasocket
|
||||
define Package/luasocket/default
|
||||
SUBMENU:=Lua
|
||||
SECTION:=lang
|
||||
CATEGORY:=Languages
|
||||
URL:=http://w3.impa.br/~diego/software/luasocket
|
||||
TITLE:=LuaSocket
|
||||
DEPENDS:=+lua
|
||||
endef
|
||||
|
||||
define Package/luasocket/description
|
||||
define Package/luasocket
|
||||
$(Package/luasocket/default)
|
||||
TITLE:=LuaSocket
|
||||
DEPENDS:=+lua
|
||||
VARIANT:=lua-51
|
||||
DEFAULT_VARIANT:=1
|
||||
endef
|
||||
|
||||
define Package/luasocket5.3
|
||||
$(Package/luasocket/default)
|
||||
TITLE:=LuaSocket 5.3
|
||||
DEPENDS:=+liblua5.3
|
||||
VARIANT:=lua-53
|
||||
endef
|
||||
|
||||
ifeq ($(BUILD_VARIANT),lua-51)
|
||||
LUA_VERSION=5.1
|
||||
endif
|
||||
|
||||
ifeq ($(BUILD_VARIANT),lua-53)
|
||||
LUA_VERSION=5.3
|
||||
endif
|
||||
|
||||
|
||||
define Package/luasocket/default/description
|
||||
LuaSocket is the most comprehensive networking support
|
||||
library for the Lua language. It provides easy access to
|
||||
TCP, UDP, DNS, SMTP, FTP, HTTP, MIME and much more.
|
||||
endef
|
||||
Package/luasocket/description = $(Package/luasocket/default/description)
|
||||
Package/luasocket5.3/description = $(Package/luasocket/default/description)
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
@ -45,7 +69,7 @@ define Build/Compile
|
|||
LIBDIR="$(TARGET_LDFLAGS)" \
|
||||
CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
|
||||
LD="$(TARGET_CROSS)ld -shared" \
|
||||
LUAV=5.1 LUAINC_linux_base=$(STAGING_DIR)/usr/include \
|
||||
LUAV=$(LUA_VERSION) LUAINC_linux_base=$(STAGING_DIR)/usr/include \
|
||||
all
|
||||
endef
|
||||
|
||||
|
@ -62,4 +86,14 @@ define Package/luasocket/install
|
|||
ln -sf ../socket-3.0-rc1.so $(1)/usr/lib/lua/socket/core.so
|
||||
endef
|
||||
|
||||
|
||||
define Package/luasocket5.3/install
|
||||
$(MAKE) -C $(PKG_BUILD_DIR)/src \
|
||||
DESTDIR="$(1)" \
|
||||
LUAV=$(LUA_VERSION) \
|
||||
install
|
||||
endef
|
||||
|
||||
|
||||
$(eval $(call BuildPackage,luasocket))
|
||||
$(eval $(call BuildPackage,luasocket5.3))
|
||||
|
|
Loading…
Reference in a new issue