From f2371d3702da0fd37aee2d3907c03e4c3c0ca8bc Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sat, 23 Sep 2023 14:10:35 +0800 Subject: [PATCH] bugfix: complete ldap support for macOS and Linux --- src/SPC/builder/unix/library/ldap.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SPC/builder/unix/library/ldap.php b/src/SPC/builder/unix/library/ldap.php index 00078012..3ba74d65 100644 --- a/src/SPC/builder/unix/library/ldap.php +++ b/src/SPC/builder/unix/library/ldap.php @@ -11,22 +11,22 @@ trait ldap shell()->cd($this->source_dir) ->exec( $this->builder->configure_env . ' ' . - 'CC="musl-gcc -I' . BUILD_INCLUDE_PATH . '" ' . - 'LDFLAGS="-static -L' . BUILD_LIB_PATH . '" ' . - ($this->builder->getLib('openssl') && $this->builder->getExt('zlib') ? 'LIBS="-lssl -lcrypto -lz" ' : '') . + $this->builder->makeAutoconfFlags(AUTOCONF_LDFLAGS | AUTOCONF_CPPFLAGS) . ' ./configure ' . '--enable-static ' . '--disable-shared ' . '--disable-slapd ' . '--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 ' : '') . '--prefix=' ) ->exec('make clean') - ->exec('make depend') + // remove tests and doc to prevent compile failed with error: soelim not found + ->exec('sed -i -e "s/SUBDIRS= include libraries clients servers tests doc/SUBDIRS= include libraries clients servers/g" Makefile') ->exec("make -j{$this->builder->concurrency}") ->exec('make install DESTDIR=' . BUILD_ROOT_PATH); $this->patchPkgconfPrefix(['ldap.pc', 'lber.pc']);