From 137d6cea40e5e0263d7f38a125fe45b21b73e527 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Thu, 21 Jul 2016 20:11:58 +1000 Subject: Add script for building Lua (LuaJIT actually) --- src/others/build_Lua.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 src/others/build_Lua.lua diff --git a/src/others/build_Lua.lua b/src/others/build_Lua.lua new file mode 100755 index 0000000..1adad97 --- /dev/null +++ b/src/others/build_Lua.lua @@ -0,0 +1,23 @@ +#!/usr/bin/env luajit + +local dir = ... + +if 'nil' == type(dir) then + local build, err = loadfile('../../build.lua') + if build then + setfenv(build, getfenv(2)) + build(2) + else + print("ERROR - " .. err) + end + dir = workingDir +end + +baseDir = '/usr/local/' + +cloneGit('luajit-2.0', '.', 'luajit.org/git', '') +runCommand('LuaJIT', 'luajit-2.0', 'make clean') +runCommand(nil, 'luajit-2.0', 'make amalg PREFIX=' .. baseDir) +runCommand(nil, 'luajit-2.0', 'sudo make install PREFIX=' .. baseDir) +-- This link prevents linking to LuaJIT when it works, the Ubuntu one supplies a broken link instead, which also "works". +runCommand(nil, 'luajit-2.0', 'sudo rm ' .. baseDir .. '/lib/libluajit-5.1.so') -- cgit v1.1