From 0b426d6186e2c4de6a2bccbfa76a9cdef24e0c3b Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Wed, 15 May 2013 11:42:47 -0400 Subject: [PATCH] lua 5.2 --- rrdtool-1.4.7-lua-5.2.patch | 29 +++++++++++++++++++++++++++++ rrdtool.spec | 9 +++++++-- 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 rrdtool-1.4.7-lua-5.2.patch 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..03c08f4 --- /dev/null +++ b/rrdtool-1.4.7-lua-5.2.patch @@ -0,0 +1,29 @@ +diff -up rrdtool-1.4.7/bindings/lua/rrdlua.c.lua-52 rrdtool-1.4.7/bindings/lua/rrdlua.c +--- rrdtool-1.4.7/bindings/lua/rrdlua.c.lua-52 2013-05-15 11:38:28.152336459 -0400 ++++ rrdtool-1.4.7/bindings/lua/rrdlua.c 2013-05-15 11:38:48.291336762 -0400 +@@ -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 -up rrdtool-1.4.7/configure.ac.lua-52 rrdtool-1.4.7/configure.ac +--- rrdtool-1.4.7/configure.ac.lua-52 2013-05-15 11:35:49.074334072 -0400 ++++ rrdtool-1.4.7/configure.ac 2013-05-15 11:35:49.077334073 -0400 +@@ -744,7 +744,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.spec b/rrdtool.spec index 7249a0a..9374325 100644 --- a/rrdtool.spec +++ b/rrdtool.spec @@ -18,7 +18,7 @@ Summary: Round Robin Database Tool to store and display time-series data Name: rrdtool Version: 1.4.7 -Release: 15%{?dist} +Release: 16%{?dist} License: GPLv2+ with exceptions Group: Applications/Databases URL: http://oss.oetiker.ch/rrdtool/ @@ -30,6 +30,7 @@ Patch2: rrdtool-1.4.7-ruby-2-fix.patch # disable logo for php 5.5. Patch3: rrdtool-1.4.7-php55.patch Patch4: rrdtool-1.4.7-autoconf-fix.patch +Patch5: rrdtool-1.4.7-lua-5.2.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: dejavu-sans-mono-fonts @@ -148,7 +149,7 @@ The %{name}-ruby package includes RRDtool bindings for Ruby. %endif %if %{with_lua} -%define luaver 5.1 +%define luaver 5.2 %define lualibdir %{_libdir}/lua/%{luaver} %define luapkgdir %{_datadir}/lua/%{luaver} @@ -171,6 +172,7 @@ The %{name}-lua package includes RRDtool bindings for Lua. %endif %patch2 -p1 -b .ruby-2-fix %patch4 -p1 -b .autoconf-fix +%patch5 -p1 -b .lua-52 # Fix to find correct python dir on lib64 %{__perl} -pi -e 's|get_python_lib\(0,0,prefix|get_python_lib\(1,0,prefix|g' \ @@ -384,6 +386,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} php -n \ %endif %changelog +* Wed May 15 2013 Tom Callaway - 1.4.7-16 +- lua 5.2 + * Tue May 7 2013 Jaroslav Škarvada - 1.4.7-15 - Removed unneccassary dejavu-lgc-sans-mono-fonts requirement Resolves: rhbz#922467