Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 504876 - media-libs/libquvi media-libs/libquvi-scripts - add luajit support
Summary: media-libs/libquvi media-libs/libquvi-scripts - add luajit support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
Depends on: 513344
Blocks:
  Show dependency tree
 
Reported: 2014-03-17 11:32 UTC by Vadim A. Misbakh-Soloviov (mva)
Modified: 2022-12-29 18:31 UTC (History)
2 users (show)

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


Attachments
this patch is required for lua version 5.4 build... (libquvi-0.9.4-luaL_setfuncs.patch,1.98 KB, patch)
2022-10-17 10:15 UTC, Jocelyn Mayer
Details | Diff
Updated patch for lua 5.4 support with fixes and version checks (libquvi-0.9.4-luaL_setfuncs_ver.patch,2.23 KB, patch)
2022-12-29 08:34 UTC, Jocelyn Mayer
Details | Diff
Update ebuild patch for libquvi (media-libs_libquvi_libquvi-0.9.4-r100.ebuild.patch,568 bytes, patch)
2022-12-29 08:35 UTC, Jocelyn Mayer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2014-03-17 11:32:54 UTC
HI there! Can you add LuaJIT support to libquvi:
> luajit? ( dev-lang/luajit:2 )
> !luajit? ( >=dev-lang/lua-5.1[deprecated] )
and to libquvi-scripts:
> luajit? ( dev-lang/luajit:2 )
> !luajit? ( >=dev-lua/LuaBitOp-1.0.1 )

Reproducible: Always
Comment 1 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2014-03-17 12:10:33 UTC
(means, also add "luajit" to IUSE)
Comment 2 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2014-06-12 16:31:20 UTC
btw, it also be nice to add that in src_configure (before mycmakeargs) too:

   local lua="lua"
   use luajit && lua="luajit"
   export CFLAGS="${CFLAGS} $($(tc-getPKG_CONFIG) --cflags ${lua})"
   export liblua_CFLAGS="$($(tc-getPKG_CONFIG) --cflags ${lua})"
   export liblua_LIBS="$($(tc-getPKG_CONFIG) --variable libdir ${lua})"
   export LDFLAGS="${LDFLAGS} $($(tc-getPKG_CONFIG) --libs ${lua})"

// assumes inherit toolchain-funcs
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-06-15 12:51:41 UTC
So upstream does not support luajit? I think the relevant changes should go upstream too.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-06-15 13:45:33 UTC
Since libquvi is multilib now, this will require multilib luajit... and multilib luajit require fixing #513344 first.
Comment 5 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2014-06-15 13:51:38 UTC
actually, it do support work with luajit, just it doesn't recognize it as Lua ;)

Talking about multilib LuaJIT — I can fix that (actually, I already did it for vcs-versions in Lua overlay), but I can't guarantee rmartins approve that...
Comment 6 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2016-10-15 09:01:56 UTC
ping?
#513344 is fixed now, if any.
Comment 7 Jocelyn Mayer 2022-10-17 04:08:41 UTC
Seems to still be a good idea to avoid keeping old lua versions installed, especially on net servers...

For media-libs/libquvi-0.9.4-r100, a small patch in configure.ac is required:
--- libquvi-0.9.4/configure.ac 2021-10-20 13:44:09.834182117 +0200
+++ libquvi-0.9.4/configure.ac 2021-10-20 13:46:23.611188250 +0200
@@ -85,7 +85,9 @@ AC_SUBST([VALGRIND])
 PKG_CHECK_MODULES([liblua], [lua >= 5.1], [], [
   PKG_CHECK_MODULES([liblua], [lua51 >= 5.1], [], [
     PKG_CHECK_MODULES([liblua], [lua5.1 >= 5.1], [], [
-      PKG_CHECK_MODULES(liblua, [lua-5.1 >= 5.1])])
+      PKG_CHECK_MODULES([liblua], [lua-5.1 >= 5.1], [], [
+        PKG_CHECK_MODULES(liblua, [luajit])])
+    ])
   ])
 ])
 PKG_CHECK_MODULES([libproxy], [libproxy-1.0 >= 0.3.1])

Then the ebuild can be changed:
--- media-libs/libquvi/libquvi-0.9.4-r100.ebuild        2021-01-24 05:09:20.000000000 +0100
+++ media-libs/libquvi/libquvi-0.9.4-r100.ebuild        2021-11-03 15:05:58.762820340 +0100
@@ -3,8 +3,8 @@

 EAPI=7

-LUA_COMPAT=( lua5-1 )
-LUA_REQ_USE="deprecated"
+LUA_COMPAT=( lua5-1 luajit )
+#LUA_REQ_USE="deprecated"

 inherit autotools lua-single

For =media-libs/libquvi-scripts-0.9.20131130-r100, only adding luajit in LUA_COMPAT seems required:
--- media-libs/libquvi-scripts/libquvi-scripts-0.9.20131130-r100.ebuild 2021-01-24 05:09:20.000000000 +0100
+++ media-libs/libquvi-scripts/libquvi-scripts-0.9.20131130-r100.ebuild 2021-10-22 09:01:43.519805086 +0200
@@ -3,7 +3,7 @@

 EAPI=7

-LUA_COMPAT=( lua5-1 )
+LUA_COMPAT=( lua5-1 luajit )

 inherit lua-single
Comment 8 Jocelyn Mayer 2022-10-17 10:10:13 UTC
It seems that those 2 packages can also be built against lua version 5.4, updating the LUA_COMPAT variable patch up to:
+LUA_COMPAT=( lua5-1 lua5-4 luajit )
Comment 9 Jocelyn Mayer 2022-10-17 10:15:58 UTC
Created attachment 824567 [details, diff]
this patch is required for lua version 5.4 build...

My mistake: this patch would have to be applied conditionally when compiling for lua version 5.4
Comment 10 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2022-12-29 00:52:50 UTC
Jocelyn, can you, please, made a PR with that changes on GitHub and ping me, and I'll merge it?
Comment 11 Jocelyn Mayer 2022-12-29 08:34:29 UTC
Created attachment 845563 [details, diff]
Updated patch for lua 5.4 support with fixes and version checks

While trying to improve the patch to make it able to compile with luajit and lua version 5.4, I discovered issues with this later version.
This new patch allows libquvi to succesfully pass all tests.
Comment 12 Jocelyn Mayer 2022-12-29 08:35:22 UTC
Created attachment 845565 [details, diff]
Update ebuild patch for libquvi
Comment 13 Jocelyn Mayer 2022-12-29 08:37:21 UTC
As far as I can see, upstream seems dead.
I found some forks on github but there seems not to be any activity then I don't know where to submit the patches...
Comment 14 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2022-12-29 16:37:04 UTC
I mean a PR on https://github.com/gentoo/gentoo with fixed ebuilds (and bumped rev-numbers)
Comment 15 Jocelyn Mayer 2022-12-29 18:04:49 UTC
OK, I never did use github before.
Did a pull request for libquvi and libquvi-scripts with revision dump up to r101.
Comment 16 Jocelyn Mayer 2022-12-29 18:12:55 UTC
Here: https://github.com/gentoo/gentoo/pull/28894
Comment 17 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-29 18:18:43 UTC
(In reply to Jocelyn Mayer from comment #16)
> Here: https://github.com/gentoo/gentoo/pull/28894

Thanks! I'll review shortly.
Comment 18 Larry the Git Cow gentoo-dev 2022-12-29 18:22:31 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=385b637dbb7a250a1b4b4bf5ef7936ca49ecfbd3

commit 385b637dbb7a250a1b4b4bf5ef7936ca49ecfbd3
Author:     Jocelyn-MAYER <l_indien@mailmagic.fr>
AuthorDate: 2022-12-29 17:43:57 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-12-29 18:21:30 +0000

    media-libs/libquvi-scripts: Allow build using luajit and lua version 5.4
    
    Closes: https://bugs.gentoo.org/504876
    Signed-off-by: Jocelyn-MAYER <l_indien@mailmagic.fr>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../libquvi-scripts-0.9.20131130-r101.ebuild       | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b5021931af5a2e8eafa31dc0d503ba3ce50dfd2

commit 2b5021931af5a2e8eafa31dc0d503ba3ce50dfd2
Author:     Jocelyn-MAYER <l_indien@mailmagic.fr>
AuthorDate: 2022-12-29 17:28:00 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-12-29 18:21:30 +0000

    media-libs/libquvi: support luajit and lua5.4
    
    libquvi used to build only with lua version 5.1
    - the configure.ac file is to be patched in order to be able to build with luajit
    - the second patch allow build with lua version 5.4
    
    Closes: https://bugs.gentoo.org/504876
    Signed-off-by: Jocelyn-MAYER <l_indien@mailmagic.fr>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/libquvi-0.9.4-luaL_setfuncs_ver.patch    | 70 ++++++++++++++++++++++
 .../libquvi/files/libquvi-0.9.4-luajit.patch       | 15 +++++
 media-libs/libquvi/libquvi-0.9.4-r101.ebuild       | 69 +++++++++++++++++++++
 3 files changed, 154 insertions(+)
Comment 19 Larry the Git Cow gentoo-dev 2022-12-29 18:31:23 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b2483454e7498e1145014b3d23fd2eddb7db628

commit 6b2483454e7498e1145014b3d23fd2eddb7db628
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-12-29 18:30:52 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-12-29 18:30:52 +0000

    media-libs/libquvi: EAPI 8, adjust LUA_COMPAT
    
    Closes: https://bugs.gentoo.org/504876
    Signed-off-by: Sam James <sam@gentoo.org>

 media-libs/libquvi/libquvi-0.9.4-r101.ebuild | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eee7111f1e3ef3c0e2ce0f7aaaa094cd7ee4a4ba

commit eee7111f1e3ef3c0e2ce0f7aaaa094cd7ee4a4ba
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-12-29 18:30:20 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-12-29 18:30:20 +0000

    media-libs/libquvi-scripts: EAPI 8, adjust LUA_COMPAT
    
    Closes: https://bugs.gentoo.org/504876
    Signed-off-by: Sam James <sam@gentoo.org>

 media-libs/libquvi-scripts/libquvi-scripts-0.9.20131130-r101.ebuild | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)