pkg(mono-6.12.0): Added mono-basic 7.4

This commit is contained in:
Brikaa 2021-09-09 20:20:01 +02:00
parent e197ca5b7a
commit 08b2fa094a
5 changed files with 43 additions and 6 deletions

View File

@ -2,19 +2,31 @@
PREFIX=$(realpath $(dirname $0)) PREFIX=$(realpath $(dirname $0))
mkdir -p build/mono mkdir -p build/mono build/mono-basic
cd build cd build
curl "https://download.mono-project.com/sources/mono/mono-6.12.0.122.tar.xz" -o mono.tar.xz 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.tar.xz --strip-components=1 -C mono
tar xf mono-basic.tar.gz --strip-components=1 -C mono-basic
# Compiling Mono
cd mono cd mono
./configure --prefix "$PREFIX" ./configure --prefix "$PREFIX"
make -j$(nproc) make -j$(nproc)
make install -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 ../../ cd ../../
rm -rf build rm -rf build

View File

@ -1,4 +1,16 @@
#!/bin/bash #!/bin/bash
rename 's/$/\.cs/' "$@" # Add .cs extension case "${PISTON_LANGUAGE}" in
csc -out:out *.cs csharp)
rename 's/$/\.cs/' "$@" # Add .cs extension
csc -out:out *.cs
;;
basic)
rename 's/$/\.vb/' "$@" # Add .vb extension
vbnc -out:out *.vb
;;
*)
echo "How did you get here? (${PISTON_LANGUAGE})"
exit 1
;;
esac

View File

@ -1 +1 @@
export PATH=$PWD/bin:$PATH export PATH=$PWD/bin:$PATH

View File

@ -5,6 +5,10 @@
{ {
"language": "csharp", "language": "csharp",
"aliases": ["mono", "mono-csharp", "mono-c#", "mono-cs", "c#", "cs"] "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
View File

@ -0,0 +1,9 @@
Imports System
Module Module1
Sub Main()
Console.WriteLine("OK")
End Sub
End Module