summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander M Pickering <alex@cogarr.net>2024-09-12 13:02:03 -0500
committerAlexander M Pickering <alex@cogarr.net>2024-09-12 13:02:03 -0500
commite0a950a484da0c8c62d93409d77dc08a3b796df3 (patch)
treec2e8dded395053718fdb9e0581ea4440967cef49
parent74ce1948ccd6ee5fca878cfdaa22c611b83f1ae2 (diff)
downloadluajit-packaging-e0a950a484da0c8c62d93409d77dc08a3b796df3.tar.gz
luajit-packaging-e0a950a484da0c8c62d93409d77dc08a3b796df3.tar.bz2
luajit-packaging-e0a950a484da0c8c62d93409d77dc08a3b796df3.zip
Add a meta step to build the linux binaries
-rwxr-xr-xinit3
-rw-r--r--init-nix8
-rw-r--r--meta.lua16
3 files changed, 25 insertions, 2 deletions
diff --git a/init b/init
index c57fe55..126db12 100755
--- a/init
+++ b/init
@@ -1,7 +1,8 @@
1#!/bin/sh -ex 1#!/bin/sh -ex
2 2
3echo "lua4win" > luajit_relver.txt
3cd "luajit" 4cd "luajit"
4make mingw "CFLAGS= -Wall -Wextra -std=c99 -pedantic $CFLAGS" 5make "CFLAGS= -Wall -Wextra -std=c99 -pedantic $CFLAGS" BUILDMODE=mixed
5cd "/root/" 6cd "/root/"
6cp luajit/src/*.exe . 7cp luajit/src/*.exe .
7cp luajit/src/*.dll . 8cp 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
3rc-service networking start
4
5apk add build-base
6cd luajit/src
7echo "lua4win" > luajit_relver.txt
8make host/minilua host/buildvm
diff --git a/meta.lua b/meta.lua
index e71a077..1b74bf6 100644
--- a/meta.lua
+++ b/meta.lua
@@ -12,8 +12,20 @@ local debug = {
12 debug = "-g", 12 debug = "-g",
13} 13}
14local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]} 14local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]}
15
16local builds = {} 15local builds = {}
16
17--2-part build since we need to compile some binaries for use during the rest of the build
18builds["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
17for name, optimization, rel, flag, _, image in cartesian(optimizations, debug, compilers) do 29for 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,