From 2ef5cffcdcfc9759789bade0a2dd9fed9fa0329d Mon Sep 17 00:00:00 2001 From: shixuantong Date: Thu, 13 Jan 2022 17:30:26 +0800 Subject: [PATCH] fix undefined reference to 'luaL_register' --- libquvi-0.9.4-lua-5.2.patch | 25 +++++++++++++++++++++++++ libquvi.spec | 7 ++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 libquvi-0.9.4-lua-5.2.patch diff --git a/libquvi-0.9.4-lua-5.2.patch b/libquvi-0.9.4-lua-5.2.patch new file mode 100644 index 0000000..060a67f --- /dev/null +++ b/libquvi-0.9.4-lua-5.2.patch @@ -0,0 +1,25 @@ +diff --git a/src/lua/init.c b/src/lua/init.c +index c76d13a..ea4c16b 100644 +--- a/src/lua/init.c ++++ b/src/lua/init.c +@@ -80,10 +80,17 @@ QuviError l_init(_quvi_t q) + return (QUVI_ERROR_LUA_INIT); + + luaL_openlibs(q->handle.lua); ++#if LUA_VERSION_NUM < 502 + luaL_register(q->handle.lua, "quvi", quvi_reg_meth); + luaL_register(q->handle.lua, "quvi.http", quvi_http_reg_meth); + luaL_register(q->handle.lua, "quvi.crypto", quvi_crypto_reg_meth); + luaL_register(q->handle.lua, "quvi.base64", quvi_base64_reg_meth); ++#else ++ luaL_newlib(q->handle.lua, quvi_reg_meth); ++ luaL_newlib(q->handle.lua, quvi_http_reg_meth); ++ luaL_newlib(q->handle.lua, quvi_crypto_reg_meth); ++ luaL_newlib(q->handle.lua, quvi_base64_reg_meth); ++#endif + + return (QUVI_OK); + } +-- +1.8.3.1 + diff --git a/libquvi.spec b/libquvi.spec index 12708ae..81046cc 100644 --- a/libquvi.spec +++ b/libquvi.spec @@ -1,6 +1,6 @@ Name: libquvi Version: 0.9.4 -Release: 19 +Release: 20 Summary: A cross-platform library for parsing flash media stream License: AGPLv3+ URL: http://quvi.sourceforge.net @@ -9,6 +9,8 @@ BuildRequires: gcc asciidoc lua-devel libproxy-devel BuildRequires: libcurl-devel glib2-devel libquvi-scripts libgcrypt-devel Requires: libquvi-scripts +Patch6000: libquvi-0.9.4-lua-5.2.patch + %description Libquvi is a small C library that can be used to parse ad0be flash media stream URLs. @@ -68,6 +70,9 @@ rm -f %{buildroot}/%{_libdir}/%{name}-0.9.la %{_mandir}/man7/quvi-object.7.gz %changelog +* Thu Jan 13 2022 shixuantong - 0.9.4-20 +- fix undefined reference to 'luaL_register' + * Mon Aug 02 2021 chenyanpanHW - 0.9.4-19 - DESC: delete -S git from %autosetup, and delete BuildRequires git