aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander M Pickering <alex@cogarr.net>2024-11-07 23:44:15 -0600
committerAlexander M Pickering <alex@cogarr.net>2024-11-07 23:44:15 -0600
commit36c872b96fb4335078558cec78075d2c332114ea (patch)
tree98b92afeb051b171bf6444edb4f879c036f92e8d
parent5b1bef8221d93e85260bfd394625ebd3d3202ae4 (diff)
downloadluarocks-packaging-36c872b96fb4335078558cec78075d2c332114ea.tar.gz
luarocks-packaging-36c872b96fb4335078558cec78075d2c332114ea.tar.bz2
luarocks-packaging-36c872b96fb4335078558cec78075d2c332114ea.zip
Patch wget to use short options
-rwxr-xr-xinit1
-rw-r--r--meta.lua3
-rw-r--r--wget.patch29
3 files changed, 33 insertions, 0 deletions
diff --git a/init b/init
index 5943696..ece283c 100755
--- a/init
+++ b/init
@@ -11,6 +11,7 @@ cd luarocks
11mkdir build-binary 11mkdir build-binary
12sed -i 's/local program_version = "dev"/local program_version = "lua4.win"/g' /root/luarocks/src/luarocks/core/cfg.lua 12sed -i 's/local program_version = "dev"/local program_version = "lua4.win"/g' /root/luarocks/src/luarocks/core/cfg.lua
13patch -i /root/luarocks-packaging/all_in_one.patch binary/all_in_one 13patch -i /root/luarocks-packaging/all_in_one.patch binary/all_in_one
14patch -i /root/luarocks-packaging/wget.patch src/luarocks/fs/tools.lua
14LUAROCKS_CROSS_COMPILING=1 lua5.4 binary/all_in_one "src/bin/luarocks" "" "^src/luarocks/admin/" "/config" "build-binary" "yes" "windows" 15LUAROCKS_CROSS_COMPILING=1 lua5.4 binary/all_in_one "src/bin/luarocks" "" "^src/luarocks/admin/" "/config" "build-binary" "yes" "windows"
15if [ -e "/root/luarocks-packaging/luarocks.exe.c.$LUA_VER.patch" ]; then 16if [ -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
diff --git a/meta.lua b/meta.lua
index dd3ad09..89c6f6b 100644
--- a/meta.lua
+++ b/meta.lua
@@ -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