Skip to content

Commit

Permalink
[BUGFIX] PHP 5.5+ can now be built on El Cap
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabe Blair committed Oct 30, 2015
1 parent 7368615 commit d43132b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/puppet/provider/php_version/php_source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ def install(version)
puts "Installing PHP #{@resource[:version]}, this may take a while..."
configure(version)

# Fix for openssl when building 5.5
# Discussed here: https://github.com/Homebrew/homebrew-php/issues/1941
# and here: https://github.com/boxen/puppet-php/issues/78
makefile = "#{@resource[:phpenv_root]}/php-src/Makefile"
makefileOutdata = File.read(makefile).gsub(/^EXTRA_LIBS = (.*)/, "EXTRA_LIBS = \\1 #{@resource[:homebrew_path]}/opt/openssl/lib/libssl.dylib #{@resource[:homebrew_path]}/opt/openssl/lib/libcrypto.dylib")

File.open(makefile, 'w') do |out|
out << makefileOutdata
end

# Make & install
make
make_install
Expand Down

0 comments on commit d43132b

Please sign in to comment.