Skip to content

Commit

Permalink
openjdk: unbundle freetype on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
cho-m authored and carlocab committed Sep 19, 2024
1 parent 217d336 commit af15341
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Formula/o/openjdk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class Openjdk < Formula
depends_on "autoconf" => :build
depends_on "pkg-config" => :build
depends_on xcode: :build
depends_on "freetype"
depends_on "giflib"
depends_on "harfbuzz"
depends_on "jpeg-turbo"
Expand Down Expand Up @@ -53,7 +54,6 @@ class Openjdk < Formula
on_linux do
depends_on "alsa-lib"
depends_on "fontconfig"
depends_on "freetype"
depends_on "libx11"
depends_on "libxext"
depends_on "libxi"
Expand Down Expand Up @@ -122,6 +122,7 @@ def install
--with-version-build=#{revision}
--without-version-opt
--without-version-pre
--with-freetype=system
--with-giflib=system
--with-harfbuzz=system
--with-lcms=system
Expand All @@ -137,16 +138,20 @@ def install
args += if OS.mac?
ldflags << "-headerpad_max_install_names"

# Allow unbundling `freetype` on macOS
inreplace "make/autoconf/lib-freetype.m4", '= "xmacosx"', '= ""'

%W[
--enable-dtrace
--with-freetype-include=#{Formula["freetype"].opt_include}
--with-freetype-lib=#{Formula["freetype"].opt_lib}
--with-sysroot=#{MacOS.sdk_path}
]
else
%W[
--with-x=#{HOMEBREW_PREFIX}
--with-cups=#{HOMEBREW_PREFIX}
--with-fontconfig=#{HOMEBREW_PREFIX}
--with-freetype=system
--with-stdc++lib=dynamic
]
end
Expand Down

0 comments on commit af15341

Please sign in to comment.