aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GNUmakefile7
-rw-r--r--binary/Makefile.windows2
-rwxr-xr-xbinary/all_in_one26
-rw-r--r--binary/lua-bz2-0.2.1-1.rockspec (renamed from binary/lua-bz2-0.1.0-1.rockspec)4
-rw-r--r--binary/lua-zlib-1.2-0.rockspec2
-rw-r--r--binary/luaposix-35.1-1.rockspec (renamed from binary/luaposix-34.0.4-1.rockspec)16
-rw-r--r--binary/luasec-1.0.2-1.rockspec (renamed from binary/luasec-0.8.1-2.rockspec)33
-rw-r--r--src/luarocks/fs/tools.lua2
-rw-r--r--src/luarocks/fs/unix.lua3
-rw-r--r--src/luarocks/fs/win32.lua3
10 files changed, 50 insertions, 48 deletions
diff --git a/GNUmakefile b/GNUmakefile
index f4a6015f..cbb47996 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -14,9 +14,10 @@ luadir = $(datarootdir)/lua/$(LUA_VERSION)
14builddir = ./build 14builddir = ./build
15buildbinarydir = ./build-binary 15buildbinarydir = ./build-binary
16 16
17
18LUAROCKS_FILES = $(shell find src/luarocks/ -type f -name '*.lua') 17LUAROCKS_FILES = $(shell find src/luarocks/ -type f -name '*.lua')
19 18
19LUA_ENV_VARS = LUA_PATH LUA_PATH_5_2 LUA_PATH_5_3 LUA_PATH_5_4 LUA_CPATH LUA_CPATH_5_2 LUA_CPATH_5_3 LUA_CPATH_5_4
20
20all: build 21all: build
21 22
22# ---------------------------------------- 23# ----------------------------------------
@@ -51,7 +52,7 @@ luarocks: config.unix $(builddir)/config-$(LUA_VERSION).lua
51 cp $(builddir)/config-$(LUA_VERSION).lua .luarocks/config-$(LUA_VERSION).lua 52 cp $(builddir)/config-$(LUA_VERSION).lua .luarocks/config-$(LUA_VERSION).lua
52 rm -f src/luarocks/core/hardcoded.lua 53 rm -f src/luarocks/core/hardcoded.lua
53 echo "#!/bin/sh" > luarocks 54 echo "#!/bin/sh" > luarocks
54 echo "unset LUA_PATH LUA_PATH_5_2 LUA_PATH_5_3 LUA_PATH_5_4 LUA_CPATH LUA_CPATH_5_2 LUA_CPATH_5_3 LUA_CPATH_5_4" >> luarocks 55 echo "unset $(LUA_ENV_VARS)" >> luarocks
55 echo 'LUAROCKS_SYSCONFDIR="$(luarocksconfdir)" LUA_PATH="$(CURDIR)/src/?.lua;;" exec "$(LUA)" "$(CURDIR)/src/bin/luarocks" --project-tree="$(CURDIR)/lua_modules" "$$@"' >> luarocks 56 echo 'LUAROCKS_SYSCONFDIR="$(luarocksconfdir)" LUA_PATH="$(CURDIR)/src/?.lua;;" exec "$(LUA)" "$(CURDIR)/src/bin/luarocks" --project-tree="$(CURDIR)/lua_modules" "$$@"' >> luarocks
56 chmod +rx ./luarocks 57 chmod +rx ./luarocks
57 ./luarocks init 58 ./luarocks init
@@ -59,7 +60,7 @@ luarocks: config.unix $(builddir)/config-$(LUA_VERSION).lua
59luarocks-admin: config.unix 60luarocks-admin: config.unix
60 rm -f src/luarocks/core/hardcoded.lua 61 rm -f src/luarocks/core/hardcoded.lua
61 echo "#!/bin/sh" > luarocks-admin 62 echo "#!/bin/sh" > luarocks-admin
62 echo "unset LUA_PATH LUA_PATH_5_2 LUA_PATH_5_3 LUA_PATH_5_4 LUA_CPATH LUA_CPATH_5_2 LUA_CPATH_5_3 LUA_CPATH_5_4" >> luarocks-admin 63 echo "unset $(LUA_ENV_VARS)" >> luarocks-admin
63 echo 'LUAROCKS_SYSCONFDIR="$(luarocksconfdir)" LUA_PATH="$(CURDIR)/src/?.lua;;" exec "$(LUA)" "$(CURDIR)/src/bin/luarocks-admin" --project-tree="$(CURDIR)/lua_modules" "$$@"' >> luarocks-admin 64 echo 'LUAROCKS_SYSCONFDIR="$(luarocksconfdir)" LUA_PATH="$(CURDIR)/src/?.lua;;" exec "$(LUA)" "$(CURDIR)/src/bin/luarocks-admin" --project-tree="$(CURDIR)/lua_modules" "$$@"' >> luarocks-admin
64 chmod +rx ./luarocks-admin 65 chmod +rx ./luarocks-admin
65 66
diff --git a/binary/Makefile.windows b/binary/Makefile.windows
index e6ec26bf..8dbbc270 100644
--- a/binary/Makefile.windows
+++ b/binary/Makefile.windows
@@ -6,7 +6,7 @@ MINGW_SYSROOT=/usr/lib/mingw-w64-sysroot/$(MINGW_PREFIX)
6# "mingw" or "mingw64" 6# "mingw" or "mingw64"
7OPENSSL_PLATFORM=mingw 7OPENSSL_PLATFORM=mingw
8# Versions of dependencies 8# Versions of dependencies
9LIBLUA_VERSION=5.3.4 9LIBLUA_VERSION=5.4.3
10OPENSSL_VERSION=1.0.2o 10OPENSSL_VERSION=1.0.2o
11ZLIB_VERSION=1.2.11 11ZLIB_VERSION=1.2.11
12BZIP2_VERSION=1.0.6 12BZIP2_VERSION=1.0.6
diff --git a/binary/all_in_one b/binary/all_in_one
index bfe9c974..34b84a2c 100755
--- a/binary/all_in_one
+++ b/binary/all_in_one
@@ -164,7 +164,7 @@ local function write_hardcoded_module(dir)
164 LUA_BINDIR = if_platform("unix", cfg.variables.LUA_BINDIR), 164 LUA_BINDIR = if_platform("unix", cfg.variables.LUA_BINDIR),
165 LUA_INTERPRETER = if_platform("unix", cfg.lua_interpreter), 165 LUA_INTERPRETER = if_platform("unix", cfg.lua_interpreter),
166 } 166 }
167 167
168 local name = dir .. "/luarocks/core/hardcoded.lua" 168 local name = dir .. "/luarocks/core/hardcoded.lua"
169 persist.save_as_module(name, hardcoded) 169 persist.save_as_module(name, hardcoded)
170 return name 170 return name
@@ -335,7 +335,7 @@ static int pmain(lua_State *L) {
335/* error handler, from luac */ 335/* error handler, from luac */
336static int msghandler (lua_State *L) { 336static int msghandler (lua_State *L) {
337 /* is error object not a string? */ 337 /* is error object not a string? */
338 const char *msg = lua_tostring(L, 1); 338 const char *msg = lua_tostring(L, 1);
339 if (msg == NULL) { 339 if (msg == NULL) {
340 /* does it have a metamethod that produces a string */ 340 /* does it have a metamethod that produces a string */
341 if (luaL_callmeta(L, 1, "__tostring") && lua_type(L, -1) == LUA_TSTRING) { 341 if (luaL_callmeta(L, 1, "__tostring") && lua_type(L, -1) == LUA_TSTRING) {
@@ -393,7 +393,7 @@ local function generate(main_program, dir, skip)
393 local program_name = main_program:gsub(".*/", "") 393 local program_name = main_program:gsub(".*/", "")
394 394
395 local hardcoded = write_hardcoded_module(dir) 395 local hardcoded = write_hardcoded_module(dir)
396 396
397 local out = {} 397 local out = {}
398 table.insert(out, ([[static const char* progname = %q;]]):format(program_name)) 398 table.insert(out, ([[static const char* progname = %q;]]):format(program_name))
399 table.insert(out, c_preamble) 399 table.insert(out, c_preamble)
@@ -404,7 +404,7 @@ local function generate(main_program, dir, skip)
404 table.insert(out, c_main) 404 table.insert(out, c_main)
405 405
406 os.remove(hardcoded) 406 os.remove(hardcoded)
407 407
408 local c_filename = TARGET_DIR .. "/" .. program_name .. ".exe.c" 408 local c_filename = TARGET_DIR .. "/" .. program_name .. ".exe.c"
409 local fd = io.open(c_filename, "w") 409 local fd = io.open(c_filename, "w")
410 fd:write(reindent_c(table.concat(out, "\n"))) 410 fd:write(reindent_c(table.concat(out, "\n")))
@@ -412,7 +412,7 @@ local function generate(main_program, dir, skip)
412 412
413 deps.check_lua_incdir(cfg.variables) 413 deps.check_lua_incdir(cfg.variables)
414 deps.check_lua_libdir(cfg.variables) 414 deps.check_lua_libdir(cfg.variables)
415 415
416 cmd = table.concat(filter_in(nonnull, { 416 cmd = table.concat(filter_in(nonnull, {
417 CC, "-o", TARGET_DIR .. "/" .. program_name .. ".exe", 417 CC, "-o", TARGET_DIR .. "/" .. program_name .. ".exe",
418 "-I", cfg.variables.LUA_INCDIR, 418 "-I", cfg.variables.LUA_INCDIR,
@@ -426,6 +426,7 @@ local function generate(main_program, dir, skip)
426 cfg.variables.LUA_LIBDIR .. "/" .. cfg.variables.LUALIB:gsub("%.so.*$", ".a"), 426 cfg.variables.LUA_LIBDIR .. "/" .. cfg.variables.LUALIB:gsub("%.so.*$", ".a"),
427 if_platform("unix", "-ldl"), 427 if_platform("unix", "-ldl"),
428 if_platform("unix", "-lpthread"), 428 if_platform("unix", "-lpthread"),
429 if_platform("windows", "-mwindows"),
429 "-lm" 430 "-lm"
430 }), " ") 431 }), " ")
431 print(cmd) 432 print(cmd)
@@ -445,7 +446,7 @@ local function main()
445 path.use_tree(LUA_MODULES) 446 path.use_tree(LUA_MODULES)
446 447
447 local CONFIG_FILE = CONFIG_DIR .. "/config-" .. cfg.lua_version .. ".lua" 448 local CONFIG_FILE = CONFIG_DIR .. "/config-" .. cfg.lua_version .. ".lua"
448 449
449 fs.make_dir(CONFIG_DIR) 450 fs.make_dir(CONFIG_DIR)
450 451
451 persist.save_from_table(CONFIG_FILE, { 452 persist.save_from_table(CONFIG_FILE, {
@@ -456,22 +457,23 @@ local function main()
456 LD = fs.current_dir() .. "/binary/static-gcc", 457 LD = fs.current_dir() .. "/binary/static-gcc",
457 LIB_EXTENSION = "a", 458 LIB_EXTENSION = "a",
458 LIBFLAG = "-static", 459 LIBFLAG = "-static",
460 PWD = "pwd",
459 }, 461 },
460 platforms = if_platform("windows", { "windows", "win32", "mingw32" }), 462 platforms = if_platform("windows", { "windows", "win32", "mingw32" }),
461 external_deps_dirs = if_platform("windows", { CROSSCOMPILER_SYSROOT, fs.current_dir() .. "/windows-deps-" .. TRIPLET }), 463 external_deps_dirs = if_platform("windows", { CROSSCOMPILER_SYSROOT, fs.current_dir() .. "/windows-deps-" .. TRIPLET }),
462 }) 464 })
463 465
464 local dependencies = { 466 local dependencies = {
465 md5 = "md5", 467 md5 = "md5",
466 luasec = "./binary/luasec-0.8.1-2.rockspec", 468 luasec = "./binary/luasec-1.0.2-1.rockspec",
467 luaposix = if_platform("unix", "./binary/luaposix-34.0.4-1.rockspec"),
468 luasocket = "luasocket",
469 ["lua-zlib"] = "./binary/lua-zlib-1.2-0.rockspec", 469 ["lua-zlib"] = "./binary/lua-zlib-1.2-0.rockspec",
470 ["lua-bz2"] = "./binary/lua-bz2-0.1.0-1.rockspec", 470 ["lua-bz2"] = "./binary/lua-bz2-0.2.1-1.rockspec",
471 luaposix = if_platform("unix", "./binary/luaposix-35.1-1.rockspec"),
472 luasocket = "luasocket",
471 luafilesystem = "luafilesystem", 473 luafilesystem = "luafilesystem",
472 dkjson = "dkjson", 474 dkjson = "dkjson",
473 } 475 }
474 476
475 fs.make_dir(LUA_MODULES) 477 fs.make_dir(LUA_MODULES)
476 for name, arg in pairs(dependencies) do 478 for name, arg in pairs(dependencies) do
477 print("----------------------------------------------------------------") 479 print("----------------------------------------------------------------")
diff --git a/binary/lua-bz2-0.1.0-1.rockspec b/binary/lua-bz2-0.2.1-1.rockspec
index aa29293f..d5a73778 100644
--- a/binary/lua-bz2-0.1.0-1.rockspec
+++ b/binary/lua-bz2-0.2.1-1.rockspec
@@ -1,8 +1,8 @@
1package = "lua-bz2" 1package = "lua-bz2"
2version = "0.1.0-1" 2version = "0.2.1-1"
3source = { 3source = {
4 url = "git+ssh://git@github.com/hishamhm/lua-bz2.git", 4 url = "git+ssh://git@github.com/hishamhm/lua-bz2.git",
5 tag = "0.1.0", 5 tag = "0.2.1",
6} 6}
7description = { 7description = {
8 summary = "A Lua binding to Julian Seward's libbzip2", 8 summary = "A Lua binding to Julian Seward's libbzip2",
diff --git a/binary/lua-zlib-1.2-0.rockspec b/binary/lua-zlib-1.2-0.rockspec
index dd0c4a15..4e32448f 100644
--- a/binary/lua-zlib-1.2-0.rockspec
+++ b/binary/lua-zlib-1.2-0.rockspec
@@ -16,7 +16,7 @@ description = {
16 license = "MIT" 16 license = "MIT"
17} 17}
18dependencies = { 18dependencies = {
19 "lua >= 5.1, <= 5.3" 19 "lua >= 5.1, <= 5.4"
20} 20}
21external_dependencies = { 21external_dependencies = {
22 ZLIB = { 22 ZLIB = {
diff --git a/binary/luaposix-34.0.4-1.rockspec b/binary/luaposix-35.1-1.rockspec
index 490715d5..1940c755 100644
--- a/binary/luaposix-34.0.4-1.rockspec
+++ b/binary/luaposix-35.1-1.rockspec
@@ -1,4 +1,4 @@
1local _MODREV, _SPECREV = '34.0.4', '-1' 1local _MODREV, _SPECREV = '35.1', '-1'
2 2
3package = 'luaposix' 3package = 'luaposix'
4version = _MODREV .. _SPECREV 4version = _MODREV .. _SPECREV
@@ -14,14 +14,20 @@ description = {
14} 14}
15 15
16dependencies = { 16dependencies = {
17 'bit32', 17 'lua >= 5.1, < 5.5',
18 'lua >= 5.1, < 5.4',
19 'std.normalize',
20} 18}
21 19
20do
21 -- We only want to install a bit32 module for Lua 5.1.
22 local _ENV={package=nil, dependencies=dependencies}
23 if package then
24 dependencies[#dependencies + 1] = 'bit32'
25 end
26end
27
22source = { 28source = {
23 url = 'http://github.com/luaposix/luaposix/archive/v' .. _MODREV .. '.zip', 29 url = 'http://github.com/luaposix/luaposix/archive/v' .. _MODREV .. '.zip',
24 dir = 'luaposix-' .. _MODREV, 30 dir = 'luaposix-' .. _MODREV,
25} 31}
26 32
27build = { 33build = {
diff --git a/binary/luasec-0.8.1-2.rockspec b/binary/luasec-1.0.2-1.rockspec
index 510e88ef..b6741257 100644
--- a/binary/luasec-0.8.1-2.rockspec
+++ b/binary/luasec-1.0.2-1.rockspec
@@ -1,8 +1,8 @@
1package = "LuaSec" 1package = "LuaSec"
2version = "0.8.1-2" 2version = "1.0.2-1"
3source = { 3source = {
4 url = "https://github.com/brunoos/luasec/archive/luasec-0.8.1.tar.gz", 4 url = "git://github.com/brunoos/luasec",
5 dir = "luasec-luasec-0.8.1" 5 tag = "v1.0.2",
6} 6}
7description = { 7description = {
8 summary = "A binding for OpenSSL library to provide TLS/SSL communication over LuaSocket.", 8 summary = "A binding for OpenSSL library to provide TLS/SSL communication over LuaSocket.",
@@ -57,19 +57,10 @@ build = {
57 "ssl", "crypto" 57 "ssl", "crypto"
58 }, 58 },
59 sources = { 59 sources = {
60 "src/config.c", "src/ec.c", 60 "src/options.c", "src/config.c", "src/ec.c",
61 "src/x509.c", "src/context.c", "src/ssl.c", 61 "src/x509.c", "src/context.c", "src/ssl.c",
62 "src/luasocket/buffer.c", "src/luasocket/io.c", 62 "src/luasocket/buffer.c", "src/luasocket/io.c",
63 "src/luasocket/timeout.c", "src/luasocket/usocket.c" 63 "src/luasocket/usocket.c" -- , "src/luasocket/timeout.c"
64 }
65 }
66 }
67 },
68 mingw32 = {
69 modules = {
70 ssl = {
71 libraries = {
72 "ssl", "crypto", "ws2_32", "gdi32"
73 } 64 }
74 } 65 }
75 } 66 }
@@ -89,16 +80,16 @@ build = {
89 "$(OPENSSL_BINDIR)", 80 "$(OPENSSL_BINDIR)",
90 }, 81 },
91 libraries = { 82 libraries = {
92 "libssl32MD", "libcrypto32MD", "ws2_32" 83 "ssl", "crypto", "ws2_32"
93 }, 84 },
94 incdirs = { 85 incdirs = {
95 "$(OPENSSL_INCDIR)", "src/", "src/luasocket" 86 "$(OPENSSL_INCDIR)", "src/", "src/luasocket"
96 }, 87 },
97 sources = { 88 sources = {
98 "src/config.c", "src/ec.c", 89 "src/options.c", "src/config.c", "src/ec.c",
99 "src/x509.c", "src/context.c", "src/ssl.c", 90 "src/x509.c", "src/context.c", "src/ssl.c",
100 "src/luasocket/buffer.c", "src/luasocket/io.c", 91 "src/luasocket/buffer.c", "src/luasocket/io.c",
101 "src/luasocket/timeout.c", "src/luasocket/wsocket.c" 92 "src/luasocket/wsocket.c", "src/luasocket/timeout.c"
102 } 93 }
103 } 94 }
104 }, 95 },
@@ -110,12 +101,12 @@ index 95109c4..e5defa8 100644
110+++ b/src/ssl.c 101+++ b/src/ssl.c
111@@ -11,7 +11,7 @@ 102@@ -11,7 +11,7 @@
112 #include <string.h> 103 #include <string.h>
113 104
114 #if defined(WIN32) 105 #if defined(WIN32)
115-#include <Winsock2.h> 106-#include <Winsock2.h>
116+#include <winsock2.h> 107+#include <winsock2.h>
117 #endif 108 #endif
118 109
119 #include <openssl/ssl.h> 110 #include <openssl/ssl.h>
120]] 111]]
121 } 112 }
diff --git a/src/luarocks/fs/tools.lua b/src/luarocks/fs/tools.lua
index 623e5a90..0a154794 100644
--- a/src/luarocks/fs/tools.lua
+++ b/src/luarocks/fs/tools.lua
@@ -57,7 +57,7 @@ do
57 local current = cache_pwd 57 local current = cache_pwd
58 if not current then 58 if not current then
59 local pipe = io.popen(fs.quiet_stderr(vars.PWD)) 59 local pipe = io.popen(fs.quiet_stderr(vars.PWD))
60 current = pipe:read("*l"):gsub("%s*", "") 60 current = pipe:read("*a"):gsub("^%s*", ""):gsub("%s*$", "")
61 pipe:close() 61 pipe:close()
62 cache_pwd = current 62 cache_pwd = current
63 end 63 end
diff --git a/src/luarocks/fs/unix.lua b/src/luarocks/fs/unix.lua
index 2c66eaa3..0065753e 100644
--- a/src/luarocks/fs/unix.lua
+++ b/src/luarocks/fs/unix.lua
@@ -90,7 +90,8 @@ function unix.wrap_script(script, target, deps_mode, name, version, ...)
90 } 90 }
91 91
92 local remove_interpreter = false 92 local remove_interpreter = false
93 if target == "luarocks" or target == "luarocks-admin" then 93 local base = dir.base_name(target):gsub("%..*$", "")
94 if base == "luarocks" or base == "luarocks-admin" then
94 if cfg.is_binary then 95 if cfg.is_binary then
95 remove_interpreter = true 96 remove_interpreter = true
96 end 97 end
diff --git a/src/luarocks/fs/win32.lua b/src/luarocks/fs/win32.lua
index 1902a691..a3f42df7 100644
--- a/src/luarocks/fs/win32.lua
+++ b/src/luarocks/fs/win32.lua
@@ -167,7 +167,8 @@ function win32.wrap_script(script, target, deps_mode, name, version, ...)
167 } 167 }
168 168
169 local remove_interpreter = false 169 local remove_interpreter = false
170 if target == "luarocks" or target == "luarocks-admin" then 170 local base = dir.base_name(target):gsub("%..*$", "")
171 if base == "luarocks" or base == "luarocks-admin" then
171 if cfg.is_binary then 172 if cfg.is_binary then
172 remove_interpreter = true 173 remove_interpreter = true
173 end 174 end