LUA-UTILS.ECLASS
Section: eclass-manpages (5)Updated: Nov 2024
Index Return to Main Contents
NAME
lua-utils.eclass - Utility functions for packages with Lua partsDESCRIPTION
A utility eclass providing functions to query Lua implementations, install Lua modules and scripts.This eclass neither sets any metadata variables nor exports any phase functions. It can be inherited safely.
SUPPORTED EAPIS
7 8FUNCTIONS
- lua_enable_tests <test-runner> <test-directory>
-
Set up IUSE, RESTRICT, BDEPEND and src_test() for running tests
with the specified test runner. Also copies the current value
of RDEPEND to test?-BDEPEND. The test-runner argument must be one of:
- busted: dev-lua/busted
Additionally, a second argument can be passed after <test-runner>, so <test-runner> will use that directory to search for tests. If not passed, a default directory of <test-runner> will be used.
- busted: spec
This function is meant as a helper for common use cases, and it only takes care of basic setup. You still need to list additional test dependencies manually. If you have uncommon use case, you should not use it and instead enable tests manually.
This function must be called in global scope, after RDEPEND has been declared. Take care not to overwrite the variables set by it.
- lua_get_CFLAGS [<impl>]
-
Obtain and print the compiler flags for building against Lua,
for the given implementation. If no implementation is provided,
${ELUA} will be used.
Please note that this function requires Lua and pkg-config installed, and therefore proper build-time dependencies need be added to the ebuild.
- lua_get_cmod_dir [<impl>]
-
Obtain and print the name of the directory into which compiled Lua
modules are installed, for the given implementation. If no implementation
is provided, ${ELUA} will be used.
Please note that this function requires Lua and pkg-config installed, and therefore proper build-time dependencies need be added to the ebuild.
- lua_get_include_dir [<impl>]
-
Obtain and print the name of the directory containing header files
of the given Lua implementation. If no implementation is provided,
${ELUA} will be used.
Please note that this function requires Lua and pkg-config installed, and therefore proper build-time dependencies need be added to the ebuild.
- lua_get_LIBS [<impl>]
-
Obtain and print the compiler flags for linking against Lua,
for the given implementation. If no implementation is provided,
${ELUA} will be used.
Please note that this function requires Lua and pkg-config installed, and therefore proper build-time dependencies need be added to the ebuild.
- lua_get_lmod_dir [<impl>]
-
Obtain and print the name of the directory into which native-Lua
modules are installed, for the given implementation. If no implementation
is provided, ${ELUA} will be used.
Please note that this function requires Lua and pkg-config installed, and therefore proper build-time dependencies need be added to the ebuild.
- lua_get_shared_lib [<impl>]
-
Obtain and print the expected name, with path, of the main shared library
of the given Lua implementation. If no implementation is provided,
${ELUA} will be used.
Note that it is up to the ebuild maintainer to ensure Lua actually provides a shared library.
Please note that this function requires Lua and pkg-config installed, and therefore proper build-time dependencies need be added to the ebuild.
- lua_get_version [<impl>]
-
Obtain and print the full version number of the given Lua implementation.
If no implementation is provided, ${ELUA} will be used.
Please note that this function requires Lua and pkg-config installed, and therefore proper build-time dependencies need be added to the ebuild.
ECLASS VARIABLES
- ELUA
-
The executable name of the current Lua interpreter. This variable is set
automatically in functions called by lua_foreach_impl().
Example value:
lua5.1
- LUA
-
The absolute path to the current Lua interpreter. This variable is set
automatically in functions called by lua_foreach_impl().
Example value:
/usr/bin/lua5.1
AUTHORS
Marek Szuba <[email protected]>Based on python-utils-r1.eclass by Michał Górny <[email protected]> et al.
MAINTAINERS
William Hubbs <[email protected]>REPORTING BUGS
Please report bugs via https://bugs.gentoo.org/FILES
lua-utils.eclassSEE ALSO
ebuild(5)https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/lua-utils.eclass
Index
- NAME
- DESCRIPTION
- SUPPORTED EAPIS
- FUNCTIONS
- ECLASS VARIABLES
- AUTHORS
- MAINTAINERS
- REPORTING BUGS
- FILES
- SEE ALSO
This document was created by man2html, using the manual pages.
Time: 03:27:00 GMT, November 25, 2024