2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-10-10 22:39:59 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class GooglePerftools < Formula
|
2012-08-28 17:16:53 +00:00
|
|
|
homepage 'http://code.google.com/p/gperftools/'
|
2014-03-05 07:22:08 +00:00
|
|
|
url 'https://gperftools.googlecode.com/files/gperftools-2.1.tar.gz'
|
2013-08-02 14:30:00 +00:00
|
|
|
sha1 'b799b99d9f021988bbc931db1c21b2f94826d4f0'
|
2009-10-10 22:39:59 +00:00
|
|
|
|
2012-03-18 20:33:24 +00:00
|
|
|
fails_with :llvm do
|
|
|
|
build 2326
|
|
|
|
cause "Segfault during linking"
|
|
|
|
end
|
2011-01-22 21:45:20 +00:00
|
|
|
|
2013-11-12 13:08:42 +00:00
|
|
|
# * DATA is incorporated upstream, remove on next version update
|
|
|
|
# * configure patch removes __thread support, which breaks tcmalloc since it internally calls malloc as well
|
|
|
|
# upstream: https://code.google.com/p/gperftools/issues/detail?id=573
|
2014-03-17 00:35:08 +00:00
|
|
|
patch :DATA
|
|
|
|
patch do
|
2014-04-26 19:48:32 +00:00
|
|
|
url "https://gist.githubusercontent.com/JustSid/7430366/raw/54979ac61602eec5e59223164cb1f0d136044d1f/gistfile1.txt"
|
2014-03-17 00:35:08 +00:00
|
|
|
sha1 "4fde81e106b31198622db587fea51f01e2640789"
|
2013-10-29 18:47:58 +00:00
|
|
|
end
|
|
|
|
|
2011-03-21 21:24:22 +00:00
|
|
|
def install
|
2010-02-27 07:12:53 +00:00
|
|
|
ENV.append_to_cflags '-D_XOPEN_SOURCE'
|
2011-12-03 17:03:10 +00:00
|
|
|
system "./configure", "--disable-dependency-tracking",
|
2010-02-27 07:12:53 +00:00
|
|
|
"--prefix=#{prefix}"
|
2009-10-10 22:39:59 +00:00
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
2013-10-29 18:47:58 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
--- a/src/static_vars.cc
|
|
|
|
+++ b/src/static_vars.cc
|
|
|
|
@@ -37,6 +37,7 @@
|
|
|
|
#include "common.h"
|
|
|
|
#include "sampler.h" // for Sampler
|
|
|
|
#include "base/googleinit.h"
|
|
|
|
+#include <pthread.h>
|
|
|
|
|
|
|
|
namespace tcmalloc {
|