Producing rockspec 1.1.4-1

alfons-task
Nathan DECHER 4 years ago
parent 80a5c54032
commit 7203d38bdb
  1. 22
      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
if (#prefix == 0 or (sub(str, 1, #prefix)) == prefix) and (#suffix == 0 or (sub(str, -#suffix)) == suffix) then
return replacement return replacement
else
return str
end end
if (sub(str, 1, #prefix)) == prefix and (sub(str, -#suffix)) == suffix then end
return reprefix .. (sub(str, #prefix + 1, -#suffix - 1)) .. resuffix if #prefix == 0 or (sub(str, 1, #prefix)) == prefix then
str = reprefix .. (sub(str, #prefix + 1))
end
if #suffix == 0 or (sub(str, -#suffix)) == suffix then
str = (sub(str, 1, -#suffix - 1)) .. resuffix
end end
return str return str
end end
@ -513,11 +523,15 @@ 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
if e[1] == nil and (next(e)) ~= nil then
insert(out, e)
else
local _list_0 = flatten(e) local _list_0 = flatten(e)
for _index_1 = 1, #_list_0 do for _index_1 = 1, #_list_0 do
local v = _list_0[_index_1] local v = _list_0[_index_1]
insert(out, v) insert(out, v)
end end
end
else else
insert(out, e) insert(out, e)
end end

@ -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