-
Notifications
You must be signed in to change notification settings - Fork 1
/
valgrind.rb
51 lines (41 loc) · 1.45 KB
/
valgrind.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
class Valgrind < Formula
desc "Dynamic analysis tools (memory, debug, profiling)"
homepage "http://www.valgrind.org/"
stable do
url "https://sourceware.org/pub/valgrind/valgrind-3.14.0.tar.bz2"
mirror "https://dl.bintray.com/homebrew/mirror/valgrind-3.14.0.tar.bz2"
sha256 "037c11bfefd477cc6e9ebe8f193bb237fe397f7ce791b4a4ce3fa1c6a520baa5"
depends_on :maximum_macos => :high_sierra
end
bottle do
sha256 "7869473ca1009d871dfcb496cc4d08e0318315d18721854ef42960b76e2ef64d" => :high_sierra
sha256 "5ac984d472025c7bbc081e3be88b31f709944cf924945ebe85427f00d7cca73e" => :sierra
end
head do
url "https://github.com/LouisBrunner/valgrind-macos.git"
depends_on "automake" => :build
depends_on "libtool" => :build
end
# Valgrind needs vcpreload_core-*-darwin.so to have execute permissions.
# See #2150 for more information.
skip_clean "lib/valgrind"
def install
args = %W[
--disable-dependency-tracking
--prefix=#{prefix}
--enable-only64bit
--build=amd64-darwin
]
system "./autogen.sh" if build.head?
# Look for headers in the SDK on Xcode-only systems: https://bugs.kde.org/show_bug.cgi?id=295084
unless MacOS::CLT.installed?
inreplace "coregrind/Makefile.in", %r{(\s)(?=/usr/include/mach/)}, '\1'+MacOS.sdk_path.to_s
end
system "./configure", *args
system "make"
system "make", "install"
end
test do
system "#{bin}/valgrind", "ls", "-l"
end
end