Bug 229520

Summary: devel/lua-luarocks: Possible build with Lua 5.3?
Product: Ports & Packages Reporter: Guangyuan Yang <ygy>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: andrew, kevans, nbari, russ.haley, ygy
Priority: --- Keywords: needs-patch
Version: LatestFlags: jbeich: maintainer-feedback+
Hardware: Any   
OS: Any   

Description Guangyuan Yang freebsd_committer 2018-07-04 23:02:26 UTC
Currently luarocks is only available as lua52-luarocks in pkg (I didn't really find any lua53- packages in the pkg). I understand that it has something to do with luajit, but I'm just wondering if it is possible that we have a lua53-luarocks?

I'm not really into Lua, so sorry if this is a newbie question.
Comment 1 Jan Beich freebsd_committer 2018-07-04 23:48:27 UTC
> Currently, luarocks is only available as lua52-luarocks in pkg

Correct. USES=lua hasn't been flavorized, so lua- ports only generate packages for the default lang/lua* version.

> I understand that it has something to do with luajit.

luajit isn't supported by USES=lua, so the support is experimental[1]. For now it uses lua51- as package prefix but dependencies that rely on luajit FFI are incompatible with lua51.

[1] Added for my Torch7 work but abandoned later due to lack of generic solution.

> if it is possible that we have a lua53-luarocks?

Try either:

  $ echo "DEFAULT_VERSIONS += lua=5.3" >>${__MAKE_CONF:-/etc/make.conf}
  $ make install -C /usr/ports/devel/lua-luarocks


  $ make install _LUA_DEFAULT_VERSION=53 -C /usr/ports/devel/lua-luarocks
Comment 2 Jan Beich freebsd_committer 2018-07-04 23:55:33 UTC
To pull luarocks as a dependency try:

  BUILD_DEPENDS=	luarocks-${LUA_VER}:devel/lua-luarocks

  USES=		lua:53

The port supports concurrent installation just fine e.g.,

  $ pkg info -x luarocks

  $ pkg info -lx luarocks | fgrep bin/
Comment 3 Guangyuan Yang freebsd_committer 2018-07-05 00:49:48 UTC
(In reply to Jan Beich from comment #2)

Thanks! I could see this working. However,
Comment 4 Guangyuan Yang freebsd_committer 2018-07-05 00:51:09 UTC
the real solution to the problem is to flavorize USE=lua, is that correct? Do you think it's a question worth raising?
Comment 5 andrew 2018-08-11 22:50:50 UTC
(In reply to Guangyuan Yang from comment #4)

Proposed flavorization of USES=lua is at https://reviews.freebsd.org/D16494

Luarocks however would not need it, because luarocks v3 is supposed to be able to handle multiple lua versions from a single installation, so building a single luarocks package (possibly including config files for all supported versions) would suffice. work in progress at https://reviews.freebsd.org/D16274
Comment 6 Jan Beich freebsd_committer 2018-08-16 22:52:14 UTC
Resign per ports r477379.
Comment 7 Russell Haley 2018-08-27 03:08:09 UTC

I'd like to take on maintainership of luarocks if Andrew isn't interested. I'm currently the maintainer for Lua 5.3, which we have successfully updated to 5.3.5.
Comment 8 Kubilay Kocak freebsd_committer freebsd_triage 2018-08-27 07:26:36 UTC
(In reply to Russell Haley from comment #7)

Feel free to include a maintainer change in any diff provided to resolve this issue
Comment 9 nbari 2020-02-25 07:38:55 UTC
any progress on this?
Comment 10 Kyle Evans freebsd_committer 2020-10-25 17:36:49 UTC
Lua flavorization has landed in the interim and we now even have lua53-luarocks and lua54-luarocks, so I'm closing this as OBE -- a new PR will be needed if we end wanting to just build one luarocks to rule them all in the future.