summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander M Pickering <alex@cogarr.net>2024-09-12 11:59:35 -0500
committerAlexander M Pickering <alex@cogarr.net>2024-09-12 11:59:35 -0500
commitbf001243b759725f5e71ac5a18cad8595162af67 (patch)
treed22bedbf68d97ef59f32346199286f6b1158bd07
parent81717917516e7e3832dfb160be9d52827a025888 (diff)
downloadluajit-packaging-bf001243b759725f5e71ac5a18cad8595162af67.tar.gz
luajit-packaging-bf001243b759725f5e71ac5a18cad8595162af67.tar.bz2
luajit-packaging-bf001243b759725f5e71ac5a18cad8595162af67.zip
Start building luajit
-rwxr-xr-xinit11
-rw-r--r--meta.lua40
2 files changed, 46 insertions, 5 deletions
diff --git a/init b/init
index 642d265..0739dee 100755
--- a/init
+++ b/init
@@ -1 +1,12 @@
1#!/bin/sh -ex 1#!/bin/sh -ex
2
3luaver=$(ls lua-*.tar.gz | grep -Eo "lua-.\\..")
4mkdir "$luaver"
5tar -xvzf lua-*.tar.gz --directory="$luaver" --strip-components=1
6cd "$luaver"
7make mingw "CFLAGS= -Wall -Wextra -std=c99 -pedantic $CFLAGS"
8cd "/root/"
9cp $luaver/src/*.exe .
10cp $luaver/src/*.dll .
11cp $luaver/src/*.a .
12
diff --git a/meta.lua b/meta.lua
index 71e1e14..e71a077 100644
--- a/meta.lua
+++ b/meta.lua
@@ -1,6 +1,36 @@
1return { 1local 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}
10local debug = {
11 release = "",
12 debug = "-g",
6} 13}
14local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]}
15
16local builds = {}
17for 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 }
35end
36return builds