Termux-packages: mpv: enable lua support

Created on 28 Feb 2017  路  10Comments  路  Source: termux/termux-packages

Lua support is explicitly disabled in mpv, but mpv has a great library of user created scripts that enhance the functionality.
Is there a reason for it to be disabled?
If it's just to keep dependencies small maybe we can have a mpv-lua subpackage (like vim-python).

enhancement mpv

Most helpful comment

@Neo-Oli Thanks, I've bumped the mpv revision now with the lua removal.

As for solving the issue, if there is no plan in having lua 5.3 supported in mpv, perhaps we can build and link lua 5.2 statically as part of mpv? The lua code is rather small to embed inline, and as long as no more package uses older lua versions we don't need it as a separate package with a shared library.

All 10 comments

related to #599

The latest update of the mpv package, version 0.24.0-3, has lua support enabled. I haven't tried it myself - does it work ok?

Doesn't seem to work yet.

$ mpv
[osc] Only Lua 5.1 and 5.2 are supported.
[osc] Could not load lua script @osc.lua
[ytdl_hook] Only Lua 5.1 and 5.2 are supported.
[ytdl_hook] Could not load lua script @ytdl_hook.lua
[navigator] Only Lua 5.1 and 5.2 are supported.
[navigator] Could not load lua script /data/data/com.termux/files/home/.config/mpv/scripts/navigator.lua

Seems mpv doesn't support lua 5.3.x yet and does so on purpose. https://github.com/mpv-player/mpv/issues/1729

It seems that there is a rift in the Lua language and maybe we should add lua 5.2 to the repository (similar to python2)

Maybe it would be better to disable LUA support again until a solution is found.

@vishalbiswas Ah, I see. But the package has not been version bumped and rebuilt since. The version in the repository still has Lua.

@Neo-Oli Thanks, I've bumped the mpv revision now with the lua removal.

As for solving the issue, if there is no plan in having lua 5.3 supported in mpv, perhaps we can build and link lua 5.2 statically as part of mpv? The lua code is rather small to embed inline, and as long as no more package uses older lua versions we don't need it as a separate package with a shared library.

I have enabled Lua support for x11-packages/mpv-x.
Liblua v5.2 currently located in x11-packages/liblua52.

Closing since Lua support is enabled on master (android-7) branch.

@xeffyr @Neo-Oli I have no problems running lua scripts for mpv, but I cant run javascript ones. Is it possible to use javascript like I can with lua? I saw mpv can be compiled with or without javascript/lua support so was wondering if it was compiled to use one, not the other?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

reggi picture reggi  路  4Comments

loveablefellow007 picture loveablefellow007  路  3Comments

bbtdev picture bbtdev  路  3Comments

zejji picture zejji  路  4Comments

neitsab picture neitsab  路  3Comments