diff --git a/Formula/gperftools.rb b/Formula/gperftools.rb index 7eae75b70c..f6c9899235 100644 --- a/Formula/gperftools.rb +++ b/Formula/gperftools.rb @@ -3,6 +3,7 @@ class Gperftools < Formula homepage "https://github.com/gperftools/gperftools" url "https://github.com/gperftools/gperftools/releases/download/gperftools-2.5/gperftools-2.5.tar.gz" sha256 "6fa2748f1acdf44d750253e160cf6e2e72571329b42e563b455bde09e9e85173" + head "https://github.com/gperftools/gperftools.git" bottle do cellar :any @@ -11,13 +12,32 @@ class Gperftools < Formula sha256 "6036aafcbbce98242174d9481b14112ec947598452f493878b1394d08e6ca275" => :mavericks end + # Needed for stable due to the patch; otherwise, just head + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "libtool" => :build + fails_with :llvm do build 2326 cause "Segfault during linking" end + # Prevents build failure on Xcode >= 7.3: + # Undefined symbols for architecture x86_64: + # "operator delete(void*, unsigned long)", referenced from: + # ProcMapsIterator::~ProcMapsIterator() in libsysinfo.a(sysinfo.o) + # Reported 17 April 2016: gperftools/gperftools#794 + patch do + url "https://raw.githubusercontent.com/Homebrew/patches/edb49c752c0c02eb9e47bd2ab9788d504fd5b495/gperftools/revert-sized-delete-aliases.patch" + sha256 "49eb4f2ac52ad38723d3bf371e7d682644ef09ee7c1e2e2098e69b6c085153b6" + end + def install ENV.append_to_cflags "-D_XOPEN_SOURCE" + + # Needed for stable due to the patch; otherwise, just head + system "autoreconf", "-fiv" + system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" system "make"