1 |
Hello! |
2 |
|
3 |
Some notes from me. |
4 |
|
5 |
чт, 3 сент. 2020 г. в 16:37, Marek Szuba <marecki@g.o>: |
6 |
|
7 |
> +# @ECLASS-VARIABLE: LUA |
8 |
> +# @DEFAULT_UNSET |
9 |
> +# @DESCRIPTION: |
10 |
> +# The absolute path to the current Lua interpreter. This variable is set |
11 |
> +# automatically in functions called by lua_foreach_impl(). |
12 |
> +# |
13 |
> +# Example value: |
14 |
> +# @CODE |
15 |
> +# /usr/bin/lua5.1 |
16 |
|
17 |
I think there also needs a LUAC variable that points to the current |
18 |
Lua compiler. |
19 |
|
20 |
> +# @FUNCTION: lua_get_version |
21 |
> +# @USAGE: [<impl>] |
22 |
> +# @DESCRIPTION: |
23 |
> +# Obtain and print the full version number of the given Lua implementation. |
24 |
> +# If no implementation is provided, ${ELUA} will be used. |
25 |
> +# |
26 |
> +# Please note that this function requires Lua and pkg-config installed, |
27 |
> +# and therefore proper build-time dependencies need be added to the ebuild. |
28 |
> +lua_get_version() { |
29 |
> + debug-print-function ${FUNCNAME} "${@}" |
30 |
> + |
31 |
> + _lua_export "${@}" LUA_VERSION |
32 |
> + echo "${LUA_VERSION}" |
33 |
> +} |
34 |
|
35 |
There needs a LUA_MAJOR_VERSION (V variable in lua.pc, i.e. 5.1, 5.2, |
36 |
5.3) instead of full version (R variable in lua.pc, i.e 5.1.5, 5.2.4). |
37 |
Some obscure Lua packages are required to define V variable to work |
38 |
properly. |