aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2010-07-09 12:40:41 -0700
committerAdam Vandenberg2010-07-16 09:09:39 -0700
commit511d309374f693231938eecfda7202c2a6ce3e4d (patch)
tree08783d129a434ec5977ef27eae3083f5f932b53c /Library
parent418902f7beabf6cf724c9e84cf5294aed5fc376e (diff)
downloadhomebrew-511d309374f693231938eecfda7202c2a6ce3e4d.tar.bz2
Add ARGV.build_head? and use it.
This allows both "--HEAD" and "-H" to be used consistently, which was the intention in the first place.
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/clojure-contrib.rb4
-rw-r--r--Library/Formula/clojure.rb2
-rw-r--r--Library/Formula/coffee-script.rb4
-rw-r--r--Library/Formula/git-flow.rb2
-rw-r--r--Library/Formula/guile.rb4
-rw-r--r--Library/Formula/id3lib.rb2
-rw-r--r--Library/Formula/libdrizzle.rb2
-rw-r--r--Library/Formula/libevent.rb2
-rw-r--r--Library/Formula/maven.rb2
-rw-r--r--Library/Formula/nginx.rb6
-rw-r--r--Library/Formula/ppl.rb2
-rw-r--r--Library/Formula/ruby.rb10
-rw-r--r--Library/Formula/schroedinger.rb2
-rw-r--r--Library/Homebrew/extend/ARGV.rb3
14 files changed, 25 insertions, 22 deletions
diff --git a/Library/Formula/clojure-contrib.rb b/Library/Formula/clojure-contrib.rb
index 576e84f20..f99729307 100644
--- a/Library/Formula/clojure-contrib.rb
+++ b/Library/Formula/clojure-contrib.rb
@@ -7,14 +7,14 @@ class ClojureContrib <Formula
homepage 'http://richhickey.github.com/clojure-contrib/branch-1.1.x/index.html'
depends_on 'clojure'
- depends_on 'maven' if ARGV.include? '--HEAD'
+ depends_on 'maven' if ARGV.build_head?
def jar
'clojure-contrib.jar'
end
def install
- if ARGV.include? '--HEAD'
+ if ARGV.build_head?
system "mvn package -Dclojure.jar=#{HOMEBREW_PREFIX}/Cellar/clojure/HEAD/clojure.jar"
system "mv target/clojure-contrib-*.jar #{jar}"
end
diff --git a/Library/Formula/clojure.rb b/Library/Formula/clojure.rb
index 5af029cb5..ce6e8b394 100644
--- a/Library/Formula/clojure.rb
+++ b/Library/Formula/clojure.rb
@@ -24,7 +24,7 @@ EOS
end
def install
- system "ant" if ARGV.include? '--HEAD'
+ system "ant" if ARGV.build_head?
prefix.install jar
(bin+'clj').write script
end
diff --git a/Library/Formula/coffee-script.rb b/Library/Formula/coffee-script.rb
index 51076f3ec..b34bab590 100644
--- a/Library/Formula/coffee-script.rb
+++ b/Library/Formula/coffee-script.rb
@@ -9,7 +9,7 @@ class CoffeeScript <Formula
# head coffee-script usually depends on head node and
# since there isn't a way to specify that just remove
# the depends_on
- depends_on :node unless ARGV.flag? '--HEAD'
+ depends_on :node unless ARGV.build_head?
def caveats
<<-EOS.undent
@@ -20,7 +20,7 @@ class CoffeeScript <Formula
brew uninstall node
brew install node --HEAD
EOS
- end if ARGV.flag? '--HEAD'
+ end if ARGV.build_head?
def install
bin.mkpath
diff --git a/Library/Formula/git-flow.rb b/Library/Formula/git-flow.rb
index cd75b1e6a..541fbfe77 100644
--- a/Library/Formula/git-flow.rb
+++ b/Library/Formula/git-flow.rb
@@ -1,7 +1,7 @@
require 'formula'
class GitFlow <Formula
- if ARGV.include? "--HEAD"
+ if ARGV.build_head?
head 'git://github.com/nvie/gitflow.git', :branch => 'develop'
else
head 'git://github.com/nvie/gitflow.git', :tag => '0.2.1'
diff --git a/Library/Formula/guile.rb b/Library/Formula/guile.rb
index 4c9f02000..2d468ff13 100644
--- a/Library/Formula/guile.rb
+++ b/Library/Formula/guile.rb
@@ -5,7 +5,7 @@ class Guile <Formula
head 'ftp://alpha.gnu.org/gnu/guile/guile-1.9.11.tar.gz'
homepage 'http://www.gnu.org/software/guile/'
- if ARGV.include? "--HEAD"
+ if ARGV.build_head?
sha1 'abd1424a927302db31395db828d4d14fa68d13f9'
else
sha1 '24cd2f06439c76d41d982a7384fe8a0fe5313b54'
@@ -27,6 +27,6 @@ class Guile <Formula
system "make install"
# A really messed up workaround required on OS X --mkhl
- lib.cd { Dir["*.dylib"].each {|p| ln_sf p, "#{File.basename(p, ".dylib")}.so" }}
+ lib.cd { Dir["*.dylib"].each {|p| ln_sf p, File.basename(p, ".dylib")+".so" }}
end
end
diff --git a/Library/Formula/id3lib.rb b/Library/Formula/id3lib.rb
index 0ff235362..31bf7c209 100644
--- a/Library/Formula/id3lib.rb
+++ b/Library/Formula/id3lib.rb
@@ -8,7 +8,7 @@ class Id3lib <Formula
def patches
{:p1 => DATA }
- end unless ARGV.include? "--HEAD"
+ end unless ARGV.build_head?
def install
system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
diff --git a/Library/Formula/libdrizzle.rb b/Library/Formula/libdrizzle.rb
index 6503e96f2..9e811f60d 100644
--- a/Library/Formula/libdrizzle.rb
+++ b/Library/Formula/libdrizzle.rb
@@ -7,7 +7,7 @@ class Libdrizzle <Formula
md5 '9b2f0ed5d9f63d0f0b9253d03c817d55'
def install
- system "./config/autorun.sh" if ARGV.include? '--HEAD'
+ system "./config/autorun.sh" if ARGV.build_head?
system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
system "make install"
end
diff --git a/Library/Formula/libevent.rb b/Library/Formula/libevent.rb
index 80f03b80b..c66dc7ddd 100644
--- a/Library/Formula/libevent.rb
+++ b/Library/Formula/libevent.rb
@@ -7,7 +7,7 @@ class Libevent <Formula
head 'git://levent.git.sourceforge.net/gitroot/levent/levent'
def install
- system "./autogen.sh" if ARGV.include? '--HEAD'
+ system "./autogen.sh" if ARGV.build_head?
ENV.j1 # Needed for Mac Pro compilation
system "./configure", "--prefix=#{prefix}"
diff --git a/Library/Formula/maven.rb b/Library/Formula/maven.rb
index 4d37a3cd4..3163eab83 100644
--- a/Library/Formula/maven.rb
+++ b/Library/Formula/maven.rb
@@ -5,7 +5,7 @@ class Maven <Formula
head 'http://www.apache.org/dist/maven/binaries/apache-maven-3.0-beta-1-bin.tar.gz'
homepage 'http://maven.apache.org/'
- if ARGV.include? "--HEAD"
+ if ARGV.build_head?
md5 '82d43745cf2f2d1d939f1139a09d6654'
else
md5 '3f829ed854cbacdaca8f809e4954c916'
diff --git a/Library/Formula/nginx.rb b/Library/Formula/nginx.rb
index 064f4882c..776ec950a 100644
--- a/Library/Formula/nginx.rb
+++ b/Library/Formula/nginx.rb
@@ -5,10 +5,10 @@ class Nginx < Formula
head 'http://nginx.org/download/nginx-0.8.44.tar.gz'
homepage 'http://nginx.org/'
- unless (ARGV & ['--HEAD', '-H']).empty?
- @md5='7158c67ba2697f7d469aa7b17bef202f'
+ if ARGV.build_head?
+ md5 'b6e175f969d03a4d3c5643aaabc6a5ff'
else
- @md5='b6e175f969d03a4d3c5643aaabc6a5ff'
+ md5 '7158c67ba2697f7d469aa7b17bef202f'
end
depends_on 'pcre'
diff --git a/Library/Formula/ppl.rb b/Library/Formula/ppl.rb
index e87ffc98a..ce69ccd66 100644
--- a/Library/Formula/ppl.rb
+++ b/Library/Formula/ppl.rb
@@ -5,7 +5,7 @@ class Ppl <Formula
head 'http://www.cs.unipr.it/ppl/Download/ftp/snapshots/ppl-0.11pre24.tar.bz2'
homepage 'http://www.cs.unipr.it/ppl/'
- if ARGV.include? "--HEAD"
+ if ARGV.build_head?
md5 '14f4d5297a161f9ba22c33945fc61a27'
else
md5 '5667111f53150618b0fa522ffc53fc3e'
diff --git a/Library/Formula/ruby.rb b/Library/Formula/ruby.rb
index 2817b9dbb..53269b0c1 100644
--- a/Library/Formula/ruby.rb
+++ b/Library/Formula/ruby.rb
@@ -6,17 +6,17 @@ class Ruby <Formula
url 'http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p378.tar.gz'
homepage 'http://www.ruby-lang.org/en/'
head 'http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_2/', :using => :svn
- md5 '9fc5941bda150ac0a33b299e1e53654c' unless ARGV.include? '--HEAD'
+ md5 '9fc5941bda150ac0a33b299e1e53654c'
depends_on 'readline'
-
+
def options
[
["--with-suffix", "Add a 19 suffix to commands"],
["--with-doc", "Install with the Ruby documentation"],
]
end
-
+
def install
fails_with_llvm
@@ -35,14 +35,14 @@ class Ruby <Formula
system "make install-doc" if ARGV.include? "--with-doc"
end
-
+
def caveats; <<-EOS
If you install gems with the RubyGems installed with this formula they will
be installed to this formula's prefix. This needs to be fixed, as for example,
upgrading Ruby will lose all your gems.
EOS
end
-
+
def skip_clean? path
# TODO only skip the clean for the files that need it, we didn't get a
# comment about why we're skipping the clean, so you'll need to figure
diff --git a/Library/Formula/schroedinger.rb b/Library/Formula/schroedinger.rb
index 809575bc6..05818dc91 100644
--- a/Library/Formula/schroedinger.rb
+++ b/Library/Formula/schroedinger.rb
@@ -10,7 +10,7 @@ class Schroedinger <Formula
depends_on 'orc'
def install
- system "autoreconf -i -f" if ARGV.include? '--HEAD'
+ system "autoreconf -i -f" if ARGV.build_head?
system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
system "make install"
end
diff --git a/Library/Homebrew/extend/ARGV.rb b/Library/Homebrew/extend/ARGV.rb
index 24231292d..e87048c0f 100644
--- a/Library/Homebrew/extend/ARGV.rb
+++ b/Library/Homebrew/extend/ARGV.rb
@@ -51,6 +51,9 @@ module HomebrewArgvExtension
def interactive?
flag? '--interactive'
end
+ def build_head?
+ flag? '--HEAD'
+ end
def flag? flag
options.each do |arg|