diff options
| author | Alexander M Pickering <alex@cogarr.net> | 2024-09-25 17:41:09 -0500 |
|---|---|---|
| committer | Alexander M Pickering <alex@cogarr.net> | 2024-09-25 17:41:09 -0500 |
| commit | 9d8f40e12c9374a1c916fe5a5d20023f43b99b94 (patch) | |
| tree | 8f79d0059dd3de0b73846514dbcbbe55fce34e4d | |
| parent | 26989e190460a2d6b4768a6918826bb658cf5a99 (diff) | |
| download | luarocks-packaging-9d8f40e12c9374a1c916fe5a5d20023f43b99b94.tar.gz luarocks-packaging-9d8f40e12c9374a1c916fe5a5d20023f43b99b94.tar.bz2 luarocks-packaging-9d8f40e12c9374a1c916fe5a5d20023f43b99b94.zip | |
Seperate patches for lua51 and luajit
| -rwxr-xr-x | init | 4 | ||||
| -rw-r--r-- | luarocks.exe.c.51.patch (renamed from luarocks.exe.c.patch) | 0 | ||||
| -rw-r--r-- | luarocks.exe.c.jit.patch | 13 |
3 files changed, 15 insertions, 2 deletions
| @@ -12,8 +12,8 @@ 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 | LUAROCKS_CROSS_COMPILING=1 lua5.4 binary/all_in_one "src/bin/luarocks" "" "^src/luarocks/admin/" "/config" "build-binary" "yes" "windows" | 14 | LUAROCKS_CROSS_COMPILING=1 lua5.4 binary/all_in_one "src/bin/luarocks" "" "^src/luarocks/admin/" "/config" "build-binary" "yes" "windows" |
| 15 | if [ "$LUA_VER" = "51" ]; then | 15 | if [ -e "/root/luarocks-packaging/luarocks.exe.c.$LUA_VER.patch" ]; then |
| 16 | patch -i /root/luarocks-packaging/luarocks.exe.c.patch build-binary/luarocks.exe.c | 16 | patch -i "/root/luarocks-packaging/luarocks.exe.c.$LUA_VER.patch" build-binary/luarocks.exe.c |
| 17 | fi | 17 | fi |
| 18 | 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 | 18 | 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 |
| 19 | cp build-binary/luarocks.exe /root | 19 | cp build-binary/luarocks.exe /root |
diff --git a/luarocks.exe.c.patch b/luarocks.exe.c.51.patch index a8c022f..a8c022f 100644 --- a/luarocks.exe.c.patch +++ b/luarocks.exe.c.51.patch | |||
diff --git a/luarocks.exe.c.jit.patch b/luarocks.exe.c.jit.patch new file mode 100644 index 0000000..3ba5e87 --- /dev/null +++ b/luarocks.exe.c.jit.patch | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | --- luarocks.exe.c 2024-09-23 15:25:00.870448000 -0500 | ||
| 2 | +++ luarocks.exe.c 2024-09-23 15:27:52.663551300 -0500 | ||
| 3 | @@ -38282,7 +38309,9 @@ | ||
| 4 | lua_pop(L, 1); | ||
| 5 | lua_getfield(L, -1, "loaders"); /* table table.insert package package.loaders */ | ||
| 6 | } | ||
| 7 | - lua_copy(L, 4, 3); /* table table.insert package.searchers */ | ||
| 8 | + /* lua_copy introduced in lua 5.2 */ | ||
| 9 | + lua_replace(L,3); | ||
| 10 | + //lua_copy(L, 4, 3); /* table table.insert package.searchers */ | ||
| 11 | lua_settop(L, 3); /* table table.insert package.searchers */ | ||
| 12 | lua_pushnumber(L, 1); /* table table.insert package.searchers 1 */ | ||
| 13 | lua_pushcfunction(L, pkg_loader); /* table table.insert package.searchers 1 pkg_loader */ | ||
