passenger: fix apr linkage issues
This commit is contained in:
parent
37ac2a4fc1
commit
c7f2d2610e
1 changed files with 12 additions and 21 deletions
|
@ -4,7 +4,7 @@ class Passenger < Formula
|
|||
url "https://s3.amazonaws.com/phusion-passenger/releases/passenger-5.0.30.tar.gz"
|
||||
sha256 "f367e0c1d808d7356c3749222194a72ea03efe61a3bf1b682bd05d47f087b4e3"
|
||||
head "https://github.com/phusion/passenger.git"
|
||||
revision 1
|
||||
revision 2
|
||||
|
||||
bottle do
|
||||
cellar :any
|
||||
|
@ -15,37 +15,28 @@ class Passenger < Formula
|
|||
|
||||
option "without-apache2-module", "Disable Apache2 module"
|
||||
|
||||
depends_on "pcre"
|
||||
depends_on "openssl@1.1"
|
||||
depends_on :macos => :lion
|
||||
|
||||
# macOS Sierra ships the APR libraries & headers, but has removed the
|
||||
# apr-1-config & apu-1-config executables which are used to find
|
||||
# those elements. We may need to adopt a broader solution if this problem
|
||||
# expands, but currently subversion & passenger are the only breakage as a result.
|
||||
if MacOS.version >= :sierra
|
||||
depends_on "apr-util" => :build
|
||||
depends_on "apr" => :build
|
||||
end
|
||||
depends_on "pcre"
|
||||
depends_on "openssl"
|
||||
depends_on "apr-util"
|
||||
|
||||
def install
|
||||
# https://github.com/Homebrew/homebrew-core/pull/1046
|
||||
ENV.delete("SDKROOT")
|
||||
|
||||
ENV["APU_CONFIG"] = Formula["apr-util"].opt_bin/"apu-1-config"
|
||||
ENV["APR_CONFIG"] = Formula["apr"].opt_bin/"apr-1-config"
|
||||
|
||||
inreplace "src/ruby_supportlib/phusion_passenger.rb",
|
||||
"PREFERRED_NGINX_VERSION = '1.10.1'",
|
||||
"PREFERRED_NGINX_VERSION = '1.10.2'"
|
||||
inreplace "src/ruby_supportlib/phusion_passenger/platform_info/openssl.rb" do |s|
|
||||
s.gsub! "-I/usr/local/opt/openssl/include", "-I#{Formula["openssl@1.1"].opt_include}"
|
||||
s.gsub! "-L/usr/local/opt/openssl/lib", "-L#{Formula["openssl@1.1"].opt_lib}"
|
||||
s.gsub! "-I/usr/local/opt/openssl/include", "-I#{Formula["openssl"].opt_include}"
|
||||
s.gsub! "-L/usr/local/opt/openssl/lib", "-L#{Formula["openssl"].opt_lib}"
|
||||
end
|
||||
inreplace "src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb",
|
||||
"http://nginx.org",
|
||||
"https://nginx.org"
|
||||
# https://github.com/Homebrew/homebrew-core/pull/1046
|
||||
ENV.delete("SDKROOT")
|
||||
|
||||
if MacOS.version >= :sierra
|
||||
ENV["APU_CONFIG"] = Formula["apr-util"].opt_bin/"apu-1-config"
|
||||
ENV["APR_CONFIG"] = Formula["apr"].opt_bin/"apr-1-config"
|
||||
end
|
||||
|
||||
rake "apache2" if build.with? "apache2-module"
|
||||
rake "nginx"
|
||||
|
|
Loading…
Reference in a new issue