Skip to content

Commit

Permalink
Update php@8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
BrewTestBot committed Jan 19, 2022
1 parent 771f622 commit e939608
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions Formula/php@8.0.rb
Expand Up @@ -2,9 +2,9 @@ class PhpAT80 < Formula
desc "General-purpose scripting language"
homepage "https://www.php.net/"
# Should only be updated if the new version is announced on the homepage, https://www.php.net/
url "https://www.php.net/distributions/php-8.0.14.tar.xz"
mirror "https://fossies.org/linux/www/php-8.0.14.tar.xz"
sha256 "fbde8247ac200e4de73449d9fefc8b495d323b5be9c10cdb645fb431c91156e3"
url "https://www.php.net/distributions/php-8.0.15.tar.xz"
mirror "https://fossies.org/linux/www/php-8.0.15.tar.xz"
sha256 "5f33544061d37d805a2a9ce791f081ef08a7155bd7ba2362e69bba2d06b0f8b2"
license "PHP-3.01"

livecheck do
Expand Down Expand Up @@ -209,15 +209,19 @@ def install
extension_dir = Utils.safe_popen_read("#{bin}/php-config", "--extension-dir").chomp
orig_ext_dir = File.basename(extension_dir)
inreplace bin/"php-config", lib/"php", prefix/"pecl"
inreplace "php.ini-development", %r{; ?extension_dir = "\./"},
"extension_dir = \"#{HOMEBREW_PREFIX}/lib/php/pecl/#{orig_ext_dir}\""
%w[development production].each do |mode|
inreplace "php.ini-#{mode}", %r{; ?extension_dir = "\./"},
"extension_dir = \"#{HOMEBREW_PREFIX}/lib/php/pecl/#{orig_ext_dir}\""
end

# Use OpenSSL cert bundle
openssl = Formula["openssl@1.1"]
inreplace "php.ini-development", /; ?openssl\.cafile=/,
"openssl.cafile = \"#{openssl.pkgetc}/cert.pem\""
inreplace "php.ini-development", /; ?openssl\.capath=/,
"openssl.capath = \"#{openssl.pkgetc}/certs\""
%w[development production].each do |mode|
inreplace "php.ini-#{mode}", /; ?openssl\.cafile=/,
"openssl.cafile = \"#{openssl.pkgetc}/cert.pem\""
inreplace "php.ini-#{mode}", /; ?openssl\.capath=/,
"openssl.capath = \"#{openssl.pkgetc}/certs\""
end

config_files = {
"php.ini-development" => "php.ini",
Expand Down

0 comments on commit e939608

Please sign in to comment.