php: fully version pear repo
A shared version is still possible with user configuration, but we should follow the versioned policies to avoid link problems between versions.
This commit is contained in:
parent
91d49560f6
commit
28c91c5b3c
1 changed files with 10 additions and 2 deletions
|
@ -1,8 +1,9 @@
|
||||||
class Php < Formula
|
class Php < Formula
|
||||||
desc "General-purpose scripting language"
|
desc "General-purpose scripting language"
|
||||||
homepage "https://php.net/"
|
homepage "https://secure.php.net/"
|
||||||
url "https://php.net/get/php-7.2.4.tar.xz/from/this/mirror"
|
url "https://php.net/get/php-7.2.4.tar.xz/from/this/mirror"
|
||||||
sha256 "7916b1bd148ddfd46d7f8f9a517d4b09cd8a8ad9248734e7c8dd91ef17057a88"
|
sha256 "7916b1bd148ddfd46d7f8f9a517d4b09cd8a8ad9248734e7c8dd91ef17057a88"
|
||||||
|
revision 1
|
||||||
|
|
||||||
bottle do
|
bottle do
|
||||||
sha256 "465136132568d7b316e8cec31569aa67af7ce8b6d4e472a55d78c0fbdf22401b" => :high_sierra
|
sha256 "465136132568d7b316e8cec31569aa67af7ce8b6d4e472a55d78c0fbdf22401b" => :high_sierra
|
||||||
|
@ -71,6 +72,9 @@ class Php < Formula
|
||||||
ENV.append "CPPFLAGS", "-DU_USING_ICU_NAMESPACE=1"
|
ENV.append "CPPFLAGS", "-DU_USING_ICU_NAMESPACE=1"
|
||||||
|
|
||||||
config_path = etc/"php/#{php_version}"
|
config_path = etc/"php/#{php_version}"
|
||||||
|
# Prevent system pear config from inhibiting pear install
|
||||||
|
(config_path/"pear.conf").delete if (config_path/"pear.conf").exist?
|
||||||
|
|
||||||
# Prevent homebrew from harcoding path to sed shim in phpize script
|
# Prevent homebrew from harcoding path to sed shim in phpize script
|
||||||
ENV["lt_cv_path_SED"] = "sed"
|
ENV["lt_cv_path_SED"] = "sed"
|
||||||
|
|
||||||
|
@ -80,6 +84,7 @@ class Php < Formula
|
||||||
--sysconfdir=#{config_path}
|
--sysconfdir=#{config_path}
|
||||||
--with-config-file-path=#{config_path}
|
--with-config-file-path=#{config_path}
|
||||||
--with-config-file-scan-dir=#{config_path}/conf.d
|
--with-config-file-scan-dir=#{config_path}/conf.d
|
||||||
|
--with-pear=#{pkgshare}/pear
|
||||||
--enable-bcmath
|
--enable-bcmath
|
||||||
--enable-calendar
|
--enable-calendar
|
||||||
--enable-dba
|
--enable-dba
|
||||||
|
@ -193,7 +198,7 @@ class Php < Formula
|
||||||
end
|
end
|
||||||
|
|
||||||
def post_install
|
def post_install
|
||||||
pear_prefix = share/"pear"
|
pear_prefix = pkgshare/"pear"
|
||||||
pear_files = %W[
|
pear_files = %W[
|
||||||
#{pear_prefix}/.depdblock
|
#{pear_prefix}/.depdblock
|
||||||
#{pear_prefix}/.filemap
|
#{pear_prefix}/.filemap
|
||||||
|
@ -220,6 +225,7 @@ class Php < Formula
|
||||||
|
|
||||||
# fix pear config to install outside cellar
|
# fix pear config to install outside cellar
|
||||||
pear_path = HOMEBREW_PREFIX/"share/pear"
|
pear_path = HOMEBREW_PREFIX/"share/pear"
|
||||||
|
cp_r pkgshare/"pear/.", pear_path
|
||||||
{
|
{
|
||||||
"php_ini" => etc/"php/#{php_version}/php.ini",
|
"php_ini" => etc/"php/#{php_version}/php.ini",
|
||||||
"php_dir" => pear_path,
|
"php_dir" => pear_path,
|
||||||
|
@ -237,6 +243,8 @@ class Php < Formula
|
||||||
system bin/"pear", "config-set", key, value, "system"
|
system bin/"pear", "config-set", key, value, "system"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
system bin/"pear", "update-channels"
|
||||||
|
|
||||||
%w[
|
%w[
|
||||||
opcache
|
opcache
|
||||||
].each do |e|
|
].each do |e|
|
||||||
|
|
Loading…
Reference in a new issue