diff options
author | Samuel Thibault <sthibault@hypra.fr> | 2018-02-21 15:51:11 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-02-28 22:54:21 +0100 |
commit | 84ef6d82546b044990f4efd57e51e29c6c6565c8 (patch) | |
tree | 8f6d9e140c2d3731bb4a44eb58d09e359ab33ca6 /external/lxml | |
parent | e215310d6b531b8af39c86639ef88495470681bc (diff) |
Build external lxml if not provided by system
except on windows, where gla11y will resort to python's internal xml parser,
which does not provide line numbers.
This allows gla11y to be runnable on all systems.
Change-Id: Ica4eb90f59bddfcefd783fc2ed9c8c27357e7572
Reviewed-on: https://gerrit.libreoffice.org/50115
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'external/lxml')
-rw-r--r-- | external/lxml/ExternalProject_lxml.mk | 42 | ||||
-rw-r--r-- | external/lxml/Makefile | 7 | ||||
-rw-r--r-- | external/lxml/Module_lxml.mk | 17 | ||||
-rw-r--r-- | external/lxml/README | 7 | ||||
-rw-r--r-- | external/lxml/UnpackedTarball_lxml.mk | 14 |
5 files changed, 87 insertions, 0 deletions
diff --git a/external/lxml/ExternalProject_lxml.mk b/external/lxml/ExternalProject_lxml.mk new file mode 100644 index 000000000000..1e479d855ccf --- /dev/null +++ b/external/lxml/ExternalProject_lxml.mk @@ -0,0 +1,42 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_ExternalProject_ExternalProject,lxml)) + +$(eval $(call gb_ExternalProject_use_external_project,lxml,python3)) +$(eval $(call gb_ExternalProject_use_external_project,lxml,libxml2)) +$(eval $(call gb_ExternalProject_use_external_project,lxml,libxslt)) +$(eval $(call gb_ExternalProject_use_external_project,lxml,zlib)) + +$(eval $(call gb_ExternalProject_register_targets,lxml,\ + build \ +)) + +lxml_PYTHON := $(call gb_ExternalExecutable_get_command,python) + +$(call gb_ExternalProject_get_state_target,lxml,build): \ + $(call gb_ExternalExecutable_get_dependencies,python) + $(call gb_ExternalProject_run,build,\ + PYPATH=$${PYPATH:+$$PYPATH:}$(call gb_UnpackedTarball_get_dir,lxml)/install && \ + $(if $(PYTHON_FOR_BUILD), \ + unset MACOSX_DEPLOYMENT_TARGET && , \ + CFLAGS="$$CFLAGS -I$(call gb_UnpackedTarball_get_dir,python3)" && \ + CFLAGS="$$CFLAGS -I$(call gb_UnpackedTarball_get_dir,python3)/Include" && \ + LDFLAGS="$$LDFLAGS -L$(call gb_UnpackedTarball_get_dir,python3)" && \ + _PYTHON_PROJECT_BASE=$(call gb_UnpackedTarball_get_dir,python3) && \ + export CFLAGS LDFLAGS _PYTHON_PROJECT_BASE && ) \ + $(lxml_PYTHON) setup.py build \ + $(if $(SYSTEM_LIBXML),,--with-xml2-config=$(call gb_UnpackedTarball_get_dir,libxml2)/xml2-config) \ + $(if $(SYSTEM_LIBXSLT),,--with-xslt-config=$(call gb_UnpackedTarball_get_dir,libxslt)/xslt-config) && \ + mkdir install && \ + $(lxml_PYTHON) setup.py install \ + --install-lib install \ + ) + +# vim: set noet sw=4 ts=4: diff --git a/external/lxml/Makefile b/external/lxml/Makefile new file mode 100644 index 000000000000..e4968cf85fb6 --- /dev/null +++ b/external/lxml/Makefile @@ -0,0 +1,7 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- + +module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) + +include $(module_directory)/../../solenv/gbuild/partial_build.mk + +# vim: set noet sw=4 ts=4: diff --git a/external/lxml/Module_lxml.mk b/external/lxml/Module_lxml.mk new file mode 100644 index 000000000000..9fe3b85ad170 --- /dev/null +++ b/external/lxml/Module_lxml.mk @@ -0,0 +1,17 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Module_Module,lxml)) + +$(eval $(call gb_Module_add_targets,lxml,\ + UnpackedTarball_lxml \ + ExternalProject_lxml \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/lxml/README b/external/lxml/README new file mode 100644 index 000000000000..ad9f0952c6b3 --- /dev/null +++ b/external/lxml/README @@ -0,0 +1,7 @@ +LXML XML processing python Library from [http://lxml.de/]. + +This library is used for the .ui accessibility checker bin/gla11y + +The archive was downloaded from: +[http://lxml.de/files/lxml-4.1.1.tgz] +on 2018-02-22. diff --git a/external/lxml/UnpackedTarball_lxml.mk b/external/lxml/UnpackedTarball_lxml.mk new file mode 100644 index 000000000000..bfb5dc2b046f --- /dev/null +++ b/external/lxml/UnpackedTarball_lxml.mk @@ -0,0 +1,14 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_UnpackedTarball_UnpackedTarball,lxml)) + +$(eval $(call gb_UnpackedTarball_set_tarball,lxml,$(LXML_TARBALL))) + +# vim: set noet sw=4 ts=4: |