diff options
author | Boris Nagaev <bnagaev@gmail.com> | 2015-05-14 12:58:58 (GMT) |
---|---|---|
committer | Boris Nagaev <bnagaev@gmail.com> | 2015-05-14 12:58:58 (GMT) |
commit | c7526852f06ce445e8b1546468c802fe075963bf (patch) | |
tree | 318bb52397a8410eefa44d728e2d7bd60e058484 | |
parent | 98a5771690279ebe89ac1b5134f02d4864cefa6b (diff) | |
download | mxe-c7526852f06ce445e8b1546468c802fe075963bf.zip mxe-c7526852f06ce445e8b1546468c802fe075963bf.tar.gz mxe-c7526852f06ce445e8b1546468c802fe075963bf.tar.bz2 |
update Lua from 5.2.3 to 5.3.0
Package luabind was changed to be compatible with Lua 5.3.0:
* do not use macro LUA_COMPAT_ALL. Lua 5.3 respects macros
LUA_COMPAT_5_2 and LUA_COMPAT_5_1 and ignores macro
LUA_COMPAT_ALL.
* Instead, include needed compatibility defines into header
luabind/config.hpp. Side effect of this is that C++ code
using luabind doesn't need to define LUA_COMPAT_ALL.
This definition was removed from the example of luabind.
-rw-r--r-- | src/lua.mk | 6 | ||||
-rw-r--r-- | src/luabind-1-cmakelists.patch | 4 | ||||
-rw-r--r-- | src/luabind-7-compatibility-Lua-macro.patch | 36 | ||||
-rw-r--r-- | src/luabind.mk | 3 |
4 files changed, 41 insertions, 8 deletions
@@ -3,10 +3,10 @@ PKG := lua $(PKG)_IGNORE := -$(PKG)_VERSION := 5.2.3 +$(PKG)_VERSION := 5.3.0 # Shared version -$(PKG)_SOVERS := 52 -$(PKG)_CHECKSUM := 926b7907bc8d274e063d42804666b40a3f3c124c +$(PKG)_SOVERS := 53 +$(PKG)_CHECKSUM := 1c46d1c78c44039939e820126b86a6ae12dadfba $(PKG)_SUBDIR := lua-$($(PKG)_VERSION) $(PKG)_FILE := lua-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://www.lua.org/ftp/$($(PKG)_FILE) diff --git a/src/luabind-1-cmakelists.patch b/src/luabind-1-cmakelists.patch index b6927eb..cef6d17 100644 --- a/src/luabind-1-cmakelists.patch +++ b/src/luabind-1-cmakelists.patch @@ -12,7 +12,7 @@ new file mode 100644 index 0000000..acc47ae --- /dev/null +++ b/CMakeLists.txt -@@ -0,0 +1,29 @@ +@@ -0,0 +1,27 @@ +cmake_minimum_required(VERSION 2.6) +project(luabind) + @@ -33,8 +33,6 @@ index 0000000..acc47ae +set(luabind_cxx_flags "-ftemplate-depth-128 -finline-functions") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${luabind_cxx_flags}") + -+add_definitions(-DLUA_COMPAT_ALL) -+ +target_link_libraries(luabind ${LUA_LIBRARIES} luabind) + +install(TARGETS luabind DESTINATION diff --git a/src/luabind-7-compatibility-Lua-macro.patch b/src/luabind-7-compatibility-Lua-macro.patch new file mode 100644 index 0000000..69b2c0d --- /dev/null +++ b/src/luabind-7-compatibility-Lua-macro.patch @@ -0,0 +1,36 @@ +This file is part of MXE. +See index.html for further information. + +From 456cad416f81c985b726fbf63fd7734e472c8b5f Mon Sep 17 00:00:00 2001 +From: Boris Nagaev <bnagaev@gmail.com> +Date: Thu, 14 May 2015 15:23:33 +0300 +Subject: [PATCH] compatibility Lua macro to config.hpp + +--- + luabind/config.hpp | 11 +++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/luabind/config.hpp b/luabind/config.hpp +index 609fb95..3535406 100644 +--- a/luabind/config.hpp ++++ b/luabind/config.hpp +@@ -128,5 +128,16 @@ LUABIND_API void disable_super_deprecation(); + + } // namespace luabind + ++#include <lua.hpp> ++ ++#if LUA_VERSION_NUM > 501 ++#define lua_objlen lua_rawlen ++#define lua_equal(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPEQ) ++#define lua_lessthan(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPLT) ++#endif ++#if LUA_VERSION_NUM >= 501 ++#define lua_strlen lua_objlen ++#endif ++ + #endif // LUABIND_CONFIG_HPP_INCLUDED + +-- +1.7.10.4 + diff --git a/src/luabind.mk b/src/luabind.mk index b6c883d..45796df 100644 --- a/src/luabind.mk +++ b/src/luabind.mk @@ -24,9 +24,8 @@ define $(PKG)_BUILD $(MAKE) -C '$(1).build' -j '$(JOBS)' VERBOSE=1 || $(MAKE) -C '$(1).build' -j 1 VERBOSE=1 $(MAKE) -C '$(1).build' -j 1 install VERBOSE=1 - # all programs using luabind should define LUA_COMPAT_ALL '$(TARGET)-g++' \ - -W -Wall -DLUA_COMPAT_ALL \ + -W -Wall \ '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-luabind.exe' \ -llua -lluabind endef |