aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authornibbles 2bits2012-09-25 16:22:28 -0700
committerAdam Vandenberg2012-09-25 19:49:20 -0700
commit34deb8f80abf97ca2da04f09e5ad11f18795e36b (patch)
tree6c7b0224834a79a6fa1d0de12a77559fadf4404a /Library
parent4c0b143efa14586f6d9efac69286f78b0a34a602 (diff)
downloadhomebrew-34deb8f80abf97ca2da04f09e5ad11f18795e36b.tar.bz2
valgrind 3.8.1
- Upgrade to 3.8.1 - Remove the __bzero patch because it works now. - Move the existing patch into a gist - Add a patch supplied in the issue below to fix compiling on Lion. - Patch reported upstream and noted in comments - Add a `--disable-dependency-tracking` - Remove the `--mandir` because it installs correctly. - Remove the `AR=ar` from the make command. It uses `/usr/bin/ar` - Works with superenv - passes `brew test -v valgrind` on Lion & ML using XCode-4.5 Fixes #14986 #14706 Closes #15122. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/valgrind.rb60
1 files changed, 16 insertions, 44 deletions
diff --git a/Library/Formula/valgrind.rb b/Library/Formula/valgrind.rb
index 9bb48de39..c2a0fc858 100644
--- a/Library/Formula/valgrind.rb
+++ b/Library/Formula/valgrind.rb
@@ -5,8 +5,8 @@ class Valgrind < Formula
# Valgrind 3.7.0 drops support for OS X 10.5
if MacOS.version >= 10.6
- url 'http://valgrind.org/downloads/valgrind-3.8.0.tar.bz2'
- sha1 '074b09e99b09634f1efa6f7f0f87c7a541fb9b0d'
+ url 'http://valgrind.org/downloads/valgrind-3.8.1.tar.bz2'
+ sha1 'aa7a3b0b9903f59a11ae518874852e8ccb12751c'
else
url "http://valgrind.org/downloads/valgrind-3.6.1.tar.bz2"
md5 "2c3aa122498baecc9d69194057ca88f5"
@@ -23,16 +23,21 @@ class Valgrind < Formula
skip_clean 'lib'
def patches
- # For Xcode-only systems, we have to patch hard-coded paths, use xcrun and
- # add missing CFLAGS. See: https://bugs.kde.org/show_bug.cgi?id=295084
- DATA
- end unless MacOS::CLT.installed?
+ # 1: For Xcode-only systems, we have to patch hard-coded paths, use xcrun &
+ # add missing CFLAGS. See: https://bugs.kde.org/show_bug.cgi?id=295084
+ # 2: Fix for 10.7.4 w/XCode-4.5, duplicate symbols. Reported upstream in
+ # https://bugs.kde.org/show_bug.cgi?id=307415
+ p = []
+ p << 'https://gist.github.com/raw/3784836/f046191e72445a2fc8491cb6aeeabe84517687d9/patch1.diff' unless MacOS::CLT.installed?
+ p << 'https://gist.github.com/raw/3784930/dc8473c0ac5274f6b7d2eb23ce53d16bd0e2993a/patch2.diff' if MacOS.version == :lion
+ return p.empty? ? nil : p
+ end
def install
- # avoid undefined symbol __bzero
- ENV.remove_from_cflags "-mmacosx-version-min=#{MacOS.version}"
-
- args = ["--prefix=#{prefix}", "--mandir=#{man}"]
+ args = %W[
+ --disable-dependency-tracking
+ --prefix=#{prefix}
+ ]
if MacOS.prefer_64_bit?
args << "--enable-only64bit" << "--build=amd64-darwin"
else
@@ -41,7 +46,7 @@ class Valgrind < Formula
system "./autogen.sh" if build.head?
system "./configure", *args
- system "make", "AR=ar" # have to set AR or valgrind picks cc (WTF?)
+ system 'make'
system "make install"
end
@@ -49,36 +54,3 @@ class Valgrind < Formula
system "#{bin}/valgrind", "ls", "-l"
end
end
-
-__END__
-diff --git a/coregrind/Makefile.in b/coregrind/Makefile.in
-index d62cf92..477b069 100644
---- a/coregrind/Makefile.in
-+++ b/coregrind/Makefile.in
-@@ -82,10 +82,10 @@ bin_PROGRAMS = valgrind$(EXEEXT) vgdb$(EXEEXT)
- @VGCONF_OS_IS_DARWIN_TRUE@ m_mach/vm_map.h
-
- @VGCONF_OS_IS_DARWIN_TRUE@am__append_10 = \
--@VGCONF_OS_IS_DARWIN_TRUE@ /usr/include/mach/mach_vm.defs \
--@VGCONF_OS_IS_DARWIN_TRUE@ /usr/include/mach/task.defs \
--@VGCONF_OS_IS_DARWIN_TRUE@ /usr/include/mach/thread_act.defs \
--@VGCONF_OS_IS_DARWIN_TRUE@ /usr/include/mach/vm_map.defs
-+@VGCONF_OS_IS_DARWIN_TRUE@ $(HOMEBREW_SDKROOT)/usr/include/mach/mach_vm.defs \
-+@VGCONF_OS_IS_DARWIN_TRUE@ $(HOMEBREW_SDKROOT)/usr/include/mach/task.defs \
-+@VGCONF_OS_IS_DARWIN_TRUE@ $(HOMEBREW_SDKROOT)/usr/include/mach/thread_act.defs \
-+@VGCONF_OS_IS_DARWIN_TRUE@ $(HOMEBREW_SDKROOT)/usr/include/mach/vm_map.defs
-
- @VGCONF_HAVE_PLATFORM_SEC_TRUE@am__append_11 = libcoregrind-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a
- @ENABLE_LINUX_TICKET_LOCK_PRIMARY_TRUE@am__append_12 = \
-diff --git a/coregrind/link_tool_exe_darwin.in b/coregrind/link_tool_exe_darwin.in
-index bf483a9..8474346 100644
---- a/coregrind/link_tool_exe_darwin.in
-+++ b/coregrind/link_tool_exe_darwin.in
-@@ -138,7 +138,7 @@ die "Can't find '-arch archstr' in command line"
-
-
- # build the command line
--my $cmd = "/usr/bin/ld";
-+my $cmd = "ld";
-
- $cmd = "$cmd -static";