Skip to content

Commit bb646b9

Browse files
committed
Update rockspec
1 parent 4c54cb7 commit bb646b9

File tree

3 files changed

+34
-28
lines changed

3 files changed

+34
-28
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,21 @@ jobs:
3030
sudo apt install --no-install-recommends libvips-dev
3131
fi
3232
33-
- name: Lua dependencies
33+
- name: Install lua-vips
3434
run: |
35-
make dev
36-
if [[ ${{ matrix.luaVersion }} == 5.* ]]; then make ffi; fi
35+
if [[ ${{ matrix.luaVersion }} == luajit* ]]; then
36+
luarocks config --scope system rocks_provided.luaffi-tkl 2.1-1
37+
fi
38+
luarocks make
3739
3840
- name: Lint with luacheck
3941
run: |
42+
luarocks install luacheck
4043
luacheck -q .
4144
4245
- name: Busted tests
4346
run: |
44-
busted -o gtest -v spec
47+
luarocks test spec/ -- -o gtest -v spec
4548
4649
4750
windows:
@@ -86,17 +89,23 @@ jobs:
8689
luarocks config --scope system lua_interpreter ${{ matrix.lua.exe }}.exe
8790
luarocks config --scope system variables.LUA_DIR /mingw64/bin
8891
luarocks config --scope system variables.LUA_INCDIR ${{ matrix.lua.incdir }}
89-
make dev
90-
if [[ ${{ matrix.lua.exe }} != luajit ]]; then make ffi; fi
92+
if [[ ${{ matrix.lua.exe }} == luajit ]]; then
93+
luarocks config --scope system rocks_provided.luaffi-tkl 2.1-1
94+
fi
9195
9296
- name: Add to PATH
9397
run: |
9498
echo $RUNNER_TEMP/msys64/mingw64/bin:$HOME/.luarocks/bin >> $GITHUB_PATH
9599
100+
- name: Install lua-vips
101+
run: |
102+
luarocks make
103+
96104
- name: Lint with luacheck
97105
run: |
106+
luarocks install luacheck
98107
luacheck.bat -q .
99108
100109
- name: Busted tests
101110
run: |
102-
busted.bat --lua=${{ matrix.lua.exe }} -o gtest -v spec
111+
luarocks test spec -- --lua=${{ matrix.lua.exe }} -o gtest -v

Makefile

Lines changed: 0 additions & 16 deletions
This file was deleted.

lua-vips-1.1-10.rockspec

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package = "lua-vips"
22
version = "1.1-10"
3+
rockspec_format = "3.0"
34

45
source = {
56
url = "git://github.com/libvips/lua-vips.git"
@@ -8,16 +9,28 @@ source = {
89
description = {
910
summary = "A fast image processing library with low memory needs.",
1011
detailed = [[
11-
This LuaJIT rock implements a binding for the libvips image
12-
processing library. It is usually faster and needs less memory than
13-
similar libraries.
12+
This rock implements a binding for the libvips image processing library.
13+
It is usually faster and needs less memory than similar libraries.
14+
15+
For use with standard Lua, the dependency luaffi-tkl is used as a drop-in
16+
replacement for LuaJIT's ffi module.
1417
]],
1518
homepage = "https://github.com/libvips/lua-vips",
16-
license = "MIT"
19+
license = "MIT",
20+
labels = { "image" }
1721
}
1822

1923
dependencies = {
20-
"lua >= 5.1", -- "luajit >= 2.0.0"
24+
"lua >= 5.1, < 5.5", -- standard Lua or LuaJIT >= 2.0
25+
"luaffi-tkl >= 1.0" -- provided by VM with LuaJIT, use `luarocks config rocks_provided.luaffi-tkl 2.1-1` in that case
26+
}
27+
28+
test_dependencies = {
29+
"busted"
30+
}
31+
32+
test = {
33+
type = "busted"
2134
}
2235

2336
build = {

0 commit comments

Comments
 (0)