diff options
author | Philipp Janda <siffiejoe@gmx.net> | 2013-09-27 01:30:59 +0200 |
---|---|---|
committer | Philipp Janda <siffiejoe@gmx.net> | 2013-09-27 01:30:59 +0200 |
commit | 216f3601359ecf216683edb40a7da78824aa042c (patch) | |
tree | 7a442da0fab036e5d381ebdc0a3a5606f258b489 | |
parent | 0455050ffb17b0da1c614b8e34f8bf797467d520 (diff) | |
download | luarocks-216f3601359ecf216683edb40a7da78824aa042c.tar.gz luarocks-216f3601359ecf216683edb40a7da78824aa042c.tar.bz2 luarocks-216f3601359ecf216683edb40a7da78824aa042c.zip |
changed multiarch detection and site_config variables
-rw-r--r-- | Makefile | 3 | ||||
-rwxr-xr-x | configure | 2 | ||||
-rw-r--r-- | src/luarocks/cfg.lua | 21 |
3 files changed, 5 insertions, 21 deletions
@@ -82,7 +82,8 @@ src/luarocks/site_config.lua: config.unix | |||
82 | echo "LUAROCKS_MD5CHECKER=[[$(LUAROCKS_MD5CHECKER)]]" >> src/luarocks/site_config.lua | 82 | echo "LUAROCKS_MD5CHECKER=[[$(LUAROCKS_MD5CHECKER)]]" >> src/luarocks/site_config.lua |
83 | if [ -n "$(MULTIARCH_SUBDIR)" ] ;\ | 83 | if [ -n "$(MULTIARCH_SUBDIR)" ] ;\ |
84 | then \ | 84 | then \ |
85 | echo "LUAROCKS_ADD_LIB_SUBDIRS={ [[$(MULTIARCH_SUBDIR)]] }" >> src/luarocks/site_config.lua ;\ | 85 | echo 'LUAROCKS_EXTERNAL_DEPS_SUBDIRS={ bin="bin", lib={ "lib", [[$(MULTIARCH_SUBDIR)]] }, include="include" }' >> src/luarocks/site_config.lua ;\ |
86 | echo 'LUAROCKS_RUNTIME_EXTERNAL_DEPS_SUBDIRS={ bin="bin", lib={ "lib", [[$(MULTIARCH_SUBDIR)]] }, include="include" }' >> src/luarocks/site_config.lua ;\ | ||
86 | fi | 87 | fi |
87 | 88 | ||
88 | dev: | 89 | dev: |
@@ -399,7 +399,7 @@ fi | |||
399 | 399 | ||
400 | if [ "$LUAROCKS_UNAME_S" = Linux ] | 400 | if [ "$LUAROCKS_UNAME_S" = Linux ] |
401 | then | 401 | then |
402 | GCC_ARCH=`gcc -dumpspecs 2>/dev/null | grep -A 1 "^*multilib:$" | tail -1 | cut -d: -f3 | cut -d' ' -f1` | 402 | GCC_ARCH=`gcc -print-multiarch 2>/dev/null` |
403 | if [ -n "$GCC_ARCH" -a -d "/usr/lib/$GCC_ARCH" ] | 403 | if [ -n "$GCC_ARCH" -a -d "/usr/lib/$GCC_ARCH" ] |
404 | then | 404 | then |
405 | MULTIARCH_SUBDIR="lib/$GCC_ARCH" | 405 | MULTIARCH_SUBDIR="lib/$GCC_ARCH" |
diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua index 9227db4b..94afe0a0 100644 --- a/src/luarocks/cfg.lua +++ b/src/luarocks/cfg.lua | |||
@@ -254,12 +254,12 @@ local defaults = { | |||
254 | STATFLAG = "-c '%a'", | 254 | STATFLAG = "-c '%a'", |
255 | }, | 255 | }, |
256 | 256 | ||
257 | external_deps_subdirs = { | 257 | external_deps_subdirs = site_config.LUAROCKS_EXTERNAL_DEPS_SUBDIRS or { |
258 | bin = "bin", | 258 | bin = "bin", |
259 | lib = "lib", | 259 | lib = "lib", |
260 | include = "include" | 260 | include = "include" |
261 | }, | 261 | }, |
262 | runtime_external_deps_subdirs = { | 262 | runtime_external_deps_subdirs = site_config.LUAROCKS_RUNTIME_EXTERNAL_DEPS_SUBDIRS or { |
263 | bin = "bin", | 263 | bin = "bin", |
264 | lib = "lib", | 264 | lib = "lib", |
265 | include = "include" | 265 | include = "include" |
@@ -437,23 +437,6 @@ if detected.solaris then | |||
437 | defaults.variables.MAKE = "gmake" | 437 | defaults.variables.MAKE = "gmake" |
438 | end | 438 | end |
439 | 439 | ||
440 | if type(site_config.LUAROCKS_ADD_LIB_SUBDIRS) == "table" and next(site_config.LUAROCKS_ADD_LIB_SUBDIRS) ~= nil then | ||
441 | local lib = defaults.external_deps_subdirs.lib | ||
442 | if type(lib) ~= "table" then | ||
443 | lib = { lib } | ||
444 | end | ||
445 | local rt_lib = defaults.runtime_external_deps_subdirs.lib | ||
446 | if type(rt_lib) ~= "table" then | ||
447 | rt_lib = { rt_lib } | ||
448 | end | ||
449 | for i,v in ipairs(site_config.LUAROCKS_ADD_LIB_SUBDIRS) do | ||
450 | lib[#lib+1] = v | ||
451 | rt_lib[#rt_lib+1] = v | ||
452 | end | ||
453 | defaults.external_deps_subdirs.lib = lib | ||
454 | defaults.runtime_external_deps_subdirs.lib = rt_lib | ||
455 | end | ||
456 | |||
457 | -- Expose some more values detected by LuaRocks for use by rockspec authors. | 440 | -- Expose some more values detected by LuaRocks for use by rockspec authors. |
458 | defaults.variables.LIB_EXTENSION = defaults.lib_extension | 441 | defaults.variables.LIB_EXTENSION = defaults.lib_extension |
459 | defaults.variables.OBJ_EXTENSION = defaults.obj_extension | 442 | defaults.variables.OBJ_EXTENSION = defaults.obj_extension |