From 1437be3a9da2f604e9bd41a83c6625ad75335fd1 Mon Sep 17 00:00:00 2001 From: DubbleClick Date: Thu, 21 Sep 2023 12:56:52 +0200 Subject: [PATCH] gmp and libsodium for ldap if enabled only enable openssl when zlib ext is also enabled (missing 'deflate' otherwise) move back from source/php-src/ext/ldap to source/ldap (fix "LICENSE not found") --- config/ext.json | 8 ++++++-- config/source.json | 1 - src/SPC/builder/unix/library/ldap.php | 9 +++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/config/ext.json b/config/ext.json index 92ad0598..2914007f 100644 --- a/config/ext.json +++ b/config/ext.json @@ -158,10 +158,14 @@ "ldap" ], "lib-suggests": [ - "openssl" + "openssl", + "zlib", + "gmp", + "libsodium" ], "ext-suggests": [ - "openssl" + "openssl", + "zlib" ] }, "mbregex": { diff --git a/config/source.json b/config/source.json index 498e72a8..d204062e 100644 --- a/config/source.json +++ b/config/source.json @@ -46,7 +46,6 @@ "type": "filelist", "url": "https://www.openldap.org/software/download/OpenLDAP/openldap-release/", "regex": "/href=\"(?openldap-(?[^\"]+)\\.tgz)\"/", - "path": "php-src/ext/ldap", "license": { "type": "file", "path": "LICENSE" diff --git a/src/SPC/builder/unix/library/ldap.php b/src/SPC/builder/unix/library/ldap.php index 63463432..00078012 100644 --- a/src/SPC/builder/unix/library/ldap.php +++ b/src/SPC/builder/unix/library/ldap.php @@ -11,13 +11,18 @@ trait ldap shell()->cd($this->source_dir) ->exec( $this->builder->configure_env . ' ' . - 'LDFLAGS="-static"' . + '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" ' : '') . ' ./configure ' . '--enable-static ' . '--disable-shared ' . '--disable-slapd ' . + '--disable-slurpd ' . '--without-systemd ' . - ($this->builder->getLib('openssl') ? '--with-tls=openssl ' : '') . + ($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')