Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Update rust recipe. #15073

Closed
wants to merge 1 commit into from

4 participants

@awreece

add head

build with newest clang

don't hardcode homebrew path

don't patch if building from head

depend on llvm to avoid duplicate package

Library/Formula/rust.rb
@@ -5,6 +5,10 @@ class Rust < Formula
url 'http://dl.rust-lang.org/dist/rust-0.3.1.tar.gz'
sha256 'eb99ff2e745ecb6eaf01d4caddebce397a2b4cda6836a051cb2d493b9cedd018'
+ depends_on 'llvm'
+
+ head 'https://github.com/mozilla/rust.git'
@mistydemeo Owner

head should go above depends_on, not below.

@awreece
awreece added a note

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Library/Formula/rust.rb
@@ -5,6 +5,10 @@ class Rust < Formula
url 'http://dl.rust-lang.org/dist/rust-0.3.1.tar.gz'
sha256 'eb99ff2e745ecb6eaf01d4caddebce397a2b4cda6836a051cb2d493b9cedd018'
+ depends_on 'llvm'
+
+ head 'https://github.com/mozilla/rust.git'
+
fails_with :clang do
build 318
@mistydemeo Owner

Were you able to test this with the current version of clang? Does it work now?

@awreece
awreece added a note

Yes, this works for both building from head and from the tarball.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@jacknagel
Owner

Why do we need a dep on LLVM? Doesn't rust ship its own copy?

@awreece

Yeah it does (ship its own copy), but isn't that something we'd rather avoid?

@jacknagel
Owner

Perhaps, but doesn't it merit at least a mention in the commit message?

@awreece

Good call, I accidentally deleted that while rebasing.

@awreece awreece Update rust recipe.
add head
build with newest clang
don't hardcode homebrew path
don't patch if building from head
depend on llvm rather than download extra copy
708dd2f
@adamv
Owner

Passing on this and letting rust vendor its own LLVM.

@adamv adamv closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 24, 2012
  1. @awreece

    Update rust recipe.

    awreece authored
    add head
    build with newest clang
    don't hardcode homebrew path
    don't patch if building from head
    depend on llvm rather than download extra copy
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 2 deletions.
  1. +7 −2 Library/Formula/rust.rb
View
9 Library/Formula/rust.rb
@@ -5,6 +5,10 @@ class Rust < Formula
url 'http://dl.rust-lang.org/dist/rust-0.3.1.tar.gz'
sha256 'eb99ff2e745ecb6eaf01d4caddebce397a2b4cda6836a051cb2d493b9cedd018'
+ head 'https://github.com/mozilla/rust.git'
+
+ depends_on 'llvm'
+
fails_with :clang do
build 318
cause "cannot initialize a parameter of type 'volatile long long *' with an rvalue of type 'int *'"
@@ -13,12 +17,13 @@ class Rust < Formula
def patches
# fix for Mountain Lion's clang 4.0
# should be part of next release (commit 50f2db4)
- DATA
+ DATA unless build.head?
end
def install
args = ["--prefix=#{prefix}"]
args << "--enable-clang" if ENV.compiler == :clang
+ args << "--llvm-root=#{HOMEBREW_PREFIX}"
system "./configure", *args
system "make"
system "make install"
@@ -41,7 +46,7 @@ def test
case $CFG_CLANG_VERSION in
- (3.0svn | 3.0 | 3.1)
-+ (3.0svn | 3.0 | 3.1 | 4.0)
++ (3.0svn | 3.0 | 3.1 | 4.0 | 4.1)
step_msg "found ok version of CLANG: $CFG_CLANG_VERSION"
CFG_C_COMPILER="clang"
;;
Something went wrong with that request. Please try again.