summaryrefslogtreecommitdiffstats
path: root/external/lxml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:54:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:54:39 +0000
commit267c6f2ac71f92999e969232431ba04678e7437e (patch)
tree358c9467650e1d0a1d7227a21dac2e3d08b622b2 /external/lxml
parentInitial commit. (diff)
downloadlibreoffice-267c6f2ac71f92999e969232431ba04678e7437e.tar.xz
libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.zip
Adding upstream version 4:24.2.0.upstream/4%24.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'external/lxml')
-rw-r--r--external/lxml/0001-Make-regexp-string-raw-to-correct-its-escape-sequenc.patch.131
-rw-r--r--external/lxml/ExternalProject_lxml.mk45
-rw-r--r--external/lxml/Makefile7
-rw-r--r--external/lxml/Module_lxml.mk17
-rw-r--r--external/lxml/README7
-rw-r--r--external/lxml/UnpackedTarball_lxml.mk19
-rw-r--r--external/lxml/replace-setuptools-with-distutils.patch.129
7 files changed, 155 insertions, 0 deletions
diff --git a/external/lxml/0001-Make-regexp-string-raw-to-correct-its-escape-sequenc.patch.1 b/external/lxml/0001-Make-regexp-string-raw-to-correct-its-escape-sequenc.patch.1
new file mode 100644
index 0000000000..ce1ec383cc
--- /dev/null
+++ b/external/lxml/0001-Make-regexp-string-raw-to-correct-its-escape-sequenc.patch.1
@@ -0,0 +1,31 @@
+From 9686dd9c7670d18acff6360c8444520273d5f1b2 Mon Sep 17 00:00:00 2001
+From: Jakub Wilk <jwilk@jwilk.net>
+Date: Fri, 16 Jun 2023 09:24:21 +0200
+Subject: [PATCH] Make regexp string raw to correct its escape sequence usage
+ (GH-371)
+
+Fixes:
+
+ $ python3 -Wd setup.py
+ setup.py:117: DeprecationWarning: invalid escape sequence \.
+ ...
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index 709cbc68..7a3f46e5 100644
+--- a/setup.py
++++ b/setup.py
+@@ -114,7 +114,7 @@ extra_options['packages'] = [
+
+ def setup_extra_options():
+ is_interesting_package = re.compile('^(libxml|libxslt|libexslt)$').match
+- is_interesting_header = re.compile('^(zconf|zlib|.*charset)\.h$').match
++ is_interesting_header = re.compile(r'^(zconf|zlib|.*charset)\.h$').match
+
+ def extract_files(directories, pattern='*'):
+ def get_files(root, dir_path, files):
+--
+2.39.2
+
diff --git a/external/lxml/ExternalProject_lxml.mk b/external/lxml/ExternalProject_lxml.mk
new file mode 100644
index 0000000000..a282546b1a
--- /dev/null
+++ b/external/lxml/ExternalProject_lxml.mk
@@ -0,0 +1,45 @@
+# -*- 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_Trace_StartRange,lxml,EXTERNAL)
+ $(call gb_ExternalProject_run,build,\
+ export PYTHONPATH=$${PYTHONPATH:+$$PYTHONPATH:}$(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) && \
+ rm -fr install && \
+ mkdir install && \
+ $(lxml_PYTHON) setup.py install \
+ --install-lib install \
+ )
+ $(call gb_Trace_EndRange,lxml,EXTERNAL)
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/lxml/Makefile b/external/lxml/Makefile
new file mode 100644
index 0000000000..e4968cf85f
--- /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 0000000000..9fe3b85ad1
--- /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 0000000000..be90f0a862
--- /dev/null
+++ b/external/lxml/README
@@ -0,0 +1,7 @@
+LXML XML processing python Library from [https://lxml.de/].
+
+This library is used for the .ui accessibility checker bin/gla11y
+
+The archive was downloaded from:
+[https://lxml.de/files/lxml-4.9.2.tgz]
+on 2023-07-17.
diff --git a/external/lxml/UnpackedTarball_lxml.mk b/external/lxml/UnpackedTarball_lxml.mk
new file mode 100644
index 0000000000..1b19b6fd16
--- /dev/null
+++ b/external/lxml/UnpackedTarball_lxml.mk
@@ -0,0 +1,19 @@
+# -*- 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)))
+
+$(eval $(call gb_UnpackedTarball_add_patches,lxml, \
+ external/lxml/0001-Make-regexp-string-raw-to-correct-its-escape-sequenc.patch.1 \
+ external/lxml/replace-setuptools-with-distutils.patch.1 \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/lxml/replace-setuptools-with-distutils.patch.1 b/external/lxml/replace-setuptools-with-distutils.patch.1
new file mode 100644
index 0000000000..5275e40312
--- /dev/null
+++ b/external/lxml/replace-setuptools-with-distutils.patch.1
@@ -0,0 +1,29 @@
+diff -ur lxml.org/setupinfo.py lxml/setupinfo.py
+--- lxml.org/setupinfo.py 2023-10-20 10:32:17.921500435 +0200
++++ lxml/setupinfo.py 2023-10-20 10:33:40.303323572 +0200
+@@ -4,7 +4,7 @@
+ import os.path
+ import subprocess
+
+-from setuptools.command.build_ext import build_ext as _build_ext
++from distutils.command.build_ext import build_ext as _build_ext
+ from distutils.core import Extension
+ from distutils.errors import CompileError, DistutilsOptionError
+ from versioninfo import get_base_dir
+diff -ur lxml.org/setup.py lxml/setup.py
+--- lxml.org/setup.py 2023-10-20 10:32:17.949501053 +0200
++++ lxml/setup.py 2023-10-20 10:33:09.082631759 +0200
+@@ -217,9 +217,10 @@
+ # `Unknown distribution option: 'bugtrack_url'`
+ # which distract folks from real causes of problems when troubleshooting
+ # bugtrack_url="https://bugs.launchpad.net/lxml",
+- project_urls={
+- "Source": "https://github.com/lxml/lxml",
+- },
++ # same as for bugtrack_urls also for project_urls when using distutils instead of setuptools
++ #project_urls={
++ # "Source": "https://github.com/lxml/lxml",
++ #},
+ description=(
+ "Powerful and Pythonic XML processing library"
+ " combining libxml2/libxslt with the ElementTree API."