@@ -181,6 +181,9 @@ async function installSystemDependencies() {
181181}
182182
183183async function addCMakeBuildScripts ( sourcePath , luaVersion ) {
184+ if ( luaVersion . indexOf ( "jit" ) > - 1 ) {
185+ return ;
186+ }
184187 debug ( "addCMakeBuildScripts %s, %s" , sourcePath , luaVersion )
185188 fs . unlinkSync ( path . join ( sourcePath , "src" , "luaconf.h" ) )
186189 debug ( "removed luaconf.h" )
@@ -195,7 +198,20 @@ async function addCMakeBuildScripts(sourcePath, luaVersion) {
195198
196199async function buildAndInstall ( sourcePath , platform ) {
197200 debug ( "buildAndInstall %s, %s" , sourcePath , platform )
201+ if ( / j i t / i. test ( sourcePath ) ) {
202+ buildAndInstallLuaJIT ( sourcePath , platform )
203+ } else {
204+ return buildAndInstallLua5 ( sourcePath , platform )
205+ }
206+ }
207+
208+ async function buildAndInstallLuaJIT ( sourcePath , platform ) {
209+ await exec . exec ( "make" , undefined , { cwd : sourcePath } )
210+ await exec . exec ( "make install" , undefined , { cwd : sourcePath } )
211+ }
198212
213+ async function buildAndInstallLua5 ( sourcePath , platform ) {
214+ debug ( "buildAndInstallLua5 %s, %s" , sourcePath , platform )
199215 if ( platform ) {
200216 await exec . exec ( `cmake -H"${ sourcePath } " -Bbuild -DCMAKE_INSTALL_PREFIX=${ INSTALL_PREFIX } -A${ platform } ` , undefined , {
201217 cwd : sourcePath
0 commit comments