Files
zooqueen 7306e24eea datastore rebrand fix: ${ClickHouse_SOURCE_DIR} -> ${Datastore_SOURCE_DIR} (project var)
project(Datastore) renamed the CMake auto-vars ClickHouse_SOURCE_DIR/BINARY_DIR; the contrib
*-cmake glue + top-level CMakeLists submodule check still referenced the old names -> undefined ->
false 'submodules not initialized'. Renamed all CMake refs (incl contrib glue). Found by spark build.
2026-06-21 21:03:07 -07:00

1.7 KiB

libstemmer_c

Sources:

Update steps:

Set these variables before starting (adjust paths to match your checkout):

CLICKHOUSE_DIR=/path/to/ClickHouse
SUBMODULE_DIR=$CLICKHOUSE_DIR/contrib/libstemmer_c
  1. Go to the submodule directory and create a new branch for the new version:
cd $SUBMODULE_DIR
git checkout -b "Clickhouse/Clickhouse/release/vX.X.X"
  1. Get the tarball using one of the following methods:

Download distribution tarball

wget https://snowballstem.org/dist/libstemmer_c-X.X.X.tar.gz

Generate tarball from sources:

git clone https://github.com/snowballstem/snowball
cd snowball
make dist_libstemmer_c
  1. Uncompress and override (strip the top-level directory from the tarball so files land directly in the submodule):
tar --overwrite --strip-components=1 -xvzf libstemmer_c-X.X.X.tar.gz -C $SUBMODULE_DIR
  1. Commit the changes to the submodule repo:
cd $SUBMODULE_DIR
git add .
git commit -m "Snapshot to version vX.X.X"
git push --set-upstream origin Clickhouse/release/vX.X.X
  1. Regenerate the CMakeLists.txt in THIS directory (run from the ClickHouse repo root):
cd $CLICKHOUSE_DIR

SOURCES=$(find contrib/libstemmer_c -name "*.c" -not -path "*/examples/*" | sort | sed 's|contrib/libstemmer_c/|    ${LIBRARY_DIR}/|')

cat > contrib/libstemmer-c-cmake/CMakeLists.txt << EOF

set(LIBRARY_DIR "\${Datastore_SOURCE_DIR}/contrib/libstemmer_c")

add_library(_stemmer
${SOURCES}
)

target_include_directories(_stemmer SYSTEM PUBLIC "\${LIBRARY_DIR}/include")
add_library(ch_contrib::stemmer ALIAS _stemmer)
EOF