Skip to content

Commit b32f076

Browse files
authored
Merge pull request #11080 from heitbaum/libxml2
Update libxml2 to 2.15.x without Python bindings
2 parents 5bf4683 + d8e262c commit b32f076

6 files changed

Lines changed: 1714 additions & 35 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
# Copyright (C) 2026-present Team LibreELEC (https://libreelec.tv)
3+
4+
PKG_NAME="lxml"
5+
PKG_VERSION="6.0.2"
6+
PKG_SHA256="cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62"
7+
PKG_LICENSE="BSD-3-Clause"
8+
PKG_SITE="https://lxml.de"
9+
PKG_URL="https://github.com/lxml/lxml/releases/download/${PKG_NAME}-${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz"
10+
PKG_DEPENDS_HOST="Python3:host libxml2:host libxslt:host setuptools:host"
11+
PKG_LONGDESC="The lxml XML toolkit for Python"
12+
PKG_TOOLCHAIN="python"

packages/textproc/itstool/package.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ PKG_SHA256="6b9a7cd29a12bb95598f5750e8763cee78836a1a207f85b74d8b3275b27e87ca"
77
PKG_LICENSE="GPLv3"
88
PKG_SITE="http://itstool.org"
99
PKG_URL="http://files.itstool.org/itstool/itstool-${PKG_VERSION}.tar.bz2"
10-
PKG_DEPENDS_HOST="toolchain libxml2:host"
10+
PKG_DEPENDS_HOST="toolchain:host lxml:host"
1111
PKG_LONGDESC="ITS Tool allows you to translate your XML documents with PO files."
1212
PKG_BUILD_FLAGS="-cfg-libs:host"
1313
PKG_TOOLCHAIN="autotools"
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
From 32c7d07664dc37765100285d1202d488cd6a27e8 Mon Sep 17 00:00:00 2001
2+
From: Nils Philippsen <nils@tiptoe.de>
3+
Date: Mon, 9 Oct 2023 14:26:43 +0200
4+
Subject: [PATCH] Fix insufficiently quoted regular expressions
5+
6+
These went under the radar until Python 3.12 started warning about them.
7+
8+
Signed-off-by: Nils Philippsen <nils@tiptoe.de>
9+
---
10+
itstool.in | 14 +++++++-------
11+
1 file changed, 7 insertions(+), 7 deletions(-)
12+
13+
diff --git a/itstool.in b/itstool.in
14+
index c21ad4b..4452616 100755
15+
--- a/itstool.in
16+
+++ b/itstool.in
17+
@@ -220,7 +220,7 @@ class Message (object):
18+
if not isinstance(text, ustr_type):
19+
text = ustr(text, 'utf-8')
20+
self._message[-1] += text.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;')
21+
- if re.sub('\s+', ' ', text).strip() != '':
22+
+ if re.sub(r'\s+', ' ', text).strip() != '':
23+
self._empty = False
24+
25+
def add_entity_ref (self, name):
26+
@@ -318,7 +318,7 @@ class Message (object):
27+
message += '<_:%s-%i/>' % (msg.name, placeholder)
28+
placeholder += 1
29+
if not self._preserve:
30+
- message = re.sub('\s+', ' ', message).strip()
31+
+ message = re.sub(r'\s+', ' ', message).strip()
32+
return message
33+
34+
def get_preserve_space (self):
35+
@@ -456,9 +456,9 @@ class LocNote (object):
36+
if self._preserve_space:
37+
return self.locnote
38+
else:
39+
- return re.sub('\s+', ' ', self.locnote).strip()
40+
+ return re.sub(r'\s+', ' ', self.locnote).strip()
41+
elif self.locnoteref is not None:
42+
- return '(itstool) link: ' + re.sub('\s+', ' ', self.locnoteref).strip()
43+
+ return '(itstool) link: ' + re.sub(r'\s+', ' ', self.locnoteref).strip()
44+
return ''
45+
46+
47+
@@ -889,7 +889,7 @@ class Document (object):
48+
trans = translations.ugettext('_\x04translator-credits')
49+
if trans is None or trans == 'translator-credits':
50+
return
51+
- regex = re.compile('(.*) \<(.*)\>, (.*)')
52+
+ regex = re.compile(r'(.*) \<(.*)\>, (.*)')
53+
for credit in trans.split('\n'):
54+
match = regex.match(credit)
55+
if not match:
56+
@@ -924,7 +924,7 @@ class Document (object):
57+
prevnode = None
58+
if node.prev is not None and node.prev.type == 'text':
59+
prevtext = node.prev.content
60+
- if re.sub('\s+', '', prevtext) == '':
61+
+ if re.sub(r'\s+', '', prevtext) == '':
62+
prevnode = node.prev
63+
for lang in sorted(list(translations.keys()), reverse=True):
64+
locale = self.get_its_locale_filter(node)
65+
@@ -1468,7 +1468,7 @@ def match_locale(extrange, locale):
66+
localei += 1
67+
return True
68+
69+
-_locale_pattern = re.compile('([a-zA-Z0-9-]+)(_[A-Za-z0-9]+)?(@[A-Za-z0-9]+)?(\.[A-Za-z0-9]+)?')
70+
+_locale_pattern = re.compile(r'([a-zA-Z0-9-]+)(_[A-Za-z0-9]+)?(@[A-Za-z0-9]+)?(\.[A-Za-z0-9]+)?')
71+
def convert_locale (locale):
72+
# Automatically convert POSIX-style locales to BCP47
73+
match = _locale_pattern.match(locale)

0 commit comments

Comments
 (0)