summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2021-03-24 18:58:58 +0200
committerTor Lillqvist <tml@collabora.com>2021-03-25 07:59:14 +0100
commita499e9419af4b54dcf2dca390a19f7617b9b479a (patch)
tree6ef4f1fa7ebf62bc4675f828f33c3e1cfb556f37
parent5f6b2199fdb95acf8bef17121e2fe618da2803fb (diff)
tdf#124173: Enable thesauruses in the iOS app
Build our lnth library and the external mythes library. Install thesauruses for the app's Xcode project to pick up and include in the app bundle. Look for them in the place where they will end up. To get thesauruses you need to configure with --with-myspell-dicts. Change-Id: I2d850ca3c821c5c764cb061340a265440d04e41b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113066 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
-rw-r--r--Repository.mk2
-rw-r--r--configure.ac4
-rw-r--r--ios/CustomTarget_iOS_setup.mk16
-rw-r--r--lingucomponent/Module_lingucomponent.mk2
-rw-r--r--lingucomponent/source/lingutil/lingutil.cxx5
-rw-r--r--postprocess/Rdb_services.mk4
-rwxr-xr-xsolenv/bin/native-code.py2
7 files changed, 20 insertions, 15 deletions
diff --git a/Repository.mk b/Repository.mk
index 43da9de09616..157e5c068dca 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -385,7 +385,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
localebe1 \
log \
lng \
- $(if $(filter-out iOS,$(OS)),lnth) \
+ lnth \
$(if $(filter $(OS),MACOSX),macbe1) \
$(if $(MERGELIBS),merged) \
migrationoo2 \
diff --git a/configure.ac b/configure.ac
index bd98318047d8..8353cea96bb4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10284,9 +10284,7 @@ dnl ===================================================================
dnl Checking for mythes
dnl ===================================================================
AC_MSG_CHECKING([which mythes to use])
-if test "$_os" = iOS; then
- AC_MSG_RESULT([none])
-elif test "$with_system_mythes" = "yes"; then
+if test "$with_system_mythes" = "yes"; then
AC_MSG_RESULT([external])
SYSTEM_MYTHES=TRUE
AC_LANG_PUSH([C++])
diff --git a/ios/CustomTarget_iOS_setup.mk b/ios/CustomTarget_iOS_setup.mk
index 53ea70f1306a..970f8ff61e4b 100644
--- a/ios/CustomTarget_iOS_setup.mk
+++ b/ios/CustomTarget_iOS_setup.mk
@@ -72,13 +72,17 @@ $(IOSGEN)/native-code.h: $(BUILDDIR)/config_host.mk \
mkdir -p $(IOSRES)/share/fonts
cp -R $(INSTDIR)/share/fonts/truetype $(IOSRES)/share/fonts
cp -R $(INSTDIR)/share/gallery $(IOSRES)/share
- mkdir -p $(IOSRES)/share/spell
- # Install the Swiss German dictionary and use it for Liechtenstein, too
+ mkdir -p $(IOSRES)/share/spell $(IOSRES)/share/thes
+ # Install the Swiss German dictionary and use it for Liechtenstein, too.
+ # Install also thesauruses.
if test -d $(INSTDIR)/share/extensions/dict-de; then \
- cp $(INSTDIR)/share/extensions/dict-de/de_CH_frami.aff $(IOSRES)/share/spell/de_CH.aff; \
- cp $(INSTDIR)/share/extensions/dict-de/de_CH_frami.dic $(IOSRES)/share/spell/de_CH.dic; \
- cp $(INSTDIR)/share/extensions/dict-de/de_CH_frami.aff $(IOSRES)/share/spell/de_LI.aff; \
- cp $(INSTDIR)/share/extensions/dict-de/de_CH_frami.dic $(IOSRES)/share/spell/de_LI.dic; \
+ cp $(INSTDIR)/share/extensions/dict-de/de_CH_frami.aff $(IOSRES)/share/thes/de_CH.aff; \
+ cp $(INSTDIR)/share/extensions/dict-de/de_CH_frami.dic $(IOSRES)/share/thes/de_CH.dic; \
+ cp $(INSTDIR)/share/extensions/dict-de/de_CH_frami.aff $(IOSRES)/share/thes/de_LI.aff; \
+ cp $(INSTDIR)/share/extensions/dict-de/de_CH_frami.dic $(IOSRES)/share/thes/de_LI.dic; \
+ cp $(INSTDIR)/share/extensions/*/th_*_v2.* $(IOSRES)/share/thes; \
+ cp $(INSTDIR)/share/extensions/dict-en/th_en_US_v2.dat $(IOSRES)/share/thes/th_en_GB_v2.dat; \
+ cp $(INSTDIR)/share/extensions/dict-en/th_en_US_v2.idx $(IOSRES)/share/thes/th_en_GB_v2.idx; \
fi
cp -R $(INSTDIR)/share/palette $(IOSRES)/share
cp -R $(INSTDIR)/share/fingerprint $(IOSRES)/share
diff --git a/lingucomponent/Module_lingucomponent.mk b/lingucomponent/Module_lingucomponent.mk
index 3f8bcb026fa2..2bde5d5391e5 100644
--- a/lingucomponent/Module_lingucomponent.mk
+++ b/lingucomponent/Module_lingucomponent.mk
@@ -13,7 +13,7 @@ $(eval $(call gb_Module_Module,lingucomponent))
$(eval $(call gb_Module_add_targets,lingucomponent,\
Library_guesslang \
Library_hyphen \
- $(if $(filter-out iOS,$(OS)),Library_lnth) \
+ Library_lnth \
$(if $(filter iOS MACOSX,$(OS)),Library_MacOSXSpell) \
Library_spell \
StaticLibrary_ulingu \
diff --git a/lingucomponent/source/lingutil/lingutil.cxx b/lingucomponent/source/lingutil/lingutil.cxx
index 5ef22bbeff34..c6d914614716 100644
--- a/lingucomponent/source/lingutil/lingutil.cxx
+++ b/lingucomponent/source/lingutil/lingutil.cxx
@@ -180,6 +180,11 @@ std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char *pDicTy
aSystemDir = THES_SYSTEM_DIR;
aSystemPrefix = "th_";
aSystemSuffix = "_v2.dat";
+#elif defined IOS
+ aSystemDir = "$BRAND_BASE_DIR/share/thes";
+ rtl::Bootstrap::expandMacros(aSystemDir);
+ aSystemPrefix = "th_";
+ aSystemSuffix = "_v2.dat";
#endif
}
diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk
index 084af4b9c1da..aee91755c77c 100644
--- a/postprocess/Rdb_services.mk
+++ b/postprocess/Rdb_services.mk
@@ -51,9 +51,7 @@ $(eval $(call gb_Rdb_add_components,services,\
lingucomponent/source/hyphenator/hyphen/hyphen \
lingucomponent/source/languageguessing/guesslang \
lingucomponent/source/spellcheck/spell/spell \
- $(if $(filter-out iOS,$(OS)), \
- lingucomponent/source/thesaurus/libnth/lnth \
- ) \
+ lingucomponent/source/thesaurus/libnth/lnth \
lingucomponent/source/numbertext/numbertext \
linguistic/source/lng \
$(if $(ENABLE_LWP), \
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index d7c3582fd907..6ab9d7c8e68d 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -33,7 +33,7 @@ core_factory_list = [
("libi18nsearchlo.a", "i18nsearch_component_getFactory"),
("libinvocadaptlo.a", "invocadapt_component_getFactory"),
("liblnglo.a", "lng_component_getFactory"),
- ("liblnthlo.a", "lnth_component_getFactory", "#ifndef IOS"),
+ ("liblnthlo.a", "lnth_component_getFactory"),
("liblocalebe1lo.a", "localebe1_component_getFactory"),
("libpackage2.a", "package2_component_getFactory"),
("libsmlo.a", "sm_component_getFactory"),