From 5f43e0b524a3317b60eca0fe765af468c7ed8470 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 3 May 2014 11:22:54 +0000 Subject: [PATCH] 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 SVN-Revision: 40673 --- lang/luaposix/Makefile | 18 +++++++----- lang/luaposix/patches/100-eglibc-compat.patch | 28 ++++++++++--------- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/lang/luaposix/Makefile b/lang/luaposix/Makefile index 95e013564d..949f478a22 100644 --- a/lang/luaposix/Makefile +++ b/lang/luaposix/Makefile @@ -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)) diff --git a/lang/luaposix/patches/100-eglibc-compat.patch b/lang/luaposix/patches/100-eglibc-compat.patch index 96a6fce640..0cdff83d2c 100644 --- a/lang/luaposix/patches/100-eglibc-compat.patch +++ b/lang/luaposix/patches/100-eglibc-compat.patch @@ -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 ), -- 2.30.2