Fredrik Fornwall
8 years ago
4 changed files with 27 additions and 17 deletions
@ -1,14 +1,12 @@ |
|||
Use luajit instead of lua. |
|||
|
|||
diff -u -r ../luarocks-2.1.2/Makefile ./Makefile
|
|||
--- ../luarocks-2.1.2/Makefile 2014-01-10 20:03:03.000000000 +0100
|
|||
+++ ./Makefile 2014-07-09 02:51:43.896335398 +0200
|
|||
@@ -129,7 +129,7 @@
|
|||
diff -u -r ../luarocks-2.4.0/Makefile ./Makefile
|
|||
--- ../luarocks-2.4.0/Makefile 2016-09-08 14:39:09.000000000 -0400
|
|||
+++ ./Makefile 2016-09-26 09:15:45.364036927 -0400
|
|||
@@ -116,7 +116,7 @@
|
|||
for f in $(BIN_FILES) ;\ |
|||
do \ |
|||
mv src/bin/$$f src/bin/$$f.bak ;\ |
|||
- sed "s,^#!.*lua.*,#!/usr/bin/env lua,;/^package.path/d" < src/bin/$$f.bak > src/bin/$$f ;\
|
|||
+ sed "s,^#!.*lua.*,#!/usr/bin/env luajit,;/^package.path/d" < src/bin/$$f.bak > src/bin/$$f ;\
|
|||
chmod +x src/bin/$$f ;\ |
|||
chmod +rx src/bin/$$f ;\ |
|||
rm -f src/bin/$$f.bak ;\ |
|||
done |
|||
|
@ -1,12 +1,12 @@ |
|||
diff -u -r ../luarocks-2.1.2/src/luarocks/fs/lua.lua ./src/luarocks/fs/lua.lua
|
|||
--- ../luarocks-2.1.2/src/luarocks/fs/lua.lua 2014-01-10 20:03:04.000000000 +0100
|
|||
+++ ./src/luarocks/fs/lua.lua 2014-07-09 02:24:11.488380570 +0200
|
|||
@@ -74,7 +74,7 @@
|
|||
diff -u -r ../luarocks-2.4.0/src/luarocks/fs/lua.lua ./src/luarocks/fs/lua.lua
|
|||
--- ../luarocks-2.4.0/src/luarocks/fs/lua.lua 2016-09-08 14:39:09.000000000 -0400
|
|||
+++ ./src/luarocks/fs/lua.lua 2016-09-26 09:13:06.062435573 -0400
|
|||
@@ -781,7 +781,7 @@
|
|||
assert(type(name) == "string") |
|||
name = dir.normalize(name) |
|||
|
|||
- local temp_dir = (os.getenv("TMP") or "/tmp") .. "/luarocks_" .. name:gsub(dir.separator, "_") .. "-" .. tostring(math.floor(math.random() * 10000))
|
|||
+ local temp_dir = (os.getenv("TMP") or "@TERMUX_PREFIX@/tmp") .. "/luarocks_" .. name:gsub(dir.separator, "_") .. "-" .. tostring(math.floor(math.random() * 10000))
|
|||
local ok, err = fs.make_dir(temp_dir) |
|||
if ok then |
|||
return temp_dir |
|||
- return posix.mkdtemp((os.getenv("TMPDIR") or "/tmp") .. "/luarocks_" .. name:gsub(dir.separator, "_") .. "-XXXXXX")
|
|||
+ return posix.mkdtemp((os.getenv("TMPDIR") or "@TERMUX_PREFIX@/tmp") .. "/luarocks_" .. name:gsub(dir.separator, "_") .. "-XXXXXX")
|
|||
end |
|||
|
|||
end |
|||
|
@ -0,0 +1,12 @@ |
|||
diff -u -r ../luarocks-2.4.0/src/luarocks/fs/unix/tools.lua ./src/luarocks/fs/unix/tools.lua
|
|||
--- ../luarocks-2.4.0/src/luarocks/fs/unix/tools.lua 2016-09-08 14:39:09.000000000 -0400
|
|||
+++ ./src/luarocks/fs/unix/tools.lua 2016-09-26 09:19:08.200979160 -0400
|
|||
@@ -224,7 +224,7 @@
|
|||
assert(type(name) == "string") |
|||
name = dir.normalize(name) |
|||
|
|||
- local template = (os.getenv("TMPDIR") or "/tmp") .. "/luarocks_" .. name:gsub(dir.separator, "_") .. "-XXXXXX"
|
|||
+ local template = (os.getenv("TMPDIR") or "@TERMUX_PREFIX@/tmp") .. "/luarocks_" .. name:gsub(dir.separator, "_") .. "-XXXXXX"
|
|||
local pipe = io.popen(vars.MKTEMP.." -d "..fs.Q(template)) |
|||
local dirname = pipe:read("*l") |
|||
pipe:close() |
Loading…
Reference in new issue