Module: OS::Mac::Formula Private
This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.
Instance Method Summary collapse
-
#common_sandbox_env(home) ⇒ Hash{Symbol => String}
private
The sandbox denies
mach-lookup, so AWT cannot reach the WindowServer and aborts the JVM. - #std_cmake_args(install_prefix: prefix, install_libdir: "lib", find_framework: "LAST") ⇒ Array<String> private
- #std_swift_args ⇒ Array<String> private
- #std_zig_args(prefix: self.prefix, release_mode: :fast, cpu: nil) ⇒ Array<String> private
-
#test_sandbox_env(testpath) ⇒ Hash{Symbol => String}
private
The
javalauncher decides from the options it parses itself, its arguments andJDK_JAVA_OPTIONS, whether to show a jar'sSplashScreen-Image, which aborts under the sandbox like the rest of AWT. - #valid_platform? ⇒ Boolean private
Instance Method Details
#common_sandbox_env(home) ⇒ Hash{Symbol => String}
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
The sandbox denies mach-lookup, so AWT cannot reach the WindowServer and aborts
the JVM. Headless AWT never connects to it and still renders images off-screen.
59 60 61 62 |
# File 'extend/os/mac/formula.rb', line 59 def common_sandbox_env(home) env = super env.merge(_JAVA_OPTIONS: [env[:_JAVA_OPTIONS], JAVA_HEADLESS_OPTION].compact.join(" ")) end |
#std_cmake_args(install_prefix: prefix, install_libdir: "lib", find_framework: "LAST") ⇒ Array<String>
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
26 27 28 29 30 31 32 33 34 35 36 |
# File 'extend/os/mac/formula.rb', line 26 def std_cmake_args(install_prefix: prefix, install_libdir: "lib", find_framework: "LAST") args = super # Ensure CMake is using the same SDK we are using. sdk = MacOS.sdk_for_formula(self) raise "No macOS SDK found. Install Xcode or the Command Line Tools." if sdk.nil? args << "-DCMAKE_OSX_SYSROOT=#{sdk.path}" args end |
#std_swift_args ⇒ Array<String>
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
39 40 41 |
# File 'extend/os/mac/formula.rb', line 39 def std_swift_args ["--disable-sandbox"].concat(super) end |
#std_zig_args(prefix: self.prefix, release_mode: :fast, cpu: nil) ⇒ Array<String>
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
50 51 52 53 54 |
# File 'extend/os/mac/formula.rb', line 50 def std_zig_args(prefix: self.prefix, release_mode: :fast, cpu: nil) args = super args << "-fno-rosetta" if ::Hardware::CPU.arm? args end |
#test_sandbox_env(testpath) ⇒ Hash{Symbol => String}
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
The java launcher decides from the options it parses itself, its arguments and
JDK_JAVA_OPTIONS, whether to show a jar's SplashScreen-Image, which aborts under
the sandbox like the rest of AWT. OpenJDK's configure rejects a boot JDK that reports
picked-up options, so the build phase must not see this variable.
69 70 71 |
# File 'extend/os/mac/formula.rb', line 69 def test_sandbox_env(testpath) super.merge(JDK_JAVA_OPTIONS: JAVA_HEADLESS_OPTION) end |
#valid_platform? ⇒ Boolean
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
15 16 17 |
# File 'extend/os/mac/formula.rb', line 15 def valid_platform? supports_macos? end |