Using lua and luajit.

Gleb Popov 6yearold at gmail.com
Thu Nov 9 12:33:07 UTC 2017


Hello.

I'm working on porting Torch7, a scientific framework written in Lua:
https://reviews.freebsd.org/D12559

Torch7 has a generic install script and I'm using it to determine
dependencies need for the port. Amongst other things, Torch7 seems to
prefer LuaJIT over other lua implementations, so I decided to do the same.

The first problem I faced is lua.mk doesn't have any support for luajit. Is
there a reason for this? I have to manually define LUA_DIR and other vars,
because they gets defined only when using lua51 or lua52.

Another question is how to handle lua packages that can work with different
lua versions (like py27- and py36- ports, for instance). The example of
such port is devel/lua-Penlight, as you can see it is basically a bunch of
.lua files, which I decided to install everything into lua/5.1/ subdir.
What's proper way to handle this?

General comments on the review are also welcome.

Thanks in advance.


More information about the freebsd-ports mailing list