diff --git a/scripts/setup-macos.sh b/scripts/setup-macos.sh index 6eb600c34aa0..336ebfab7489 100755 --- a/scripts/setup-macos.sh +++ b/scripts/setup-macos.sh @@ -43,6 +43,7 @@ MACOS_VELOX_DEPS="bison flex gflags glog googletest icu4c libevent libsodium lz4 MACOS_BUILD_DEPS="ninja cmake" FB_OS_VERSION="v2024.09.16.00" FMT_VERSION="10.1.1" +STEMMER_VERSION="2.2.0" function update_brew { DEFAULT_BREW_PATH=/usr/local/bin/brew @@ -147,6 +148,17 @@ function install_fast_float { cmake_install_dir fast_float } +function install_stemmer { + wget_and_untar https://snowballstem.org/dist/libstemmer_c-${STEMMER_VERSION}.tar.gz stemmer + ( + cd ${DEPENDENCY_DIR}/stemmer + sed -i '/CPPFLAGS=-Iinclude/ s/$/ -fPIC/' Makefile + make clean && make "-j${NPROC}" + ${SUDO} cp libstemmer.a ${INSTALL_PREFIX}/lib/ + ${SUDO} cp include/libstemmer.h ${INSTALL_PREFIX}/include/ + ) +} + function install_velox_deps { run_and_time install_velox_deps_from_brew run_and_time install_ranges_v3 @@ -159,6 +171,7 @@ function install_velox_deps { run_and_time install_wangle run_and_time install_mvfst run_and_time install_fbthrift + run_and_time install_stemmer } (return 2> /dev/null) && return # If script was sourced, don't run commands.