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", "type": "external",
"source": "mongodb", "source": "mongodb",
"arg-type": "custom", "arg-type": "custom",
"lib-depends": [
"zstd"
],
"lib-suggests": [ "lib-suggests": [
"icu", "icu",
"openssl" "openssl",
"zstd",
"zlib"
] ]
}, },
"mysqli": { "mysqli": {

View File

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