Skip to content

Commit

Permalink
rust: fix compilation for Mountain Lion/clang 4.0
Browse files Browse the repository at this point in the history
Closes Homebrew#14457.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
  • Loading branch information
mernen authored and adamv committed Aug 26, 2012
1 parent 55f4ebd commit b6bfbbe
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion rust.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -22,3 +30,18 @@ def test
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"
;;

0 comments on commit b6bfbbe

Please sign in to comment.