forked from tarantool/rocks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlulpeg-0.1.0-1.rockspec
41 lines (35 loc) · 1.06 KB
/
lulpeg-0.1.0-1.rockspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package = "lulpeg"
version = "0.1.0-1"
source = {
url = "git://github.com/pygy/LuLPeg",
tag = "v0.1",
}
description = {
summary = "LuLPeg",
detailed = "LuLPeg, a pure Lua port of LPeg, Roberto Ierusalimschy's Parsing Expression Grammars library. Copyright (C) Pierre-Yves Gerardy.",
license = "The Romantic WTF public license",
maintainer = "pygy",
}
dependencies = {
"lua >= 5.1",
}
build = {
type = "command",
build_command = "cd src; tarantool -e 'require(\"strict\").off()' ../scripts/pack.lua > ../lulpeg.lua",
patches = { ["fix-strict-mode.diff"] = [[
diff --git a/scripts/pack.lua b/scripts/pack.lua
index 959c7ed..9c6a9a1 100644
--- a/scripts/pack.lua
+++ b/scripts/pack.lua
@@ -38,4 +38,5 @@ scandir( root )
acc={(io.open("../ABOUT"):read("*all").."\n"):gsub( "([^\n]-\n)","-- %1" ),[[
+_G._ENV = rawget(_G, "_ENV") -- to stisfy tarantool strict mode
local _ENV, loaded, packages, release, require_
= _ENV or _G, {}, {}, true, require
]]},
install = {
lua = {
["lulpeg"] = "lulpeg.lua",
}
}
}