Merge pull request #9708 from mstorchak/luaposix
luaposix: update to v34.1.1
This commit is contained in:
commit
3e791f33a0
3 changed files with 46 additions and 74 deletions
|
@ -1,6 +1,4 @@
|
||||||
#
|
#
|
||||||
# Copyright (C) 2011 OpenWrt.org
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
#
|
#
|
||||||
|
@ -8,20 +6,17 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=luaposix
|
PKG_NAME:=luaposix
|
||||||
PKG_VERSION:=v33.2.1
|
PKG_VERSION:=34.1.1
|
||||||
PKG_RELEASE:=6
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=release-$(PKG_VERSION).tar.gz
|
PKG_SOURCE_URL:=https://codeload.github.com/$(PKG_NAME)/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)?
|
||||||
PKG_SOURCE_URL:=https://github.com/luaposix/luaposix/archive/
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_HASH:=4fb34dfea67f4cf3194cdecc6614c9aea67edc3c4093d34137669ea869c358e1
|
PKG_HASH:=7948f4ac8b953172e928753632e37ad97cc3014df74b524fe7839f71216a7e90
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-release-$(PKG_VERSION)
|
|
||||||
PKG_REMOVE_FILES:=aclocal.m4
|
|
||||||
PKG_FIXUP:=autoreconf
|
|
||||||
PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
|
PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
|
||||||
PKG_LICENSE:=MIT
|
PKG_LICENSE:=MIT
|
||||||
PKG_LICENSE_FILES:=COPYING
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
|
||||||
PKG_BUILD_DEPENDS:=lua/host
|
PKG_BUILD_DEPENDS:=luarocks/host
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
@ -29,9 +24,9 @@ define Package/luaposix
|
||||||
SUBMENU:=Lua
|
SUBMENU:=Lua
|
||||||
SECTION:=lang
|
SECTION:=lang
|
||||||
CATEGORY:=Languages
|
CATEGORY:=Languages
|
||||||
TITLE:=luaposix
|
TITLE:=POSIX binding for LuaJIT, Lua 5.1, 5.2 and 5.3
|
||||||
URL:=http://luaforge.net/projects/luaposix/
|
URL:=https://github.com/luaposix/luaposix
|
||||||
DEPENDS:=+lua +librt
|
DEPENDS:=+lua +lua-bit32
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/luaposix/description
|
define Package/luaposix/description
|
||||||
|
@ -39,20 +34,30 @@ define Package/luaposix/description
|
||||||
to various low level libc functions.
|
to various low level libc functions.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
CONFIGURE_VARS += ac_cv_path_LDOC="true"
|
TARGET_CFLAGS += \
|
||||||
|
-I$(STAGING_DIR)/usr/include
|
||||||
|
|
||||||
TARGET_CFLAGS += -DLUA_USE_LINUX $(FPIC) -std=gnu99
|
define Build/Compile
|
||||||
ifeq ($(CONFIG_USE_MUSL),y)
|
cd $(PKG_BUILD_DIR) && \
|
||||||
TARGET_CFLAGS += -D_POSIX_PRIORITY_SCHEDULING
|
LDFLAGS="$(TARGET_LDFLAGS) $(FPIC)" \
|
||||||
# Musl doesn't do all of XOPEN_REALTIME, but it does for luaposix.
|
CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \
|
||||||
# see https://github.com/luaposix/luaposix/issues/295
|
CC="$(TARGET_CC)" LD="$(TARGET_CC)" \
|
||||||
TARGET_CFLAGS += -D_XOPEN_REALTIME=1
|
LUA_PKGNAME=lua5.1 \
|
||||||
endif
|
LUA_LIBDIR=$(STAGING_DIR)/usr/lib/lua \
|
||||||
|
luarocks make --force --deps-mode=none --pack-binary-rock luaposix-$(PKG_VERSION)-1.rockspec \
|
||||||
|
LUA_LIBDIR=$(STAGING_DIR)/usr/lib/lua \
|
||||||
|
LUA_PKGNAME=lua5.1 \
|
||||||
|
CC="$(TARGET_CC)" LD="$(TARGET_CC)" \
|
||||||
|
CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \
|
||||||
|
LDFLAGS="$(TARGET_LDFLAGS)"
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/luaposix/install
|
define Package/luaposix/install
|
||||||
$(INSTALL_DIR) $(1)/usr/lib/lua/posix
|
$(INSTALL_DIR) $(1)/usr/lib/lua/posix/sys
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ext/posix/.libs/posix.so $(1)/usr/lib/lua
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/linux/posix/*.so $(1)/usr/lib/lua/posix/
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/posix.lua $(1)/usr/lib/lua
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/linux/posix/sys/*.so $(1)/usr/lib/lua/posix/sys/
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/posix/*.lua $(1)/usr/lib/lua/posix/
|
||||||
|
rm -f $(1)/usr/lib/lua/posix/{deprecated,compat}.lua
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,luaposix))
|
$(eval $(call BuildPackage,luaposix))
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index dfd4199..19924d0 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -153,15 +153,6 @@ AC_CHECK_LIB([rt], [clock_gettime])
|
|
||||||
AC_SUBST([LIBRT], [$LIBS])
|
|
||||||
LIBS=$save_LIBS
|
|
||||||
|
|
||||||
-## Curses
|
|
||||||
-AX_WITH_CURSES
|
|
||||||
-AC_ARG_VAR(CURSES_LIB, [linker flags for curses library])
|
|
||||||
-
|
|
||||||
-save_LIBS=$LIBS
|
|
||||||
-LIBS="$CURSES_LIB $LIBS"
|
|
||||||
-AC_CHECK_FUNCS([resizeterm])
|
|
||||||
-LIBS=$save_LIBS
|
|
||||||
-
|
|
||||||
## Use system implementation, or bundled replacement?
|
|
||||||
AC_CHECK_FUNCS([strlcpy])
|
|
||||||
|
|
||||||
diff --git a/ext/posix/posix.c b/ext/posix/posix.c
|
|
||||||
index 6019df0..2d75487 100644
|
|
||||||
--- a/ext/posix/posix.c
|
|
||||||
+++ b/ext/posix/posix.c
|
|
||||||
@@ -12,7 +12,6 @@
|
|
||||||
|
|
||||||
#include "bit32.c"
|
|
||||||
#include "ctype.c"
|
|
||||||
-#include "curses.c"
|
|
||||||
#include "dirent.c"
|
|
||||||
#include "errno.c"
|
|
||||||
#include "fcntl.c"
|
|
|
@ -1,20 +1,19 @@
|
||||||
diff --git a/lib/posix.lua.in b/lib/posix.lua.in
|
diff --git i/lib/posix/init.lua w/lib/posix/init.lua
|
||||||
index 17ef39a..a248d9b 100644
|
index c17693a..d4db923 100644
|
||||||
--- a/lib/posix.lua.in
|
--- i/lib/posix/init.lua
|
||||||
+++ b/lib/posix.lua.in
|
+++ w/lib/posix/init.lua
|
||||||
@@ -35,15 +35,6 @@ for _, sub in ipairs {
|
@@ -325,14 +325,6 @@ do
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-
|
||||||
|
- -- Inject deprecated APIs (overwriting submodules) for backwards compatibility.
|
||||||
|
- for k, v in next, require 'posix.deprecated' do
|
||||||
|
- M[k] = v
|
||||||
|
- end
|
||||||
|
- for k, v in next, require 'posix.compat' do
|
||||||
|
- M[k] = v
|
||||||
|
- end
|
||||||
end
|
end
|
||||||
|
|
||||||
-
|
|
||||||
--- Inject deprecated APIs (overwriting submodules) for backwards compatibility.
|
|
||||||
-for k, v in pairs (require "posix.deprecated") do
|
|
||||||
- M[k] = v
|
|
||||||
-end
|
|
||||||
-for k, v in pairs (require "posix.compat") do
|
|
||||||
- M[k] = v
|
|
||||||
-end
|
|
||||||
-
|
|
||||||
M.version = "posix for " .. _VERSION .. " / @PACKAGE_STRING@"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue