mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-02 04:58:46 -05:00
978ef6bd92
GitOrigin-RevId: da45ae4a93e99a0bb720e09a37c8e291c057cab9
25 lines
827 B
Bash
Executable file
25 lines
827 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
COMMIT="e994dceb97fb695bca6bfe5ad5665525426bf01f"
|
|
|
|
curl -L "https://github.com/hunspell/hunspell/archive/${COMMIT}.tar.gz" | tar xvz
|
|
|
|
cd "hunspell-${COMMIT}"
|
|
autoreconf -fiv
|
|
emconfigure ./configure --disable-shared --enable-static
|
|
emmake make
|
|
|
|
em++ \
|
|
-s EXPORTED_FUNCTIONS="['_Hunspell_create', '_Hunspell_destroy', '_Hunspell_spell', '_Hunspell_suggest', '_Hunspell_free_list', '_Hunspell_add_dic', '_Hunspell_add', '_Hunspell_remove', '_free', '_malloc', 'FS']" \
|
|
-s EXPORTED_RUNTIME_METHODS="['ccall', 'cwrap', 'getValue', 'stringToNewUTF8', 'UTF8ToString', 'WORKERFS']" \
|
|
-s ENVIRONMENT=worker \
|
|
-s STACK_SIZE=5MB \
|
|
-s ALLOW_MEMORY_GROWTH \
|
|
-lworkerfs.js \
|
|
-O2 \
|
|
-g2 \
|
|
src/hunspell/.libs/libhunspell-1.7.a \
|
|
-o hunspell.mjs
|
|
|
|
cp hunspell.{mjs,wasm} /wasm/
|