mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-23 05:26:28 +02:00
Merge branch 'master' into add-forte
This commit is contained in:
commit
977ec08311
46 changed files with 834 additions and 210 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Naming Languages
|
||||
|
||||
Languages should be named after their interpreters, and the command line binaries you call.
|
||||
Languages should be named after their interpreters, and the command line binaries you call. The language version should use semantic versioning.
|
||||
For example, the full name of the standard python interpreter is `CPython`, however we would name it `python`, after the main binary which it provides.
|
||||
In the example of NodeJS, we would call this `node`, after the main binary.
|
||||
|
||||
|
|
2
packages/cow/1.0.0/build.sh
vendored
2
packages/cow/1.0.0/build.sh
vendored
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Grab the latest cow source from github
|
||||
git clone -q https://github.com/BigZaphod/COW.git cow
|
||||
git clone -q https://github.com/Hydrazer/COW.git cow
|
||||
|
||||
# Generate the cow binary into bin
|
||||
mkdir -p bin
|
||||
|
|
17
packages/iverilog/11.0.0/build.sh
vendored
Executable file
17
packages/iverilog/11.0.0/build.sh
vendored
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
PREFIX=$(realpath $(dirname $0))
|
||||
|
||||
mkdir -p build/iverilog
|
||||
cd build/iverilog
|
||||
curl -L https://github.com/steveicarus/iverilog/archive/refs/tags/v11_0.tar.gz -o iverilog.tar.gz
|
||||
tar xzf iverilog.tar.gz --strip-components=1
|
||||
|
||||
chmod +x ./autoconf.sh
|
||||
./autoconf.sh
|
||||
./configure --prefix="$PREFIX"
|
||||
make -j$(nproc)
|
||||
make install -j$(nproc)
|
||||
|
||||
cd ../../
|
||||
rm -rf build
|
4
packages/iverilog/11.0.0/compile
vendored
Normal file
4
packages/iverilog/11.0.0/compile
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
rename 's/$/\.v/' "$@" # Add .v extension
|
||||
iverilog *.v
|
2
packages/iverilog/11.0.0/environment
vendored
Normal file
2
packages/iverilog/11.0.0/environment
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
export PATH=$PWD/bin:$PATH
|
5
packages/iverilog/11.0.0/metadata.json
vendored
Normal file
5
packages/iverilog/11.0.0/metadata.json
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"language": "iverilog",
|
||||
"version": "11.0.0",
|
||||
"aliases": ["verilog", "vvp"]
|
||||
}
|
4
packages/iverilog/11.0.0/run
vendored
Normal file
4
packages/iverilog/11.0.0/run
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
shift
|
||||
vvp a.out "$@"
|
7
packages/iverilog/11.0.0/test.verilog
vendored
Normal file
7
packages/iverilog/11.0.0/test.verilog
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
module hello;
|
||||
initial
|
||||
begin
|
||||
$display("OK");
|
||||
$finish ;
|
||||
end
|
||||
endmodule
|
18
packages/mono/6.12.0/build.sh
vendored
18
packages/mono/6.12.0/build.sh
vendored
|
@ -2,19 +2,31 @@
|
|||
|
||||
PREFIX=$(realpath $(dirname $0))
|
||||
|
||||
mkdir -p build/mono
|
||||
mkdir -p build/mono build/mono-basic
|
||||
cd build
|
||||
|
||||
curl "https://download.mono-project.com/sources/mono/mono-6.12.0.122.tar.xz" -o mono.tar.xz
|
||||
curl -L "https://github.com/mono/mono-basic/archive/refs/tags/4.7.tar.gz" -o mono-basic.tar.gz
|
||||
tar xf mono.tar.xz --strip-components=1 -C mono
|
||||
tar xf mono-basic.tar.gz --strip-components=1 -C mono-basic
|
||||
|
||||
# Compiling Mono
|
||||
cd mono
|
||||
|
||||
./configure --prefix "$PREFIX"
|
||||
|
||||
make -j$(nproc)
|
||||
make -j$(nproc)
|
||||
make install -j$(nproc)
|
||||
|
||||
export PATH="$PREFIX/bin:$PATH" # To be able to use mono commands
|
||||
|
||||
# Compiling mono-basic
|
||||
cd ../mono-basic
|
||||
./configure --prefix="$PREFIX"
|
||||
|
||||
make -j$(nproc) PLATFORM="linux" # Avoids conflict with the $PLATFORM variable we have
|
||||
make install -j$(nproc) PLATFORM="linux"
|
||||
|
||||
# Remove redundant files
|
||||
cd ../../
|
||||
rm -rf build
|
||||
|
||||
|
|
23
packages/mono/6.12.0/compile
vendored
23
packages/mono/6.12.0/compile
vendored
|
@ -1,4 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
rename 's/$/\.cs/' "$@" # Add .cs extension
|
||||
csc -out:out *.cs
|
||||
check_errors () {
|
||||
grep -q 'error [A-Z]\+[0-9]\+:' check.txt && cat check.txt 1>&2 || cat check.txt
|
||||
rm check.txt
|
||||
}
|
||||
|
||||
case "${PISTON_LANGUAGE}" in
|
||||
csharp)
|
||||
rename 's/$/\.cs/' "$@" # Add .cs extension
|
||||
csc -out:out *.cs > check.txt
|
||||
check_errors
|
||||
;;
|
||||
basic)
|
||||
rename 's/$/\.vb/' "$@" # Add .vb extension
|
||||
vbnc -out:out *.vb > check.txt
|
||||
check_errors
|
||||
;;
|
||||
*)
|
||||
echo "How did you get here? (${PISTON_LANGUAGE})"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
|
2
packages/mono/6.12.0/environment
vendored
2
packages/mono/6.12.0/environment
vendored
|
@ -1 +1 @@
|
|||
export PATH=$PWD/bin:$PATH
|
||||
export PATH=$PWD/bin:$PATH
|
||||
|
|
4
packages/mono/6.12.0/metadata.json
vendored
4
packages/mono/6.12.0/metadata.json
vendored
|
@ -5,6 +5,10 @@
|
|||
{
|
||||
"language": "csharp",
|
||||
"aliases": ["mono", "mono-csharp", "mono-c#", "mono-cs", "c#", "cs"]
|
||||
},
|
||||
{
|
||||
"language": "basic",
|
||||
"aliases": ["vb", "mono-vb", "mono-basic", "visual-basic", "visual basic"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
9
packages/mono/6.12.0/test.vb
vendored
Normal file
9
packages/mono/6.12.0/test.vb
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
Imports System
|
||||
|
||||
Module Module1
|
||||
|
||||
Sub Main()
|
||||
Console.WriteLine("OK")
|
||||
End Sub
|
||||
|
||||
End Module
|
6
packages/pwsh/7.1.4/build.sh
vendored
Executable file
6
packages/pwsh/7.1.4/build.sh
vendored
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.1.4/powershell-7.1.4-linux-x64.tar.gz -o powershell.tar.gz
|
||||
tar zxf powershell.tar.gz
|
||||
rm powershell.tar.gz
|
||||
|
||||
chmod +x pwsh
|
1
packages/pwsh/7.1.4/environment
vendored
Normal file
1
packages/pwsh/7.1.4/environment
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
export PATH=$PWD:$PATH
|
10
packages/pwsh/7.1.4/metadata.json
vendored
Normal file
10
packages/pwsh/7.1.4/metadata.json
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"language": "pwsh",
|
||||
"version": "7.1.4",
|
||||
"provides": [
|
||||
{
|
||||
"language": "powershell",
|
||||
"aliases": ["ps", "pwsh", "ps1"]
|
||||
}
|
||||
]
|
||||
}
|
3
packages/pwsh/7.1.4/run
vendored
Normal file
3
packages/pwsh/7.1.4/run
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
pwsh "$@"
|
1
packages/pwsh/7.1.4/test.ps1
vendored
Normal file
1
packages/pwsh/7.1.4/test.ps1
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
echo "OK"
|
16
packages/rscript/4.1.1/build.sh
vendored
Executable file
16
packages/rscript/4.1.1/build.sh
vendored
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
PREFIX=$(realpath $(dirname $0))
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
curl https://cloud.r-project.org/src/base/R-4/R-4.1.1.tar.gz -o R.tar.gz
|
||||
tar xzf R.tar.gz --strip-components 1
|
||||
|
||||
./configure --prefix="$PREFIX" --with-x=no
|
||||
make -j$(nproc)
|
||||
make install -j$(nproc)
|
||||
|
||||
cd ../
|
||||
rm -rf build
|
1
packages/rscript/4.1.1/environment
vendored
Normal file
1
packages/rscript/4.1.1/environment
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
export PATH=$PWD/bin:$PATH
|
5
packages/rscript/4.1.1/metadata.json
vendored
Normal file
5
packages/rscript/4.1.1/metadata.json
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"language": "rscript",
|
||||
"version": "4.1.1",
|
||||
"aliases": ["r"]
|
||||
}
|
2
packages/rscript/4.1.1/run
vendored
Normal file
2
packages/rscript/4.1.1/run
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
#/bin/bash
|
||||
Rscript "$@"
|
1
packages/rscript/4.1.1/test.r
vendored
Normal file
1
packages/rscript/4.1.1/test.r
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
cat('OK')
|
10
packages/sqlite3/3.36.0/build.sh
vendored
Executable file
10
packages/sqlite3/3.36.0/build.sh
vendored
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
PREFIX=$(realpath $(dirname $0))
|
||||
|
||||
curl https://www.sqlite.org/2021/sqlite-amalgamation-3360000.zip -o sqlite.zip
|
||||
unzip -q sqlite.zip
|
||||
rm -rf sqlite.zip
|
||||
|
||||
gcc -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION sqlite-amalgamation-3360000/shell.c sqlite-amalgamation-3360000/sqlite3.c -o sqlite3
|
||||
|
||||
rm -rf sqlite-amalgamation-3360000
|
2
packages/sqlite3/3.36.0/environment
vendored
Normal file
2
packages/sqlite3/3.36.0/environment
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
export PATH=$PWD:$PATH
|
5
packages/sqlite3/3.36.0/metadata.json
vendored
Normal file
5
packages/sqlite3/3.36.0/metadata.json
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"language": "sqlite3",
|
||||
"version": "3.36.0",
|
||||
"aliases": ["sqlite", "sql"]
|
||||
}
|
3
packages/sqlite3/3.36.0/run
vendored
Normal file
3
packages/sqlite3/3.36.0/run
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
sqlite3 < "$1"
|
1
packages/sqlite3/3.36.0/test.sql
vendored
Normal file
1
packages/sqlite3/3.36.0/test.sql
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
SELECT 'OK';
|
7
packages/vlang/0.1.13/run
vendored
7
packages/vlang/0.1.13/run
vendored
|
@ -6,8 +6,9 @@ export TMPDIR="$PWD"
|
|||
|
||||
# Put instructions to run the runtime
|
||||
|
||||
rename 's/$/\.v/' "$@" # Add .v extension
|
||||
filename=$1
|
||||
|
||||
rename 's/$/\.v/' $filename # Add .v extension
|
||||
|
||||
filename=$1.v
|
||||
shift
|
||||
v run $filename "$@"
|
||||
v run $filename.v "$@"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue