-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from brahimhaddou/master
Introduce GraalVM JDK 23
- Loading branch information
Showing
3 changed files
with
87 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
cask "graalvm-community-jdk23" do | ||
arch arm: "aarch64", intel: "x64" | ||
|
||
version "23" | ||
sha256 arm: "cda587f6d15134dc237fbb1111c7e339c8a0b2f4c1a4817a436c7c15d8ba2a9b", | ||
intel: "1338b838e5c845688643ed9e91bf2a0236e4d53bf1dc9cb4f693bde0409d4daa" | ||
|
||
installation_dir = "graalvm-community-openjdk-#{version}+37.1".freeze | ||
jvms_dir = "/Library/Java/JavaVirtualMachines".freeze | ||
target_dir = "#{jvms_dir}/graalvm-community-openjdk-#{version.split(".").first}".freeze | ||
|
||
# github.com/graalvm/graalvm-ce-builds was verified as official when first introduced to the cask | ||
url "https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-#{version}.0.0/graalvm-community-jdk-#{version}.0.0_macos-#{arch}_bin.tar.gz" | ||
name "GraalVM Community Edition for JDK 23" | ||
homepage "https://www.graalvm.org/" | ||
|
||
artifact installation_dir, target: target_dir | ||
|
||
postflight do | ||
# Correct symlink | ||
macos_dir = "#{target_dir}/Contents/MacOS" | ||
libjli_filename = "libjli.dylib" | ||
libjli_path = "#{target_dir}/Contents/Home/lib/#{libjli_filename}" | ||
libjli_symlink_path = "#{macos_dir}/#{libjli_filename}" | ||
system_command "/bin/mkdir", args: ["-p", macos_dir], sudo: true | ||
system_command "/bin/ln", args: ["-s", "-f", libjli_path, libjli_symlink_path], sudo: true | ||
end | ||
|
||
caveats <<~EOS | ||
Installing GraalVM CE for JDK 23 in #{jvms_dir} requires root permission. | ||
You may be asked to enter your password to proceed. | ||
To use GraalVM, you may want to change your $JAVA_HOME: | ||
export JAVA_HOME="#{target_dir}/Contents/Home" | ||
or you may want to add its `bin` directory to your $PATH: | ||
export PATH="#{target_dir}/Contents/Home/bin:$PATH" | ||
GraalVM CE is licensed under the GPL 2 with Classpath exception: | ||
https://github.com/oracle/graal/blob/master/LICENSE | ||
EOS | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
cask "graalvm-jdk23" do | ||
arch arm: "aarch64", intel: "x64" | ||
|
||
version "23" | ||
sha256 arm: "63290bf6242836ac46ca4c8c4ad048e4482fdb3f8276b9689088f059be430687", | ||
intel: "d516ea854e361a821c7679d127ff7126c254b8c43c99e571e203df218df2764b" | ||
|
||
installation_dir = "graalvm-jdk-#{version}+37.1".freeze | ||
jvms_dir = "/Library/Java/JavaVirtualMachines".freeze | ||
target_dir = "#{jvms_dir}/graalvm-jdk-#{version.split(".").first}".freeze | ||
|
||
# download.oracle.com was verified as official when first introduced to the cask | ||
url "https://download.oracle.com/graalvm/23/archive/graalvm-jdk-#{version}_macos-#{arch}_bin.tar.gz" | ||
name "Oracle GraalVM for JDK 23" | ||
homepage "https://www.graalvm.org/" | ||
|
||
artifact installation_dir, target: target_dir | ||
|
||
postflight do | ||
# Correct symlink | ||
macos_dir = "#{target_dir}/Contents/MacOS" | ||
libjli_filename = "libjli.dylib" | ||
libjli_path = "#{target_dir}/Contents/Home/lib/#{libjli_filename}" | ||
libjli_symlink_path = "#{macos_dir}/#{libjli_filename}" | ||
system_command "/bin/mkdir", args: ["-p", macos_dir], sudo: true | ||
system_command "/bin/ln", args: ["-s", "-f", libjli_path, libjli_symlink_path], sudo: true | ||
end | ||
|
||
caveats <<~EOS | ||
Installing Oracle GraalVM for JDK 23 in #{jvms_dir} requires root permission. | ||
You may be asked to enter your password to proceed. | ||
To use GraalVM, you may want to change your $JAVA_HOME: | ||
export JAVA_HOME="#{target_dir}/Contents/Home" | ||
or you may want to add its `bin` directory to your $PATH: | ||
export PATH="#{target_dir}/Contents/Home/bin:$PATH" | ||
Oracle GraalVM is licensed under the GraalVM Free Terms and Conditions: | ||
https://www.oracle.com/downloads/licenses/graal-free-license.html | ||
EOS | ||
end |