Software /
code /
prosody
Comparison
util/dependencies.lua @ 2281:27441b099984
Merge with tip.
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Sun, 29 Nov 2009 21:33:37 +0100 |
parent | 2170:2abca9cc78b1 |
child | 2299:b7d25e1ac716 |
comparison
equal
deleted
inserted
replaced
2280:0b0fe49e5251 | 2281:27441b099984 |
---|---|
15 print(""); | 15 print(""); |
16 print("**************************"); | 16 print("**************************"); |
17 print("Prosody was unable to find "..tostring(name)); | 17 print("Prosody was unable to find "..tostring(name)); |
18 print("This package can be obtained in the following ways:"); | 18 print("This package can be obtained in the following ways:"); |
19 print(""); | 19 print(""); |
20 for k,v in pairs(sources) do | 20 local longest_platform = 0; |
21 print("", k, v); | 21 for platform in pairs(sources) do |
22 longest_platform = math.max(longest_platform, #platform); | |
23 end | |
24 for platform, source in pairs(sources) do | |
25 print("", platform..":"..(" "):rep(4+longest_platform-#platform)..source); | |
22 end | 26 end |
23 print(""); | 27 print(""); |
24 print(msg or (name.." is required for Prosody to run, so we will now exit.")); | 28 print(msg or (name.." is required for Prosody to run, so we will now exit.")); |
25 print("More help can be found on our website, at http://prosody.im/doc/depends"); | 29 print("More help can be found on our website, at http://prosody.im/doc/depends"); |
26 print("**************************"); | 30 print("**************************"); |
28 end | 32 end |
29 | 33 |
30 local lxp = softreq "lxp" | 34 local lxp = softreq "lxp" |
31 | 35 |
32 if not lxp then | 36 if not lxp then |
33 missingdep("luaexpat", { ["Ubuntu 8.04 (Hardy)"] = "sudo apt-get install liblua5.1-expat0"; ["luarocks"] = "luarocks install luaexpat"; }); | 37 missingdep("luaexpat", { |
38 ["Debian/Ubuntu"] = "sudo apt-get install liblua5.1-expat0"; | |
39 ["luarocks"] = "luarocks install luaexpat"; | |
40 ["Source"] = "http://www.keplerproject.org/luaexpat/"; | |
41 }); | |
34 fatal = true; | 42 fatal = true; |
35 end | 43 end |
36 | 44 |
37 local socket = softreq "socket" | 45 local socket = softreq "socket" |
38 | 46 |
39 if not socket then | 47 if not socket then |
40 missingdep("luasocket", { ["Ubuntu 8.04 (Hardy)"] = "sudo apt-get install liblua5.1-socket2"; ["luarocks"] = "luarocks install luasocket"; }); | 48 missingdep("luasocket", { |
49 ["Debian/Ubuntu"] = "sudo apt-get install liblua5.1-socket2"; | |
50 ["luarocks"] = "luarocks install luasocket"; | |
51 ["Source"] = "http://www.tecgraf.puc-rio.br/~diego/professional/luasocket/"; | |
52 }); | |
41 fatal = true; | 53 fatal = true; |
42 end | 54 end |
43 | 55 |
56 local lfs, err = softreq "lfs" | |
57 if not lfs then | |
58 missingdep("luafilesystem", { | |
59 ["luarocks"] = "luarocks install luafilesystem"; | |
60 ["Debian/Ubuntu"] = "sudo apt-get install liblua5.1-luafilesystem0"; | |
61 ["Source"] = "http://www.keplerproject.org/luafilesystem/"; | |
62 }); | |
63 fatal = true; | |
64 end | |
65 | |
44 local ssl = softreq "ssl" | 66 local ssl = softreq "ssl" |
45 | 67 |
46 if not ssl then | 68 if not ssl then |
47 if config.get("*", "core", "run_without_ssl") then | 69 if config.get("*", "core", "run_without_ssl") then |
48 log("warn", "Running without SSL support because run_without_ssl is defined in the config"); | 70 log("warn", "Running without SSL support because run_without_ssl is defined in the config"); |
49 else | 71 else |
50 missingdep("LuaSec", { ["Source"] = "http://www.inf.puc-rio.br/~brunoos/luasec/" }, "SSL/TLS support will not be available"); | 72 missingdep("LuaSec", { |
73 ["Debian/Ubuntu"] = "http://prosody.im/download/start#debian_and_ubuntu"; | |
74 ["luarocks"] = "luarocks install luasec"; | |
75 ["Source"] = "http://www.inf.puc-rio.br/~brunoos/luasec/"; | |
76 }, "SSL/TLS support will not be available"); | |
77 end | |
78 else | |
79 local major, minor, veryminor, patched = ssl._VERSION:match("(%d+)%.(%d+)%.?(%d*)(M?)"); | |
80 if not major or ((tonumber(major) == 0 and (tonumber(minor) or 0) <= 3 and (tonumber(veryminor) or 0) <= 2) and patched ~= "M") then | |
81 log("error", "This version of LuaSec contains a known bug that causes disconnects, see http://prosody.im/doc/depends"); | |
51 end | 82 end |
52 end | 83 end |
53 | 84 |
54 local encodings, err = softreq "util.encodings" | 85 local encodings, err = softreq "util.encodings" |
55 if not encodings then | 86 if not encodings then |