rrdtool/rrdtool-1.4.9-lua-5.2.patch
Jaroslav Škarvada 5c673d27f8 New version
Resolves: rhbz#1147901
- Dropped imginfo-check patch (upstreamed)
- De-fuzzified patches
2014-09-30 16:05:39 +02:00

69 lines
2.3 KiB
Diff

diff --git a/bindings/lua/rrdlua.c b/bindings/lua/rrdlua.c
index 690ba29..839833a 100644
--- a/bindings/lua/rrdlua.c
+++ b/bindings/lua/rrdlua.c
@@ -342,7 +342,7 @@ set_info (lua_State * L)
/**********************************************************/
-static const struct luaL_reg rrd[] = {
+static const struct luaL_Reg rrd[] = {
{"create", lua_rrd_create},
{"dump", lua_rrd_dump},
{"fetch", lua_rrd_fetch},
diff --git a/configure.ac b/configure.ac
index 3ef1bef..187e127 100644
--- a/configure.ac
+++ b/configure.ac
@@ -736,7 +736,12 @@ LUA_EOF
LIBS=
lua_havelib=no
LUA_HAVE_COMPAT51=DONT_HAVE_COMPAT51
- AC_SEARCH_LIBS(lua_call, lua$lua_vdot lua$lua_vndot lua,
+ if test "$lua_vndot" = "52"; then
+ CALL_FUNC=lua_callk
+ else
+ CALL_FUNC=lua_call
+ fi
+ AC_SEARCH_LIBS($CALL_FUNC, lua$lua_vdot lua$lua_vndot lua,
[AC_SEARCH_LIBS(luaL_register, lua$lua_vdot lua$lua_vndot lua,
[lua_havelib=LUA$lua_vndot],
[AC_SEARCH_LIBS(luaL_module, lualib$lua_vndot lualib$lua_vdot lualib,
diff --git a/rrdtool-1.4.7-lua-5.2.patch b/rrdtool-1.4.7-lua-5.2.patch
new file mode 100644
index 0000000..f597371
--- /dev/null
+++ b/rrdtool-1.4.7-lua-5.2.patch
@@ -0,0 +1,31 @@
+diff --git a/bindings/lua/rrdlua.c b/bindings/lua/rrdlua.c
+index 690ba29..839833a 100644
+--- a/bindings/lua/rrdlua.c
++++ b/bindings/lua/rrdlua.c
+@@ -342,7 +342,7 @@ set_info (lua_State * L)
+
+ /**********************************************************/
+
+-static const struct luaL_reg rrd[] = {
++static const struct luaL_Reg rrd[] = {
+ {"create", lua_rrd_create},
+ {"dump", lua_rrd_dump},
+ {"fetch", lua_rrd_fetch},
+diff --git a/configure.ac b/configure.ac
+index 2ff18a8..4993717 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -734,7 +734,12 @@ LUA_EOF
+ LIBS=
+ lua_havelib=no
+ LUA_HAVE_COMPAT51=DONT_HAVE_COMPAT51
+- AC_SEARCH_LIBS(lua_call, lua$lua_vdot lua$lua_vndot lua,
++ if test "$lua_vndot" = "52"; then
++ CALL_FUNC=lua_callk
++ else
++ CALL_FUNC=lua_call
++ fi
++ AC_SEARCH_LIBS($CALL_FUNC, lua$lua_vdot lua$lua_vndot lua,
+ [AC_SEARCH_LIBS(luaL_register, lua$lua_vdot lua$lua_vndot lua,
+ [lua_havelib=LUA$lua_vndot],
+ [AC_SEARCH_LIBS(luaL_module, lualib$lua_vndot lualib$lua_vdot lualib,