From 61aa1027bc65bc3d32875f0aae1d26a315b1a0db Mon Sep 17 00:00:00 2001 From: Jonathan Chang Date: Fri, 5 Mar 2021 12:44:05 +1100 Subject: [PATCH 01/13] openjdk 16 --- Aliases/{openjdk@15 => openjdk@16} | 0 Formula/openjdk.rb | 180 +++++++++++++++-------------- 2 files changed, 92 insertions(+), 88 deletions(-) rename Aliases/{openjdk@15 => openjdk@16} (100%) diff --git a/Aliases/openjdk@15 b/Aliases/openjdk@16 similarity index 100% rename from Aliases/openjdk@15 rename to Aliases/openjdk@16 diff --git a/Formula/openjdk.rb b/Formula/openjdk.rb index 22db14f81d15f..6a5638f766454 100644 --- a/Formula/openjdk.rb +++ b/Formula/openjdk.rb @@ -2,19 +2,20 @@ class Openjdk < Formula desc "Development kit for the Java programming language" homepage "https://openjdk.java.net/" if Hardware::CPU.arm? - # Temporarily use a openjdk 16 preview on Apple Silicon + # Temporarily use a openjdk 17 preview on Apple Silicon # (because it is better than nothing) - url "https://github.com/openjdk/jdk-sandbox/archive/a56ddad05cf1808342aeff1b1cd2b0568a6cdc3a.tar.gz" - sha256 "29df31b5eefb5a6c016f50b2518ca29e8e61e3cfc676ed403214e1f13a78efd5" - version "15.0.2" + url "https://github.com/openjdk/jdk/archive/refs/tags/jdk-17+24.tar.gz" + sha256 "9d1ea3fc63ce860e55a9be77f670b18fa7b7e5c9773dca3c70042403e1ee285c" + version "16.0.1" else - url "https://hg.openjdk.java.net/jdk-updates/jdk15u/archive/jdk-15.0.2-ga.tar.bz2" - sha256 "d07b45b5b319e7034e8ebc41cd78c496e6ee8b1f6e08310dee303beaee8b4a3a" + url "https://github.com/openjdk/jdk16u/archive/refs/tags/jdk-16.0.1-ga.tar.gz" + sha256 "ef53ef8796080a955efbfdbf05ea137ff95ac6d444dab3b2fcd57c9709a3b65d" end - license :cannot_represent + license "GPL-2.0-only" => { with: "Classpath-exception-2.0" } livecheck do - url "https://hg.openjdk.java.net/jdk-updates/jdk#{version.major}u/tags" + url "https://github.com/openjdk/jdk#{version.major}u/releases" + strategy :page_match regex(/>\s*?jdk[._-]v?(\d+(?:\.\d+)*)-ga\s*? :build depends_on "alsa-lib" + depends_on "cups" + depends_on "fontconfig" + depends_on "libx11" + depends_on "libxext" + depends_on "libxrandr" + depends_on "libxrender" + depends_on "libxt" + depends_on "libxtst" + depends_on "unzip" + depends_on "zip" end # From https://jdk.java.net/archive/ resource "boot-jdk" do on_macos do if Hardware::CPU.arm? - url "https://download.java.net/java/early_access/jdk16/31/GPL/openjdk-16-ea+31_osx-x64_bin.tar.gz" - sha256 "8e4a8fdd2d965067bdb56e1a72c7c72343d571b371ac61eee74d9e71bbef63e8" + url "https://download.java.net/java/early_access/jdk17/24/GPL/openjdk-17-ea+24_macos-aarch64_bin.tar.gz" + sha256 "176ab64ad860e363428ce3e4b23e8207576f8a65a567761475281cda25887640" else - url "https://download.java.net/java/GA/jdk14.0.2/205943a0976c4ed48cb16f1043c5c647/12/GPL/openjdk-14.0.2_osx-x64_bin.tar.gz" - sha256 "386a96eeef63bf94b450809d69ceaa1c9e32a97230e0a120c1b41786b743ae84" + url "https://download.java.net/java/GA/jdk15.0.2/0d1cfde4252546c6931946de8db48ee2/7/GPL/openjdk-15.0.2_osx-x64_bin.tar.gz" + sha256 "578b17748f5a7d111474bc4c9b5a8a06b4a4aa1ba4a4bc3fef014e079ece7c74" end end on_linux do - url "https://download.java.net/java/GA/jdk14.0.2/205943a0976c4ed48cb16f1043c5c647/12/GPL/openjdk-14.0.2_linux-x64_bin.tar.gz" - sha256 "91310200f072045dc6cef2c8c23e7e6387b37c46e9de49623ce0fa461a24623d" + url "https://download.java.net/java/GA/jdk15.0.2/0d1cfde4252546c6931946de8db48ee2/7/GPL/openjdk-15.0.2_linux-x64_bin.tar.gz" + sha256 "91ac6fc353b6bf39d995572b700e37a20e119a87034eeb939a6f24356fbcd207" end end def install - # Path to dual-arch JavaNativeFoundation.framework from Xcode - framework_path = File.expand_path( - "../SharedFrameworks/ContentDeliveryServices.framework/Versions/Current/itms/java/Frameworks", - MacOS::Xcode.prefix, - ) - - boot_jdk_dir = Pathname.pwd/"boot-jdk" - resource("boot-jdk").stage boot_jdk_dir - boot_jdk = boot_jdk_dir/"Contents/Home" - java_options = ENV.delete("_JAVA_OPTIONS") - - # Inspecting .hgtags to find a build number - # The file looks like this: - # - # 1613004c47e9dc867a2c2c43d716533b1aaedc5f jdk-15.0.2+0 - # cc4fdb537bc14734064a9a8eadb091fd1c12b36e jdk-15.0.2+1 - # d24e907486b3f90691980b0dde01efca5840abc6 jdk-15.0.2+2 - # dbb11e11955ad1240ba775ab0007a14547e14ce6 jdk-15.0.2+3 - # 4c4a2eb7b19ecb31620e6bb120e40f8a5fd1737a jdk-15.0.2+4 - # e431a9461b1356c4b763443e5333b3f4a8695eaf jdk-15.0.2+5 - # d5977ee56509ceaa3d3c8e1aebbca76651358da4 jdk-15.0.2+6 - # 38912b2a5bcb396c75f8707e300773c874327451 jdk-15.0.2+7 - # - # Since openjdk has move their development from mercurial to git and GitHub - # this approach may need some changes in the future - # - version_to_parse = if Hardware::CPU.arm? - "16" - else - version + boot_jdk = Pathname.pwd/"boot-jdk" + resource("boot-jdk").stage boot_jdk + on_macos do + boot_jdk /= "Contents/Home" end - build = File.read(".hgtags") - .scan(/ jdk-#{version_to_parse}\+(.+)$/) - .map(&:first) - .map(&:to_i) - .max - raise "cannot find build number in .hgtags" if build.nil? + java_options = ENV.delete("_JAVA_OPTIONS") args = %W[ - --without-version-pre - --without-version-opt - --with-version-build=#{build} - --with-toolchain-path=/usr/bin - --with-boot-jdk=#{boot_jdk} + --disable-warnings-as-errors --with-boot-jdk-jvmargs=#{java_options} + --with-boot-jdk=#{boot_jdk} --with-debug-level=release - --with-native-debug-symbols=none --with-jvm-variants=server - --with-sysroot=#{MacOS.sdk_path} - --with-extra-ldflags=-headerpad_max_install_names - --enable-dtrace + --with-native-debug-symbols=none + --with-vendor-bug-url=#{tap.issues_url} + --with-vendor-name=#{tap.user} + --with-vendor-url=#{tap.issues_url} + --with-vendor-version-string=#{tap.user} + --with-vendor-vm-bug-url=#{tap.issues_url} + --with-version-build=#{revision} + --without-version-opt + --without-version-pre ] - if Hardware::CPU.arm? + framework_path = nil + on_macos do args += %W[ - --disable-warnings-as-errors - --openjdk-target=aarch64-apple-darwin - --with-build-jdk=#{boot_jdk} - --with-extra-cflags=-arch\ arm64 - --with-extra-ldflags=-arch\ arm64\ -F#{framework_path} - --with-extra-cxxflags=-arch\ arm64 + --enable-dtrace + --with-extra-ldflags=-headerpad_max_install_names + --with-sysroot=#{MacOS.sdk_path} + ] + + if Hardware::CPU.arm? + # Path to dual-arch JavaNativeFoundation.framework from Xcode + framework_path = File.expand_path( + "../SharedFrameworks/ContentDeliveryServices.framework/Versions/Current/itms/java/Frameworks", + MacOS::Xcode.prefix, + ) + + args += %W[ + --openjdk-target=aarch64-apple-darwin + --with-build-jdk=#{boot_jdk} + --with-extra-cflags=-arch\ arm64 + --with-extra-cxxflags=-arch\ arm64 + --with-extra-ldflags=-arch\ arm64\ -F#{framework_path} + ] + end + end + + on_linux do + args += %W[ + --with-x=#{HOMEBREW_PREFIX} + --with-cups=#{HOMEBREW_PREFIX} + --with-fontconfig=#{HOMEBREW_PREFIX} ] end @@ -123,38 +127,38 @@ def install ENV["MAKEFLAGS"] = "JOBS=#{ENV.make_jobs}" system "make", "images" - jdk = Dir["build/*/images/jdk-bundle/*"].first - libexec.install jdk => "openjdk.jdk" - bin.install_symlink Dir["#{libexec}/openjdk.jdk/Contents/Home/bin/*"] - include.install_symlink Dir["#{libexec}/openjdk.jdk/Contents/Home/include/*.h"] - include.install_symlink Dir["#{libexec}/openjdk.jdk/Contents/Home/include/darwin/*.h"] + on_macos do + jdk = Dir["build/*/images/jdk-bundle/*"].first + libexec.install jdk => "openjdk.jdk" + bin.install_symlink Dir["#{libexec}/openjdk.jdk/Contents/Home/bin/*"] + include.install_symlink Dir["#{libexec}/openjdk.jdk/Contents/Home/include/*.h"] + include.install_symlink Dir["#{libexec}/openjdk.jdk/Contents/Home/include/darwin/*.h"] - if Hardware::CPU.arm? - dest = libexec/"openjdk.jdk/Contents/Home/lib/JavaNativeFoundation.framework" - # Copy JavaNativeFoundation.framework from Xcode - # https://gist.github.com/claui/ea4248aa64d6a1b06c6d6ed80bc2d2b8#gistcomment-3539574 - cp_r "#{framework_path}/JavaNativeFoundation.framework", dest, remove_destination: true + if Hardware::CPU.arm? + dest = libexec/"openjdk.jdk/Contents/Home/lib/JavaNativeFoundation.framework" + # Copy JavaNativeFoundation.framework from Xcode + # https://gist.github.com/claui/ea4248aa64d6a1b06c6d6ed80bc2d2b8#gistcomment-3539574 + cp_r "#{framework_path}/JavaNativeFoundation.framework", dest, remove_destination: true - # Replace Apple signature by ad-hoc one (otherwise relocation will break it) - system "codesign", "-f", "-s", "-", "#{dest}/Versions/A/JavaNativeFoundation" + # Replace Apple signature by ad-hoc one (otherwise relocation will break it) + system "codesign", "-f", "-s", "-", "#{dest}/Versions/A/JavaNativeFoundation" + end + end + + on_linux do + libexec.install Dir["build/linux-x86_64-server-release/images/jdk/*"] + bin.install_symlink Dir["#{libexec}/bin/*"] + include.install_symlink Dir["#{libexec}/include/*.h"] + include.install_symlink Dir["#{libexec}/include/linux/*.h"] end end def caveats on_macos do - s = <<~EOS + <<~EOS For the system Java wrappers to find this JDK, symlink it with sudo ln -sfn #{opt_libexec}/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk EOS - - if Hardware::CPU.arm? - s += <<~EOS - This is a beta version of openjdk for Apple Silicon - (openjdk 16 preview). - EOS - end - - s end end From a92f563b21f6591d1aa6ae435c5775f2b00586b5 Mon Sep 17 00:00:00 2001 From: Thierry Moisan Date: Thu, 13 May 2021 19:40:46 -0400 Subject: [PATCH 02/13] google-java-format: add exports for openjdk 16 --- Formula/google-java-format.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Formula/google-java-format.rb b/Formula/google-java-format.rb index 083cfb2196b9c..3c2d3977a07df 100644 --- a/Formula/google-java-format.rb +++ b/Formula/google-java-format.rb @@ -11,7 +11,12 @@ class GoogleJavaFormat < Formula def install libexec.install "google-java-format-#{version}-all-deps.jar" => "google-java-format.jar" - bin.write_jar_script libexec / "google-java-format.jar", "google-java-format" + bin.write_jar_script libexec / "google-java-format.jar", "google-java-format", + "--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \ + --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED \ + --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED \ + --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \ + --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED" end test do From 500e6e917a980200ecc6ba9efa34185c8bd139bb Mon Sep 17 00:00:00 2001 From: Thierry Moisan Date: Thu, 13 May 2021 19:42:52 -0400 Subject: [PATCH 03/13] redpen: downgrade to openjdk@11 --- Formula/redpen.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Formula/redpen.rb b/Formula/redpen.rb index bf5ad42a700a5..5bd1d678b5c6d 100644 --- a/Formula/redpen.rb +++ b/Formula/redpen.rb @@ -4,6 +4,7 @@ class Redpen < Formula url "https://github.com/redpen-cc/redpen/releases/download/redpen-1.10.4/redpen-1.10.4.tar.gz" sha256 "6c3dc4a6a45828f9cc833ca7253fdb036179036631248288251cb9ac4520c39d" license "Apache-2.0" + revision 1 livecheck do url :stable @@ -13,7 +14,7 @@ class Redpen < Formula bottle :unneeded - depends_on "openjdk" + depends_on "openjdk@11" def install # Don't need Windows files. @@ -21,7 +22,7 @@ def install libexec.install %w[conf lib sample-doc js] prefix.install "bin" - bin.env_script_all_files libexec/"bin", JAVA_HOME: Formula["openjdk"].opt_prefix + bin.env_script_all_files libexec/"bin", JAVA_HOME: Formula["openjdk@11"].opt_prefix end test do From 3cb5f1d00d3a8aa73762963db22200520fb347df Mon Sep 17 00:00:00 2001 From: Thierry Moisan Date: Thu, 13 May 2021 19:59:03 -0400 Subject: [PATCH 04/13] ringojs: downgrade to openjdk@11 --- Formula/ringojs.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Formula/ringojs.rb b/Formula/ringojs.rb index 2c1dd9ce4c608..851acc6243734 100644 --- a/Formula/ringojs.rb +++ b/Formula/ringojs.rb @@ -4,18 +4,18 @@ class Ringojs < Formula url "https://github.com/ringo/ringojs/releases/download/v2.0.0/ringojs-2.0.0.tar.gz" sha256 "5991953012f3c493abb8c7256fa48e885bd284976bd1ec36f20fef77ff37fac9" license "Apache-2.0" - revision 1 + revision 2 bottle :unneeded - depends_on "openjdk" + depends_on "openjdk@11" def install rm Dir["bin/*.cmd"] libexec.install Dir["*"] bin.install Dir["#{libexec}/bin/*"] env = { RINGO_HOME: libexec } - env.merge! Language::Java.overridable_java_home_env + env.merge! Language::Java.overridable_java_home_env("11") bin.env_script_all_files libexec/"bin", env end From 7e89eef8c895d8d3a5d212f23c6c16a7763d38bc Mon Sep 17 00:00:00 2001 From: Thierry Moisan Date: Thu, 13 May 2021 20:03:01 -0400 Subject: [PATCH 05/13] swagger2markup-cli: downgrade to openjdk@11 --- Formula/swagger2markup-cli.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Formula/swagger2markup-cli.rb b/Formula/swagger2markup-cli.rb index 425c38bb29959..c4b59a9507187 100644 --- a/Formula/swagger2markup-cli.rb +++ b/Formula/swagger2markup-cli.rb @@ -4,17 +4,17 @@ class Swagger2markupCli < Formula url "https://search.maven.org/remotecontent?filepath=io/github/swagger2markup/swagger2markup-cli/1.3.3/swagger2markup-cli-1.3.3.jar" sha256 "93ff10990f8279eca35b7ac30099460e557b073d48b52d16046ab1aeab248a0a" license "Apache-2.0" - revision 2 + revision 3 bottle do sha256 cellar: :any_skip_relocation, all: "462e764f4e4d57ad2f1c0c668c265fa0a57885bb5d97a3578b79e6da5ff8f2f2" end - depends_on "openjdk" + depends_on "openjdk@11" def install libexec.install "swagger2markup-cli-#{version}.jar" - bin.write_jar_script libexec/"swagger2markup-cli-#{version}.jar", "swagger2markup" + bin.write_jar_script libexec/"swagger2markup-cli-#{version}.jar", "swagger2markup", java_version: "11" end test do From 30e71a2396db2e2d0ddaabd46f1cc9c88a2ef90f Mon Sep 17 00:00:00 2001 From: Thierry Moisan Date: Thu, 13 May 2021 20:08:28 -0400 Subject: [PATCH 06/13] micronaut 2.5.4 --- Formula/micronaut.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/micronaut.rb b/Formula/micronaut.rb index 403ca97f9f93e..0be9f639e7d9b 100644 --- a/Formula/micronaut.rb +++ b/Formula/micronaut.rb @@ -1,8 +1,8 @@ class Micronaut < Formula desc "Modern JVM-based framework for building modular microservices" homepage "https://micronaut.io/" - url "https://github.com/micronaut-projects/micronaut-starter/archive/v2.4.4.tar.gz" - sha256 "92be3f5d0e05e810221ef0d123f4e227900487636b9ea31198964bbf3ddd853f" + url "https://github.com/micronaut-projects/micronaut-starter/archive/v2.5.4.tar.gz" + sha256 "2f044087a676ee9c00a7d19a9facf5d968befdfbd6e1d322a19f711ce0279439" license "Apache-2.0" livecheck do From 8ef45f16311c650602c70cda67a72d267b9531b7 Mon Sep 17 00:00:00 2001 From: Thierry Moisan Date: Thu, 13 May 2021 20:09:46 -0400 Subject: [PATCH 07/13] rest-shell: downgrade to openjdk@11 --- Formula/rest-shell.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Formula/rest-shell.rb b/Formula/rest-shell.rb index 37e7320d48d92..1847edc0f980d 100644 --- a/Formula/rest-shell.rb +++ b/Formula/rest-shell.rb @@ -6,16 +6,17 @@ class RestShell < Formula # version "1.2.1" sha256 "0ecfa67d005cc0d51e7a3a26c4dacc53aa12012f0e757332a2fa40c5e780c2d6" license "Apache-2.0" + revision 1 bottle do sha256 cellar: :any_skip_relocation, all: "887fccddf93ec8546b97c3a2351b3111d7869eb5576b401b9c19e6ec49147b2f" end - depends_on "openjdk" + depends_on "openjdk@11" def install libexec.install Dir["*"] - (bin/"rest-shell").write_env_script libexec/"bin/rest-shell", Language::Java.overridable_java_home_env + (bin/"rest-shell").write_env_script libexec/"bin/rest-shell", Language::Java.overridable_java_home_env("11") end test do From 6b0c55ee078aa05057f813c446a530fd1bd3b698 Mon Sep 17 00:00:00 2001 From: Thierry Moisan Date: Thu, 13 May 2021 20:11:33 -0400 Subject: [PATCH 08/13] swagger-codegen: downgrade to openjdk@11 --- Formula/swagger-codegen.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Formula/swagger-codegen.rb b/Formula/swagger-codegen.rb index f46b0cd440c5a..7a16f069d1bdc 100644 --- a/Formula/swagger-codegen.rb +++ b/Formula/swagger-codegen.rb @@ -4,6 +4,7 @@ class SwaggerCodegen < Formula url "https://github.com/swagger-api/swagger-codegen/archive/v3.0.25.tar.gz" sha256 "3a9b525c8109afaba7333dfc070de148c18c3e8596382b89bba591e0394ac5e0" license "Apache-2.0" + revision 1 head "https://github.com/swagger-api/swagger-codegen.git" bottle do @@ -14,11 +15,11 @@ class SwaggerCodegen < Formula end depends_on "maven" => :build - depends_on "openjdk" + depends_on "openjdk@11" def install # Need to set JAVA_HOME manually since maven overrides 1.8 with 1.7+ - ENV["JAVA_HOME"] = Formula["openjdk"].opt_prefix + ENV["JAVA_HOME"] = Formula["openjdk@11"].opt_prefix system "mvn", "clean", "package" libexec.install "modules/swagger-codegen-cli/target/swagger-codegen-cli.jar" From b646ce046e3787af2ce648f6d627bf714a27ddcf Mon Sep 17 00:00:00 2001 From: Thierry Moisan Date: Sat, 15 May 2021 16:10:24 -0400 Subject: [PATCH 09/13] detekt: downgrade to openjdk@11 --- Formula/detekt.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Formula/detekt.rb b/Formula/detekt.rb index ff391725657d8..4ca429e608619 100644 --- a/Formula/detekt.rb +++ b/Formula/detekt.rb @@ -4,6 +4,7 @@ class Detekt < Formula url "https://github.com/detekt/detekt/releases/download/v1.17.1/detekt-cli-1.17.1-all.jar" sha256 "2a01bc4fe9836d08a683be268887ecd88b6f76b8832078fb153feaf126f91678" license "Apache-2.0" + revision 1 livecheck do url :homepage @@ -12,11 +13,11 @@ class Detekt < Formula bottle :unneeded - depends_on "openjdk" + depends_on "openjdk@11" def install libexec.install "detekt-cli-#{version}-all.jar" - bin.write_jar_script libexec/"detekt-cli-#{version}-all.jar", "detekt" + bin.write_jar_script libexec/"detekt-cli-#{version}-all.jar", "detekt", java_version: "11" end test do From 9146d9136c70cded2950d8368c1cba605c4afc36 Mon Sep 17 00:00:00 2001 From: Thierry Moisan Date: Sat, 15 May 2021 16:15:56 -0400 Subject: [PATCH 10/13] ki: downgrade to openjdk@11 --- Formula/ki.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Formula/ki.rb b/Formula/ki.rb index 4c2f11303287e..b5822f15dfc77 100644 --- a/Formula/ki.rb +++ b/Formula/ki.rb @@ -4,6 +4,7 @@ class Ki < Formula url "https://github.com/Kotlin/kotlin-interactive-shell/archive/refs/tags/v0.3.3.tar.gz" sha256 "46913b17c85711213251948342d0f4d0fec7dc98dd11c1f24eedb0409338e273" license "Apache-2.0" + revision 1 head "https://github.com/Kotlin/kotlin-interactive-shell.git", branch: "main" bottle do @@ -14,12 +15,13 @@ class Ki < Formula end depends_on "maven" => :build - depends_on "openjdk" + depends_on "openjdk@11" def install + ENV["JAVA_HOME"] = Formula["openjdk@11"].opt_prefix system "mvn", "-DskipTests", "package" libexec.install "lib/ki-shell.jar" - bin.write_jar_script libexec/"ki-shell.jar", "ki" + bin.write_jar_script libexec/"ki-shell.jar", "ki", java_version: "11" end test do From 2ad30994cecb36c35cdc8319cbbce22e7fca1e65 Mon Sep 17 00:00:00 2001 From: Thierry Moisan Date: Sat, 15 May 2021 16:16:52 -0400 Subject: [PATCH 11/13] ktlint: downgrade to openjdk@11 --- Formula/ktlint.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Formula/ktlint.rb b/Formula/ktlint.rb index 38c7b850b52ce..fbf73b597f986 100644 --- a/Formula/ktlint.rb +++ b/Formula/ktlint.rb @@ -4,17 +4,18 @@ class Ktlint < Formula url "https://github.com/pinterest/ktlint/releases/download/0.41.0/ktlint" sha256 "438bd098e5e8acc966940480b025af7020bdaa66698c7d76042416314100e183" license "MIT" + revision 1 bottle do sha256 cellar: :any_skip_relocation, all: "3e579a1c6a074922e7280071c9cbd87f1604d645b8a1b694b9ecc95739e95111" end - depends_on "openjdk" + depends_on "openjdk@11" def install libexec.install "ktlint" (libexec/"ktlint").chmod 0755 - (bin/"ktlint").write_env_script libexec/"ktlint", JAVA_HOME: Formula["openjdk"].opt_prefix + (bin/"ktlint").write_env_script libexec/"ktlint", JAVA_HOME: Formula["openjdk@11"].opt_prefix end test do From cc2449ca1e114e904cdc6d845427138d9f3db7a1 Mon Sep 17 00:00:00 2001 From: Thierry Moisan Date: Mon, 17 May 2021 12:30:32 -0400 Subject: [PATCH 12/13] dafny: downgrade to openjdk@11 --- Formula/dafny.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Formula/dafny.rb b/Formula/dafny.rb index 4d2ae2e827172..75b2ff4e87f47 100644 --- a/Formula/dafny.rb +++ b/Formula/dafny.rb @@ -19,7 +19,7 @@ class Dafny < Formula depends_on "gradle" => :build depends_on "nuget" => :build depends_on "dotnet" - depends_on "openjdk" + depends_on "openjdk@11" # Use the following along with the z3 build below, as long as dafny # cannot build with latest z3 (https://github.com/dafny-lang/dafny/issues/810) From 386a70537e7e35ad4a808716d76e9905a2387214 Mon Sep 17 00:00:00 2001 From: Thierry Moisan Date: Sun, 23 May 2021 11:36:25 -0400 Subject: [PATCH 13/13] commandbox: downgrade to openjdk@11 --- Formula/commandbox.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Formula/commandbox.rb b/Formula/commandbox.rb index 2ee9ae71cf9cb..b660761048a00 100644 --- a/Formula/commandbox.rb +++ b/Formula/commandbox.rb @@ -4,6 +4,7 @@ class Commandbox < Formula url "https://downloads.ortussolutions.com/ortussolutions/commandbox/5.3.1/commandbox-bin-5.3.1.zip" sha256 "f0e1f3b989a8664c3f7d0f02362ae8b0f3ab0ecd2b923b3ceeb89a4cf46cb614" license "LGPL-3.0-or-later" + revision 1 livecheck do url :homepage @@ -14,7 +15,8 @@ class Commandbox < Formula sha256 cellar: :any_skip_relocation, all: "7ab51feadd7ba7c1525c98a0d7a96d010a374cc1ea69b7989cb033115a1316eb" end - depends_on "openjdk" + # not yet compatible with Java 17 on ARM + depends_on "openjdk@11" resource "apidocs" do url "https://downloads.ortussolutions.com/ortussolutions/commandbox/5.3.1/commandbox-apidocs-5.3.1.zip" @@ -23,7 +25,7 @@ class Commandbox < Formula def install (libexec/"bin").install "box" - (bin/"box").write_env_script libexec/"bin/box", Language::Java.overridable_java_home_env + (bin/"box").write_env_script libexec/"bin/box", Language::Java.overridable_java_home_env("11") doc.install resource("apidocs") end