forked from Homebrew/legacy-homebrew
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the upstream binaries to avoid building a copy of Qt. Fixes Homebrew#11225. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
- Loading branch information
1 parent
5475962
commit 885385e
Showing
1 changed file
with
20 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,30 @@ | ||
require 'formula' | ||
|
||
class NeedsSnowLeopardOrNewer < Requirement | ||
def satisfied? | ||
MacOS.snow_leopard? | ||
end | ||
|
||
def message | ||
"PhantomJS requires Mac OS X 10.6 (Snow Leopard) or newer." | ||
end | ||
end | ||
|
||
class Phantomjs < Formula | ||
url "https://phantomjs.googlecode.com/files/phantomjs-1.4.1-source.tar.gz" | ||
head "https://github.com/ariya/phantomjs.git" | ||
url "http://phantomjs.googlecode.com/files/phantomjs-1.5.0-macosx-static.zip" | ||
homepage 'http://www.phantomjs.org/' | ||
sha1 "d9386aa3e36bdd31f069f5301e315a9c5d91f06a" | ||
sha1 'b87152ce691e7ed1937d30f86bc706a408d47f64' | ||
|
||
depends_on 'qt' | ||
depends_on NeedsSnowLeopardOrNewer.new | ||
|
||
def install | ||
system "qmake -spec macx-g++" | ||
system "make" | ||
bin.install "bin/phantomjs" | ||
end | ||
|
||
def caveats; <<-EOS.undent | ||
PhantomJS in Homebrew currently does not hide the dock icon. | ||
For more information see: | ||
http://code.google.com/p/phantomjs/issues/detail?id=281 | ||
EOS | ||
end | ||
end |