Skip to content

Commit

Permalink
Add support for pecl_http, propro, raphf, xdebug2 and zmq using shiva…
Browse files Browse the repository at this point in the history
…mmathur/extensions tap
  • Loading branch information
shivammathur committed Feb 19, 2021
1 parent 633920d commit 356e1a5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
6 changes: 4 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2938,9 +2938,11 @@ async function addExtensionDarwin(extension_csv, version) {
case /(5\.[3-6]|7\.0)pcov/.test(version_extension):
add_script += await utils.getUnsupportedLog('pcov', version, 'darwin');
return;
// match 5.6 to 8.9 for amqp, grpc, igbinary, imagick, imap, protobuf, swoole and xdebug
// match 5.6 to 8.9 for amqp, grpc, igbinary, imagick, imap, pecl_http, protobuf, raphf, swoole, xdebug, xdebug2, zmq
// match 7.1 to 8.9 for pcov
case /(5\.6|7\.[0-4]|8\.[0-9])(amqp|grpc|igbinary|imagick|imap|protobuf|swoole|xdebug)/.test(version_extension):
// match 5.6 to 7.4 for propro
case /(5\.6|7\.[0-4]|8\.[0-9])(amqp|grpc|http|igbinary|imagick|imap|pecl_http|protobuf|raphf|swoole|xdebug|xdebug2|zmq)/.test(version_extension):
case /(5\.6|7\.[0-4])propro/.test(version_extension):
case /(7\.[1-4]|8\.[0-9])pcov/.test(version_extension):
add_script += await utils.joins('\nadd_brew_extension', ext_name, ext_prefix);
return;
Expand Down
6 changes: 4 additions & 2 deletions src/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,13 @@ export async function addExtensionDarwin(
case /(5\.[3-6]|7\.0)pcov/.test(version_extension):
add_script += await utils.getUnsupportedLog('pcov', version, 'darwin');
return;
// match 5.6 to 8.9 for amqp, grpc, igbinary, imagick, imap, protobuf, swoole and xdebug
// match 5.6 to 8.9 for amqp, grpc, igbinary, imagick, imap, pecl_http, protobuf, raphf, swoole, xdebug, xdebug2, zmq
// match 7.1 to 8.9 for pcov
case /(5\.6|7\.[0-4]|8\.[0-9])(amqp|grpc|igbinary|imagick|imap|protobuf|swoole|xdebug)/.test(
// match 5.6 to 7.4 for propro
case /(5\.6|7\.[0-4]|8\.[0-9])(amqp|grpc|http|igbinary|imagick|imap|pecl_http|protobuf|raphf|swoole|xdebug|xdebug2|zmq)/.test(
version_extension
):
case /(5\.6|7\.[0-4])propro/.test(version_extension):
case /(7\.[1-4]|8\.[0-9])pcov/.test(version_extension):
add_script += await utils.joins(
'\nadd_brew_extension',
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/darwin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ add_brew_tap() {
add_brew_extension() {
formula=$1
prefix=$2
extension=${formula//[0-9]/}
extension="$(echo "$formula" | sed -E "s/pecl_|[0-9]//g")"
enable_extension "$extension" "$prefix"
if check_extension "$extension"; then
add_log "${tick:?}" "$extension" "Enabled"
else
add_brew_tap shivammathur/homebrew-php
add_brew_tap shivammathur/homebrew-extensions
sudo mv "$tap_dir"/shivammathur/homebrew-extensions/.github/deps/"$extension"/* "$tap_dir/homebrew/homebrew-core/Formula/" 2>/dev/null || true
sudo mv "$tap_dir"/shivammathur/homebrew-extensions/.github/deps/"$formula"/* "$tap_dir/homebrew/homebrew-core/Formula/" 2>/dev/null || true
brew install "$formula@$version" >/dev/null 2>&1
sudo cp "$brew_prefix/opt/$formula@$version/$extension.so" "$ext_dir"
add_extension_log "$extension" "Installed and enabled"
Expand Down

0 comments on commit 356e1a5

Please sign in to comment.