summaryrefslogtreecommitdiff
path: root/meta.lua
blob: 548acdbf88e45f09126e8c1fdc96416bf8c16f03 (plain)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
local lua_versions = {
	["51"] = "https://www.lua.org/ftp/lua-5.1.5.tar.gz",
	--[[
	["52"] = "https://www.lua.org/ftp/lua-5.2.4.tar.gz",
	["53"] = "https://www.lua.org/ftp/lua-5.3.6.tar.gz",
	["54"] = "https://www.lua.org/ftp/lua-5.4.7.tar.gz",
	]]
}
local optimizations = {
	--[[
	size = "-Os",
	zero = "-O0",
	one = "-O1",
	two = "-O2",
	]]
	three = "-O3",
}
local debug = {
	--[[
	release = "",
	]]
	debug = "-g",
}
local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]}

local builds = {}
for _,image,lua_ver,link in cartesian(compilers,lua_versions) do
	builds["image-luafilesystem-" .. image .. "-lua" .. lua_ver] = {
		image = "image-" .. image,
		requires = {
			{"http",link}
		},
		produces = {},
		export = true,
		entrypoint = "prepare",
		env = {
			rockver = lua_ver:gsub("(%d)(%d)$","%1.%2")
		}
	}
end
for version, link, name, optimization, rel, flag, _, image in cartesian(lua_versions, optimizations, debug, compilers) do
	local name = "luafilesystem-" .. version .. "-" .. name .. "-" .. rel .. "-" .. image
	builds[name] = {
		image = "image-luafilesystem-" .. image .. "-lua" .. version,
		requires = {
			{"git", "luafilesystem"},
			{"cicd","lua" .. version .. "-" .. name .. "-" .. rel .. "-" .. image},
		},
		produces = {
			"luafilesystem-git-1.win32-" .. image .. ".rock"
		},
		env = {
			CFLAGS = optimization .. " " .. flag,
			rockver = version:gsub("(%d)(%d)$","%1.%2")
		},
	}
end

return builds