Files
documentdb/scripts/install_setup_libbson.sh
T
John Pao 9e7757ce98 Merged PR 1436495: Updated libbson build to remove libicu as a dependency
### Does this PR have any customer impact?
No

### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc)
DevOps

### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes)
No

### Are you introducing any new config? If yes, do you have tests with and without them being set?
No

### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md))
N/A

### Description
Updated libbson build to remove libicu as a dependency.

----
#### AI description  (iteration 1)
#### PR Classification
Build configuration update to remove `libicu` as a dependency.

#### PR Summary
This pull request updates the build configuration for the `libbson` library to remove `libicu` as a dependency.
- `oss/scripts/install_setup_libbson.sh`: Updated build script to disable ICU support by adding `-DMONGOC_ENABLE_ICU=OFF -DENABLE_ICU=OFF` flags.
2024-08-26 13:12:13 +03:00

28 lines
975 B
Bash
Executable File

#!/bin/bash
# fail if trying to reference a variable that is not set.
set -u
# exit immediately if a command exits with a non-zero status
set -e
MONGO_DRIVER_VERSION="1.16.1"
if [ "${INSTALLDESTDIR:-""}" == "" ]; then
INSTALLDESTDIR="/usr";
fi
if [ "${MAKE_PROGRAM:-""}" == "" ]; then
MAKE_PROGRAM="cmake3"
fi
pushd $INSTALL_DEPENDENCIES_ROOT
curl -s -L https://github.com/mongodb/mongo-c-driver/releases/download/$MONGO_DRIVER_VERSION/mongo-c-driver-$MONGO_DRIVER_VERSION.tar.gz | tar -C $INSTALL_DEPENDENCIES_ROOT -zx --transform="s|mongo-c-driver-$MONGO_DRIVER_VERSION|mongo-c-driver|"
cd $INSTALL_DEPENDENCIES_ROOT/mongo-c-driver/build
$MAKE_PROGRAM -DENABLE_MONGOC=ON -DMONGOC_ENABLE_ICU=OFF -DENABLE_ICU=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_INSTALL_PREFIX=$INSTALLDESTDIR ..
make clean && make -sj$(cat /proc/cpuinfo | grep "processor" | wc -l) install
popd
if [ "${CLEANUP_SETUP:-"0"}" == "1" ]; then
rm -rf $INSTALL_DEPENDENCIES_ROOT/mongo-c-driver
fi