summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* eclass/lua-utils.eclass: Add support for test-runnersConrad Kostecki2021-01-201-0/+70
| | | | | | | | | | | | | | | | | | | | | | During migration of dev-lua/* ebuilds to slotted lua, I noticed, that many ebuilds use 'dev-lua/busted' for running tests. This change adds support for running a test-runner, at first only 'busted' for now. Also a non-color and plaintext output will be used for the test-runner 'busted'. This is basically a copy of the test-runner section, written by mgorny, which already exists in 'distutils-r1', but modified and adapted to lua. In order to use this feature, you can define 'lua_enable_tests busted' to setup everything needed for tests and run them. By default, 'dev-lua/busted' assumes, that tests are in the 'spec' folder. If this is not the case, you can add a second argument to specify a different folder. For example, if the folder is called 'foo', you can just run 'lua_enable_tests busted foo'. More test-runners can be added in future, if needed. Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
* lua-utils.eclass: Add lua_get_shared_lib()Marek Szuba2020-10-151-0/+52
| | | | | | | For build systems which must be pointed directly to the relevant files, e.g. CMake. Signed-off-by: Marek Szuba <marecki@gentoo.org>
* lua-utils.eclass: Add lua_get_include_dir()Marek Szuba2020-10-151-0/+24
| | | | | | | For build systems which must be pointed directly to the relevant files, e.g. CMake. Signed-off-by: Marek Szuba <marecki@gentoo.org>
* lua-utils.eclass: Support luajitMarek Szuba2020-10-121-4/+17
| | | | | | | | | | | | | | | According to discussions on IRC, luajit should work as a drop-in replacement for lua5.1 - and indeed, at least for x11-wm/awesome it has worked. Note that for the time being dev-lang/luajit uses the same module directories as dev-lang/lua:5.1, which may lead to weird behaviour in multi-impl ebuilds supporting both lua5-1 and luajit. Hopefully we will get luajit to use its own directories so that it is fully independent, same as we install pypy3 modules in their own directory hierarchy in spite of compatibility with cpython-3.6. Signed-off-by: Marek Szuba <marecki@gentoo.org>
* lua.eclass: split some stuff out as lua-utils.eclassMarek Szuba2020-10-051-0/+373
These are the things that will be used by both lua and lua-single. Signed-off-by: Marek Szuba <marecki@gentoo.org>