diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2022-04-11 16:15:15 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2022-04-11 17:02:28 -0300 |
| commit | eddf776d64941454377f996733f96873cb79bcae (patch) | |
| tree | 9ca362c77bd1827feb872f8b67650821012a9d4d /binary | |
| parent | 21c84dad3ff4e0de10b813260b6a5247771d6754 (diff) | |
| download | luarocks-eddf776d64941454377f996733f96873cb79bcae.tar.gz luarocks-eddf776d64941454377f996733f96873cb79bcae.tar.bz2 luarocks-eddf776d64941454377f996733f96873cb79bcae.zip | |
Changes for building the all-in-one binary with Lua 5.4
Diffstat (limited to 'binary')
| -rw-r--r-- | binary/Makefile.windows | 2 | ||||
| -rwxr-xr-x | binary/all_in_one | 26 | ||||
| -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.rockspec | 2 | ||||
| -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 |
6 files changed, 41 insertions, 42 deletions
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" |
| 7 | OPENSSL_PLATFORM=mingw | 7 | OPENSSL_PLATFORM=mingw |
| 8 | # Versions of dependencies | 8 | # Versions of dependencies |
| 9 | LIBLUA_VERSION=5.3.4 | 9 | LIBLUA_VERSION=5.4.3 |
| 10 | OPENSSL_VERSION=1.0.2o | 10 | OPENSSL_VERSION=1.0.2o |
| 11 | ZLIB_VERSION=1.2.11 | 11 | ZLIB_VERSION=1.2.11 |
| 12 | BZIP2_VERSION=1.0.6 | 12 | BZIP2_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 */ |
| 336 | static int msghandler (lua_State *L) { | 336 | static 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 @@ | |||
| 1 | package = "lua-bz2" | 1 | package = "lua-bz2" |
| 2 | version = "0.1.0-1" | 2 | version = "0.2.1-1" |
| 3 | source = { | 3 | source = { |
| 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 | } |
| 7 | description = { | 7 | description = { |
| 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 | } |
| 18 | dependencies = { | 18 | dependencies = { |
| 19 | "lua >= 5.1, <= 5.3" | 19 | "lua >= 5.1, <= 5.4" |
| 20 | } | 20 | } |
| 21 | external_dependencies = { | 21 | external_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 @@ | |||
| 1 | local _MODREV, _SPECREV = '34.0.4', '-1' | 1 | local _MODREV, _SPECREV = '35.1', '-1' |
| 2 | 2 | ||
| 3 | package = 'luaposix' | 3 | package = 'luaposix' |
| 4 | version = _MODREV .. _SPECREV | 4 | version = _MODREV .. _SPECREV |
| @@ -14,14 +14,20 @@ description = { | |||
| 14 | } | 14 | } |
| 15 | 15 | ||
| 16 | dependencies = { | 16 | dependencies = { |
| 17 | 'bit32', | 17 | 'lua >= 5.1, < 5.5', |
| 18 | 'lua >= 5.1, < 5.4', | ||
| 19 | 'std.normalize', | ||
| 20 | } | 18 | } |
| 21 | 19 | ||
| 20 | do | ||
| 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 | ||
| 26 | end | ||
| 27 | |||
| 22 | source = { | 28 | source = { |
| 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 | ||
| 27 | build = { | 33 | build = { |
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 @@ | |||
| 1 | package = "LuaSec" | 1 | package = "LuaSec" |
| 2 | version = "0.8.1-2" | 2 | version = "1.0.2-1" |
| 3 | source = { | 3 | source = { |
| 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 | } |
| 7 | description = { | 7 | description = { |
| 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 | } |
