Fix lua web interface

math.pow was deprecated in lua-5.3 in favour of the ^ operator:
https://www.lua.org/manual/5.3/manual.html#8.2

Resolves: rhbz#2280091
epel10
Yaakov Selkowitz 9 months ago
parent 8ec5a0c653
commit 9ff5b8688c

@ -0,0 +1,11 @@
--- ./share/lua/intf/modules/httprequests.lua.Orig 2023-08-05 06:03:51.000000000 -0400
+++ ./share/lua/intf/modules/httprequests.lua 2024-05-28 14:02:41.569002601 -0400
@@ -34,7 +34,7 @@
what = common.us_tonumber(what)
end
if type(what) == "number" then
- return math.floor(what*math.pow(10,precision)+0.5) / math.pow(10,precision)
+ return math.floor(what*(10^precision)+0.5) / (10^precision)
end
return nil
end

@ -27,7 +27,7 @@
Name: vlc
Epoch: 1
Version: 3.0.20
Release: %autorelease -b 3
Release: %autorelease
Summary: The cross-platform open-source multimedia framework, player and server
License: GPL-2.0-or-later AND LGPL-2.1-or-later AND BSD-2-Clause AND BSD-3-Clause
URL: https://www.videolan.org
@ -48,6 +48,8 @@ Patch: https://code.videolan.org/videolan/vlc/-/merge_requests/4645.patch
Patch: https://code.videolan.org/videolan/vlc/-/merge_requests/4665.patch
# port from libidn to libidn2
Patch: libidn2.patch
# fix deprecated lua math functions (rhbz#2280091)
Patch: lua-math.patch
%{load:%{S:1}}
%global __provides_exclude_from ^%{vlc_plugindir}/.*$

Loading…
Cancel
Save