Skip to content
Closed
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
13 changes: 9 additions & 4 deletions Formula/zeromq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ class Zeromq < Formula
homepage "http://www.zeromq.org/"
url "https://github.com/zeromq/libzmq/releases/download/v4.3.1/zeromq-4.3.1.tar.gz"
sha256 "bcbabe1e2c7d0eec4ed612e10b94b112dd5f06fcefa994a0c79a45d835cd21eb"
revision 1

bottle do
cellar :any
Expand All @@ -20,7 +21,7 @@ class Zeromq < Formula
end

depends_on "asciidoc" => :build
depends_on "pkg-config" => :build
depends_on "pkg-config" => [:build, :test]
depends_on "xmlto" => :build

def install
Expand All @@ -32,9 +33,11 @@ def install

ENV["XML_CATALOG_FILES"] = "#{etc}/xml/catalog"

ENV["LIBUNWIND_LIBS"] = "-framework System"
sdk = MacOS::CLT.installed? ? "" : MacOS.sdk_path
ENV["LIBUNWIND_CFLAGS"] = "-I#{sdk}/usr/include"
# Disable libunwind support due to pkg-config problem
# https://github.com/Homebrew/homebrew-core/pull/35940#issuecomment-454177261
# ENV["LIBUNWIND_LIBS"] = "-framework System"
# sdk = MacOS::CLT.installed? ? "" : MacOS.sdk_path
# ENV["LIBUNWIND_CFLAGS"] = "-I#{sdk}/usr/include"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's probably worth deleting rather than commenting out the code (that's what the Git history is for) and leaving the link to the PR comment.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did so during brew pull --bottle


system "./autogen.sh" if build.head?
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
Expand All @@ -56,5 +59,7 @@ def install
EOS
system ENV.cc, "test.c", "-L#{lib}", "-lzmq", "-o", "test"
system "./test"
system "pkg-config", "libzmq", "--cflags"
system "pkg-config", "libzmq", "--libs"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding a test 👍

end
end