summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-03-15 09:56:32 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-03-15 14:31:53 +0100
commit28e8c3e28bf4944ecad23961602b9b1f72613d39 (patch)
tree41d3cc720944f9fa88e43511992fc741f2bd6517
parenta98465920f0c82759d3e74b437c4fb4dd9f2c4c6 (diff)
--without-lxml for Flatpak builds
where the Yocto-based GNOME SDK provides no python lxml, but building LO's internal one fails because it internally uses {xml2,xslt}-config, and those are broken by (mis?-)design in Yocto, just returning with exit code 1. It didn't work well to pass applications of pkg-config into the external/lxml build as replacements for --with-{xml2,xslt}-config (as is successfully done elsewhere with 1462b2784fa3e95499808b2ef706e4787a01aaae "Adapt the external/redland/raptor/xml2-config.patch to raptor2-2.0.15"), so just run gla11y in its slightly limited form without lxml in the Flatpak build. Change-Id: I2d42901373c8c861b16da385c37bcc24d6e783fd Reviewed-on: https://gerrit.libreoffice.org/51321 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--configure.ac51
-rw-r--r--distro-configs/LibreOfficeFlatpak.conf1
2 files changed, 31 insertions, 21 deletions
diff --git a/configure.ac b/configure.ac
index fa758edd8c24..8fa43fd0c31e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2082,6 +2082,13 @@ AC_ARG_WITH(iwyu,
Use only if you are hacking on it.]),
,)
+libo_FUZZ_ARG_WITH(lxml,
+ AS_HELP_STRING([--without-lxml],
+ [gla11y will use python lxml when available, potentially building a local copy if necessary.
+ --without-lxml tells it to not use python lxml at all, which means that gla11y will only
+ report widget classes and ids.]),
+,)
+
dnl ===================================================================
dnl Branding
dnl ===================================================================
@@ -8157,35 +8164,37 @@ if test $enable_python = system; then
PYTHON_FOR_BUILD=$PYTHON
fi
-if test -z "$PYTHON_FOR_BUILD"; then
- case $build_os in
- cygwin)
- AC_MSG_WARN([No system-provided python lxml, gla11y will only report widget classes and ids])
- ;;
- *)
- if test "$cross_compiling" != yes ; then
- BUILD_TYPE="$BUILD_TYPE LXML"
- fi
- ;;
- esac
-else
- AC_MSG_CHECKING([for python lxml])
- if $PYTHON_FOR_BUILD -c "import lxml.etree as ET" 2> /dev/null ; then
- AC_MSG_RESULT([yes])
- else
+if test "$with_lxml" != no; then
+ if test -z "$PYTHON_FOR_BUILD"; then
case $build_os in
cygwin)
- AC_MSG_RESULT([no, gla11y will only report widget classes and ids])
+ AC_MSG_WARN([No system-provided python lxml, gla11y will only report widget classes and ids])
;;
*)
- if test "$cross_compiling" != yes -a "x$ac_cv_header_Python_h" = "xyes"; then
+ if test "$cross_compiling" != yes ; then
BUILD_TYPE="$BUILD_TYPE LXML"
- AC_MSG_RESULT([no, using internal lxml])
- else
- AC_MSG_RESULT([no, and system does not provide python development headers, gla11y will only report widget classes and ids])
fi
;;
esac
+ else
+ AC_MSG_CHECKING([for python lxml])
+ if $PYTHON_FOR_BUILD -c "import lxml.etree as ET" 2> /dev/null ; then
+ AC_MSG_RESULT([yes])
+ else
+ case $build_os in
+ cygwin)
+ AC_MSG_RESULT([no, gla11y will only report widget classes and ids])
+ ;;
+ *)
+ if test "$cross_compiling" != yes -a "x$ac_cv_header_Python_h" = "xyes"; then
+ BUILD_TYPE="$BUILD_TYPE LXML"
+ AC_MSG_RESULT([no, using internal lxml])
+ else
+ AC_MSG_RESULT([no, and system does not provide python development headers, gla11y will only report widget classes and ids])
+ fi
+ ;;
+ esac
+ fi
fi
fi
diff --git a/distro-configs/LibreOfficeFlatpak.conf b/distro-configs/LibreOfficeFlatpak.conf
index 60312c31c8f5..68b0089cbe27 100644
--- a/distro-configs/LibreOfficeFlatpak.conf
+++ b/distro-configs/LibreOfficeFlatpak.conf
@@ -9,6 +9,7 @@
--with-vendor=The Document Foundation
--without-export-validation
--without-junit
+--without-lxml
--without-system-apache-commons
--without-system-beanshell
--without-system-bluez