From 295b5da700d4a7eab722a9538462603df920f4fb Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Thu, 23 Sep 2021 18:55:16 +0530 Subject: [PATCH] Add config to resolve extensions from shivammathur/extensions --- src/configs/brew_extensions | 28 ++++++++++++++++++++++++++++ src/scripts/darwin.sh | 3 ++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 src/configs/brew_extensions diff --git a/src/configs/brew_extensions b/src/configs/brew_extensions new file mode 100644 index 00000000..d7f1212e --- /dev/null +++ b/src/configs/brew_extensions @@ -0,0 +1,28 @@ +amqp=amqp +apcu=apcu +expect=expect +grpc=grpc +igbinary=igbinary +imagick=imagick +imap=imap +memcache=memcache +memcached=memcached +mongodb=mongodb +msgpack=msgpack +pcov=pcov +pecl_http=http +phalcon3=phalcon +phalcon4=phalcon +propro=propro +protobuf=protobuf +psr=psr +raphf=raphf +rdkafka=rdkafka +redis=redis +ssh2=ssh2 +swoole=swoole +vips=vips +xdebug=xdebug +xdebug2=xdebug +yaml=yaml +zmq=zmq diff --git a/src/scripts/darwin.sh b/src/scripts/darwin.sh index 15e3665d..ed6742b3 100644 --- a/src/scripts/darwin.sh +++ b/src/scripts/darwin.sh @@ -61,7 +61,8 @@ add_brew_tap() { add_brew_extension() { formula=$1 prefix=$2 - shared_extension "$formula" && extension="$formula" || extension="$(echo "$formula" | sed -E "s/pecl_|[0-9]//g")" + extension=$(grep "$formula=" "$dist"/../src/configs/brew_extensions | cut -d '=' -f 2) + [[ -z "$extension" ]] && extension="$(echo "$formula" | sed -E "s/pecl_|[0-9]//g")" enable_extension "$extension" "$prefix" if check_extension "$extension"; then add_log "${tick:?}" "$extension" "Enabled"