diff options
author | Alexander M Pickering <alex@cogarr.net> | 2024-09-12 13:02:03 -0500 |
---|---|---|
committer | Alexander M Pickering <alex@cogarr.net> | 2024-09-12 13:02:03 -0500 |
commit | e0a950a484da0c8c62d93409d77dc08a3b796df3 (patch) | |
tree | c2e8dded395053718fdb9e0581ea4440967cef49 | |
parent | 74ce1948ccd6ee5fca878cfdaa22c611b83f1ae2 (diff) | |
download | luajit-packaging-e0a950a484da0c8c62d93409d77dc08a3b796df3.tar.gz luajit-packaging-e0a950a484da0c8c62d93409d77dc08a3b796df3.tar.bz2 luajit-packaging-e0a950a484da0c8c62d93409d77dc08a3b796df3.zip |
Add a meta step to build the linux binaries
-rwxr-xr-x | init | 3 | ||||
-rw-r--r-- | init-nix | 8 | ||||
-rw-r--r-- | meta.lua | 16 |
3 files changed, 25 insertions, 2 deletions
@@ -1,7 +1,8 @@ | |||
1 | #!/bin/sh -ex | 1 | #!/bin/sh -ex |
2 | 2 | ||
3 | echo "lua4win" > luajit_relver.txt | ||
3 | cd "luajit" | 4 | cd "luajit" |
4 | make mingw "CFLAGS= -Wall -Wextra -std=c99 -pedantic $CFLAGS" | 5 | make "CFLAGS= -Wall -Wextra -std=c99 -pedantic $CFLAGS" BUILDMODE=mixed |
5 | cd "/root/" | 6 | cd "/root/" |
6 | cp luajit/src/*.exe . | 7 | cp luajit/src/*.exe . |
7 | cp luajit/src/*.dll . | 8 | cp luajit/src/*.dll . |
diff --git a/init-nix b/init-nix new file mode 100644 index 0000000..afdf99d --- /dev/null +++ b/init-nix | |||
@@ -0,0 +1,8 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | rc-service networking start | ||
4 | |||
5 | apk add build-base | ||
6 | cd luajit/src | ||
7 | echo "lua4win" > luajit_relver.txt | ||
8 | make host/minilua host/buildvm | ||
@@ -12,8 +12,20 @@ local debug = { | |||
12 | debug = "-g", | 12 | debug = "-g", |
13 | } | 13 | } |
14 | local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]} | 14 | local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]} |
15 | |||
16 | local builds = {} | 15 | local builds = {} |
16 | |||
17 | --2-part build since we need to compile some binaries for use during the rest of the build | ||
18 | builds["luajit-meta"] = { | ||
19 | requires = { | ||
20 | {"git","luajit"} | ||
21 | }, | ||
22 | produces = { | ||
23 | ["luajit/src/host/minilua"] = true, | ||
24 | ["luajit/src/host/buildvm"] = true | ||
25 | }, | ||
26 | entrypoint="init-nix" | ||
27 | } | ||
28 | |||
17 | for name, optimization, rel, flag, _, image in cartesian(optimizations, debug, compilers) do | 29 | for name, optimization, rel, flag, _, image in cartesian(optimizations, debug, compilers) do |
18 | local name = "luajit-" .. name .. "-" .. rel .. "-" .. image | 30 | local name = "luajit-" .. name .. "-" .. rel .. "-" .. image |
19 | builds[name] = { | 31 | builds[name] = { |
@@ -21,6 +33,8 @@ for name, optimization, rel, flag, _, image in cartesian(optimizations, debug, c | |||
21 | requires = { | 33 | requires = { |
22 | {"git","luajit"}, | 34 | {"git","luajit"}, |
23 | {"cicd", "image-" .. image}, | 35 | {"cicd", "image-" .. image}, |
36 | {"cicd", "luajit-base:luajit/src/host/minilua"}, | ||
37 | {"cicd", "luajit-base:luajit/src/host/buildvm"}, | ||
24 | }, | 38 | }, |
25 | produces = { | 39 | produces = { |
26 | ["lua.exe"] = true, | 40 | ["lua.exe"] = true, |