aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2012-03-03 14:25:55 -0800
committerHisham Muhammad <hisham@gobolinux.org>2012-03-03 14:25:55 -0800
commitd2a4573ad42be8fe68bfd2b0aa73658f5748b1d8 (patch)
tree3b2aa42e44fff71a1dadb0b127347a42ed886afd
parent9b9df2fa3475531aba8e41e38ba7d452d802cfb6 (diff)
parentaaf92d629ce4bdb903bd5dde14e94f20abf5825a (diff)
downloadluarocks-d2a4573ad42be8fe68bfd2b0aa73658f5748b1d8.tar.gz
luarocks-d2a4573ad42be8fe68bfd2b0aa73658f5748b1d8.tar.bz2
luarocks-d2a4573ad42be8fe68bfd2b0aa73658f5748b1d8.zip
Merge pull request #66 from mpx/solaris-support
Solaris support
-rw-r--r--Makefile3
-rw-r--r--src/luarocks/cfg.lua11
2 files changed, 13 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 7c1cb252..89993210 100644
--- a/Makefile
+++ b/Makefile
@@ -104,7 +104,8 @@ check_makefile:
104cleanup_bins: 104cleanup_bins:
105 for f in $(BIN_FILES) ;\ 105 for f in $(BIN_FILES) ;\
106 do \ 106 do \
107 sed -i.bak "s,^#!.*lua.*,#!/usr/bin/env lua,;/^package.path/d" src/bin/$$f ;\ 107 mv src/bin/$$f{,.bak} ;\
108 sed "s,^#!.*lua.*,#!/usr/bin/env lua,;/^package.path/d" < src/bin/$$f.bak > src/bin/$$f ;\
108 rm src/bin/$$f.bak ;\ 109 rm src/bin/$$f.bak ;\
109 done 110 done
110 111
diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua
index 9628a291..df573c82 100644
--- a/src/luarocks/cfg.lua
+++ b/src/luarocks/cfg.lua
@@ -76,6 +76,9 @@ elseif system == "Darwin" then
76elseif system == "Linux" then 76elseif system == "Linux" then
77 detected.unix = true 77 detected.unix = true
78 detected.linux = true 78 detected.linux = true
79elseif system == "SunOS" then
80 detected.unix = true
81 detected.solaris = true
79elseif system and system:match("^CYGWIN") then 82elseif system and system:match("^CYGWIN") then
80 detected.unix = true 83 detected.unix = true
81 detected.cygwin = true 84 detected.cygwin = true
@@ -371,6 +374,14 @@ if detected.openbsd then
371 defaults.variables.STATFLAG = "-f '%Op'" 374 defaults.variables.STATFLAG = "-f '%Op'"
372end 375end
373 376
377if detected.solaris then
378 defaults.arch = "solaris-"..proc
379 defaults.platforms = {"unix", "solaris"}
380 defaults.variables.MAKE = "gmake"
381 defaults.variables.CC = "gcc"
382 defaults.variables.LD = "gcc"
383end
384
374-- Expose some more values detected by LuaRocks for use by rockspec authors. 385-- Expose some more values detected by LuaRocks for use by rockspec authors.
375defaults.variables.LUA = defaults.lua_interpreter 386defaults.variables.LUA = defaults.lua_interpreter
376defaults.variables.LIB_EXTENSION = defaults.lib_extension 387defaults.variables.LIB_EXTENSION = defaults.lib_extension