aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorChongyu Zhu2014-01-22 01:13:09 +0800
committerMike McQuaid2014-01-21 10:24:51 -0800
commitb282783341a010bc5eb227c0f7d01a5a95441899 (patch)
tree905fd0b1325750c0db6c4e1518115bd7f70f539e /Library/Formula
parent5fc088cf46939d2250071f88642c5d5b344877a9 (diff)
downloadhomebrew-b282783341a010bc5eb227c0f7d01a5a95441899.tar.bz2
valgrind: more fixes for mavericks
This commit consists of two minor tweaks: - Use the patch from Valgrind Bug Tracker, not the modified nonsense on gist. - With Clang 3.4 and later (unrecognized option '-mno-dynamic-no-pic' has become a fatal error, which was simply a warning before). Closes #26065. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/valgrind.rb17
1 files changed, 13 insertions, 4 deletions
diff --git a/Library/Formula/valgrind.rb b/Library/Formula/valgrind.rb
index 8ea724c67..2b597f6c8 100644
--- a/Library/Formula/valgrind.rb
+++ b/Library/Formula/valgrind.rb
@@ -25,14 +25,23 @@ class Valgrind < Formula
# https://bugs.kde.org/show_bug.cgi?id=307415
# 3: Fix for 10.9 Mavericks. From upstream bug:
# https://bugs.kde.org/show_bug.cgi?id=326724#c12
- 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
- p << 'https://gist.github.com/mckelvin/8514475/raw/1939e5dfeb1dfc2974582f0dbbf5e3aaeb46d17a/valgrind-3.9.0-marericks.patch' if MacOS.version == :mavericks
+ p = { :p1 => [] }
+ p[:p1] << 'https://gist.github.com/raw/3784836/f046191e72445a2fc8491cb6aeeabe84517687d9/patch1.diff' unless MacOS::CLT.installed?
+ p[:p1] << 'https://gist.github.com/raw/3784930/dc8473c0ac5274f6b7d2eb23ce53d16bd0e2993a/patch2.diff' if MacOS.version == :lion
+ p[:p0] = 'http://bugsfiles.kde.org/attachment.cgi?id=83590' if MacOS.version == :mavericks
p
end
def install
+ if (build.head? || MacOS.version == :mavericks) && ENV.compiler == :clang
+ # Clang does not support '-mno-dynamic-no-pic'. Before clang 3.4,
+ # this is simply a warning, however, with clang 3.4 and later,
+ # this becomes a fatal error.
+ #
+ # Reported upstream in https://bugs.kde.org/show_bug.cgi?id=330257
+ inreplace 'Makefile.all.am', '-mno-dynamic-no-pic', ''
+ end
+
args = %W[
--disable-dependency-tracking
--prefix=#{prefix}