Skip to content

Commit

Permalink
scala 3.6.2
Browse files Browse the repository at this point in the history
scala: bump to openjdk and fix `scala-cli.jar` path

Signed-off-by: Rui Chen <[email protected]>
  • Loading branch information
BrewTestBot authored and chenrui333 committed Dec 10, 2024
1 parent 843806a commit ad71057
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions Formula/s/scala.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Scala < Formula
desc "JVM-based programming language"
homepage "https://www.scala-lang.org/"
url "https://github.com/scala/scala3/releases/download/3.5.2/scala3-3.5.2.tar.gz"
sha256 "899de4f9aca56989ce337d8390fbf94967bc70c9e8420e79f375d1c2ad00ff99"
url "https://github.com/scala/scala3/releases/download/3.6.2/scala3-3.6.2.tar.gz"
sha256 "9525b93f8b9488330ecbdb85df3046d3ef46c6760ac23248902c4d89194c5206"
license "Apache-2.0"

livecheck do
Expand All @@ -14,19 +14,20 @@ class Scala < Formula
sha256 cellar: :any_skip_relocation, all: "7a0c887cea761759face114d09e5b29559dac305e7695dd9c0273f039f8edf1e"
end

# Switch back to `openjdk` when supported:
# https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html
depends_on "openjdk@21"
# JDK Compatibility: https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html
depends_on "openjdk"

conflicts_with "pwntools", because: "both install `common` binaries"

def install
# fix `scala-cli.jar` path, upstream pr ref, https://github.com/scala/scala3/pull/22185
inreplace "libexec/cli-common-platform", "bin/scala-cli", "libexec/scala-cli"

rm Dir["bin/*.bat"]
libexec.install "lib"
libexec.install "maven2"
libexec.install "VERSION"

libexec.install "lib", "maven2", "VERSION", "libexec"
prefix.install "bin"
bin.env_script_all_files libexec/"bin", Language::Java.overridable_java_home_env("21")
bin.env_script_all_files libexec/"bin", Language::Java.overridable_java_home_env

# Set up an IntelliJ compatible symlink farm in 'idea'
idea = prefix/"idea"
Expand Down

0 comments on commit ad71057

Please sign in to comment.