diff --git a/lib/puppet/provider/php_version/php_source.rb b/lib/puppet/provider/php_version/php_source.rb index 7b6dd31..81be7b3 100644 --- a/lib/puppet/provider/php_version/php_source.rb +++ b/lib/puppet/provider/php_version/php_source.rb @@ -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