Producing rockspec 1.1.4-1

alfons-task
Nathan DECHER 4 years ago
parent 80a5c54032
commit 7203d38bdb
  1. 32
      moonbuild.lua
  2. 23
      rockspecs/moonbuild-1.1.4-1.rockspec

@ -370,16 +370,26 @@ patsubst = function(str, pattern, replacement)
end end
return _accum_0 return _accum_0
end end
if str == pattern then
return replacement
end
local prefix, suffix = match(pattern, GLOB_PATT) local prefix, suffix = match(pattern, GLOB_PATT)
if not (prefix) then if not (prefix or suffix) then
return str return str
end end
local reprefix, resuffix = match(replacement, GLOB_PATT) local reprefix, resuffix = match(replacement, GLOB_PATT)
if not (reprefix) then if not (reprefix or resuffix) then
return replacement if (#prefix == 0 or (sub(str, 1, #prefix)) == prefix) and (#suffix == 0 or (sub(str, -#suffix)) == suffix) then
return replacement
else
return str
end
end
if #prefix == 0 or (sub(str, 1, #prefix)) == prefix then
str = reprefix .. (sub(str, #prefix + 1))
end end
if (sub(str, 1, #prefix)) == prefix and (sub(str, -#suffix)) == suffix then if #suffix == 0 or (sub(str, -#suffix)) == suffix then
return reprefix .. (sub(str, #prefix + 1, -#suffix - 1)) .. resuffix str = (sub(str, 1, -#suffix - 1)) .. resuffix
end end
return str return str
end end
@ -513,10 +523,14 @@ flatten = function(tab)
for _index_0 = 1, #tab do for _index_0 = 1, #tab do
local e = tab[_index_0] local e = tab[_index_0]
if (type(e)) == 'table' then if (type(e)) == 'table' then
local _list_0 = flatten(e) if e[1] == nil and (next(e)) ~= nil then
for _index_1 = 1, #_list_0 do insert(out, e)
local v = _list_0[_index_1] else
insert(out, v) local _list_0 = flatten(e)
for _index_1 = 1, #_list_0 do
local v = _list_0[_index_1]
insert(out, v)
end
end end
else else
insert(out, e) insert(out, e)

@ -0,0 +1,23 @@
build = {
install = {
bin = {
moonbuild = "moonbuild.lua"
}
},
type = "builtin"
}
dependencies = {
"lua >= 5.3",
"luafilesystem >= 1.7.0"
}
description = {
detailed = "moonbuild is a small build system that simplifies your build definitions by allowing you to use declarative as well as imperative rules. It represents the build as a DAG with explicit ordering, and doesn't give you any default confusing rules (unlike make)\n",
summary = "Small build system in between make and a build.sh"
}
package = "moonbuild"
rockspec_format = "3.0"
source = {
tag = "v1.1.4",
url = "git://github.com/natnat-mc/moonbuild"
}
version = "1.1.4-1"
Loading…
Cancel
Save