mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
new file: projects/github.com/luvit/luv/package.yml
new file: projects/github.com/luvit/luv/test.lua
This commit is contained in:
parent
496cfb72f1
commit
d72df597f2
52
projects/github.com/luvit/luv/package.yml
Normal file
52
projects/github.com/luvit/luv/package.yml
Normal file
|
@ -0,0 +1,52 @@
|
|||
distributable:
|
||||
url: https://github.com/luvit/luv/archive/{{version}}-0.tar.gz
|
||||
strip-components: 1
|
||||
versions:
|
||||
#github: luvit/luv
|
||||
- 1.45.0
|
||||
dependencies:
|
||||
libuv.org: '*'
|
||||
runtime:
|
||||
env:
|
||||
LUA_CPATH: "{{prefix}}/lib/lua/{{deps.lua.org.version.major}}/?.so;;"
|
||||
build:
|
||||
dependencies:
|
||||
cmake.org: '*'
|
||||
lua.org: '*'
|
||||
luajit.org: '*'
|
||||
linux:
|
||||
curl.se: '*'
|
||||
script:
|
||||
- run: curl -L "$lua_compact" | tar -xz --strip-component=1
|
||||
working-directory: deps/lua-compat-5.3
|
||||
- cmake -S . -B buildjit $CMAKE_ARGS -DWITH_LUA_ENGINE=LuaJIT -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=ON
|
||||
- cmake --build buildjit
|
||||
- cmake --install buildjit
|
||||
- cmake -S . -B buildlua $CMAKE_ARGS -DWITH_LUA_ENGINE=Lua -DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=OFF
|
||||
- cmake --build buildlua
|
||||
- cmake --install buildlua
|
||||
- run: |
|
||||
ln -s {{deps.lua.org.version.marketing}} {{deps.lua.org.version.major}}
|
||||
working-directory: "{{prefix}}/lib/lua"
|
||||
env:
|
||||
lua_compact: https://github.com/keplerproject/lua-compat-5.3/archive/v0.10.tar.gz
|
||||
CMAKE_ARGS:
|
||||
- -DCMAKE_INSTALL_PREFIX="{{prefix}}
|
||||
- -DCMAKE_INSTALL_LIBDIR=lib
|
||||
- -DCMAKE_BUILD_TYPE=Release
|
||||
- -DCMAKE_FIND_FRAMEWORK=LAST
|
||||
- -DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
- -Wno-dev
|
||||
- -DBUILD_TESTING=OFF
|
||||
- -DWITH_SHARED_LIBUV=ON
|
||||
- -DLUA_BUILD_TYPE=System
|
||||
- -DLUA_COMPAT53_DIR=$SRCROOT/deps/lua-compat-5.3
|
||||
- -DBUILD_MODULE=ON
|
||||
test:
|
||||
dependencies:
|
||||
lua.org: '*'
|
||||
freedesktop.org/pkg-config: '*'
|
||||
script:
|
||||
- pkg-config --modversion libluv | grep {{version}}
|
||||
- lua test.lua | grep 'Sleeping'
|
||||
- lua test.lua | grep 'Awake!'
|
8
projects/github.com/luvit/luv/test.lua
Normal file
8
projects/github.com/luvit/luv/test.lua
Normal file
|
@ -0,0 +1,8 @@
|
|||
local uv = require('luv')
|
||||
local timer = uv.new_timer()
|
||||
timer:start(1000, 0, function()
|
||||
print("Awake!")
|
||||
timer:close()
|
||||
end)
|
||||
print("Sleeping");
|
||||
uv.run()
|
Loading…
Reference in a new issue