Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Formula/openjdk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class Openjdk < Formula
url "https://github.com/openjdk/jdk18u/archive/jdk-18.0.2.1-ga.tar.gz"
sha256 "06fad73665af281e36e1cc5fb0c8ed5e88e1e821989f1421539cb012065d7722"
license "GPL-2.0-only" => { with: "Classpath-exception-2.0" }
revision 1

livecheck do
url :stable
Expand Down Expand Up @@ -40,6 +41,9 @@ class Openjdk < Formula
depends_on "unzip"
depends_on "zip"

# FIXME: This should not be needed because of the `-rpath` flag
# we set in `--with-extra-ldflags`, but this configuration
# does not appear to have made it to the linker.
ignore_missing_libraries "libjvm.so"
end

Expand Down Expand Up @@ -86,10 +90,12 @@ def install
--without-version-pre
]

ldflags = ["-Wl,-rpath,#{loader_path}/server"]
args += if OS.mac?
ldflags << "-headerpad_max_install_names"

%W[
--enable-dtrace
--with-extra-ldflags=-headerpad_max_install_names
--with-sysroot=#{MacOS.sdk_path}
]
else
Expand All @@ -99,6 +105,7 @@ def install
--with-fontconfig=#{HOMEBREW_PREFIX}
]
end
args << "--with-extra-ldflags=#{ldflags.join(" ")}"

chmod 0755, "configure"
system "./configure", *args
Expand Down
11 changes: 9 additions & 2 deletions Formula/openjdk@11.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class OpenjdkAT11 < Formula
url "https://github.com/openjdk/jdk11u/archive/refs/tags/jdk-11.0.16.1-ga.tar.gz"
sha256 "3008e50e258a5e9a488a814df2998b9823b6c2959d6a5a85221d333534d2f24c"
license "GPL-2.0-only"
revision 1

livecheck do
url :stable
Expand Down Expand Up @@ -37,6 +38,9 @@ class OpenjdkAT11 < Formula
depends_on "unzip"
depends_on "zip"

# FIXME: This should not be needed because of the `-rpath` flag
# we set in `--with-extra-ldflags`, but this configuration
# does not appear to have made it to the linker.
ignore_missing_libraries "libjvm.so"
end

Expand Down Expand Up @@ -82,11 +86,13 @@ def install
--without-version-pre
]

ldflags = ["-Wl,-rpath,#{loader_path}/server"]
args += if OS.mac?
ldflags << "-headerpad_max_install_names"

%W[
--enable-dtrace
--with-sysroot=#{MacOS.sdk_path}
--enable-dtrace=auto
--with-extra-ldflags=-headerpad_max_install_names
]
else
%W[
Expand All @@ -95,6 +101,7 @@ def install
--with-fontconfig=#{HOMEBREW_PREFIX}
]
end
args << "--with-extra-ldflags=#{ldflags.join(" ")}"

chmod 0755, "configure"
system "./configure", *args
Expand Down
9 changes: 8 additions & 1 deletion Formula/openjdk@17.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class OpenjdkAT17 < Formula
url "https://github.com/openjdk/jdk17u/archive/jdk-17.0.4.1-ga.tar.gz"
sha256 "9b3e2558590fbb06ae4c02355919b1f75af9c696b786b113088ab6630e425824"
license "GPL-2.0-only" => { with: "Classpath-exception-2.0" }
revision 1

livecheck do
url :stable
Expand Down Expand Up @@ -39,6 +40,9 @@ class OpenjdkAT17 < Formula
depends_on "unzip"
depends_on "zip"

# FIXME: This should not be needed because of the `-rpath` flag
# we set in `--with-extra-ldflags`, but this configuration
# does not appear to have made it to the linker.
ignore_missing_libraries "libjvm.so"
end

Expand Down Expand Up @@ -85,10 +89,12 @@ def install
--without-version-pre
]

ldflags = ["-Wl,-rpath,#{loader_path}/server"]
args += if OS.mac?
ldflags << "-headerpad_max_install_names"

%W[
--enable-dtrace
--with-extra-ldflags=-headerpad_max_install_names
--with-sysroot=#{MacOS.sdk_path}
]
else
Expand All @@ -98,6 +104,7 @@ def install
--with-fontconfig=#{HOMEBREW_PREFIX}
]
end
args << "--with-extra-ldflags=#{ldflags.join(" ")}"

chmod 0755, "configure"
system "./configure", *args
Expand Down