mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 16:35:07 +03:00
parent
c5548d52a5
commit
a886d7a769
1 changed files with 43 additions and 35 deletions
|
@ -24,6 +24,8 @@ versions:
|
||||||
dependencies:
|
dependencies:
|
||||||
openssl.org: ^1.1
|
openssl.org: ^1.1
|
||||||
invisible-island.net/ncurses: '*'
|
invisible-island.net/ncurses: '*'
|
||||||
|
linux/x86-64:
|
||||||
|
gnu.org/gcc/libstdcxx: '*'
|
||||||
|
|
||||||
runtime:
|
runtime:
|
||||||
env:
|
env:
|
||||||
|
@ -31,20 +33,19 @@ runtime:
|
||||||
|
|
||||||
build:
|
build:
|
||||||
dependencies:
|
dependencies:
|
||||||
linux/x86-64:
|
|
||||||
# https://github.com/llvm/llvm-project/issues/56854
|
|
||||||
llvm.org: '<15'
|
|
||||||
perl.org: '>=5'
|
perl.org: '>=5'
|
||||||
script: |
|
linux/x86-64:
|
||||||
export ERL_TOP=$(pwd)
|
gnu.org/gcc: '*'
|
||||||
./configure $ARGS
|
script:
|
||||||
make -j {{hw.concurrency}}
|
- ./configure $ARGS
|
||||||
make install
|
- make -j {{hw.concurrency}}
|
||||||
|
- make install
|
||||||
env:
|
env:
|
||||||
CC: cc
|
CC: cc
|
||||||
CXX: c++
|
CXX: c++
|
||||||
LD: ld
|
LD: ld
|
||||||
CFLAGS: -O2 -g $CFLAGS
|
CFLAGS: -O2 -g $CFLAGS
|
||||||
|
ERL_TOP: $SRCROOT
|
||||||
ARGS:
|
ARGS:
|
||||||
- --disable-debug
|
- --disable-debug
|
||||||
- --disable-silent-rules
|
- --disable-silent-rules
|
||||||
|
@ -56,6 +57,10 @@ build:
|
||||||
- --enable-pie
|
- --enable-pie
|
||||||
- --with-ssl={{deps.openssl.org.prefix}}
|
- --with-ssl={{deps.openssl.org.prefix}}
|
||||||
- --without-javac
|
- --without-javac
|
||||||
|
linux/x86-64:
|
||||||
|
CC: gcc
|
||||||
|
CXX: g++
|
||||||
|
LD: gcc
|
||||||
darwin:
|
darwin:
|
||||||
ARGS:
|
ARGS:
|
||||||
- --enable-darwin-64bit
|
- --enable-darwin-64bit
|
||||||
|
@ -63,32 +68,35 @@ build:
|
||||||
- --with-dynamic-trace=dtrace
|
- --with-dynamic-trace=dtrace
|
||||||
|
|
||||||
test:
|
test:
|
||||||
script: |
|
dependencies:
|
||||||
epmd -kill || true
|
pkgx.sh: 1
|
||||||
epmd -daemon -address 127.0.0.1 -relaxed_command_check
|
script:
|
||||||
test "$(escript $FIXTURE 10)" = "factorial 10 = 3628800"
|
- epmd -kill || true
|
||||||
epmd -kill || true
|
- epmd -daemon -address 127.0.0.1 -relaxed_command_check
|
||||||
|
- run: test "$(escript $FIXTURE 10)" = "factorial 10 = 3628800"
|
||||||
|
fixture:
|
||||||
|
extname: erl
|
||||||
|
content: |
|
||||||
|
#!/usr/bin/env escript
|
||||||
|
%% -*- erlang -*-
|
||||||
|
%%! -smp enable -sname factorial -mnesia debug verbose
|
||||||
|
main([String]) ->
|
||||||
|
try
|
||||||
|
N = list_to_integer(String),
|
||||||
|
F = fac(N),
|
||||||
|
io:format("factorial ~w = ~w\n", [N,F])
|
||||||
|
catch
|
||||||
|
_:_ ->
|
||||||
|
usage()
|
||||||
|
end;
|
||||||
|
main(_) ->
|
||||||
|
usage().
|
||||||
|
|
||||||
|
usage() ->
|
||||||
|
io:format("usage: factorial integer\n").
|
||||||
|
|
||||||
|
fac(0) -> 1;
|
||||||
|
fac(N) -> N * fac(N-1).
|
||||||
|
- epmd -kill || true
|
||||||
env:
|
env:
|
||||||
ERL_DIST_PORT: 8001
|
ERL_DIST_PORT: $(pkgx get-port | tail -n1)
|
||||||
fixture: |
|
|
||||||
#!/usr/bin/env escript
|
|
||||||
%% -*- erlang -*-
|
|
||||||
%%! -smp enable -sname factorial -mnesia debug verbose
|
|
||||||
main([String]) ->
|
|
||||||
try
|
|
||||||
N = list_to_integer(String),
|
|
||||||
F = fac(N),
|
|
||||||
io:format("factorial ~w = ~w\n", [N,F])
|
|
||||||
catch
|
|
||||||
_:_ ->
|
|
||||||
usage()
|
|
||||||
end;
|
|
||||||
main(_) ->
|
|
||||||
usage().
|
|
||||||
|
|
||||||
usage() ->
|
|
||||||
io:format("usage: factorial integer\n").
|
|
||||||
|
|
||||||
fac(0) -> 1;
|
|
||||||
fac(N) -> N * fac(N-1).
|
|
||||||
|
|
Loading…
Reference in a new issue