Bug 229520 - devel/lua-luarocks: Possible build with Lua 5.3?
Summary: devel/lua-luarocks: Possible build with Lua 5.3?
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: needs-patch
Depends on:
Blocks:
 
Reported: 2018-07-04 23:02 UTC by Guangyuan Yang
Modified: 2020-10-25 17:36 UTC (History)
5 users (show)

See Also:
jbeich: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guangyuan Yang freebsd_committer freebsd_triage 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 freebsd_triage 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.
    https://github.com/jbeich/freebsd-ports/commits/torch

> 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

or

  $ make install _LUA_DEFAULT_VERSION=53 -C /usr/ports/devel/lua-luarocks
Comment 2 Jan Beich freebsd_committer freebsd_triage 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
  lua51-luarocks-2.4.4
  lua52-luarocks-2.4.4
  lua53-luarocks-2.4.4

  $ pkg info -lx luarocks | fgrep bin/
	  /usr/local/bin/luarocks-5.1
	  /usr/local/bin/luarocks-admin-5.1
	  /usr/local/bin/luarocks-5.2
	  /usr/local/bin/luarocks-admin-5.2
	  /usr/local/bin/luarocks-5.3
	  /usr/local/bin/luarocks-admin-5.3
Comment 3 Guangyuan Yang freebsd_committer freebsd_triage 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 freebsd_triage 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 "RhodiumToad" Gierth 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 freebsd_triage 2018-08-16 22:52:14 UTC
Resign per ports r477379.
Comment 7 Russell Haley 2018-08-27 03:08:09 UTC
Hello, 

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 freebsd_triage 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.