diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2012-03-03 14:25:55 -0800 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2012-03-03 14:25:55 -0800 |
commit | d2a4573ad42be8fe68bfd2b0aa73658f5748b1d8 (patch) | |
tree | 3b2aa42e44fff71a1dadb0b127347a42ed886afd | |
parent | 9b9df2fa3475531aba8e41e38ba7d452d802cfb6 (diff) | |
parent | aaf92d629ce4bdb903bd5dde14e94f20abf5825a (diff) | |
download | luarocks-d2a4573ad42be8fe68bfd2b0aa73658f5748b1d8.tar.gz luarocks-d2a4573ad42be8fe68bfd2b0aa73658f5748b1d8.tar.bz2 luarocks-d2a4573ad42be8fe68bfd2b0aa73658f5748b1d8.zip |
Merge pull request #66 from mpx/solaris-support
Solaris support
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | src/luarocks/cfg.lua | 11 |
2 files changed, 13 insertions, 1 deletions
@@ -104,7 +104,8 @@ check_makefile: | |||
104 | cleanup_bins: | 104 | cleanup_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 | |||
76 | elseif system == "Linux" then | 76 | elseif system == "Linux" then |
77 | detected.unix = true | 77 | detected.unix = true |
78 | detected.linux = true | 78 | detected.linux = true |
79 | elseif system == "SunOS" then | ||
80 | detected.unix = true | ||
81 | detected.solaris = true | ||
79 | elseif system and system:match("^CYGWIN") then | 82 | elseif 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'" |
372 | end | 375 | end |
373 | 376 | ||
377 | if 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" | ||
383 | end | ||
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. |
375 | defaults.variables.LUA = defaults.lua_interpreter | 386 | defaults.variables.LUA = defaults.lua_interpreter |
376 | defaults.variables.LIB_EXTENSION = defaults.lib_extension | 387 | defaults.variables.LIB_EXTENSION = defaults.lib_extension |