Skip to content

Commit

Permalink
zsh: fix the build on 10.12 with Xcode 9
Browse files Browse the repository at this point in the history
Fixes #18400.

Closes #18426.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
  • Loading branch information
ilovezfs committed Sep 22, 2017
1 parent 8e0bdf6 commit b6ec413
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Formula/zsh.rb
Expand Up @@ -4,6 +4,7 @@ class Zsh < Formula
url "https://downloads.sourceforge.net/project/zsh/zsh/5.4.2/zsh-5.4.2.tar.gz"
mirror "https://www.zsh.org/pub/zsh-5.4.2.tar.gz"
sha256 "957bcdb2c57f64c02f673693ea5a7518ef24b6557aeb3a4ce222cefa6d74acc9"
revision 1

bottle do
sha256 "60029d51b0654962bf478bc0779c413bee76251ffcffde42a9f0db0654917ff8" => :high_sierra
Expand Down Expand Up @@ -31,6 +32,12 @@ class Zsh < Formula
end

def install
# Fix dyld: Symbol not found: _open_memstream
if MacOS.version == :sierra && MacOS::Xcode.installed? &&
MacOS::Xcode.version >= "9.0"
ENV["ac_cv_func_open_memstream"] = "no"
end

system "Util/preconfig" if build.head?

args = %W[
Expand Down Expand Up @@ -78,5 +85,6 @@ def install

test do
assert_equal "homebrew", shell_output("#{bin}/zsh -c 'echo homebrew'").chomp
system bin/"zsh", "-c", "printf -v hello -- '%s'"
end
end

0 comments on commit b6ec413

Please sign in to comment.