This adds flavor support to USES=lua, plus some additional options.
The intent is to allow the following:
- Lua modules like devel/lua-stdlib-* can be changed to use flavors to keep their dependencies straight, and some helper definitions in lua.mk make it easier for them to keep their documentation subdirs separate
- The lang/lua ports themselves could be changed to use USES=lua:envcore,NN to centralize the definitions of all the LUA_* variables in one place, rather than duplicating them between lua.mk and lang/luaNN/Makefile
- Applications that use Lua probably wouldn't want to use the flavors option, but can now use LUA_FLAVOR when declaring dependencies on libs
- More version range options are supported, e.g. USES=lua:52-54 or USES=lua:-53
A functional change is that this version makes no attempt to look at what versions of Lua are already installed - that seems to me to be a very bad idea.
In the process, the following specific changes to ports were needed (or at least highly desirable):
- All ports with the lua version included in their name were renamed even if only one version was supported (e.g. lua51-mpd). Ports with version-specific slaves, such as luasocket, were folded into a single port with flavors.
Affected: archivers/lua51-zlib (renamed lua-zlib)
Affected: audio/lua51-mpd (renamed lua-mpd)
Affected: converters/lua51-iconv (renamed lua-iconv)
Affected: devel/lua51-bitop (renamed lua-bitop)
Affected: devel/lua51-cjson (renamed lua-cjson)
Affected: devel/lua51-libevent (renamed lua-libevent)
Affected: devel/luafilesystem-51 (now luafilesystem@lua51)
Affected: net/lualdap-51 (now lualdap@lua51)
Affected: net/luasocket-51 (now luasocket@lua51)
Affected: net/luasocket-53 (now luasocket@lua53)
Affected: security/luasec-51 (now luasec@lua51)
Affected: textproc/luaexpat-51 (now luaexpat@lua51)
- Ports that actually failed to build when the lua version was not 5.2 (the current default) had the USES tag updated to explicitly specify 5.2 (or whatever version range applied)
Affected: astro/celestia, audio/aqualung, lang/lua-ada, net/freeswitch, net/lualdap, security/cardpeek, www/volta
- Ports for lua modules were changed to use LUA_DOCSDIR, when needed, to install docs into subdirs specific to the lua version.
Affected: audio/lua-mpd
Affected: devel/lua-stdlib
Affected: devel/luafilesystem
Affected: graphics/lua-gd
Affected: net/luasocket
- Ports that had OPTIONS for different lua versions were changed to use flavors instead.
Affected: databases/lua-sqlite3, databases/luadbi
- Package name prefix added where needed.
Affected: databases/luasql-mysql (and its slaves, luasql-*)
Individual ports:
converters/lua-iconv: Un-deprecate, because the only thing keeping it broken is the failure to update bsd.sites.mk in a timely fashion.
devel/swig30: Downgraded dependency on lua to a build-only dependency (it's not needed at runtime unless the client is also using lua, in which case the client should have its own build dep)
devel/lua-lgi: Take maintainership
math/plplot: fix build with LUA option by adding build dep on swig30