From fed0226761a7166f79ec8c71b66ce7edd284fb7d Mon Sep 17 00:00:00 2001 From: Christopher Besch Date: Tue, 5 Apr 2022 09:26:24 +0200 Subject: [PATCH] Add Gentoo Language Installation Instructions (#936) --- docs/languages.rst | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/languages.rst b/docs/languages.rst index 45dfac6f..76c0c778 100644 --- a/docs/languages.rst +++ b/docs/languages.rst @@ -54,6 +54,33 @@ to what languages it should search for. Multiple languages can be requested using either ``-l eng+fra`` (English and French) or ``-l eng -l fra``. +Gentoo users +============ + +On Gentoo the package ``app-text/tessdata_fast``, which ``app-text/tesseract`` depends on, handles Tesseract languages. +It accepts USE flags to select what languages should be installed, these can be set in ``/etc/portage/package.use``. +Alternatively one can globally set the `L10N use extension `__ in ``/etc/portage/make.conf``. +This enables these languages for all packages (e.g. including aspell). + +.. code-block:: bash + + # Display a list of all Tesseract language packs + equery uses app-text/tessdata_fast + + # Add English and German language support for Tesseract only + echo 'app-text/tessdata_fast l10n_de l10n_en' >> /etc/portage/package.use + + # Add global English and German language support (the `l10n_` from equery has to be omited) + echo L10N="de en" >> /etc/portage/make.conf + + # update system to reflect changed USE flags + emerge --update --deep --newuse @world + +You can then pass the ``-l LANG`` argument to OCRmyPDF to give a hint as +to what languages it should search for. Multiple languages can be +requested using either ``-l eng+fra`` (English and French) or +``-l eng -l fra``. + macOS users ===========