mirror of
https://github.com/openwrt/packages.git
synced 2025-12-26 11:16:31 +04:00
1ab3208a1fceb12fca8f24ba57d6e13c5bff15e3 'lua.h' back to redundancy in version definitions 21ff8de33a5aca9c3c907592b894e4b9ab036d3e Bug: Tricky _PROMPT may trigger undefined behavior 7eb1ed21b7057ab5f1b921f8271eddcf13659737 More permissive use of 'errno' 2db966fcbf757775c842bc66449d7e697826aa1d Bug: luaL_traceback may need more than 5 stack slots ae9a0cbbb446499e759acae47664d1d136d7ba90 Bug: overlapping assignments d5212c13b081ed62d8e1ae436779e79c79edf564 More disciplined use of 'errno' e0efebdbe4e4053c6fb78588c546f1dc23aa964a Detail in the manual e84f7bf19852c35ad0a1e9a1654a7b99a211e17c Details dfbde4c7d540f81f2cc539741a2c1f4c00f91c10 Bug: Active-lines for stripped vararg functions de794a6527058e75b674118b35f39dcbb13e88b1 Towards release 5.4.7 8b83417de982d068bd92e0428a42ca0cdd909789 Avoids a warning when lua_Number is 'float' e288c5a91883793d14ed9e9d93464f6ee0b08915 Bug: Yielding in a hook stops in the wrong instruction 5853c37a83ec66ccb45094f9aeac23dfdbcde671 Bug: Buffer overflow in string concatenation 842a83f09caa2ebd4bc03e0076420148ac07c808 Panic functions should not raise errors 7923dbbf72da303ca1cca17efd24725668992f15 Bug: Recursion in 'getobjname' can stack overflow 81e4fce5303fdb274bc5572fb168dd766fb8208e Simpler test in 'luaH_getint' 6baee9ef9d5657ab582c8a4b9f885ec58ed502d0 Removed test for "corrupted binary dump" edd8589f478e784bb8d1a8e9a3bb2bb3ca51738c Avoid casts from unsigned long to floating-point 07a9eab23ac073362f231ddc7215688cf221ff45 Cannot use 'getshrstr' before setting 'shrlen' 9363a8b9901a5643c9da061ea8dda8a86cdc7ef1 Documentation for "LUA_NOENV" 5ab6a5756b3c50c99f1388885e9a48a7da8cbe2d Bug: Wrong line number for function calls 9b4f39ab14fb2e55345c3d23537d129dac23b091 More disciplined use of 'getstr' and 'tsslen' f4211a5ea4e235ccfa8b8dfa46031c23e9e839e2 More control over encoding of test files 1b3f507f620d996ffb69da7476a19251acfb89ca Bug: Call hook may be called twice when count hook yields 6b51133a988587f34ee9581d799ea9913581afd3 Thread stacks resized in the atomic phase cbae01620278f9b568805db16a96d0631ced473d Details ea39042e13645f63713425c05cc9ee4cfdcf0a40 Removed redundancy in definitions of version/release 05ec55f16b389a4377adab84efe374437da8dbd2 Avoid inclusion loop in 'ltm.h' f623b969325be736297bc1dff48e763c08778243 Bug: read overflow in 'l_strcmp' 9be74ccc214eb6f4d9d0b9496fd973542c7377d9 Several functions turned 'static' 09f3c2372f5dbeaec9f50614a26c1b5761726a88 Option '-l' discards version sufix from file name c197885cb00b85251c35cffdc4057efaee2d7a88 Small improvements in tests 934e77a286aeb97ca02badf56956ccc78217e9d0 Details Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
166 lines
4.1 KiB
Makefile
166 lines
4.1 KiB
Makefile
#
|
|
# Copyright (C) 2006-2023 OpenWrt.org
|
|
#
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
# See /LICENSE for more information.
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=lua
|
|
PKG_VERSION:=5.4.7
|
|
PKG_RELEASE:=1
|
|
|
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
|
PKG_SOURCE_URL:=https://www.lua.org/ftp/ \
|
|
https://www.tecgraf.puc-rio.br/lua/ftp/
|
|
PKG_HASH:=9fbf5e28ef86c69858f6d3d34eccc32e911c1a28b4120ff3e84aaa70cfbf1e30
|
|
PKG_BUILD_PARALLEL:=1
|
|
|
|
PKG_MAINTAINER:=Christian Marangi <ansuelsmth@gmail.com>
|
|
|
|
PKG_LICENSE:=MIT
|
|
PKG_LICENSE_FILES:=COPYRIGHT
|
|
PKG_CPE_ID:=cpe:/a:lua:lua
|
|
|
|
HOST_PATCH_DIR := ./patches-host
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
include $(INCLUDE_DIR)/host-build.mk
|
|
|
|
define Package/lua5.4/Default
|
|
SUBMENU:=Lua
|
|
SECTION:=lang
|
|
CATEGORY:=Languages
|
|
TITLE:=Lua programming language (version 5.4)
|
|
URL:=https://www.lua.org/
|
|
endef
|
|
|
|
define Package/lua5.4/Default/description
|
|
Lua is a powerful, efficient, lightweight, embeddable scripting language. It
|
|
supports procedural programming, object-oriented programming, functional
|
|
programming, data-driven programming, and data description.
|
|
endef
|
|
|
|
define Package/liblua5.4
|
|
$(call Package/lua5.4/Default)
|
|
SUBMENU:=
|
|
SECTION:=libs
|
|
CATEGORY:=Libraries
|
|
TITLE+= (libraries)
|
|
ABI_VERSION:=5.4
|
|
endef
|
|
|
|
define Package/liblua5.4/description
|
|
$(call Package/lua5.4/Default/description)
|
|
This package contains the Lua shared libraries, needed by other programs.
|
|
endef
|
|
|
|
define Package/lua5.4
|
|
$(call Package/lua5.4/Default)
|
|
DEPENDS:=+liblua5.4
|
|
TITLE+= (interpreter)
|
|
endef
|
|
|
|
define Package/lua5.4/description
|
|
$(call Package/lua5.4/Default/description)
|
|
This package contains the Lua language interpreter.
|
|
endef
|
|
|
|
define Package/luac5.4
|
|
$(call Package/lua5.4/Default)
|
|
DEPENDS:=+liblua5.4
|
|
TITLE+= (compiler)
|
|
endef
|
|
|
|
define Package/luac5.4/description
|
|
$(call Package/lua5.4/Default/description)
|
|
This package contains the Lua language compiler.
|
|
endef
|
|
|
|
define Build/Prepare
|
|
$(call Build/Prepare/Default)
|
|
mv $(PKG_BUILD_DIR)/doc/lua.1 $(PKG_BUILD_DIR)/doc/lua5.4.1
|
|
mv $(PKG_BUILD_DIR)/doc/luac.1 $(PKG_BUILD_DIR)/doc/luac5.4.1
|
|
endef
|
|
|
|
TARGET_CFLAGS += -DLUA_USE_LINUX $(FPIC) -std=gnu99
|
|
|
|
define Build/Compile
|
|
$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
|
|
CC="$(TARGET_CROSS)gcc" \
|
|
AR="$(TARGET_CROSS)ar rcu" \
|
|
RANLIB="$(TARGET_CROSS)ranlib" \
|
|
INSTALL_ROOT=/usr \
|
|
CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
|
|
PKG_VERSION=$(PKG_VERSION) \
|
|
linux
|
|
rm -rf $(PKG_INSTALL_DIR)
|
|
mkdir -p $(PKG_INSTALL_DIR)
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
|
INSTALL_TOP="$(PKG_INSTALL_DIR)/usr" \
|
|
install
|
|
endef
|
|
|
|
define Host/Prepare
|
|
$(call Host/Prepare/Default)
|
|
mv $(HOST_BUILD_DIR)/doc/lua.1 $(HOST_BUILD_DIR)/doc/lua5.4.1
|
|
mv $(HOST_BUILD_DIR)/doc/luac.1 $(HOST_BUILD_DIR)/doc/luac5.4.1
|
|
endef
|
|
|
|
define Host/Configure
|
|
$(SED) 's,"/usr/local/","$(STAGING_DIR_HOSTPKG)/",' $(HOST_BUILD_DIR)/src/luaconf.h
|
|
endef
|
|
|
|
ifeq ($(HOST_OS),Darwin)
|
|
LUA_OS:=macosx
|
|
else
|
|
ifeq ($(HOST_OS),FreeBSD)
|
|
LUA_OS:=freebsd
|
|
else
|
|
LUA_OS:=linux
|
|
endif
|
|
endif
|
|
|
|
define Host/Compile
|
|
$(MAKE) -C $(HOST_BUILD_DIR) \
|
|
CC="$(HOSTCC) $(HOST_FPIC) -std=gnu99" \
|
|
$(LUA_OS)
|
|
endef
|
|
|
|
define Host/Install
|
|
$(MAKE) -C $(HOST_BUILD_DIR) \
|
|
INSTALL_TOP="$(STAGING_DIR_HOSTPKG)" \
|
|
install
|
|
endef
|
|
|
|
define Build/InstallDev
|
|
$(INSTALL_DIR) $(1)/usr/include/lua5.4 $(1)/usr/lib
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/lua5.4/lua{,lib,conf}.h $(1)/usr/include/lua5.4/
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/lua5.4/lua.hpp $(1)/usr/include/lua5.4/
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/lua5.4/lauxlib.h $(1)/usr/include/lua5.4/
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/liblua5.4.{a,so*} $(1)/usr/lib/
|
|
$(LN) liblua5.4.so.0.0.0 $(1)/usr/lib/liblualib5.4.so
|
|
endef
|
|
|
|
define Package/liblua5.4/install
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/liblua5.4.so* $(1)/usr/lib/
|
|
endef
|
|
|
|
define Package/lua5.4/install
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lua5.4 $(1)/usr/bin/
|
|
endef
|
|
|
|
define Package/luac5.4/install
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/luac5.4 $(1)/usr/bin/
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,liblua5.4))
|
|
$(eval $(call BuildPackage,lua5.4))
|
|
$(eval $(call BuildPackage,luac5.4))
|
|
$(eval $(call HostBuild))
|