From ad33dffead29df2f6b963b8032ba34ab5790a1a1 Mon Sep 17 00:00:00 2001 From: Alexander M Pickering Date: Mon, 23 Sep 2024 20:51:13 -0500 Subject: Customize hardcoded configs --- hardcoded.lua | 3 +++ init | 2 ++ 2 files changed, 5 insertions(+) diff --git a/hardcoded.lua b/hardcoded.lua index 9be83d8..d51d3c0 100644 --- a/hardcoded.lua +++ b/hardcoded.lua @@ -3,4 +3,7 @@ return { PROCESSOR = "x86", FORCE_CONFIG = true, IS_BINARY = true, + SYSCONFDIR = "/config", + PREFIX = "/tree", + WIN_TOOLS = "/tools" } diff --git a/init b/init index c1d8eae..b6df6a0 100755 --- a/init +++ b/init @@ -8,11 +8,13 @@ tar -xvzf lua-*.tar.gz --directory="lua" --strip-components=1 mv luarocks-packaging/hardcoded.lua luarocks/src/luarocks/core/hardcoded.lua cd luarocks mkdir build-binary +sed -i 's/local program_version = "dev"/local program_version = "lua4.win"/g' /root/luarocks/src/luarocks/core/cfg.lua patch -i /root/luarocks-packaging/all_in_one.patch binary/all_in_one LUAROCKS_CROSS_COMPILING=1 lua5.4 binary/all_in_one patch -i /root/luarocks-packaging/luarocks.exe.c.patch build-binary/luarocks.exe.c cat build-binary/luarocks.exe.c | wc -l gcc -o build-binary/luarocks.exe -Oz build-binary/luarocks.exe.c -I/root/lua/src /root/libbz2.a /root/libssl.a /root/libz.a /root/liblua.a -mconsole -mwindows -lm +# For some reason we have to do this twice to actually compile in all the modules LUAROCKS_CROSS_COMPILING=1 lua5.4 binary/all_in_one patch -i /root/luarocks-packaging/luarocks.exe.c.patch build-binary/luarocks.exe.c cat build-binary/luarocks.exe.c | wc -l -- cgit v1.2.3-55-g6feb