[Libreoffice-commits] core.git: config_host.mk.in configure.ac
Olivier Hallot (via logerrit)
logerrit at kemper.freedesktop.org
Tue Oct 1 13:01:24 UTC 2019
config_host.mk.in | 1 +
configure.ac | 41 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 42 insertions(+)
New commits:
commit b2a81fefb185daea728a756ebc7b46c626d36080
Author: Olivier Hallot <olivier.hallot at libreoffice.org>
AuthorDate: Sun Sep 22 10:46:17 2019 -0300
Commit: Olivier Hallot <olivier.hallot at libreoffice.org>
CommitDate: Tue Oct 1 15:00:27 2019 +0200
redmine#2555 replace Help online Google search
This is the core/ part of the patch.
Add xapian-omega search to online Help.
The patch replaces Google custom search with xapian-omega search.
A new build key is introduced.
--with-omindex=server : Localizes and adds the xapian result page,
adds the xapian form to each Help page.
--with-omindex=noxap : do not localize the result template and do
not add a form in the Help page.
--with-omindex will force Online Help build.
Default is noxap
NOTES:
- searches returns resuls only on localized Help pages, avoiding same
resulis in many languages.
-xapian-omega databases must be built in server
TODO:
- Tweak the xapian-omega result page CSS and markup.
Change-Id: I5e3fe4191a3b054e3b6403f7cb5640953d92ba42
Reviewed-on: https://gerrit.libreoffice.org/79368
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>
diff --git a/config_host.mk.in b/config_host.mk.in
index 29b85688b83f..048e14a538ab 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -252,6 +252,7 @@ export HAVE_LD_BSYMBOLIC_FUNCTIONS=@HAVE_LD_BSYMBOLIC_FUNCTIONS@
export HAVE_LD_HASH_STYLE=@HAVE_LD_HASH_STYLE@
export HAVE_POSIX_FALLOCATE=@HAVE_POSIX_FALLOCATE@
export HELP_ONLINE=@HELP_ONLINE@
+export HELP_OMINDEX_PAGE=@HELP_OMINDEX_PAGE@
export HOST_PLATFORM=@host@
export HSQLDB_JAR=@HSQLDB_JAR@
export HSQLDB_USE_JDBC_4_1=@HSQLDB_USE_JDBC_4_1@
diff --git a/configure.ac b/configure.ac
index ce79ad5395af..30bd03c24123 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1972,6 +1972,17 @@ AC_ARG_WITH(help,
],
,)
+AC_ARG_WITH(omindex,
+ AS_HELP_STRING([--with-omindex],
+ [Enable the support of xapian-omega index for online help.])
+ [
+ Usage: --with-omindex=server prepare the pages for omindex
+ but let xapian-omega be built in server.
+ --with-omindex=noxap do not prepare online pages
+ for xapian-omega
+ ],
+,)
+
libo_FUZZ_ARG_WITH(java,
AS_HELP_STRING([--with-java=<java command>],
[Specify the name of the Java interpreter command. Typically "java"
@@ -4968,6 +4979,36 @@ fi
AC_SUBST([ENABLE_HTMLHELP])
AC_SUBST([HELP_ONLINE])
+AC_MSG_CHECKING([whether to enable xapian-omega support for help])
+if test -n "$with_omindex" -a "$with_omindex" != "no" -a $_os != iOS -a $_os != Android; then
+ BUILD_TYPE="$BUILD_TYPE HELP"
+ GIT_NEEDED_SUBMODULES="helpcontent2 $GIT_NEEDED_SUBMODULES"
+ case "$with_omindex" in
+ "server")
+ ENABLE_HTMLHELP=TRUE
+ HELP_ONLINE=TRUE
+ HELP_OMINDEX_PAGE=TRUE
+ AC_MSG_RESULT([SERVER])
+ ;;
+ "noxap")
+ ENABLE_HTMLHELP=TRUE
+ HELP_ONLINE=TRUE
+ HELP_OMINDEX_PAGE=FALSE
+ AC_MSG_RESULT([NOXAP])
+ ;;
+ *)
+ AC_MSG_ERROR([Unknown --with-omindex=$with_omindex])
+ ;;
+ esac
+else
+ HELP_OMINDEX_PAGE=FALSE
+ AC_MSG_RESULT([no])
+fi
+AC_SUBST([ENABLE_HTMLHELP])
+AC_SUBST([HELP_OMINDEX_PAGE])
+AC_SUBST([HELP_ONLINE])
+
+
dnl Test whether to include MySpell dictionaries
dnl ===================================================================
AC_MSG_CHECKING([whether to include MySpell dictionaries])
More information about the Libreoffice-commits
mailing list