summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorjmmv <jmmv>2013-06-15 00:31:34 +0000
committerjmmv <jmmv>2013-06-15 00:31:34 +0000
commit1caa56f2ad1dafa351c2a72da44cfa239a401a8a (patch)
treebddde6e26fc03d400f7f1fd108dd25b6c05189bf /devel
parentc752deaed72ceb430651df07642b506ca4d81f9e (diff)
downloadpkgsrc-1caa56f2ad1dafa351c2a72da44cfa239a401a8a.tar.gz
Switch to use Lutok 0.3. Bump PKGREVISION to 2.
Diffstat (limited to 'devel')
-rw-r--r--devel/kyua-cli/Makefile5
-rw-r--r--devel/kyua-cli/distinfo3
-rw-r--r--devel/kyua-cli/patches/patch-utils_config_lua_module.cpp64
3 files changed, 68 insertions, 4 deletions
diff --git a/devel/kyua-cli/Makefile b/devel/kyua-cli/Makefile
index efb459bfb20..9c1f2ded501 100644
--- a/devel/kyua-cli/Makefile
+++ b/devel/kyua-cli/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.13 2013/05/09 07:39:36 adam Exp $
+# $NetBSD: Makefile,v 1.14 2013/06/15 00:31:34 jmmv Exp $
#
DISTNAME= kyua-cli-0.6
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= devel
MASTER_SITES= http://kyua.googlecode.com/files/
@@ -44,7 +44,6 @@ post-install:
.include "../../databases/sqlite3/buildlink3.mk"
.include "../../devel/kyua-testers/buildlink3.mk"
-BUILDLINK_API_DEPENDS.lutok+= lutok>=0.2
.include "../../devel/lutok/buildlink3.mk"
.include "../../lang/lua/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/devel/kyua-cli/distinfo b/devel/kyua-cli/distinfo
index 1c22fca78f2..333720c2deb 100644
--- a/devel/kyua-cli/distinfo
+++ b/devel/kyua-cli/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.14 2013/05/06 14:46:58 joerg Exp $
+$NetBSD: distinfo,v 1.15 2013/06/15 00:31:34 jmmv Exp $
SHA1 (kyua-cli-0.6.tar.gz) = 85453765a497d381570d6f658d90038af894a90f
RMD160 (kyua-cli-0.6.tar.gz) = a60e317639e60fd688a76297791670b680e7d505
@@ -13,6 +13,7 @@ SHA1 (patch-store_transaction.cpp) = 98179f580b2d2f053f3d51c6ddd923af03de5941
SHA1 (patch-store_transaction.hpp) = 5c4066c41d4b56d304aff5a12bf9f765e8abed09
SHA1 (patch-utils_cmdline_exceptions.cpp) = f1e524db998802d3979595abd496ae609b32a1ea
SHA1 (patch-utils_cmdline_exceptions.hpp) = 7f893a224b263aaefde1232ab594c403849581f1
+SHA1 (patch-utils_config_lua_module.cpp) = d3d178a77773c4bcc4d85df18f48981ec957c31f
SHA1 (patch-utils_config_tree.hpp) = b5cef0e44597c2a1c9936c51050c5e77d22add0f
SHA1 (patch-utils_datetime.cpp) = cb5fd42fb737f8fe862a3bddcd1ecba27d71be8f
SHA1 (patch-utils_datetime.hpp) = 458d6c061f6bb4363c0e107660fd169abf04cb7c
diff --git a/devel/kyua-cli/patches/patch-utils_config_lua_module.cpp b/devel/kyua-cli/patches/patch-utils_config_lua_module.cpp
new file mode 100644
index 00000000000..c7a71676d2f
--- /dev/null
+++ b/devel/kyua-cli/patches/patch-utils_config_lua_module.cpp
@@ -0,0 +1,64 @@
+$NetBSD: patch-utils_config_lua_module.cpp,v 1.1 2013/06/15 00:31:34 jmmv Exp $
+
+Support Lutok 0.3 (and therefore Lua 5.2).
+
+This comes from upstream change df971a616a4cf930f00c836f837449d5a42589ec.
+
+--- utils/config/lua_module.cpp
++++ utils/config/lua_module.cpp
+@@ -42,7 +42,7 @@ namespace {
+
+ /// Gets the tree singleton stored in the Lua state.
+ ///
+-/// \param state The Lua state. The metadata of _G must contain a key named
++/// \param state The Lua state. The registry must contain a key named
+ /// "tree" with a pointer to the singleton.
+ ///
+ /// \return A reference to the tree associated with the Lua state.
+@@ -53,10 +53,15 @@ get_global_tree(lutok::state& state)
+ {
+ lutok::stack_cleaner cleaner(state);
+
+- if (!state.get_metafield(lutok::globals_index, "tree"))
++ state.push_value(lutok::registry_index);
++ state.push_string("tree");
++ state.get_table(-2);
++ if (state.is_nil())
+ throw config::syntax_error("Cannot find tree singleton; global state "
+ "corrupted?");
+- return **state.to_userdata< config::tree* >();
++ config::tree& tree = **state.to_userdata< config::tree* >();
++ state.pop(1);
++ return tree;
+ }
+
+
+@@ -254,7 +259,7 @@ config::redirect(lutok::state& state, tree& out_tree)
+ {
+ lutok::stack_cleaner cleaner(state);
+
+- state.new_table();
++ state.get_global_table();
+ {
+ state.push_string("__index");
+ state.push_cxx_function(redirect_index);
+@@ -263,11 +268,13 @@ config::redirect(lutok::state& state, tree& out_tree)
+ state.push_string("__newindex");
+ state.push_cxx_function(redirect_newindex);
+ state.set_table(-3);
+-
+- state.push_string("tree");
+- config::tree** tree = state.new_userdata< config::tree* >();
+- *tree = &out_tree;
+- state.set_table(-3);
+ }
+- state.set_metatable(lutok::globals_index);
++ state.set_metatable(-1);
++
++ state.push_value(lutok::registry_index);
++ state.push_string("tree");
++ config::tree** tree = state.new_userdata< config::tree* >();
++ *tree = &out_tree;
++ state.set_table(-3);
++ state.pop(1);
+ }