From a72046c3ace23326931d5036428596c752bda2a1 Mon Sep 17 00:00:00 2001 From: Alex Dunn Date: Sun, 10 Jan 2016 08:31:08 -0800 Subject: [PATCH] phantomjs: remove stable inreplace, fix HEAD build Closes Homebrew/homebrew#47932. Signed-off-by: Alex Dunn --- Formula/phantomjs.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Formula/phantomjs.rb b/Formula/phantomjs.rb index e7ac036cb7..1ba02f5eca 100644 --- a/Formula/phantomjs.rb +++ b/Formula/phantomjs.rb @@ -17,9 +17,13 @@ class Phantomjs < Formula depends_on "openssl" def install - inreplace "src/qt/preconfig.sh", "QT_CFG+=' -openssl -openssl-linked'", - "QT_CFG+=' -openssl -openssl-linked -I #{Formula["openssl"].opt_include} -L #{Formula["openssl"].opt_lib}'" - system "./build.sh", "--confirm", "--jobs", ENV.make_jobs + if build.stable? + system "./build.sh", "--confirm", "--jobs", ENV.make_jobs, + "--qt-config", "-I #{Formula["openssl"].opt_include} -L #{Formula["openssl"].opt_lib}" + else + inreplace "build.py", "/usr/local", HOMEBREW_PREFIX + system "./build.py", "--confirm", "--jobs", ENV.make_jobs + end bin.install "bin/phantomjs" (share/"phantomjs").install "examples" end