Skip to content

Commit

Permalink
Use latest version of GRPC recipe (#5492)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktf authored Jun 4, 2024
1 parent 149af34 commit b97be47
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions grpc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected])
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 \
Expand All @@ -52,23 +48,20 @@ 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

cmake --build . -- ${JOBS:+-j$JOBS} install

#ModuleFile
mkdir -p etc/modulefiles
alibuild-generate-module > etc/modulefiles/$PKGNAME
cat >> etc/modulefiles/$PKGNAME <<EoF
set GRPC_ROOT \$::env(BASEDIR)/$PKGNAME/\$version
prepend-path PATH \$GRPC_ROOT/bin
prepend-path LD_LIBRARY_PATH \$GRPC_ROOT/lib
EoF
alibuild-generate-module --bin --lib > etc/modulefiles/$PKGNAME
mkdir -p $INSTALLROOT/etc/modulefiles && rsync -a --delete etc/modulefiles/ $INSTALLROOT/etc/modulefiles

0 comments on commit b97be47

Please sign in to comment.