diff --git a/prepare_osx_build_environment.sh b/prepare_osx_build_environment.sh index 7cb9177ed..0e41bdd9d 100755 --- a/prepare_osx_build_environment.sh +++ b/prepare_osx_build_environment.sh @@ -6,7 +6,7 @@ set -e ######### Versions of libraries/frameworks to be compiled QT_VER="6.4.2" OPENSSL_VER="1.1.1t" -OPENLDAP_VER="2.6.3" +OPENLDAP_VER="2.6.4" REBUILD=false BUILD_PATH=~/cmake_builds : ${MACOSX_DEPLOYMENT_TARGET:="10.15"} @@ -135,16 +135,22 @@ fi if [[ "$REBUILD" = true || ! -d ${OPENLDAP_PATH} ]] ; then echo -e "\n${ORANGE}##### Building OpenLDAP ${OPENLDAP_VER} ${OPENLDAP_PATH} #####${RESET}\n" - curl -O -L http://mirror.eu.oneandone.net/software/openldap/openldap-release/openldap-${OPENLDAP_VER}.tgz + mkdir -p ${BUILD_PATH} + pushd ${BUILD_PATH} + if [ ! -f openldap-${OPENLDAP_VER}.tgz ]; then + curl -O -L http://mirror.eu.oneandone.net/software/openldap/openldap-release/openldap-${OPENLDAP_VER}.tgz + fi tar xf openldap-${OPENLDAP_VER}.tgz - cd openldap-${OPENLDAP_VER} + pushd openldap-${OPENLDAP_VER} + sed -ie 's! doc!!' Makefile.in ARCH="-arch x86_64 -arch arm64" CFLAGS="${ARCH}" CXXFLAGS="${ARCH}" LDFLAGS="${ARCH} -L${OPENSSL_PATH}/lib" CPPFLAGS="-I${OPENSSL_PATH}/include" ./configure \ --prefix ${OPENLDAP_PATH} --enable-static --disable-shared --disable-syslog --disable-local --disable-slapd \ --without-threads --without-cyrus-sasl --with-tls=openssl make make install - cd - + popd + popd else echo -e "\n${GREY} OpenLDAP not built${RESET}" fi