summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander M Pickering <alex@cogarr.net>2024-11-22 13:07:01 -0600
committerAlexander M Pickering <alex@cogarr.net>2024-11-22 13:07:01 -0600
commitb58292174e9efa683a32c350efbd1bde2921fd60 (patch)
tree0bbcfc3fc7ff90218033a4549e85c30fb607798b
parent7d45715c41e141b819d5d0c6c94fbb2521fc64c7 (diff)
downloadlua-compat-53-packaging-b58292174e9efa683a32c350efbd1bde2921fd60.tar.gz
lua-compat-53-packaging-b58292174e9efa683a32c350efbd1bde2921fd60.tar.bz2
lua-compat-53-packaging-b58292174e9efa683a32c350efbd1bde2921fd60.zip
Start working on 53 compat
-rwxr-xr-xinit27
-rw-r--r--meta.lua57
2 files changed, 79 insertions, 5 deletions
diff --git a/init b/init
index 642d265..3f9af63 100755
--- a/init
+++ b/init
@@ -1 +1,28 @@
1#!/bin/sh -ex 1#!/bin/sh -ex
2
3cd lua-compat-5.3
4cp rockspecs/compat53-scm-1.rockspec .
5cp rockspecs/bit32-scm-1.rockspec .
6luarocks config variables.CFLAGS " $CFLAGS"
7luarocks make --pack-binary-rock compat53-scm-1.rockspec
8luarocks make --pack-binary-rock bit32-scm-1.rockspec
9obj1="compat53-scm-1.$(luarocks config arch).rock"
10obj2="bit32-scm-1.$(luarocks config arch).rock"
11cp $obj1 /root
12cp $obj2 /root
13cd /root
14if [ -z $(echo $CFLAGS | grep -o -E -- '( |^)-g( |$)') ]; then
15 # Release build, delete docs/ and tests/
16 zip -d $obj1 docs/ docs/* tests/ tests/*
17 zip -d $obj2 docs/ docs/* tests/ tests/*
18 # And pack the library with upx
19 unzip $obj1 lib/*
20 upx --no-progress lib/*
21 zip -r "$obj1" lib
22 rm -rf lib
23
24 unzip $obj2 lib/*
25 upx --no-progress lib/*
26 zip -r "$obj2" lib
27 rm -rf lib
28fi
diff --git a/meta.lua b/meta.lua
index 10f3559..014f590 100644
--- a/meta.lua
+++ b/meta.lua
@@ -1,6 +1,53 @@
1return { 1local lua_versions = {
2 ["lua-compat-5.3"] = { 2 ["51"] = true,
3 requires = {}, 3 ["52"] = true,
4 produces = {}, 4 ["53"] = true,
5 } 5 ["54"] = true,
6}
7local optimizations = {
8 tiny = "-Oz",
9 size = "-Os",
10 zero = "-O0",
11 one = "-O1",
12 two = "-O2",
13 three = "-O3",
14 debug = "-Og"
15}
16local debug = {
17 release = "",
18 debug = "-g",
6} 19}
20local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]}
21
22local builds = {}
23for version, _, name, optimization, rel, flag, _, image in cartesian(lua_versions, optimizations, debug, compilers) do
24 local buildname = "lua-compat-5.3-" .. version .. "-" .. name .. "-" .. rel .. "-" .. image
25 builds[buildname] = {
26 image = "image-luarocks-" .. version.. "-" .. image,
27 requires = {
28 {"git", "lua-compat-5.3"},
29 {"cicd","image-luarocks-" .. version .. "-" .. image},
30 {"cicd","lua" .. version .. "-" .. name .. "-" .. rel .. "-" .. image .. ":lua" .. version .. ".dll"},
31 },
32 produces = {
33 ["compat53-scm-1.mingw32-x86_64.rock"] = {"luarocks.sh", "compat53", image, version, name, rel},
34 ["bit32-scm-1.mingw32-x86_64.rock"] = {"luarocks.sh", "bit32", image, version, name, rel},
35 },
36 env = {
37 CFLAGS = optimization .. " " .. flag,
38 rockver = version:gsub("(%d)(%d)$","%1.%2"),
39 version = version
40 },
41 }
42 --[[
43 builds[buildname .. "-test"] = {
44 image = "image-wine",
45 requires = {
46 {"cicd", buildname .. ":luafilesystem-scm-1.mingw32-x86_64.rock"},
47 {"cicd", "lua-" .. version .. "-" .. optimization .. "-" .. rel .. "-" .. }
48 }
49 }
50 ]]
51end
52
53return builds