From 8f43a09533c0295abd5bf32f3e4616316db67789 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sun, 1 Oct 2023 01:06:11 +0800 Subject: [PATCH] separate alternative libs --- src/SPC/builder/unix/library/ldap.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/SPC/builder/unix/library/ldap.php b/src/SPC/builder/unix/library/ldap.php index 3ba74d65..d1ffcbd7 100644 --- a/src/SPC/builder/unix/library/ldap.php +++ b/src/SPC/builder/unix/library/ldap.php @@ -8,6 +8,13 @@ trait ldap { protected function build(): void { + $alt = ''; + // openssl support + $alt .= $this->builder->getLib('openssl') && $this->builder->getExt('zlib') ? '--with-tls=openssl ' : ''; + // gmp support + $alt .= $this->builder->getLib('gmp') ? '--with-mp=gmp ' : ''; + // libsodium support + $alt .= $this->builder->getLib('libsodium') ? '--with-argon2=libsodium ' : ''; shell()->cd($this->source_dir) ->exec( $this->builder->configure_env . ' ' . @@ -19,9 +26,7 @@ trait ldap '--disable-slurpd ' . '--without-systemd ' . '--without-cyrus-sasl ' . - ($this->builder->getLib('openssl') && $this->builder->getExt('zlib') ? '--with-tls=openssl ' : '') . - ($this->builder->getLib('gmp') ? '--with-mp=gmp ' : '') . - ($this->builder->getLib('libsodium') ? '--with-argon2=libsodium ' : '') . + $alt . '--prefix=' ) ->exec('make clean')