|
1 | 1 | class Openjdk < Formula
|
2 | 2 | desc "Development kit for the Java programming language"
|
3 | 3 | homepage "https://openjdk.java.net/"
|
4 |
| - url "https://github.com/openjdk/jdk23u/archive/refs/tags/jdk-23.0.2-ga.tar.gz" |
5 |
| - sha256 "0812e2e4d51ab1d752c1d532150297a56bd47557db67f8e2b298199e7f65db1c" |
| 4 | + url "https://github.com/openjdk/jdk24u/archive/refs/tags/jdk-24.0.1-ga.tar.gz" |
| 5 | + sha256 "2ccaaf7c5f03b6f689347df99e6e34cd6d3b30bc56af815c8c152a6eeb6a6c25" |
6 | 6 | license "GPL-2.0-only" => { with: "Classpath-exception-2.0" }
|
7 | 7 |
|
8 | 8 | livecheck do
|
@@ -54,33 +54,26 @@ class Openjdk < Formula
|
54 | 54 | resource "boot-jdk" do
|
55 | 55 | on_macos do
|
56 | 56 | on_arm do
|
57 |
| - url "https://download.java.net/java/GA/jdk23.0.1/c28985cbf10d4e648e4004050f8781aa/11/GPL/openjdk-23.0.1_macos-aarch64_bin.tar.gz" |
58 |
| - sha256 "cd626e636fdd7e68467a9ca27d71107a27bd500c33ab40a91b57317c0c0f949f" |
| 57 | + url "https://download.java.net/java/GA/jdk23.0.2/6da2a6609d6e406f85c491fcb119101b/7/GPL/openjdk-23.0.2_macos-aarch64_bin.tar.gz" |
| 58 | + sha256 "bff699bb27455c2bb51d6e8f2467b77a4833388412aa2d95ec1970ddfb0e7b6c" |
59 | 59 | end
|
60 | 60 | on_intel do
|
61 |
| - url "https://download.java.net/java/GA/jdk23.0.1/c28985cbf10d4e648e4004050f8781aa/11/GPL/openjdk-23.0.1_macos-x64_bin.tar.gz" |
62 |
| - sha256 "3661d387ea2f1248364bc384a1e36197b3633f63dde7fd1f61b296e89eb0f768" |
| 61 | + url "https://download.java.net/java/GA/jdk23.0.2/6da2a6609d6e406f85c491fcb119101b/7/GPL/openjdk-23.0.2_macos-x64_bin.tar.gz" |
| 62 | + sha256 "b4cc7d7b51520e99308e1b4d3f8467790072c42319b9d3838ec8cfd4f69f0bc1" |
63 | 63 | end
|
64 | 64 | end
|
65 | 65 | on_linux do
|
66 | 66 | on_arm do
|
67 |
| - url "https://download.java.net/java/GA/jdk23.0.1/c28985cbf10d4e648e4004050f8781aa/11/GPL/openjdk-23.0.1_linux-aarch64_bin.tar.gz" |
68 |
| - sha256 "94586630f70f1e87d90c252a6a2a202655399d1358c9b226834179e8bcf800e9" |
| 67 | + url "https://download.java.net/java/GA/jdk23.0.2/6da2a6609d6e406f85c491fcb119101b/7/GPL/openjdk-23.0.2_linux-aarch64_bin.tar.gz" |
| 68 | + sha256 "8e9b2c7e0f138de785dc754ad1dfa067671de66672b5e84bb7f6f6c219a6b02b" |
69 | 69 | end
|
70 | 70 | on_intel do
|
71 |
| - url "https://download.java.net/java/GA/jdk23.0.1/c28985cbf10d4e648e4004050f8781aa/11/GPL/openjdk-23.0.1_linux-x64_bin.tar.gz" |
72 |
| - sha256 "dc9b6adc1550afd95e30e131c1c38044925cb656923f92f6dbf0fbd8c1405629" |
| 71 | + url "https://download.java.net/java/GA/jdk23.0.2/6da2a6609d6e406f85c491fcb119101b/7/GPL/openjdk-23.0.2_linux-x64_bin.tar.gz" |
| 72 | + sha256 "017f4ed8e8234d85e5bc1e490bb86f23599eadb6cfc9937ee87007b977a7d762" |
73 | 73 | end
|
74 | 74 | end
|
75 | 75 | end
|
76 | 76 |
|
77 |
| - # Fix build with `--with-harfbuzz=system`. |
78 |
| - # https://github.com/openjdk/jdk/pull/19739 |
79 |
| - patch do |
80 |
| - url "https://github.com/openjdk/jdk/commit/ba5a4670b8ad86fefb41a939752754bf36aac9dc.patch?full_index=1" |
81 |
| - sha256 "ff6c66f3fa81bef3fb18e88196c520cfa867aa5d57ebf26574635723b4d06d16" |
82 |
| - end |
83 |
| - |
84 | 77 | def install
|
85 | 78 | boot_jdk = buildpath/"boot-jdk"
|
86 | 79 | resource("boot-jdk").stage boot_jdk
|
@@ -137,10 +130,23 @@ def install
|
137 | 130 | end
|
138 | 131 | args << "--with-extra-ldflags=#{ldflags.join(" ")}"
|
139 | 132 |
|
| 133 | + # Workaround for Xcode 16 bug: https://bugs.openjdk.org/browse/JDK-8340341. |
140 | 134 | if DevelopmentTools.clang_build_version == 1600
|
141 | 135 | args << "--with-extra-cflags=-mllvm -enable-constraint-elimination=0"
|
142 | 136 | end
|
143 | 137 |
|
| 138 | + # Temporary workaround for the "sed: RE error: illegal byte sequence" issue on macOS 15 and later (on_arm). |
| 139 | + # See https://bugs.openjdk.org/browse/JDK-8353948 for more details. |
| 140 | + # Could be removed in openjdk@25, though it might be resolved earlier if plans change. |
| 141 | + # References: |
| 142 | + # - Related bug: https://bugs.openjdk.org/browse/JDK-8354449 |
| 143 | + # - Upstream PR: https://github.com/openjdk/jdk/pull/24601 |
| 144 | + if OS.mac? && MacOS.version >= :sequoia && Hardware::CPU.arm? |
| 145 | + (buildpath/"src/java.xml.crypto/share/classes" / |
| 146 | + "com/sun/org/apache/xml/internal/security/resource" / |
| 147 | + "xmlsecurity_de.properties").unlink |
| 148 | + end |
| 149 | + |
144 | 150 | system "bash", "configure", *args
|
145 | 151 |
|
146 | 152 | ENV["MAKEFLAGS"] = "JOBS=#{ENV.make_jobs}"
|
|
0 commit comments