Use custom support for phalcon

This commit is contained in:
Shivam Mathur 2021-10-09 06:26:16 +05:30
parent 8dfe214356
commit fca0924fa9
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
3 changed files with 9 additions and 5 deletions

2
dist/index.js vendored
View File

@ -221,6 +221,7 @@ async function addExtensionDarwin(extension_csv, version) {
case /^(5\.[3-6]|7\.[0-4]|8\.0)blackfire(-\d+\.\d+\.\d+)?$/.test(version_extension):
case /^couchbase$|^geos$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test(extension):
case /^(5\.[3-6]|7\.[0-4])ioncube$/.test(version_extension):
case /(5\.6|7\.[0-3])phalcon3|7\.[2-4]phalcon4/.test(version_extension):
add_script += await utils.customPackage(ext_name, 'ext', extension, 'darwin');
return;
case /.+-(stable|beta|alpha|devel|snapshot|rc|preview)/.test(extension):
@ -235,7 +236,6 @@ async function addExtensionDarwin(extension_csv, version) {
case /(?<!5\.[3-5])(amqp|apcu|expect|grpc|igbinary|imagick|imap|memcache|memcached|mongodb|msgpack|protobuf|psr|raphf|rdkafka|redis|ssh2|swoole|xdebug|xdebug2|yaml|zmq)/.test(version_extension):
case /(5\.6|7\.[0-4])propro/.test(version_extension):
case /(?<!5\.[3-6]|7\.0)pcov/.test(version_extension):
case /(5\.6|7\.[0-3])phalcon3|7\.[2-4]phalcon4/.test(version_extension):
case /(?<!5\.[3-6])vips/.test(version_extension):
add_script += await utils.joins('\nadd_brew_extension', ext_name, ext_prefix);
return;

View File

@ -43,6 +43,7 @@ export async function addExtensionDarwin(
extension
):
case /^(5\.[3-6]|7\.[0-4])ioncube$/.test(version_extension):
case /(5\.6|7\.[0-3])phalcon3|7\.[2-4]phalcon4/.test(version_extension):
add_script += await utils.customPackage(
ext_name,
'ext',
@ -81,7 +82,6 @@ export async function addExtensionDarwin(
):
case /(5\.6|7\.[0-4])propro/.test(version_extension):
case /(?<!5\.[3-6]|7\.0)pcov/.test(version_extension):
case /(5\.6|7\.[0-3])phalcon3|7\.[2-4]phalcon4/.test(version_extension):
case /(?<!5\.[3-6])vips/.test(version_extension):
add_script += await utils.joins(
'\nadd_brew_extension',

View File

@ -1,10 +1,14 @@
# Helper function to add phalcon.
add_phalcon_helper() {
status='Installed and enabled'
if [ "$extension" = "phalcon4" ]; then
install_packages "php${version:?}-psr" "php${version:?}-$extension"
if [ "$(uname -s)" = "Darwin" ]; then
add_brew_extension "$extension" extension
else
install_packages "php${version:?}-$extension"
if [ "$extension" = "phalcon4" ]; then
install_packages "php${version:?}-psr" "php${version:?}-$extension"
else
install_packages "php${version:?}-$extension"
fi
fi
}