Skip to content

Commit

Permalink
Merge pull request #12 from Omikhleia/fix-lua51-compat
Browse files Browse the repository at this point in the history
Lua 5.1 minimum compatibility
  • Loading branch information
Omikhleia authored Dec 8, 2023
2 parents d9c5a52 + 4a52568 commit 238354d
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/luacheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Luacheck
uses: lunarmodules/luacheck@v0
uses: lunarmodules/luacheck@v1
11 changes: 1 addition & 10 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
std = "max"
std = "min+sile"
include_files = {
"**/*.lua",
"sile.in",
Expand All @@ -19,15 +19,6 @@ exclude_files = {
files["**/*_spec.lua"] = {
std = "+busted"
}
globals = {
"SILE",
"SU",
"luautf8",
"pl",
"fluent",
"SYSTEM_SILE_PATH",
"SHARED_LIB_EXT"
}
max_line_length = false
ignore = {
"581" -- operator order warning doesn't account for custom table metamethods
Expand Down
2 changes: 1 addition & 1 deletion packages/framebox/graphics/rough.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ local function _offsetOpt(x, ops, roughnessGain)
end

local function _line(x1, y1, x2, y2, o, move, overlay) -- returns an array of operations
local lengthSq = math.pow((x1 - x2), 2) + math.pow((y1 - y2), 2)
local lengthSq = (x1 - x2)^2 + (y1 - y2)^2
local length = math.sqrt(lengthSq)
local roughnessGain
if length < 200 then
Expand Down
33 changes: 33 additions & 0 deletions ptable.sile-2.0.1-1.rockspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
rockspec_format = "3.0"
package = "ptable.sile"
version = "2.0.1-1"
source = {
url = "git+https://github.com/Omikhleia/ptable.sile.git",
tag = "v2.0.1",
}
description = {
summary = "Paragraph boxes, framed boxes and table packages for the SILE typesetting system.",
detailed = [[
This package for the SILE typesetter provides struts, paragraph boxes
(parbox), framed boxes (framebox) and tables (ptable).
]],
homepage = "https://github.com/Omikhleia/ptable.sile",
license = "MIT",
}
dependencies = {
"lua >= 5.1",
"silex.sile >= 0.1.0",
}
build = {
type = "builtin",
modules = {
["sile.packages.struts"] = "packages/struts/init.lua",
["sile.packages.parbox"] = "packages/parbox/init.lua",
["sile.packages.ptable"] = "packages/ptable/init.lua",
["sile.packages.framebox"] = "packages/framebox/init.lua",
["sile.packages.framebox.graphics.prng"] = "packages/framebox/graphics/prng.lua",
["sile.packages.framebox.graphics.renderer"] = "packages/framebox/graphics/renderer.lua",
["sile.packages.framebox.graphics.rough"] = "packages/framebox/graphics/rough.lua",
["sile.resilient-compat.hboxing"] = "resilient-compat/hboxing.lua",
}
}

0 comments on commit 238354d

Please sign in to comment.