Skip to content

Commit

Permalink
Fix mongodb support on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
crazywhalecc committed Jun 5, 2024
1 parent 7e6c2b4 commit b3018af
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion config/ext.json
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@
},
"mongodb": {
"support": {
"Darwin": "no",
"BSD": "wip",
"Windows": "wip"
},
Expand Down
9 changes: 0 additions & 9 deletions src/SPC/builder/extension/mongodb.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,11 @@
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 ';
Expand Down

0 comments on commit b3018af

Please sign in to comment.