diff options
author | Alexander M Pickering <alex@cogarr.net> | 2024-09-12 11:59:35 -0500 |
---|---|---|
committer | Alexander M Pickering <alex@cogarr.net> | 2024-09-12 11:59:35 -0500 |
commit | bf001243b759725f5e71ac5a18cad8595162af67 (patch) | |
tree | d22bedbf68d97ef59f32346199286f6b1158bd07 | |
parent | 81717917516e7e3832dfb160be9d52827a025888 (diff) | |
download | luajit-packaging-bf001243b759725f5e71ac5a18cad8595162af67.tar.gz luajit-packaging-bf001243b759725f5e71ac5a18cad8595162af67.tar.bz2 luajit-packaging-bf001243b759725f5e71ac5a18cad8595162af67.zip |
Start building luajit
-rwxr-xr-x | init | 11 | ||||
-rw-r--r-- | meta.lua | 40 |
2 files changed, 46 insertions, 5 deletions
@@ -1 +1,12 @@ | |||
1 | #!/bin/sh -ex | 1 | #!/bin/sh -ex |
2 | |||
3 | luaver=$(ls lua-*.tar.gz | grep -Eo "lua-.\\..") | ||
4 | mkdir "$luaver" | ||
5 | tar -xvzf lua-*.tar.gz --directory="$luaver" --strip-components=1 | ||
6 | cd "$luaver" | ||
7 | make mingw "CFLAGS= -Wall -Wextra -std=c99 -pedantic $CFLAGS" | ||
8 | cd "/root/" | ||
9 | cp $luaver/src/*.exe . | ||
10 | cp $luaver/src/*.dll . | ||
11 | cp $luaver/src/*.a . | ||
12 | |||
@@ -1,6 +1,36 @@ | |||
1 | return { | 1 | local optimizations = { |
2 | ["luajit"] = { | 2 | tiny = "-Oz", |
3 | requires = {}, | 3 | size = "-Os", |
4 | produces = {}, | 4 | debug = "-Og", |
5 | } | 5 | zero = "-O0", |
6 | one = "-O1", | ||
7 | two = "-O2", | ||
8 | three = "-O3", | ||
9 | } | ||
10 | local debug = { | ||
11 | release = "", | ||
12 | debug = "-g", | ||
6 | } | 13 | } |
14 | local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]} | ||
15 | |||
16 | local builds = {} | ||
17 | for name, optimization, rel, flag, _, image in cartesian(optimizations, debug, compilers) do | ||
18 | local name = "luajit-" .. name .. "-" .. rel .. "-" .. image | ||
19 | builds[name] = { | ||
20 | image = "image-" .. image, | ||
21 | requires = { | ||
22 | {"git","luajit"}, | ||
23 | {"cicd", "image-" .. image}, | ||
24 | }, | ||
25 | produces = { | ||
26 | ["lua.exe"] = true, | ||
27 | ["lua51.dll"] = true, | ||
28 | ["liblua.a"] = true, | ||
29 | ["luac.exe"] = true, | ||
30 | }, | ||
31 | env = { | ||
32 | CFLAGS = optimization .. " " .. flag, | ||
33 | }, | ||
34 | } | ||
35 | end | ||
36 | return builds | ||