Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Correct way of installing phantomjs #11225

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 20 additions & 7 deletions Library/Formula/phantomjs.rb
@@ -1,16 +1,29 @@
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"

depends_on 'qt'
sha1 'b87152ce691e7ed1937d30f86bc706a408d47f64'
depends_on NeedsSnowLeopardOrNewer.new

def install
system "qmake -spec macx-g++"
system "make"
bin.install "bin/phantomjs"
end

def caveats; <<-EOS.undent
This version of PhantomJS does not hide the dock icon.
For more information see: http://code.google.com/p/phantomjs/issues/detail?id=281
EOS
end
end