aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/rust.rb
diff options
context:
space:
mode:
authorDaniel Luz2012-08-26 00:28:54 -0300
committerAdam Vandenberg2012-08-26 13:00:08 -0700
commit6ae780f6d20c9e834c8edec2401036870df992eb (patch)
treecd9cd1e59c47ce446f6fc33df1c73f8c9f42553b /Library/Formula/rust.rb
parent1be1e61de7c503aa0d35668649f5a1bb38d26af2 (diff)
downloadhomebrew-6ae780f6d20c9e834c8edec2401036870df992eb.tar.bz2
rust: fix compilation for Mountain Lion/clang 4.0
Closes #14457. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula/rust.rb')
-rw-r--r--Library/Formula/rust.rb25
1 files changed, 24 insertions, 1 deletions
diff --git a/Library/Formula/rust.rb b/Library/Formula/rust.rb
index e2d15c061..a5eca9a45 100644
--- a/Library/Formula/rust.rb
+++ b/Library/Formula/rust.rb
@@ -10,8 +10,16 @@ class Rust < Formula
cause "cannot initialize a parameter of type 'volatile long long *' with an rvalue of type 'int *'"
end
+ def patches
+ # fix for Mountain Lion's clang 4.0
+ # should be part of next release (commit 50f2db4)
+ DATA
+ end
+
def install
- system "./configure", "--prefix=#{prefix}"
+ args = ["--prefix=#{prefix}"]
+ args << "--enable-clang" if ENV.compiler == :clang
+ system "./configure", *args
system "make"
system "make install"
end
@@ -22,3 +30,18 @@ class Rust < Formula
system "#{bin}/cargo"
end
end
+
+__END__
+diff --git a/configure b/configure
+index 06bddcc..040bae9 100755
+--- a/configure
++++ b/configure
+@@ -400,7 +400,7 @@ then
+ | cut -d ' ' -f 2)
+
+ case $CFG_CLANG_VERSION in
+- (3.0svn | 3.0 | 3.1)
++ (3.0svn | 3.0 | 3.1 | 4.0)
+ step_msg "found ok version of CLANG: $CFG_CLANG_VERSION"
+ CFG_C_COMPILER="clang"
+ ;;