Am 19.06.2013 13:14 schröbte Alexey Melnichuk:
> Philipp Janda <siffiejoe@...> writes:
>>
>> The preferred way to handle this would be to create a single rockspec
>> that works for both Lua versions.
>
> I can not modify source. I can only write rockspec file.
> Can we detect Lua version in rockspec file?
>> if LUA_VER == "5.2" then ... end
> or in some declarative way?
The rockspecs are loaded in an empty environment, but ...
if _ENV ~= nil then ... else ... end
should work.
> May be better update manifest format and place lua deps in manifest file?
>
>> You could try to compile the lbase64 code for Lua 5.1 with
> LUA_COMPAT_MODULE defined
>
> IMO this is problem of luarocks. Luarocks should be able detect/find correct
> rockspec file or give ability to detect Lua version in rockspec file.
Actually, the former is what I expected how luarocks would work, so I agree.
Philipp
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Luarocks-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luarocks-developers