Add support for snmp on macOS using shivammathur/extensions

This commit is contained in:
Shivam Mathur 2023-02-08 20:44:10 +05:30
parent 2f306f9d25
commit 1224b29111
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
4 changed files with 4 additions and 3 deletions

2
dist/index.js vendored
View File

@ -266,7 +266,7 @@ 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;
case /(?<!5\.[3-5])(amqp|apcu|expect|gnupg|grpc|igbinary|imagick|imap|mailparse|mcrypt|memcache|memcached|mongodb|msgpack|protobuf|psr|raphf|rdkafka|redis|ssh2|swoole|uuid|xdebug|xdebug2|yaml|zmq)/.test(version_extension):
case /(?<!5\.[3-5])(amqp|apcu|expect|gnupg|grpc|igbinary|imagick|imap|mailparse|mcrypt|memcache|memcached|mongodb|msgpack|protobuf|psr|raphf|rdkafka|redis|snmp|ssh2|swoole|uuid|xdebug|xdebug2|yaml|zmq)/.test(version_extension):
case /(?<!5\.[3-6])(ds|v8js)/.test(version_extension):
case /(5\.6|7\.[0-4])(propro|lua)/.test(version_extension):
case /(?<!5\.[3-6]|7\.0)pcov/.test(version_extension):

View File

@ -30,6 +30,7 @@ psr=psr
raphf=raphf
rdkafka=rdkafka
redis=redis
snmp=snmp
sqlsrv=sqlsrv
ssh2=ssh2
swoole=swoole

View File

@ -83,7 +83,7 @@ export async function addExtensionDarwin(
add_script += await utils.getUnsupportedLog('pcov', version, 'darwin');
return;
// match brew extensions
case /(?<!5\.[3-5])(amqp|apcu|expect|gnupg|grpc|igbinary|imagick|imap|mailparse|mcrypt|memcache|memcached|mongodb|msgpack|protobuf|psr|raphf|rdkafka|redis|ssh2|swoole|uuid|xdebug|xdebug2|yaml|zmq)/.test(
case /(?<!5\.[3-5])(amqp|apcu|expect|gnupg|grpc|igbinary|imagick|imap|mailparse|mcrypt|memcache|memcached|mongodb|msgpack|protobuf|psr|raphf|rdkafka|redis|snmp|ssh2|swoole|uuid|xdebug|xdebug2|yaml|zmq)/.test(
version_extension
):
case /(?<!5\.[3-6])(ds|v8js)/.test(version_extension):

View File

@ -50,7 +50,7 @@ enable_extension() {
enable_cache_extension_dependencies "$1" "$2"
if command -v phpenmod >/dev/null 2>&1; then
mod="${ini_dir:?}"/../mods-available/"$1".ini
[ ! -e "$mod" ] || echo "$2=${ext_dir:?}/$1.so" | sudo tee "$mod" >/dev/null
[ ! -e "$mod" ] || (echo "; priority=${3:'20'}"; echo "$2=${ext_dir:?}/$1.so") | sudo tee "$mod" >/dev/null
sudo phpenmod -v "$version" "$1" >/dev/null 2>&1
else
echo "$2=${ext_dir:?}/$1.so" | sudo tee -a "${pecl_file:-${ini_file[@]}}" >/dev/null