From 389c9be86ccb2b6a553930ff2896706d287b2d48 Mon Sep 17 00:00:00 2001 From: "Vargas, Dan" Date: Thu, 18 Mar 2021 13:34:03 -0500 Subject: [PATCH] pkg(scala-3.0.0): Add scala 3.0.0 --- packages/scala/3.0.0/build.sh | 16 ++++++++++++++++ packages/scala/3.0.0/environment | 5 +++++ packages/scala/3.0.0/metadata.json | 6 ++++++ packages/scala/3.0.0/run | 4 ++++ packages/scala/3.0.0/test.scala | 3 +++ 5 files changed, 34 insertions(+) create mode 100755 packages/scala/3.0.0/build.sh create mode 100644 packages/scala/3.0.0/environment create mode 100644 packages/scala/3.0.0/metadata.json create mode 100644 packages/scala/3.0.0/run create mode 100644 packages/scala/3.0.0/test.scala diff --git a/packages/scala/3.0.0/build.sh b/packages/scala/3.0.0/build.sh new file mode 100755 index 0000000..0a3fcf7 --- /dev/null +++ b/packages/scala/3.0.0/build.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# Scala depends on Java +mkdir -p java +cd java +curl "https://download.java.net/java/GA/jdk15.0.2/0d1cfde4252546c6931946de8db48ee2/7/GPL/openjdk-15.0.2_linux-x64_bin.tar.gz" -o java.tar.gz +tar xzf java.tar.gz --strip-components=1 +rm java.tar.gz +cd .. + +mkdir -p scala +cd scala +curl -L "https://github.com/lampepfl/dotty/releases/download/3.0.0-RC1/scala3-3.0.0-RC1.tar.gz" -o scala.tar.gz +tar -xzf scala.tar.gz --strip-components=1 +rm scala.tar.gz +cd .. diff --git a/packages/scala/3.0.0/environment b/packages/scala/3.0.0/environment new file mode 100644 index 0000000..40244a6 --- /dev/null +++ b/packages/scala/3.0.0/environment @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +# Scala requires JAVA_HOME to be set +export JAVA_HOME=$PWD/java +export PATH=$PWD/scala/bin:$PATH diff --git a/packages/scala/3.0.0/metadata.json b/packages/scala/3.0.0/metadata.json new file mode 100644 index 0000000..6227bb9 --- /dev/null +++ b/packages/scala/3.0.0/metadata.json @@ -0,0 +1,6 @@ +{ + "language": "scala", + "version": "3.0.0", + "aliases": ["scala","sc"], + "author": "Dan Vargas " +} diff --git a/packages/scala/3.0.0/run b/packages/scala/3.0.0/run new file mode 100644 index 0000000..e8bd3c2 --- /dev/null +++ b/packages/scala/3.0.0/run @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +# Put instructions to run the runtime +scala -color never "$@" diff --git a/packages/scala/3.0.0/test.scala b/packages/scala/3.0.0/test.scala new file mode 100644 index 0000000..bf4cabc --- /dev/null +++ b/packages/scala/3.0.0/test.scala @@ -0,0 +1,3 @@ +@main def run(): Unit = { + println("OK") +} \ No newline at end of file