Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 573990 - media-video/aegisub-3.2.2: please add lua as an alternative to luajit
Summary: media-video/aegisub-3.2.2: please add lua as an alternative to luajit
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Coacher
URL: http://devel.aegisub.org/ticket/1904
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-06 10:40 UTC by Christian Apeltauer
Modified: 2016-02-10 16:09 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to enable aegisub with lua instead of luajit (aegisub-with-luajit-optional.patch,1.36 KB, patch)
2016-02-06 10:41 UTC, Christian Apeltauer
Details | Diff
patch to enable aegisub with lua instead of luajit (source code) (aegisub-3.2.2-no-luajit.patch,5.63 KB, patch)
2016-02-06 10:42 UTC, Christian Apeltauer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Apeltauer 2016-02-06 10:40:42 UTC
The maintainer of the ebuild for media-video/aegisub-3.2.2 has unbundled the luajit delivered within the source code and replaced it by a dependency on the system luajit package. I would suggest to go a step even further: As the luajit libraries is used to execute some add-on scripts there is no logic reason to make aegisub depend exclusively on dev-lang/luajit, dev-lang/lua would do as well. Especially if you are running a hardened system (as I do), lua is preferable as it does not need pax-markings (and thus does not undermine hardening).
 I was successfully able to compile and use aegisub with the appended patches which compile aegisub against lua instead of luajit.
Comment 1 Christian Apeltauer 2016-02-06 10:41:48 UTC
Created attachment 424722 [details, diff]
patch to enable aegisub with lua instead of luajit
Comment 2 Christian Apeltauer 2016-02-06 10:42:29 UTC
Created attachment 424724 [details, diff]
patch to enable aegisub with lua instead of luajit (source code)
Comment 3 Coacher 2016-02-09 05:01:20 UTC
There is a number of Lua scripts shipped with aegisub that require ffi, which is a LuaJIT-only extension. However, those ffi-specific parts are removed for some reason when these scripts get installed. There is also at least one place in C++ code of libaegisub that relies on a LuaJIT-specific behaviour, see libaegisub/include/libaegisub/lua/ffi.h.

All of the above suggests that Lua in general is not supported as a proper replacement for LuaJIT. I've contacted upstream about this issue and hopefully they will be able to provide a more definitive answer.

Until then if you need aegisub without LuaJIT I suggest you to use the 3.0.4 ebuild. It is one of the reasons we keep it around.
Comment 4 Coacher 2016-02-10 15:52:20 UTC
(In reply to Coacher from comment #3)
> There is a number of Lua scripts shipped with aegisub that require ffi,
> which is a LuaJIT-only extension. However, those ffi-specific parts are
> removed for some reason when these scripts get installed.
I've made a mistake here. I was looking at the sources from master branch whilst grepping through the files installed with 3.2.2.
Here's the correct info. Lua scripts shipped and installed with 3.2.2 don't require ffi, but those shipped and installed with 9999 clearly do.

> There is also at
> least one place in C++ code of libaegisub that relies on a LuaJIT-specific
> behaviour, see libaegisub/include/libaegisub/lua/ffi.h.
Again, I was looking at the sources from master branch instead of 3.2.2 ones.
Comment 5 Coacher 2016-02-10 16:09:00 UTC
Now that the situation is clarified I have to deny your request.
Supporting a feature that is a complete opposite of the upstream course of action doesn't appeal to me.