819e2b9c34
Currently, luarocks.mk generates a configuration file with hardcoded STAGING_DIR, TARGET_DIR, TARGET_CC, LUAROCKS_CFLAGS and TARGET_LDFLAGS values. This is not compatible with per-package directories, where the value of STAGING_DIR, TARGET_DIR, TARGET_CC and possibly TARGET_CFLAGS/TARGET_LDFLAGS may be different from one package to the other. Based on input from François Perrad, this commit: - Changes the Luarocks configuration file to use os_getenv() for the appropriate variables. Since the contents of this file is not fixed, it is no longer generated by luarocks.mk using a series of 'echo' but simply concatenated with the rest of the Luarocks configuration file. - Adjusts LUAROCKS_RUNV_ENV so that the necessary environment variables are now passed. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Acked-by: Francois Perrad <francois.perrad@gadz.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
14 lines
560 B
Lua
14 lines
560 B
Lua
-- BR cross-compilation
|
|
local function getenv (name) return os_getenv(name) or '' end
|
|
variables.LUA_INCDIR = getenv('STAGING_DIR') .. [[/usr/include]]
|
|
variables.LUA_LIBDIR = getenv('STAGING_DIR') .. [[/usr/lib]]
|
|
variables.CC = getenv('TARGET_CC')
|
|
variables.LD = getenv('TARGET_CC')
|
|
variables.CFLAGS = getenv('TARGET_CFLAGS')
|
|
variables.LIBFLAG = [[-shared ]] .. getenv('TARGET_LDFLAGS')
|
|
external_deps_dirs = { getenv('STAGING_DIR') .. [[/usr]] }
|
|
gcc_rpath = false
|
|
rocks_trees = { getenv('TARGET_DIR') .. [[/usr]] }
|
|
wrap_bin_scripts = false
|
|
deps_mode = [[none]]
|