fix mongodb library dependency

This commit is contained in:
crazywhalecc 2023-06-27 00:59:10 +08:00
parent c49e6ba0a2
commit fdf36ad726
No known key found for this signature in database
GPG Key ID: 1F4BDD59391F2680
2 changed files with 8 additions and 10 deletions

View File

@ -166,12 +166,11 @@
"type": "external",
"source": "mongodb",
"arg-type": "custom",
"lib-depends": [
"zstd"
],
"lib-suggests": [
"icu",
"openssl"
"openssl",
"zstd",
"zlib"
]
},
"mysqli": {

View File

@ -13,16 +13,15 @@ class mongodb extends Extension
public function getUnixConfigureArg(): string
{
$arg = ' --enable-mongodb ';
$arg .= ' --with-mongodb-system-libs=no ';
$arg .= ' --with-mongodb-system-libs=no --with-mongodb-client-side-encryption=no ';
$arg .= ' --with-mongodb-sasl=no ';
if ($this->builder->getLib('openssl')) {
$arg .= '--with-mongodb-ssl=openssl';
}
if ($this->builder->getLib('icu')) {
$arg .= ' --with-mongodb-icu=yes ';
} else {
$arg .= ' --with-mongodb-icu=no ';
}
$arg .= $this->builder->getLib('icu') ? ' --with-mongodb-icu=yes ' : ' --with-mongodb-icu=no ';
$arg .= $this->builder->getLib('zstd') ? ' --with-mongodb-zstd=yes ' : ' --with-mongodb-zstd=no ';
// $arg .= $this->builder->getLib('snappy') ? ' --with-mongodb-snappy=yes ' : ' --with-mongodb-snappy=no ';
$arg .= $this->builder->getLib('zlib') ? ' --with-mongodb-zlib=yes ' : ' --with-mongodb-zlib=bundled ';
return $arg;
}
}