luaposix: update to v31
authorHauke Mehrtens <hauke@hauke-m.de>
Sat, 3 May 2014 11:22:54 +0000 (11:22 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 3 May 2014 11:22:54 +0000 (11:22 +0000)
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>
SVN-Revision: 40673

lang/luaposix/Makefile
lang/luaposix/patches/100-eglibc-compat.patch

index 95e013564ded3e9ee2eea7d6aa0181f02c7e21fc..949f478a22b40a23197e747ee632b71e305062a7 100644 (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))
index 96a6fce640cf0b01a5cc1d9875669b218983f240..0cdff83d2c351c71b374ebd5428fa9d1c4d62f0f 100644 (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         ),