summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander M Pickering <alex@cogarr.net>2025-02-27 13:44:15 -0600
committerAlexander M Pickering <alex@cogarr.net>2025-02-27 13:44:15 -0600
commitfbb21e7aa341b968c9f3577fef3c6580ffcceb11 (patch)
tree7115f5d31455fbee20e161e003b782ba86fa1e88
parent906d257fbc0b6bde00a5f1248cd1dcc6888b4721 (diff)
downloadlpeglabel-packaging-fbb21e7aa341b968c9f3577fef3c6580ffcceb11.tar.gz
lpeglabel-packaging-fbb21e7aa341b968c9f3577fef3c6580ffcceb11.tar.bz2
lpeglabel-packaging-fbb21e7aa341b968c9f3577fef3c6580ffcceb11.zip
Start work
Diffstat (limited to '')
-rwxr-xr-xinit14
-rw-r--r--lpeglabel-1.6.2-1.rockspec35
-rw-r--r--meta.lua47
3 files changed, 91 insertions, 5 deletions
diff --git a/init b/init
index 642d265..eb031e0 100755
--- a/init
+++ b/init
@@ -1 +1,15 @@
1#!/bin/sh -ex 1#!/bin/sh -ex
2
3cp lpeglabel-packaging/*.rockspec lpeglabel
4cd lpeglabel
5luarocks config variables.CFLAGS " $CFLAGS"
6luarocks make --pack-binary-rock lpeglabel-1.6.2-1.rockspec
7obj="lpeg-1.6.2-1.$(luarocks config arch).rock"
8cp $obj /root
9cd /root
10if [ -z $(echo $CFLAGS | grep -o -E -- '( |^)-g( |$)') ]; then
11 # And pack the library with upx
12 unzip $obj lib/*
13 upx --no-progress lib/*
14 zip -r "$obj" lib
15fi
diff --git a/lpeglabel-1.6.2-1.rockspec b/lpeglabel-1.6.2-1.rockspec
new file mode 100644
index 0000000..911f753
--- /dev/null
+++ b/lpeglabel-1.6.2-1.rockspec
@@ -0,0 +1,35 @@
1package = "LPegLabel"
2version = "1.6.2-1"
3source = {
4 url = "https://github.com/sqmedeiros/lpeglabel/archive/v1.6.2-1.tar.gz",
5 tag = "v1.6.2-1",
6 dir = "lpeglabel-1.6.2-1",
7}
8description = {
9 summary = "Parsing Expression Grammars For Lua with Labeled Failures",
10 detailed = [[
11 LPegLabel is a conservative extension of the LPeg library that provides
12 an implementation of Parsing Expression Grammars (PEGs) with labeled failures.
13 By using labeled failures we can properly report syntactical errors.
14 We can also recover from such errors by describing a grammar rule with
15 the same name of a given label.
16 LPegLabel also reports the farthest failure position in case of an ordinary failure.
17
18 This version was repackaged for lua4.win, send bug reports there first.
19 ]],
20 homepage = "https://github.com/sqmedeiros/lpeglabel/",
21 maintainer = "Alex Pickering <alex@lua4.win>",
22 license = "MIT/X11"
23}
24dependencies = {
25 "lua >= 5.1",
26}
27build = {
28 type = "builtin",
29 modules = {
30 lpeglabel = {
31 "lplcap.c", "lplcode.c", "lplprint.c", "lpltree.c", "lplvm.c"
32 },
33 relabel = "relabel.lua"
34 }
35}
diff --git a/meta.lua b/meta.lua
index 438a99e..c468467 100644
--- a/meta.lua
+++ b/meta.lua
@@ -1,6 +1,43 @@
1return { 1local lua_versions = {
2 ["lpeglabel"] = { 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"
6} 15}
16local debug = {
17 release = "",
18 debug = "-g",
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 = "lpeglabel-" .. version .. "-" .. name .. "-" .. rel .. "-" .. image
25 builds[buildname] = {
26 image = "image-luarocks-" .. version.. "-" .. image,
27 requires = {
28 {"git", "lpeglabel"},
29 {"cicd","image-luarocks-" .. version .. "-" .. image},
30 {"cicd","lua" .. version .. "-" .. name .. "-" .. rel .. "-" .. image .. ":lua" .. version .. ".dll"},
31 },
32 produces = {
33 ["lpeglabel-1.6.2-1.mingw32-x86_64.rock"] = {"luarocks.sh", "lpeglabel", image, version, name, rel},
34 },
35 env = {
36 CFLAGS = optimization .. " " .. flag,
37 rockver = version:gsub("(%d)(%d)$","%1.%2"),
38 version = version
39 },
40 }
41end
42
43return builds