Skip to content

Commit 4f88e4d

Browse files
author
Robert Masen
committed
add LuaDist patches
1 parent b12d2f2 commit 4f88e4d

File tree

6 files changed

+812
-40
lines changed

6 files changed

+812
-40
lines changed

.github/workflows/test.yml

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,40 @@ name: test
33
on: [push]
44

55
jobs:
6-
test:
7-
strategy:
8-
matrix:
9-
luaVersion: ["5.1.5", "5.2.4", "5.3.5"]
10-
os: [macOs-latest, ubuntu-latest]
6+
# test:
7+
# strategy:
8+
# matrix:
9+
# luaVersion: ["5.1.5", "5.2.4", "5.3.5"]
10+
# os: [macOs-latest, ubuntu-latest]
1111

12-
runs-on: ${{ matrix.os }}
12+
# runs-on: ${{ matrix.os }}
1313

14-
steps:
15-
- uses: actions/checkout@master
16-
- uses: ./
17-
with:
18-
lua-version: ${{ matrix.luaVersion }}
14+
# steps:
15+
# - uses: actions/checkout@master
16+
# - uses: ./
17+
# with:
18+
# lua-version: ${{ matrix.luaVersion }}
1919

20-
- name: test lua
21-
run: |
22-
which lua
23-
lua -e "print(_VERSION)"
24-
windows:
25-
runs-on: windows-latest
26-
strategy:
27-
matrix:
28-
luaVersion: ["5.1.5", "5.2.4", "5.3.5"]
29-
platform: [Win32, x64]
30-
steps:
31-
- uses: actions/checkout@master
32-
- uses: ./
33-
with:
34-
lua-version: ${{ matrix.luaVersion }}
35-
platform: ${{ matrix.platform }}
36-
- name: test lua
37-
run: |
38-
which lua
39-
lua -e "print(_VERSION)"
20+
# - name: test lua
21+
# run: |
22+
# which lua
23+
# lua -e "print(_VERSION)"
24+
# windows:
25+
# runs-on: windows-latest
26+
# strategy:
27+
# matrix:
28+
# luaVersion: ["5.1.5", "5.2.4", "5.3.5"]
29+
# platform: [Win32, x64]
30+
# steps:
31+
# - uses: actions/checkout@master
32+
# - uses: ./
33+
# with:
34+
# lua-version: ${{ matrix.luaVersion }}
35+
# platform: ${{ matrix.platform }}
36+
# - name: test lua
37+
# run: |
38+
# which lua
39+
# lua -e "print(_VERSION)"
4040
lua-jit:
4141
strategy:
4242
matrix:

main.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,12 @@ async function installSystemDependencies() {
182182
}
183183

184184
async function addCMakeBuildScripts(sourcePath, luaVersion) {
185-
if (luaVersion.indexOf("jit") > -1) {
186-
return;
187-
}
188185
debug("addCMakeBuildScripts %s, %s", sourcePath, luaVersion)
189186
fs.unlinkSync(path.join(sourcePath, "src", "luaconf.h"))
190187
debug("removed luaconf.h")
191188
mergeDirectory(path.join(__dirname, "patch", "shared"), sourcePath)
192189
debug("merged patch/shared with %s", sourcePath)
193-
const v = luaVersion.replace(/\.\d*$/,'')
190+
const v = luaVersion.replace(/\.\d*(-beta\d+)?$/,'')
194191
debug("v: %s", v)
195192
mergeDirectory(path.join(__dirname, "patch", "lua", v), sourcePath)
196193
console.log("VERSION: " + v)
@@ -199,11 +196,11 @@ async function addCMakeBuildScripts(sourcePath, luaVersion) {
199196

200197
async function buildAndInstall(sourcePath, platform) {
201198
debug("buildAndInstall %s, %s", sourcePath, platform)
202-
if (/jit/i.test(sourcePath)) {
203-
await buildAndInstallLuaJIT(sourcePath, platform)
204-
} else {
205-
await buildAndInstallLua5(sourcePath, platform)
206-
}
199+
await buildAndInstallLua5(sourcePath, platform)
200+
// if (/jit/i.test(sourcePath)) {
201+
// await buildAndInstallLuaJIT(sourcePath, platform)
202+
// } else {
203+
// }
207204
core.addPath(path.join(INSTALL_PREFIX, "bin"));
208205
}
209206

@@ -234,6 +231,12 @@ async function buildAndInstallLua5(sourcePath, platform) {
234231
})
235232
}
236233
else{
234+
let env
235+
if (process.platform == "darwin" && /jit/i.test(sourcePath)) {
236+
env = {
237+
MACOSX_DEPLOYMENT_TARGET: os.release().split('.').slice(0, 2).map(n => `0${n}`.substr(-2)).join('.'),
238+
}
239+
}
237240
await exec.exec(`cmake -H"${sourcePath}" -Bbuild -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX}`, undefined, {
238241
cwd: sourcePath
239242
})

0 commit comments

Comments
 (0)