diff --git a/grpc.sh b/grpc.sh index 2738b6501e..f8ac16fda3 100644 --- a/grpc.sh +++ b/grpc.sh @@ -17,15 +17,11 @@ incremental_recipe: | mkdir -p $INSTALLROOT/etc/modulefiles && rsync -a --delete etc/modulefiles/ $INSTALLROOT/etc/modulefiles --- #!/bin/bash -e - -pushd $SOURCEDIR -git checkout "$GIT_TAG" -git submodule update --init -popd - +SONAME=so case $ARCHITECTURE in osx*) - [[ ! $OPENSSL_ROOT ]] && OPENSSL_ROOT=$(brew --prefix openssl@1.1) + SONAME=dylib + [[ ! $OPENSSL_ROOT ]] && OPENSSL_ROOT=$(brew --prefix openssl@3) [[ ! $PROTOBUF_ROOT ]] && PROTOBUF_ROOT=$(brew --prefix protobuf) # to avoid issues with rpath on mac extra_cmake_variables="-DCMAKE_INSTALL_RPATH=$INSTALLROOT/lib \ @@ -52,12 +48,14 @@ cmake $SOURCEDIR \ -DgRPC_BENCHMARK_PROVIDER=package \ -DgRPC_BUILD_GRPC_CSHARP_PLUGIN=OFF \ -DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN=OFF \ - -DgRPC_BUILD_GRPC_PHP_PLUGIN=OFF \ + -DgRPC_BUILD_GRPC_PHP_PLUGIN=OFF \ -DgRPC_BUILD_GRPC_CPP_PLUGIN=ON \ -DgRPC_BUILD_CSHARP_EXT=OFF \ -DgRPC_RE2_PROVIDER=package \ ${OPENSSL_ROOT:+-DOPENSSL_ROOT_DIR=$OPENSSL_ROOT} \ ${OPENSSL_ROOT:+-DOpenSSL_ROOT="$OPENSSL_ROOT"} \ + ${OPENSSL_ROOT:+-DOPENSSL_INCLUDE_DIRS=$OPENSSL_ROOT/include} \ + ${OPENSSL_ROOT:+-DOPENSSL_LIBRARIES=$OPENSSL_ROOT/lib/libssl.$SONAME;$OPENSSL_ROOT/lib/libcrypto.$SONAME} \ -DgRPC_CARES_PROVIDER=package \ $extra_cmake_variables @@ -65,10 +63,5 @@ cmake --build . -- ${JOBS:+-j$JOBS} install #ModuleFile mkdir -p etc/modulefiles -alibuild-generate-module > etc/modulefiles/$PKGNAME -cat >> etc/modulefiles/$PKGNAME < etc/modulefiles/$PKGNAME mkdir -p $INSTALLROOT/etc/modulefiles && rsync -a --delete etc/modulefiles/ $INSTALLROOT/etc/modulefiles