blob: 1ec21feb0ec9a6c1b5f5a2a7ea43883d5a75f61f (
plain)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
require "formula"
class Valgrind < Formula
homepage "http://www.valgrind.org/"
stable do
url "http://valgrind.org/downloads/valgrind-3.10.1.tar.bz2"
sha1 "15518427de842547ffa84eff8b2b67f3b16581a8"
# Look for headers in the SDK on Xcode-only systems: https://bugs.kde.org/show_bug.cgi?id=295084
# Fix duplicate symbols error on Lion: https://bugs.kde.org/show_bug.cgi?id=307415
patch do
url "https://gist.githubusercontent.com/jacknagel/369bedc191e0a0795358/raw/a71e6c0fdcb786fdfde2fc33d71d555b18bcfe8d/valgrind-sdk-paths-Makefile-in.diff"
sha1 "4210431e2a12c191875391b144b9a45cc76496c1"
end
# Revisit the below requirement with each release
depends_on MaximumMacOSRequirement => :mavericks
end
bottle do
sha1 "db2fd4ccbd7fb2d58a38480c76a312d00292f5d8" => :mavericks
sha1 "98f60f0a39a6c97633ed5c6ff5a675979fc92861" => :mountain_lion
end
head do
url "svn://svn.valgrind.org/valgrind/trunk"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
# Look for headers in the SDK on Xcode-only systems: https://bugs.kde.org/show_bug.cgi?id=295084
# Fix duplicate symbols error on Lion: https://bugs.kde.org/show_bug.cgi?id=307415
patch do
url "https://gist.githubusercontent.com/jacknagel/cd26a902d72aabd0b51d/raw/1a61a328a87a728dccbeef0594f6fe335e9bf917/valgrind-sdk-paths-Makefile-am.diff"
sha1 "d004d6af97f7f74d49d09dc513b4c67488da0a45"
end
end
depends_on :macos => :snow_leopard
# 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}
]
if MacOS.prefer_64_bit?
args << "--enable-only64bit" << "--build=amd64-darwin"
else
args << "--enable-only32bit"
end
ext = build.head? ? "am" : "in"
inreplace "coregrind/Makefile.#{ext}", "@@HOMEBREW_SDKROOT@@", MacOS.sdk_path.to_s
system "./autogen.sh" if build.head?
system "./configure", *args
system "make"
system "make", "install"
end
test do
system "#{bin}/valgrind", "ls", "-l"
end
end
|