pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: In preparation of Lua-5.3 - versioned binaries of Lua?



[ please wrap your lines when replying ]

Kamil Rytarowski wrote:
> Hello,
> 
> This is exactly what I was planning to propose. I haven't got a
> good idea for versioning custom libraries and executable, when it
> may work for libraries (like ``lua$version-tokyocabinet.so'') it
> doesn't look natural for end-user executable (like
> ``lua5.1-luapress.lua''). Perhaps we could produce a wrapper (like
> luapress.lua) that will automatically pick an available version?

Location or modules might be a bit usual to a user but names will look
natural. For instance:

[screen pts/0 <798>] lua5.1
Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio
> require 'sqlite3'
> =sqlite3.open('/etc/rc.conf')
table: 0x7f7ff7b68080
> ^D

Essentially, Lua binary will set all paths up correctly for a user.

Modules will not look like ``lua$version-tokyocabinet.so'', more like
lib/lua/$version/tokyocabinet.so:

[screen pts/0 <800>] pkg_info -L lua51-tokyocabinet
Information for lua51-tokyocabinet-1.10nb1:

Files:
/usr/pkg/share/examples/lua51-tokyocabinet/tcbtest.lua
/usr/pkg/share/examples/lua51-tokyocabinet/tcftest.lua
/usr/pkg/share/examples/lua51-tokyocabinet/tchtest.lua
/usr/pkg/share/examples/lua51-tokyocabinet/tcutest.lua
/usr/pkg/lib/lua/5.1/tokyocabinet.so
...

Another example:

[screen pts/0 <799>] pkg_info -L lua51-sqlite3
Information for lua51-sqlite3-0.4.1nb3:

Files:
/usr/pkg/lib/lua/5.1/libluasqlite3.so
/usr/pkg/share/lua/5.1/libluasqlite3-loader.lua
/usr/pkg/share/lua/5.1/luasql-sqlite3.lua
/usr/pkg/share/lua/5.1/sqlite3.lua

> Thank you for working on it! We may also need (excuse me if it's
> already done) a macro to replace shebangs.

See REPLACE_LUA variable in lang/lua/application.mk.

Alex


Home | Main Index | Thread Index | Old Index