diff options
| -rwxr-xr-x | init | 1 | ||||
| -rw-r--r-- | meta.lua | 3 | ||||
| -rw-r--r-- | wget.patch | 29 |
3 files changed, 33 insertions, 0 deletions
| @@ -11,6 +11,7 @@ cd luarocks | |||
| 11 | mkdir build-binary | 11 | mkdir build-binary |
| 12 | sed -i 's/local program_version = "dev"/local program_version = "lua4.win"/g' /root/luarocks/src/luarocks/core/cfg.lua | 12 | sed -i 's/local program_version = "dev"/local program_version = "lua4.win"/g' /root/luarocks/src/luarocks/core/cfg.lua |
| 13 | patch -i /root/luarocks-packaging/all_in_one.patch binary/all_in_one | 13 | patch -i /root/luarocks-packaging/all_in_one.patch binary/all_in_one |
| 14 | patch -i /root/luarocks-packaging/wget.patch src/luarocks/fs/tools.lua | ||
| 14 | LUAROCKS_CROSS_COMPILING=1 lua5.4 binary/all_in_one "src/bin/luarocks" "" "^src/luarocks/admin/" "/config" "build-binary" "yes" "windows" | 15 | LUAROCKS_CROSS_COMPILING=1 lua5.4 binary/all_in_one "src/bin/luarocks" "" "^src/luarocks/admin/" "/config" "build-binary" "yes" "windows" |
| 15 | if [ -e "/root/luarocks-packaging/luarocks.exe.c.$LUA_VER.patch" ]; then | 16 | if [ -e "/root/luarocks-packaging/luarocks.exe.c.$LUA_VER.patch" ]; then |
| 16 | patch -i "/root/luarocks-packaging/luarocks.exe.c.$LUA_VER.patch" build-binary/luarocks.exe.c | 17 | patch -i "/root/luarocks-packaging/luarocks.exe.c.$LUA_VER.patch" build-binary/luarocks.exe.c |
| @@ -67,6 +67,9 @@ for version_k, version_v, opti_k, opti_v, debug_k, debug_v, comp_k, comp_v in ca | |||
| 67 | LUA_VER=version_k, | 67 | LUA_VER=version_k, |
| 68 | } | 68 | } |
| 69 | } | 69 | } |
| 70 | -- Lua can't just be pulled from git, the .tar.gz releases include extra | ||
| 71 | -- information and files not stored in git. | ||
| 72 | -- Luajit can just be built from git though. | ||
| 70 | if version_k ~= "jit" then | 73 | if version_k ~= "jit" then |
| 71 | builds[name].requires[#builds[name].requires + 1] = {"http", version_v.link} | 74 | builds[name].requires[#builds[name].requires + 1] = {"http", version_v.link} |
| 72 | else | 75 | else |
diff --git a/wget.patch b/wget.patch new file mode 100644 index 0000000..11d46d4 --- /dev/null +++ b/wget.patch | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | --- a/src/luarocks/fs/tools.lua | ||
| 2 | +++ b/src/luarocks/fs/tools.lua | ||
| 3 | @@ -153,6 +153,7 @@ end | ||
| 4 | function tools.use_downloader(url, filename, cache) | ||
| 5 | assert(type(url) == "string") | ||
| 6 | assert(type(filename) == "string" or not filename) | ||
| 7 | + cache = false | ||
| 8 | |||
| 9 | filename = fs.absolute_name(filename or dir.base_name(url)) | ||
| 10 | |||
| 11 | @@ -163,7 +164,7 @@ function tools.use_downloader(url, filename, cache) | ||
| 12 | |||
| 13 | local ok = false | ||
| 14 | if downloader == "wget" then | ||
| 15 | - local wget_cmd = vars.WGET.." "..vars.WGETNOCERTFLAG.." --no-cache --user-agent=\""..cfg.user_agent.." via wget\" --quiet " | ||
| 16 | + local wget_cmd = vars.WGET.." "..vars.WGETNOCERTFLAG.." -U \""..cfg.user_agent.." via wget\" -q " | ||
| 17 | if cfg.connection_timeout and cfg.connection_timeout > 0 then | ||
| 18 | wget_cmd = wget_cmd .. "--timeout="..tostring(cfg.connection_timeout).." --tries=1 " | ||
| 19 | end | ||
| 20 | @@ -175,7 +176,7 @@ function tools.use_downloader(url, filename, cache) | ||
| 21 | ok = fs.execute_quiet(wget_cmd.." --timestamping ", url) | ||
| 22 | fs.pop_dir() | ||
| 23 | elseif filename then | ||
| 24 | - ok = fs.execute_quiet(wget_cmd.." --output-document ", filename, url) | ||
| 25 | + ok = fs.execute_quiet(wget_cmd.." -O", filename, url) | ||
| 26 | else | ||
| 27 | ok = fs.execute_quiet(wget_cmd, url) | ||
| 28 | end | ||
| 29 | |||
