mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
luajit.org (#2939)
* luajit.org * ROLLING ver * wip * maybe LUAJIT_PATH * LUA_PATH --------- Co-authored-by: Jacob Heider <jacob@tea.xyz>
This commit is contained in:
parent
9c8861c0fb
commit
6285966ee7
2 changed files with 51 additions and 0 deletions
40
projects/luajit.org/package.yml
Normal file
40
projects/luajit.org/package.yml
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
distributable:
|
||||||
|
url: https://github.com/LuaJIT/LuaJIT/archive/v{{version.raw}}.ROLLING.tar.gz
|
||||||
|
strip-components: 1
|
||||||
|
versions:
|
||||||
|
github: LuaJIT/LuaJIT/tags
|
||||||
|
match: /v\d+\.\d+\.ROLLING/
|
||||||
|
strip:
|
||||||
|
- /^v/
|
||||||
|
- /\.ROLLING/
|
||||||
|
runtime:
|
||||||
|
env:
|
||||||
|
LUA_PATH: "{{prefix}}/share/luajit-{{version.marketing}}/?.lua"
|
||||||
|
build:
|
||||||
|
dependencies:
|
||||||
|
darwin:
|
||||||
|
tea.xyz/gx/cc: c99
|
||||||
|
linux:
|
||||||
|
gnu.org/gcc: '*'
|
||||||
|
tea.xyz/gx/make: '*'
|
||||||
|
script:
|
||||||
|
- make --jobs {{hw.concurrency}} amalg PREFIX={{prefix}}
|
||||||
|
- make --jobs {{hw.concurrency}} install PREFIX={{prefix}}
|
||||||
|
- mkdir -p {{prefix}}/doc
|
||||||
|
- mv doc/* {{prefix}}/doc/
|
||||||
|
- run: ln -s luajit-{{version.raw}}. luajit
|
||||||
|
working-directory: "{{prefix}}/bin"
|
||||||
|
- run: |
|
||||||
|
ln -s libluajit-5.1.dylib libluajit.dylib
|
||||||
|
ln -s libluajit-5.1.a libluajit.a
|
||||||
|
working-directory: "{{prefix}}/lib"
|
||||||
|
provides:
|
||||||
|
- bin/luajit
|
||||||
|
- bin/luajit-{{version.marketing}}.
|
||||||
|
test:
|
||||||
|
script:
|
||||||
|
- luajit -v | grep {{version.marketing}}
|
||||||
|
- luajit test.lua | grep 55
|
||||||
|
- luajit -e "print(package.path)"
|
||||||
|
- luajit -b test.lua test.o
|
||||||
|
- ls . | grep "test.o"
|
11
projects/luajit.org/test.lua
Normal file
11
projects/luajit.org/test.lua
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
function fibonacci(n)
|
||||||
|
if n <= 0 then
|
||||||
|
return 0
|
||||||
|
elseif n == 1 then
|
||||||
|
return 1
|
||||||
|
else
|
||||||
|
return fibonacci(n - 1) + fibonacci(n - 2)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
print("Fibonacci(10) =", fibonacci(10))
|
Loading…
Reference in a new issue