mirror of
https://github.com/ivabus/pantry
synced 2025-06-08 08:20:32 +03:00
parent
5fd32ad0b6
commit
89e82f9dd7
2 changed files with 125 additions and 0 deletions
92
projects/erlang.org/package.yml
Normal file
92
projects/erlang.org/package.yml
Normal file
|
@ -0,0 +1,92 @@
|
|||
distributable:
|
||||
url: https://github.com/erlang/otp/releases/download/OTP-{{ version.raw }}/otp_src_{{ version.raw }}.tar.gz
|
||||
strip-components: 1
|
||||
|
||||
provides:
|
||||
- bin/ct_run
|
||||
- bin/dialyzer
|
||||
- bin/epmd
|
||||
- bin/erl
|
||||
- bin/erlc
|
||||
- bin/escript
|
||||
- bin/run_erl
|
||||
- bin/to_erl
|
||||
- bin/typer
|
||||
|
||||
interprets:
|
||||
extensions: erl
|
||||
args: escript
|
||||
|
||||
versions:
|
||||
github: erlang/otp
|
||||
strip: /^OTP /
|
||||
|
||||
dependencies:
|
||||
openssl.org: '*'
|
||||
invisible-island.net/ncurses: '*'
|
||||
|
||||
runtime:
|
||||
env:
|
||||
ERL_ROOTDIR: ${{prefix}}/lib/erlang
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
tea.xyz/gx/cc: c99
|
||||
tea.xyz/gx/make: '*'
|
||||
perl.org: '>=5'
|
||||
script: |
|
||||
export ERL_TOP=$(pwd)
|
||||
./configure $ARGS
|
||||
make -j {{hw.concurrency}}
|
||||
make install
|
||||
env:
|
||||
CC: cc
|
||||
CXX: c++
|
||||
LD: ld
|
||||
ARGS:
|
||||
- --disable-debug
|
||||
- --disable-silent-rules
|
||||
- --prefix={{prefix}}
|
||||
- --enable-dynamic-ssl-lib
|
||||
- --enable-hipe
|
||||
- --enable-smp-support
|
||||
- --enable-threads
|
||||
- --enable-pie
|
||||
- --with-ssl={{deps.openssl.org.prefix}}
|
||||
- --without-javac
|
||||
darwin:
|
||||
ARGS:
|
||||
- --enable-darwin-64bit
|
||||
- --enable-kernel-poll
|
||||
- --with-dynamic-trace=dtrace
|
||||
|
||||
test:
|
||||
script: |
|
||||
epmd -kill || true
|
||||
epmd -daemon -address 127.0.0.1 -relaxed_command_check
|
||||
test "$(escript $FIXTURE 10)" = "factorial 10 = 3628800"
|
||||
epmd -kill || true
|
||||
|
||||
env:
|
||||
ERL_DIST_PORT: 8001
|
||||
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).
|
33
projects/gleam.run/package.yml
Normal file
33
projects/gleam.run/package.yml
Normal file
|
@ -0,0 +1,33 @@
|
|||
distributable:
|
||||
url: https://github.com/gleam-lang/gleam/archive/refs/tags/v{{ version }}.tar.gz
|
||||
strip-components: 1
|
||||
|
||||
provides:
|
||||
- bin/gleam
|
||||
|
||||
versions:
|
||||
github: gleam-lang/gleam
|
||||
strip: /v/
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
rust-lang.org: '>=1.60'
|
||||
rust-lang.org/cargo: '*'
|
||||
script:
|
||||
cargo install --path compiler-cli --force --locked --root {{prefix}}
|
||||
|
||||
test:
|
||||
dependencies:
|
||||
erlang.org: '*'
|
||||
script: |
|
||||
gleam --version
|
||||
gleam new test
|
||||
cp $FIXTURE test/src/test.gleam
|
||||
cd test
|
||||
gleam run | grep "Hello, world!"
|
||||
fixture: |
|
||||
import gleam/io
|
||||
|
||||
pub fn main() {
|
||||
io.print("Hello, world!")
|
||||
}
|
Loading…
Reference in a new issue