diff options
| author | Chongyu Zhu | 2015-01-15 14:32:44 +0800 |
|---|---|---|
| committer | Mike McQuaid | 2015-01-15 11:15:14 +0000 |
| commit | b135d58c8a570cf7535ad54f29bac7f7e3252faf (patch) | |
| tree | 1175de825030208420d78ce985e836cdab97e978 /Library/Formula | |
| parent | 007faf4b0169953e1ccd986977b256f4261b76d1 (diff) | |
| download | homebrew-b135d58c8a570cf7535ad54f29bac7f7e3252faf.tar.bz2 | |
google-perftools: fix strict audit failures (use https, add test)
Closes #35879.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/google-perftools.rb | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/Library/Formula/google-perftools.rb b/Library/Formula/google-perftools.rb index a1611bf58..986032f78 100644 --- a/Library/Formula/google-perftools.rb +++ b/Library/Formula/google-perftools.rb @@ -1,5 +1,5 @@ class GooglePerftools < Formula - homepage "http://code.google.com/p/gperftools/" + homepage "https://code.google.com/p/gperftools/" url "https://googledrive.com/host/0B6NtGsLhIcf7MWxMMF9JdTN3UVk/gperftools-2.4.tar.gz" sha1 "13b904d0d1f220e43e4495f3403ee280c6da26ea" @@ -20,6 +20,25 @@ class GooglePerftools < Formula system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" system "make" - system "make install" + system "make", "install" + end + + test do + (testpath/"test.c").write <<-EOS.undent + #include <assert.h> + #include <gperftools/tcmalloc.h> + + int main() + { + void *p1 = tc_malloc(10); + assert(p1 != NULL); + + tc_free(p1); + + return 0; + } + EOS + system ENV.cc, "test.c", "-ltcmalloc", "-o", "test" + system "./test" end end |
