luaposix: update to v31

v31 adds more interfaces to POSIX.
New compared to v5.1.11:
nanosleep, open, close, read, write, pipe, dup, dup2, setfl, getfl, fcntl,
poll, fnmatch, memrchr, strptime, statvfs, mkdtemp, isatty, openpt, ptsname,
grantpt, unlockpt, killpg, openpty, realpath, socket functions and constants,
fixes, optimizations, etc.
New dependency: luabitop (provided as a separate patch)

Signed-off-by: Maxim Storchak <m.storchak@gmail.com>


git-svn-id: svn://svn.openwrt.org/openwrt/packages@40673 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
hauke 2014-05-03 11:22:54 +00:00
parent d204521801
commit f24c4210db
2 changed files with 26 additions and 20 deletions

View File

@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luaposix
PKG_VERSION:=5.1.11
PKG_RELEASE:=2
PKG_VERSION:=v31
PKG_RELEASE:=1
PKG_SOURCE:=v$(PKG_VERSION).tar.gz
PKG_SOURCE:=release-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/luaposix/luaposix/archive/
PKG_MD5SUM:=8254576c52bd2d0e160353d24880bb89
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_MD5SUM:=a25ff76d54bbbebf7a1f3b20c9806ee3
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-release-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
@ -24,7 +24,8 @@ define Package/luaposix
CATEGORY:=Languages
TITLE:=luaposix
URL:=http://luaforge.net/projects/luaposix/
DEPENDS:=+lua +librt
DEPENDS:=+lua +librt +luabitop
PKG_BUILD_DEPENDS:=+lua/host
endef
define Package/luaposix/description
@ -33,6 +34,8 @@ define Package/luaposix/description
endef
define Build/Configure
cd $(PKG_BUILD_DIR) && ./bootstrap
$(call Build/Configure/Default)
endef
TARGET_CFLAGS += -DLUA_USE_LINUX $(FPIC) -std=gnu99
@ -46,7 +49,8 @@ endif
define Package/luaposix/install
$(INSTALL_DIR) $(1)/usr/lib/lua
$(INSTALL_BIN) $(PKG_BUILD_DIR)/posix.so $(1)/usr/lib/lua
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ext/posix/.libs/posix_c.so $(1)/usr/lib/lua
$(INSTALL_BIN) $(PKG_BUILD_DIR)/lib/posix.lua $(1)/usr/lib/lua
endef
$(eval $(call BuildPackage,luaposix))

View File

@ -1,26 +1,28 @@
--- a/lposix.c
+++ b/lposix.c
@@ -960,11 +960,13 @@ static int Pctermid(lua_State *L) /** c
--- a/ext/posix/posix.c
+++ b/ext/posix/posix.c
@@ -1970,6 +1970,7 @@ static int Pctermid(lua_State *L)
return 1;
}
+#ifndef NO_GETLOGIN
static int Pgetlogin(lua_State *L) /** getlogin() */
{
/***
Current logged-in user.
@see getlogin(3)
@@ -1980,6 +1981,7 @@ static int Pgetlogin(lua_State *L)
lua_pushstring(L, getlogin());
return 1;
}
+#endif
static void Fgetpasswd(lua_State *L, int i, const void *data)
@@ -1778,7 +1780,9 @@ static const luaL_reg R[] =
{
@@ -3786,7 +3788,9 @@ static const luaL_Reg R[] =
#if _POSIX_VERSION >= 200112L
{"getgroups", Pgetgroups},
MENTRY( Pgetgroups ),
#endif
+#ifndef NO_GETLOGIN
{"getlogin", Pgetlogin},
MENTRY( Pgetlogin ),
+#endif
{"getopt_long", Pgetopt_long},
{"getpasswd", Pgetpasswd},
{"getpid", Pgetpid},
MENTRY( Pgetopt ),
MENTRY( Pgetpasswd ),
MENTRY( Pgetpid ),