Chrome Release Bot (LUCI) 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
..
overrides 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
wasm 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
BUILD.gn 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
DIR_METADATA 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
LICENSE 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
OWNERS 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
PRESUBMIT.py 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
README.chromium 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
cvox-common.cti 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
liblouis_library.gni 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
liblouis_list_tables.py 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago
tables.json 4762b62e7d Publish DEPS for 106.0.5249.13 1 year ago

README.chromium

Name: Braille Translation Library
Short Name: liblouis
URL: https://github.com/liblouis/liblouis
Version: 3.22.0
CPEPrefix: cpe:/a:liblouis:liblouis:3.12.0
License: LGPL3 and GPL3
License Android Compatible: No
License File: LICENSE
Security Critical: yes

Description:
Liblouis is an open-source braille translator and back-translator. It
features support for computer and literary braille, and supports
contracted and uncontracted translation for many languages.

LibLouis is used as a web assembly module.

Local Modifications:
* Add liblouis_wrapper.js, a js wrapper to wasm binary.
* Add tables.json, a list of tables with metadata.
* Add cvox-common.cti with
common definitions for all tables mentioned in tables.json.
* The web assembly module is compiled by using emscripten.

Use the following command to get the Emscripten sdk:
git clone https://github.com/emscripten-core/emsdk.git

Use the following commands to set up your environment:
cd
source ./emsdk_env.sh
emsdk install latest
emsdk activate latest
# To refresh paths for the activated sdk.
source ./emsdk_env.sh

Use the following commands to compile:
cd third_party/liblouis/src
cp ../cvox-common.cti tables/
./autogen.sh

emconfigure ./configure --disable-shared
emmake make

em++ ./liblouis/.libs/liblouis.a -s RESERVED_FUNCTION_POINTERS=1 -s MODULARIZE=1 \
-s TOTAL_MEMORY=167772160 -s EXPORT_NAME="'liblouisBuild'" \
-s EXPORTED_FUNCTIONS="[_lou_free, _lou_checkTable, _lou_backTranslateString, _lou_translate]" \
-s EXPORTED_RUNTIME_METHODS="['ccall','ALLOC_NORMAL', \
'allocate','FS', 'cwrap', 'stringToUTF16', \
'UTF16ToString','intArrayFromString', 'intArrayToString', 'setValue',\
'getValue']" --preload-file tables@/ -o liblouis_wasm.js

cp liblouis_wasm.* ../wasm