From b3018af61cbb16eaf812a7c1e1922c1b4303671b Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Wed, 5 Jun 2024 13:12:25 +0800 Subject: [PATCH] Fix mongodb support on macOS --- config/ext.json | 1 - src/SPC/builder/extension/mongodb.php | 9 --------- 2 files changed, 10 deletions(-) diff --git a/config/ext.json b/config/ext.json index f6dadaef..7ac3014e 100644 --- a/config/ext.json +++ b/config/ext.json @@ -347,7 +347,6 @@ }, "mongodb": { "support": { - "Darwin": "no", "BSD": "wip", "Windows": "wip" }, diff --git a/src/SPC/builder/extension/mongodb.php b/src/SPC/builder/extension/mongodb.php index e6f12d54..2096de05 100644 --- a/src/SPC/builder/extension/mongodb.php +++ b/src/SPC/builder/extension/mongodb.php @@ -5,20 +5,11 @@ declare(strict_types=1); namespace SPC\builder\extension; use SPC\builder\Extension; -use SPC\store\FileSystem; use SPC\util\CustomExt; #[CustomExt('mongodb')] class mongodb extends Extension { - public function patchBeforeBuildconf(): bool - { - FileSystem::replaceFileStr(SOURCE_PATH . '/php-src/ext/mongodb/config.m4', 'if test -z "$PHP_CONFIG"; then', 'if false; then'); - FileSystem::replaceFileStr(SOURCE_PATH . '/php-src/ext/mongodb/config.m4', 'PHP_MONGODB_PHP_VERSION=`${PHP_CONFIG} --version`', 'PHP_MONGODB_PHP_VERSION=' . $this->builder->getPHPVersion()); - FileSystem::replaceFileStr(SOURCE_PATH . '/php-src/ext/mongodb/config.m4', 'PHP_MONGODB_PHP_VERSION_ID=`${PHP_CONFIG} --vernum`', 'PHP_MONGODB_PHP_VERSION_ID=' . $this->builder->getPHPVersionID()); - return true; - } - public function getUnixConfigureArg(): string { $arg = ' --enable-mongodb ';