Skip to content

Commit

Permalink
openjdk@8 1.8.0-432
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinit committed Oct 25, 2024
1 parent e7ea73c commit d3955dd
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions Formula/o/[email protected]
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
class OpenjdkAT8 < Formula
desc "Development kit for the Java programming language"
homepage "https://openjdk.java.net/"
url "https://github.com/openjdk/jdk8u/archive/refs/tags/jdk8u422-ga.tar.gz"
version "1.8.0-422"
sha256 "3931898b4336f0e583a5e97df7e5c339d859d53afaff6dafe20124107e836ebe"
url "https://github.com/openjdk/jdk8u/archive/refs/tags/jdk8u432-ga.tar.gz"
version "1.8.0-432"
sha256 "6ac8ee2b6932e4632ea2c33fe2320d6ceaca50a67521fac02a67027e40437460"
license "GPL-2.0-only"

livecheck do
Expand Down Expand Up @@ -37,6 +37,10 @@ class OpenjdkAT8 < Formula
depends_on "gawk" => :build
end

on_sonoma :or_newer do
depends_on xcode: :build
end

on_linux do
depends_on "alsa-lib"
depends_on "fontconfig"
Expand Down Expand Up @@ -135,13 +139,24 @@ def install
]
ldflags << "-F#{javavm_framework_path}"
# Fix "'JavaNativeFoundation/JavaNativeFoundation.h' file not found" issue on MacOS Sonoma.
elsif MacOS.version == :sonoma
javavm_framework_path = "/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/System/Library/Frameworks"
elsif MacOS.version >= :sonoma
system "git", "clone", "https://github.com/apple/openjdk.git", "apple-openjdk"
cd "apple-openjdk" do
mkdir_p "build/Frameworks"
header_search_paths = "#{buildpath}/jdk/src/share/javavm/export #{buildpath}/jdk/src/macosx/javavm/export"
xcodebuild "install",
"-project", "apple/JavaNativeFoundation/JavaNativeFoundation.xcodeproj",
"-target", "JavaNativeFoundation",
"-configuration", "Release",
"OTHER_CFLAGS=\"-Wno-strict-prototypes\" DSTROOT=\"$(pwd)/build/Frameworks\"",
"HEADER_SEARCH_PATHS=\"#{header_search_paths}\""
end
jnf_framework_path = "#{buildpath}/apple-openjdk/build/Frameworks"
args += %W[
--with-extra-cflags=-F#{javavm_framework_path}
--with-extra-cxxflags=-F#{javavm_framework_path}
--with-extra-cflags=-F#{jnf_framework_path}
--with-extra-cxxflags=-F#{jnf_framework_path}
]
ldflags << "-F#{javavm_framework_path}"
ldflags << "-F#{jnf_framework_path}"
end
else
args += %W[
Expand Down

0 comments on commit d3955dd

Please sign in to comment.