Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2221342/?format=api
{ "id": 2221342, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2221342/?format=api", "web_url": "http://patchwork.ozlabs.org/project/buildroot/patch/20260409084305.3960494-16-bernd@kuhls.net/", "project": { "id": 27, "url": "http://patchwork.ozlabs.org/api/1.2/projects/27/?format=api", "name": "Buildroot development", "link_name": "buildroot", "list_id": "buildroot.buildroot.org", "list_email": "buildroot@buildroot.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260409084305.3960494-16-bernd@kuhls.net>", "list_archive_url": null, "date": "2026-04-09T08:43:00", "name": "[16/20] package/kodi: switch to pcre2", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "f3a2cf6d293867b0d9018879b0bf8ee6b8faf39b", "submitter": { "id": 86624, "url": "http://patchwork.ozlabs.org/api/1.2/people/86624/?format=api", "name": "Bernd Kuhls", "email": "bernd@kuhls.net" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/buildroot/patch/20260409084305.3960494-16-bernd@kuhls.net/mbox/", "series": [ { "id": 499260, "url": "http://patchwork.ozlabs.org/api/1.2/series/499260/?format=api", "web_url": "http://patchwork.ozlabs.org/project/buildroot/list/?series=499260", "date": "2026-04-09T08:42:45", "name": "[01/20] package/shadowsocks-libev: bump version to 3.3.6", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/499260/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2221342/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2221342/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<buildroot-bounces@buildroot.org>", "X-Original-To": [ "incoming-buildroot@patchwork.ozlabs.org", "buildroot@buildroot.org" ], "Delivered-To": [ "patchwork-incoming-buildroot@legolas.ozlabs.org", "buildroot@buildroot.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=buildroot.org header.i=@buildroot.org\n header.a=rsa-sha256 header.s=default header.b=BH+ppT9N;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org\n (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org;\n envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org)" ], "Received": [ "from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4frtmM39hMz1yD3\n\tfor <incoming-buildroot@patchwork.ozlabs.org>;\n Thu, 09 Apr 2026 18:45:07 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id 1755E40795;\n\tThu, 9 Apr 2026 08:45:06 +0000 (UTC)", "from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id OOTJEqnvRODR; Thu, 9 Apr 2026 08:45:04 +0000 (UTC)", "from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id 3C0B840797;\n\tThu, 9 Apr 2026 08:45:04 +0000 (UTC)", "from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133])\n by lists1.osuosl.org (Postfix) with ESMTP id 0454B237\n for <buildroot@buildroot.org>; Thu, 9 Apr 2026 08:45:03 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp2.osuosl.org (Postfix) with ESMTP id DE3364039B\n for <buildroot@buildroot.org>; Thu, 9 Apr 2026 08:45:02 +0000 (UTC)", "from smtp2.osuosl.org ([127.0.0.1])\n by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id t6z2y-VYUNpo for <buildroot@buildroot.org>;\n Thu, 9 Apr 2026 08:45:01 +0000 (UTC)", "from dd20012.kasserver.com (dd20012.kasserver.com [85.13.140.57])\n by smtp2.osuosl.org (Postfix) with ESMTPS id BD2D840246\n for <buildroot@buildroot.org>; Thu, 9 Apr 2026 08:45:00 +0000 (UTC)", "from fli4l.lan.fli4l (p4fd6ca66.dip0.t-ipconnect.de\n [79.214.202.102])\n by dd20012.kasserver.com (Postfix) with ESMTPSA id F091BA4C0984;\n Thu, 9 Apr 2026 10:43:19 +0200 (CEST)", "from bruckner.lan.fli4l ([192.168.1.1]:35588)\n by fli4l.lan.fli4l with esmtp (Exim 4.99.1)\n (envelope-from <bernd@kuhls.net>) id 1wAkyi-000000004SH-2WEF;\n Thu, 09 Apr 2026 08:43:08 +0000" ], "X-Virus-Scanned": [ "amavis at osuosl.org", "amavis at osuosl.org" ], "X-Comment": "SPF check N/A for local connections - client-ip=140.211.166.142;\n helo=lists1.osuosl.org; envelope-from=buildroot-bounces@buildroot.org;\n receiver=<UNKNOWN> ", "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 smtp4.osuosl.org 3C0B840797", "OpenDKIM Filter v2.11.0 smtp2.osuosl.org BD2D840246" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=buildroot.org;\n\ts=default; t=1775724304;\n\tbh=z6dwpQauICpTFblJJy28Fd7JBGH+ndwOIInZlucQwCA=;\n\th=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id:\n\t List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:\n\t From;\n\tb=BH+ppT9NSxDPYIQzdh0aPoUCnHG3eRz159KO/oelrDrnAkZTox3Av67/eOEAy8B43\n\t W0XAMLnX66M67wPMVXrn51j4LabW+kIZBsTBxaJzwWiWgFl9d2ZukQh0YNPiLBmdmK\n\t L0m0Dv0lKOcmmxPImCLa0RPASvquuXVb0/vOk4bBB2HT7avhBozn5oTXxIZYXhpR41\n\t mFjnRnA3vAydwpvuGHBxz1KFviU1fV3o985Ojbdd6lYwRSeEJCFjdc4ajFUUIW/kUz\n\t qtibTSZHrAr05YFmmwD2tT7yqp8j73YoJHd/0e6+rNoq2xhdcZ2o9B0/GKgglYgUYv\n\t 3Qx/pf0ENiDAw==", "Received-SPF": "Pass (mailfrom) identity=mailfrom; client-ip=85.13.140.57;\n helo=dd20012.kasserver.com; envelope-from=bernd@kuhls.net;\n receiver=<UNKNOWN>", "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp2.osuosl.org BD2D840246", "From": "Bernd Kuhls <bernd@kuhls.net>", "To": "buildroot@buildroot.org", "Cc": "David GOUARIN <dgouarin@gmail.com>,\n Fabrice Fontaine <fontaine.fabrice@gmail.com>,\n Laurent Cans <laurent.cans@gmail.com>, Mario Lang <mlang@blind.guru>,\n Maxim Kochetkov <fido_max@inbox.ru>,\n Phil Eichinger <phil.eichinger@gmail.com>", "Date": "Thu, 9 Apr 2026 10:43:00 +0200", "Message-ID": "<20260409084305.3960494-16-bernd@kuhls.net>", "X-Mailer": "git-send-email 2.47.3", "In-Reply-To": "<20260409084305.3960494-1-bernd@kuhls.net>", "References": "<20260409084305.3960494-1-bernd@kuhls.net>", "MIME-Version": "1.0", "X-Spamd-Bar": "-", "X-Mailman-Original-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=kuhls.net;\n s=kas202511301023; t=1775724200;\n bh=ngd6jbm4qXU9KIfYvpG7ybXo8Qme3QsK1lGK0ZD2soQ=;\n h=From:To:Cc:Subject:Date:In-Reply-To:From;\n b=DeUEuTf3lToEMI27imkl+t5LSFOzjdGwTBq7Kxo/hBL/bFzsKgDsM+j384Z7S8EAN\n kqGLFllGjhaGOUqNR6PJfXF8OsZoDBI5+lpT/nqQ9lezk6VL6vKpAY7x3qMv9cMhxm\n +1qaZy6juW2gYwUetrqjtBCHgTqjP0c0uxwD/CeMtFOwFxH82zKS3GVFJqv1o7GjDG\n r4GzF3UoFsUHlZZro0t8B0o1X1PYokO6uWr7/ToU4EJB67Xns2frTi00YItxKr2wNS\n Ns2nMZubOea8gZrtcy6XFYcDGbCrlBjFozcw/jTbWVDRDZel5zrA9ysP/oiWeRs4qm\n B/AiSEhRtjvhw==", "X-Mailman-Original-Authentication-Results": [ "smtp2.osuosl.org;\n dmarc=pass (p=none dis=none)\n header.from=kuhls.net", "smtp2.osuosl.org;\n dkim=pass (2048-bit key) header.d=kuhls.net header.i=@kuhls.net\n header.a=rsa-sha256 header.s=kas202511301023 header.b=DeUEuTf3" ], "Subject": "[Buildroot] [PATCH 16/20] package/kodi: switch to pcre2", "X-BeenThere": "buildroot@buildroot.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "Discussion and development of buildroot <buildroot.buildroot.org>", "List-Unsubscribe": "<https://lists.buildroot.org/mailman/options/buildroot>,\n <mailto:buildroot-request@buildroot.org?subject=unsubscribe>", "List-Archive": "<http://lists.buildroot.org/pipermail/buildroot/>", "List-Post": "<mailto:buildroot@buildroot.org>", "List-Help": "<mailto:buildroot-request@buildroot.org?subject=help>", "List-Subscribe": "<https://lists.buildroot.org/mailman/listinfo/buildroot>,\n <mailto:buildroot-request@buildroot.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "buildroot-bounces@buildroot.org", "Sender": "\"buildroot\" <buildroot-bounces@buildroot.org>" }, "content": "Signed-off-by: Bernd Kuhls <bernd@kuhls.net>\n---\n .../0003-RegExp-remove-unused-methods.patch | 127 +++++\n .../0004-Introduce-PCRE2-dependency.patch | 192 +++++++\n ...igrate-PCRE-to-PCRE2-and-remove-PCRE.patch | 486 ++++++++++++++++++\n package/kodi/Config.in | 3 +-\n package/kodi/kodi.mk | 2 +-\n 5 files changed, 807 insertions(+), 3 deletions(-)\n create mode 100644 package/kodi/0003-RegExp-remove-unused-methods.patch\n create mode 100644 package/kodi/0004-Introduce-PCRE2-dependency.patch\n create mode 100644 package/kodi/0005-Migrate-PCRE-to-PCRE2-and-remove-PCRE.patch", "diff": "diff --git a/package/kodi/0003-RegExp-remove-unused-methods.patch b/package/kodi/0003-RegExp-remove-unused-methods.patch\nnew file mode 100644\nindex 0000000000..5f8e1af411\n--- /dev/null\n+++ b/package/kodi/0003-RegExp-remove-unused-methods.patch\n@@ -0,0 +1,127 @@\n+From 4dd017b2eae39356cda0d96a2f5743dbb8ccf299 Mon Sep 17 00:00:00 2001\n+From: fuzzard <fuzzard@kodi.tv>\n+Date: Sun, 2 Jun 2024 12:13:01 +1000\n+Subject: [PATCH] RegExp remove unused methods\n+\n+Upstream: https://github.com/xbmc/xbmc/commit/5df2e57368cf5867f588d00a503eb624e5121460\n+\n+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>\n+---\n+ xbmc/utils/RegExp.cpp | 30 ------------------------------\n+ xbmc/utils/RegExp.h | 5 -----\n+ xbmc/utils/test/TestRegExp.cpp | 17 -----------------\n+ 3 files changed, 52 deletions(-)\n+\n+diff --git a/xbmc/utils/RegExp.cpp b/xbmc/utils/RegExp.cpp\n+index 9667b646a9..40263a28eb 100644\n+--- a/xbmc/utils/RegExp.cpp\n++++ b/xbmc/utils/RegExp.cpp\n+@@ -485,11 +485,6 @@ int CRegExp::GetSubStart(int iSub) const\n+ return m_iOvector[iSub*2] + m_offset;\n+ }\n+ \n+-int CRegExp::GetSubStart(const std::string& subName) const\n+-{\n+- return GetSubStart(GetNamedSubPatternNumber(subName.c_str()));\n+-}\n+-\n+ int CRegExp::GetSubLength(int iSub) const\n+ {\n+ if (!IsValidSubNumber(iSub))\n+@@ -498,11 +493,6 @@ int CRegExp::GetSubLength(int iSub) const\n+ return m_iOvector[(iSub*2)+1] - m_iOvector[(iSub*2)];\n+ }\n+ \n+-int CRegExp::GetSubLength(const std::string& subName) const\n+-{\n+- return GetSubLength(GetNamedSubPatternNumber(subName.c_str()));\n+-}\n+-\n+ std::string CRegExp::GetMatch(int iSub /* = 0 */) const\n+ {\n+ if (!IsValidSubNumber(iSub))\n+@@ -516,26 +506,6 @@ std::string CRegExp::GetMatch(int iSub /* = 0 */) const\n+ return m_subject.substr(pos, len);\n+ }\n+ \n+-std::string CRegExp::GetMatch(const std::string& subName) const\n+-{\n+- return GetMatch(GetNamedSubPatternNumber(subName.c_str()));\n+-}\n+-\n+-bool CRegExp::GetNamedSubPattern(const char* strName, std::string& strMatch) const\n+-{\n+- strMatch.clear();\n+- int iSub = pcre_get_stringnumber(m_re, strName);\n+- if (!IsValidSubNumber(iSub))\n+- return false;\n+- strMatch = GetMatch(iSub);\n+- return true;\n+-}\n+-\n+-int CRegExp::GetNamedSubPatternNumber(const char* strName) const\n+-{\n+- return pcre_get_stringnumber(m_re, strName);\n+-}\n+-\n+ void CRegExp::DumpOvector(int iLog /* = LOGDEBUG */)\n+ {\n+ if (iLog < LOGDEBUG || iLog > LOGNONE)\n+diff --git a/xbmc/utils/RegExp.h b/xbmc/utils/RegExp.h\n+index 53f6019a8f..feea89cd0d 100644\n+--- a/xbmc/utils/RegExp.h\n++++ b/xbmc/utils/RegExp.h\n+@@ -111,15 +111,10 @@ public:\n+ };\n+ int GetSubCount() const { return m_iMatchCount - 1; } // PCRE returns the number of sub-patterns + 1\n+ int GetSubStart(int iSub) const;\n+- int GetSubStart(const std::string& subName) const;\n+ int GetSubLength(int iSub) const;\n+- int GetSubLength(const std::string& subName) const;\n+ int GetCaptureTotal() const;\n+ std::string GetMatch(int iSub = 0) const;\n+- std::string GetMatch(const std::string& subName) const;\n+ const std::string& GetPattern() const { return m_pattern; }\n+- bool GetNamedSubPattern(const char* strName, std::string& strMatch) const;\n+- int GetNamedSubPatternNumber(const char* strName) const;\n+ void DumpOvector(int iLog);\n+ /**\n+ * Check is RegExp object is ready for matching\n+diff --git a/xbmc/utils/test/TestRegExp.cpp b/xbmc/utils/test/TestRegExp.cpp\n+index d757127417..9435a46aa4 100644\n+--- a/xbmc/utils/test/TestRegExp.cpp\n++++ b/xbmc/utils/test/TestRegExp.cpp\n+@@ -96,19 +96,6 @@ TEST(TestRegExp, GetPattern)\n+ EXPECT_STREQ(\"^(Test)\\\\s*(.*)\\\\.\", regex.GetPattern().c_str());\n+ }\n+ \n+-TEST(TestRegExp, GetNamedSubPattern)\n+-{\n+- CRegExp regex;\n+- std::string match;\n+-\n+- EXPECT_TRUE(regex.RegComp(\"^(?<first>Test)\\\\s*(?<second>.*)\\\\.\"));\n+- EXPECT_EQ(0, regex.RegFind(\"Test string.\"));\n+- EXPECT_TRUE(regex.GetNamedSubPattern(\"first\", match));\n+- EXPECT_STREQ(\"Test\", match.c_str());\n+- EXPECT_TRUE(regex.GetNamedSubPattern(\"second\", match));\n+- EXPECT_STREQ(\"string\", match.c_str());\n+-}\n+-\n+ TEST(TestRegExp, operatorEqual)\n+ {\n+ CRegExp regex, regexcopy;\n+@@ -117,10 +104,6 @@ TEST(TestRegExp, operatorEqual)\n+ EXPECT_TRUE(regex.RegComp(\"^(?<first>Test)\\\\s*(?<second>.*)\\\\.\"));\n+ regexcopy = regex;\n+ EXPECT_EQ(0, regexcopy.RegFind(\"Test string.\"));\n+- EXPECT_TRUE(regexcopy.GetNamedSubPattern(\"first\", match));\n+- EXPECT_STREQ(\"Test\", match.c_str());\n+- EXPECT_TRUE(regexcopy.GetNamedSubPattern(\"second\", match));\n+- EXPECT_STREQ(\"string\", match.c_str());\n+ }\n+ \n+ class TestRegExpLog : public testing::Test\n+-- \n+2.47.3\n+\ndiff --git a/package/kodi/0004-Introduce-PCRE2-dependency.patch b/package/kodi/0004-Introduce-PCRE2-dependency.patch\nnew file mode 100644\nindex 0000000000..d72c9805b6\n--- /dev/null\n+++ b/package/kodi/0004-Introduce-PCRE2-dependency.patch\n@@ -0,0 +1,192 @@\n+From 4a4642b1d7562b553f80da279255a9755a9e20f7 Mon Sep 17 00:00:00 2001\n+From: fuzzard <fuzzard@kodi.tv>\n+Date: Sun, 2 Jun 2024 13:24:57 +1000\n+Subject: [PATCH] Introduce PCRE2 dependency\n+\n+create PCRE2 in tools/depends/target\n+Create Find module for PCRE2\n+\n+Upstream: https://github.com/xbmc/xbmc/commit/5c24bf262e5cd75b413fcb4c2c5c144d6971d7cc\n+\n+[Bernd: backported relevant parts to 21.3-Omega]\n+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>\n+---\n+ cmake/modules/FindPCRE2.cmake | 151 +++++++++++++++++++++++\n+ tools/depends/target/pcre2/PCRE2-VERSION | 7 ++\n+ 2 files changed, 158 insertions(+)\n+ create mode 100644 cmake/modules/FindPCRE2.cmake\n+ create mode 100644 tools/depends/target/pcre2/PCRE2-VERSION\n+\n+diff --git a/cmake/modules/FindPCRE2.cmake b/cmake/modules/FindPCRE2.cmake\n+new file mode 100644\n+index 0000000000..7e50d5f2c1\n+--- /dev/null\n++++ b/cmake/modules/FindPCRE2.cmake\n+@@ -0,0 +1,151 @@\n++#.rst:\n++# FindPCRE2\n++# --------\n++# Finds the PCRE2 library\n++#\n++# This will define the following imported target::\n++#\n++# ${APP_NAME_LC}::PCRE2 - The PCRE2 library\n++\n++if(NOT TARGET ${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME})\n++\n++ macro(buildPCRE2)\n++ set(PCRE2_VERSION ${${MODULE}_VER})\n++ if(WIN32)\n++ set(PCRE_DEBUG_POSTFIX d)\n++ endif()\n++\n++ set(patches \"${CORE_SOURCE_DIR}/tools/depends/target/${MODULE_LC}/001-all-enable_docs_pc.patch\"\n++ \"${CORE_SOURCE_DIR}/tools/depends/target/${MODULE_LC}/002-all-cmake-config-installdir.patch\")\n++\n++ generate_patchcommand(\"${patches}\")\n++\n++ set(CMAKE_ARGS -DBUILD_STATIC_LIBS=ON\n++ -DPCRE2_BUILD_PCRE2_8=ON\n++ -DPCRE2_BUILD_PCRE2_16=OFF\n++ -DPCRE2_BUILD_PCRE2_32=OFF\n++ -DPCRE2_SUPPORT_JIT=ON\n++ -DPCRE2_SUPPORT_UNICODE=ON\n++ -DPCRE2_BUILD_PCRE2GREP=OFF\n++ -DPCRE2_BUILD_TESTS=OFF\n++ -DENABLE_DOCS=OFF)\n++\n++ if(CORE_SYSTEM_NAME STREQUAL darwin_embedded)\n++ list(APPEND CMAKE_ARGS -DPCRE2_SUPPORT_JIT=OFF)\n++ endif()\n++\n++ set(${CMAKE_FIND_PACKAGE_NAME}_COMPILEDEFINITIONS PCRE2_STATIC)\n++\n++ BUILD_DEP_TARGET()\n++ endmacro()\n++\n++ include(cmake/scripts/common/ModuleHelpers.cmake)\n++\n++ set(MODULE_LC pcre2)\n++\n++ SETUP_BUILD_VARS()\n++\n++ if(KODI_DEPENDSBUILD OR (WIN32 OR WINDOWS_STORE))\n++ set(PCRE2_USE_STATIC_LIBS ON)\n++ endif()\n++\n++ # Check for existing PCRE2. If version >= PCRE2-VERSION file version, dont build\n++ find_package(PCRE2 CONFIG COMPONENTS 8BIT QUIET)\n++\n++ if((PCRE2_VERSION VERSION_LESS ${${MODULE}_VER} AND ENABLE_INTERNAL_PCRE2) OR\n++ ((CORE_SYSTEM_NAME STREQUAL linux OR CORE_SYSTEM_NAME STREQUAL freebsd) AND ENABLE_INTERNAL_PCRE2))\n++ buildPCRE2()\n++ else()\n++ # if PCRE2::8BIT target exists, it meets version requirements\n++ # we only do a pkgconfig search when a suitable cmake config returns nothing\n++ if(TARGET PCRE2::8BIT)\n++ get_target_property(_PCRE2_CONFIGURATIONS PCRE2::8BIT IMPORTED_CONFIGURATIONS)\n++ if(_PCRE2_CONFIGURATIONS)\n++ foreach(_pcre2_config IN LISTS _PCRE2_CONFIGURATIONS)\n++ # Just set to RELEASE var so select_library_configurations can continue to work its magic\n++ string(TOUPPER ${_pcre2_config} _pcre2_config_UPPER)\n++ if((NOT ${_pcre2_config_UPPER} STREQUAL \"RELEASE\") AND\n++ (NOT ${_pcre2_config_UPPER} STREQUAL \"DEBUG\"))\n++ get_target_property(PCRE2_LIBRARY_RELEASE PCRE2::8BIT IMPORTED_LOCATION_${_pcre2_config_UPPER})\n++ else()\n++ get_target_property(PCRE2_LIBRARY_${_pcre2_config_UPPER} PCRE2::8BIT IMPORTED_LOCATION_${_pcre2_config_UPPER})\n++ endif()\n++ endforeach()\n++ else()\n++ get_target_property(PCRE2_LIBRARY_RELEASE PCRE2::8BIT IMPORTED_LOCATION)\n++ endif()\n++ get_target_property(PCRE2_INCLUDE_DIR PCRE2::8BIT INTERFACE_INCLUDE_DIRECTORIES)\n++ else()\n++ # ToDo: use pkgconfig data imported and drop manual find_path/find_library\n++ find_package(PkgConfig)\n++ if(PKG_CONFIG_FOUND)\n++ pkg_check_modules(PC_PCRE2 libpcre2-8 QUIET)\n++ endif()\n++ \n++ find_path(PCRE2_INCLUDE_DIR pcre2.h\n++ HINTS ${PC_PCRE2_INCLUDEDIR})\n++ find_library(PCRE2_LIBRARY_RELEASE NAMES pcre2-8\n++ HINTS ${PC_PCRE2_LIBDIR})\n++ set(PCRE2_VERSION ${PC_PCRE2_VERSION})\n++ endif()\n++ endif()\n++\n++ include(SelectLibraryConfigurations)\n++ select_library_configurations(PCRE2)\n++\n++ include(FindPackageHandleStandardArgs)\n++ find_package_handle_standard_args(PCRE2\n++ REQUIRED_VARS PCRE2_LIBRARY PCRE2_INCLUDE_DIR\n++ VERSION_VAR PCRE2_VERSION)\n++\n++ if(PCRE2_FOUND)\n++ if(TARGET PCRE2::8BIT AND NOT TARGET pcre2)\n++ add_library(${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME} ALIAS PCRE2::8BIT)\n++ else()\n++ add_library(${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME} UNKNOWN IMPORTED)\n++ if(PCRE2_LIBRARY_RELEASE)\n++ set_target_properties(${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME} PROPERTIES\n++ IMPORTED_CONFIGURATIONS RELEASE\n++ IMPORTED_LOCATION_RELEASE \"${PCRE2_LIBRARY_RELEASE}\")\n++ endif()\n++ if(PCRE2_LIBRARY_DEBUG)\n++ set_target_properties(${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME} PROPERTIES\n++ IMPORTED_LOCATION_DEBUG \"${PCRE2_LIBRARY_DEBUG}\")\n++ set_property(TARGET ${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME} APPEND PROPERTY\n++ IMPORTED_CONFIGURATIONS DEBUG)\n++ endif()\n++ set_target_properties(${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME} PROPERTIES\n++ INTERFACE_INCLUDE_DIRECTORIES \"${PCRE2_INCLUDE_DIR}\")\n++\n++ # Add interface compile definitions. This will usually come from an INTERNAL build being required.\n++ if(${CMAKE_FIND_PACKAGE_NAME}_COMPILEDEFINITIONS)\n++ set_property(TARGET ${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME} APPEND PROPERTY\n++ INTERFACE_COMPILE_DEFINITIONS ${${CMAKE_FIND_PACKAGE_NAME}_COMPILEDEFINITIONS})\n++ endif()\n++ endif()\n++ if(TARGET pcre2)\n++ add_dependencies(${APP_NAME_LC}::${CMAKE_FIND_PACKAGE_NAME} pcre2)\n++ endif()\n++\n++ # Add internal build target when a Multi Config Generator is used\n++ # We cant add a dependency based off a generator expression for targeted build types,\n++ # https://gitlab.kitware.com/cmake/cmake/-/issues/19467\n++ # therefore if the find heuristics only find the library, we add the internal build\n++ # target to the project to allow user to manually trigger for any build type they need\n++ # in case only a specific build type is actually available (eg Release found, Debug Required)\n++ # This is mainly targeted for windows who required different runtime libs for different\n++ # types, and they arent compatible\n++ if(_multiconfig_generator)\n++ if(NOT TARGET pcre2)\n++ buildPCRE2()\n++ set_target_properties(pcre2 PROPERTIES EXCLUDE_FROM_ALL TRUE)\n++ endif()\n++ add_dependencies(build_internal_depends pcre2)\n++ endif()\n++\n++ else()\n++ if(PCRE2_FIND_REQUIRED)\n++ message(FATAL_ERROR \"PCRE2 not found. Possibly use -DENABLE_INTERNAL_PCRE2=ON to build PCRE2\")\n++ endif()\n++ endif()\n++endif()\n+diff --git a/tools/depends/target/pcre2/PCRE2-VERSION b/tools/depends/target/pcre2/PCRE2-VERSION\n+new file mode 100644\n+index 0000000000..800eebf0b9\n+--- /dev/null\n++++ b/tools/depends/target/pcre2/PCRE2-VERSION\n+@@ -0,0 +1,7 @@\n++LIBNAME=pcre2\n++VERSION=10.42\n++ARCHIVE=$(LIBNAME)-$(VERSION).tar.bz2\n++SHA512=72fbde87fecec3aa4b47225dd919ea1d55e97f2cbcf02aba26e5a0d3b1ffb58c25a80a9ef069eb99f9cf4e41ba9604ad06a7ec159870e1e875d86820e12256d3\n++BYPRODUCT=libpcre2-8.a\n++BYPRODUCT_WIN=pcre2-8-static.lib\n++\n+-- \n+2.47.3\n+\ndiff --git a/package/kodi/0005-Migrate-PCRE-to-PCRE2-and-remove-PCRE.patch b/package/kodi/0005-Migrate-PCRE-to-PCRE2-and-remove-PCRE.patch\nnew file mode 100644\nindex 0000000000..8a71a3a0a8\n--- /dev/null\n+++ b/package/kodi/0005-Migrate-PCRE-to-PCRE2-and-remove-PCRE.patch\n@@ -0,0 +1,486 @@\n+From 250d14b8e3f614147c9465ca6c1b86a3b5a5f7a2 Mon Sep 17 00:00:00 2001\n+From: fuzzard <fuzzard@kodi.tv>\n+Date: Sun, 2 Jun 2024 13:56:07 +1000\n+Subject: [PATCH] Migrate PCRE to PCRE2 and remove PCRE\n+\n+Upstream: https://github.com/xbmc/xbmc/commit/8e0c4fd22a0b1f9c54b0536960752263f0d5a04f\n+\n+[Bernd: backported to 21.3-Omega]\n+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>\n+---\n+ CMakeLists.txt | 4 +-\n+ xbmc/utils/RegExp.cpp | 202 ++++++++++++++++++-------------------\n+ xbmc/utils/RegExp.h | 22 ++--\n+ xbmc/utils/StringUtils.cpp | 6 +-\n+ 4 files changed, 111 insertions(+), 123 deletions(-)\n+\n+diff --git a/CMakeLists.txt b/CMakeLists.txt\n+index eb648e9a27..319b95044f 100644\n+--- a/CMakeLists.txt\n++++ b/CMakeLists.txt\n+@@ -92,7 +92,7 @@ dependent_option(ENABLE_INTERNAL_CEC \"Enable internal libcec?\")\n+ dependent_option(ENABLE_INTERNAL_FLATBUFFERS \"Enable internal flatbuffers?\")\n+ dependent_option(ENABLE_INTERNAL_FMT \"Enable internal fmt?\")\n+ dependent_option(ENABLE_INTERNAL_NFS \"Enable internal libnfs?\")\n+-dependent_option(ENABLE_INTERNAL_PCRE \"Enable internal pcre?\")\n++dependent_option(ENABLE_INTERNAL_PCRE2 \"Enable internal pcre2?\")\n+ dependent_option(ENABLE_INTERNAL_RapidJSON \"Enable internal rapidjson?\")\n+ \n+ # If ENABLE_INTERNAL_FMT is ON, we force ENABLE_INTERNAL_SPDLOG ON as it has a hard\n+@@ -215,7 +215,7 @@ set(required_deps ASS>=0.15.0\n+ LibDvd\n+ Lzo2\n+ OpenSSL>=1.1.0\n+- PCRE\n++ PCRE2\n+ RapidJSON>=1.0.2\n+ Spdlog\n+ Sqlite3\n+diff --git a/xbmc/utils/RegExp.cpp b/xbmc/utils/RegExp.cpp\n+index 40263a28eb..cb620208dc 100644\n+--- a/xbmc/utils/RegExp.cpp\n++++ b/xbmc/utils/RegExp.cpp\n+@@ -16,27 +16,6 @@\n+ #include <stdlib.h>\n+ #include <string.h>\n+ \n+-using namespace PCRE;\n+-\n+-#ifndef PCRE_UCP\n+-#define PCRE_UCP 0\n+-#endif // PCRE_UCP\n+-\n+-#ifdef PCRE_CONFIG_JIT\n+-#define PCRE_HAS_JIT_CODE 1\n+-#endif\n+-\n+-#ifndef PCRE_STUDY_JIT_COMPILE\n+-#define PCRE_STUDY_JIT_COMPILE 0\n+-#endif\n+-#ifndef PCRE_INFO_JIT\n+-// some unused number\n+-#define PCRE_INFO_JIT 2048\n+-#endif\n+-#ifndef PCRE_HAS_JIT_CODE\n+-#define pcre_free_study(x) pcre_free((x))\n+-#endif\n+-\n+ int CRegExp::m_Utf8Supported = -1;\n+ int CRegExp::m_UcpSupported = -1;\n+ int CRegExp::m_JitSupported = -1;\n+@@ -51,25 +30,24 @@ void CRegExp::InitValues(bool caseless /*= false*/, CRegExp::utf8Mode utf8 /*= a\n+ {\n+ m_utf8Mode = utf8;\n+ m_re = NULL;\n+- m_sd = NULL;\n+- m_iOptions = PCRE_DOTALL | PCRE_NEWLINE_ANY;\n++ m_ctxt = nullptr;\n++ m_iOptions = PCRE2_DOTALL;\n+ if(caseless)\n+- m_iOptions |= PCRE_CASELESS;\n++ m_iOptions |= PCRE2_CASELESS;\n+ if (m_utf8Mode == forceUtf8)\n+ {\n+ if (IsUtf8Supported())\n+- m_iOptions |= PCRE_UTF8;\n++ m_iOptions |= PCRE2_UTF;\n+ if (AreUnicodePropertiesSupported())\n+- m_iOptions |= PCRE_UCP;\n++ m_iOptions |= PCRE2_UCP;\n+ }\n+ \n+ m_offset = 0;\n+ m_jitCompiled = false;\n+ m_bMatched = false;\n+ m_iMatchCount = 0;\n+- m_jitStack = NULL;\n+-\n+- memset(m_iOvector, 0, sizeof(m_iOvector));\n++ m_iOvector = nullptr;\n++ m_jitStack = NULL;\n+ }\n+ \n+ CRegExp::CRegExp(bool caseless, CRegExp::utf8Mode utf8, const char *re, studyMode study /*= NoStudy*/)\n+@@ -225,7 +203,8 @@ bool CRegExp::isCharClassWithUnicode(const std::string& regexp, size_t& pos)\n+ CRegExp::CRegExp(const CRegExp& re)\n+ {\n+ m_re = NULL;\n+- m_sd = NULL;\n++ m_ctxt = nullptr;\n++ m_iOvector = nullptr;\n+ m_jitStack = NULL;\n+ m_utf8Mode = re.m_utf8Mode;\n+ m_iOptions = re.m_iOptions;\n+@@ -240,12 +219,13 @@ CRegExp& CRegExp::operator=(const CRegExp& re)\n+ m_pattern = re.m_pattern;\n+ if (re.m_re)\n+ {\n+- if (pcre_fullinfo(re.m_re, NULL, PCRE_INFO_SIZE, &size) >= 0)\n++ if (pcre2_pattern_info(re.m_re, PCRE2_INFO_SIZE, &size) >= 0)\n+ {\n+- if ((m_re = (pcre*)malloc(size)))\n++ if ((m_re = pcre2_code_copy(re.m_re)))\n+ {\n+- memcpy(m_re, re.m_re, size);\n+- memcpy(m_iOvector, re.m_iOvector, OVECCOUNT*sizeof(int));\n++ if (re.m_ctxt)\n++ m_ctxt = pcre2_match_context_copy(re.m_ctxt);\n++ m_iOvector = re.m_iOvector;\n+ m_offset = re.m_offset;\n+ m_iMatchCount = re.m_iMatchCount;\n+ m_bMatched = re.m_bMatched;\n+@@ -273,18 +253,27 @@ bool CRegExp::RegComp(const char *re, studyMode study /*= NoStudy*/)\n+ m_jitCompiled = false;\n+ m_bMatched = false;\n+ m_iMatchCount = 0;\n+- const char *errMsg = NULL;\n+- int errOffset = 0;\n+- int options = m_iOptions;\n++ pcre2_compile_context* ctxt;\n++ int errCode;\n++ char errMsg[120];\n++ PCRE2_SIZE errOffset;\n++ uint32_t options = m_iOptions;\n+ if (m_utf8Mode == autoUtf8 && requireUtf8(re))\n+- options |= (IsUtf8Supported() ? PCRE_UTF8 : 0) | (AreUnicodePropertiesSupported() ? PCRE_UCP : 0);\n++ options |=\n++ (IsUtf8Supported() ? PCRE2_UTF : 0) | (AreUnicodePropertiesSupported() ? PCRE2_UCP : 0);\n+ \n+ Cleanup();\n+ \n+- m_re = pcre_compile(re, options, &errMsg, &errOffset, NULL);\n++ ctxt = pcre2_compile_context_create(NULL);\n++ pcre2_set_newline(ctxt, PCRE2_NEWLINE_ANY);\n++ m_re = pcre2_compile(reinterpret_cast<PCRE2_SPTR>(re), PCRE2_ZERO_TERMINATED, options, &errCode,\n++ &errOffset, ctxt);\n++ pcre2_compile_context_free(ctxt);\n++\n+ if (!m_re)\n+ {\n+ m_pattern.clear();\n++ pcre2_get_error_message(errCode, reinterpret_cast<PCRE2_UCHAR*>(errMsg), sizeof(errMsg));\n+ CLog::Log(LOGERROR, \"PCRE: {}. Compilation failed at offset {} in expression '{}'\", errMsg,\n+ errOffset, re);\n+ return false;\n+@@ -295,23 +284,12 @@ bool CRegExp::RegComp(const char *re, studyMode study /*= NoStudy*/)\n+ if (study)\n+ {\n+ const bool jitCompile = (study == StudyWithJitComp) && IsJitSupported();\n+- const int studyOptions = jitCompile ? PCRE_STUDY_JIT_COMPILE : 0;\n+-\n+- m_sd = pcre_study(m_re, studyOptions, &errMsg);\n+- if (errMsg != NULL)\n+- {\n+- CLog::Log(LOGWARNING, \"{}: PCRE error \\\"{}\\\" while studying expression\", __FUNCTION__,\n+- errMsg);\n+- if (m_sd != NULL)\n+- {\n+- pcre_free_study(m_sd);\n+- m_sd = NULL;\n+- }\n+- }\n+- else if (jitCompile)\n++ if (jitCompile)\n+ {\n+- int jitPresent = 0;\n+- m_jitCompiled = (pcre_fullinfo(m_re, m_sd, PCRE_INFO_JIT, &jitPresent) == 0 && jitPresent == 1);\n++ pcre2_jit_compile(m_re, PCRE2_JIT_COMPLETE);\n++ size_t jitPresent = 0;\n++ m_jitCompiled =\n++ (pcre2_pattern_info(m_re, PCRE2_INFO_JITSIZE, &jitPresent) == 0 && jitPresent > 0);\n+ }\n+ }\n+ \n+@@ -325,6 +303,9 @@ int CRegExp::RegFind(const char *str, unsigned int startoffset /*= 0*/, int maxN\n+ \n+ int CRegExp::PrivateRegFind(size_t bufferLen, const char *str, unsigned int startoffset /* = 0*/, int maxNumberOfCharsToTest /*= -1*/)\n+ {\n++ pcre2_match_data* md;\n++ PCRE2_SIZE offset;\n++\n+ m_offset = 0;\n+ m_bMatched = false;\n+ m_iMatchCount = 0;\n+@@ -347,37 +328,46 @@ int CRegExp::PrivateRegFind(size_t bufferLen, const char *str, unsigned int star\n+ return -1;\n+ }\n+ \n+-#ifdef PCRE_HAS_JIT_CODE\n++ if (!m_ctxt)\n++ m_ctxt = pcre2_match_context_create(NULL);\n++\n+ if (m_jitCompiled && !m_jitStack)\n+ {\n+- m_jitStack = pcre_jit_stack_alloc(32*1024, 512*1024);\n++ m_jitStack = pcre2_jit_stack_create(32 * 1024, 512 * 1024, NULL);\n+ if (m_jitStack == NULL)\n+ CLog::Log(LOGWARNING, \"{}: can't allocate address space for JIT stack\", __FUNCTION__);\n+ \n+- pcre_assign_jit_stack(m_sd, NULL, m_jitStack);\n++ pcre2_jit_stack_assign(m_ctxt, NULL, m_jitStack);\n+ }\n+-#endif\n+ \n+ if (maxNumberOfCharsToTest >= 0)\n+ bufferLen = std::min<size_t>(bufferLen, startoffset + maxNumberOfCharsToTest);\n+ \n+ m_subject.assign(str + startoffset, bufferLen - startoffset);\n+- int rc = pcre_exec(m_re, NULL, m_subject.c_str(), m_subject.length(), 0, 0, m_iOvector, OVECCOUNT);\n++ md = pcre2_match_data_create(OVECCOUNT, nullptr);\n++ int rc = pcre2_match(m_re, reinterpret_cast<PCRE2_SPTR>(m_subject.c_str()), m_subject.length(), 0,\n++ 0, md, m_ctxt);\n++ m_iOvector = pcre2_get_ovector_pointer(md);\n++ offset = pcre2_get_startchar(md);\n++ pcre2_match_data_free(md);\n+ \n+ if (rc<1)\n+ {\n+ static const int fragmentLen = 80; // length of excerpt before erroneous char for log\n+ switch(rc)\n+ {\n+- case PCRE_ERROR_NOMATCH:\n+- return -1;\n++ case PCRE2_ERROR_NOMATCH:\n++ return -1;\n+ \n+- case PCRE_ERROR_MATCHLIMIT:\n+- CLog::Log(LOGERROR, \"PCRE: Match limit reached\");\n+- return -1;\n++ case PCRE2_ERROR_MATCHLIMIT:\n++ CLog::Log(LOGERROR, \"PCRE: Match limit reached\");\n++ return -1;\n+ \n+-#ifdef PCRE_ERROR_SHORTUTF8\n+- case PCRE_ERROR_SHORTUTF8:\n++ case PCRE2_ERROR_UTF8_ERR1:\n++ case PCRE2_ERROR_UTF8_ERR2:\n++ case PCRE2_ERROR_UTF8_ERR3:\n++ case PCRE2_ERROR_UTF8_ERR4:\n++ case PCRE2_ERROR_UTF8_ERR5:\n+ {\n+ const size_t startPos = (m_subject.length() > fragmentLen) ? CUtf8Utils::RFindValidUtf8Char(m_subject, m_subject.length() - fragmentLen) : 0;\n+ if (startPos != std::string::npos)\n+@@ -389,28 +379,44 @@ int CRegExp::PrivateRegFind(size_t bufferLen, const char *str, unsigned int star\n+ CLog::Log(LOGERROR, \"PCRE: Bad UTF-8 character at the end of string\");\n+ return -1;\n+ }\n+-#endif\n+- case PCRE_ERROR_BADUTF8:\n++ case PCRE2_ERROR_UTF8_ERR6:\n++ case PCRE2_ERROR_UTF8_ERR7:\n++ case PCRE2_ERROR_UTF8_ERR8:\n++ case PCRE2_ERROR_UTF8_ERR9:\n++ case PCRE2_ERROR_UTF8_ERR10:\n++ case PCRE2_ERROR_UTF8_ERR11:\n++ case PCRE2_ERROR_UTF8_ERR12:\n++ case PCRE2_ERROR_UTF8_ERR13:\n++ case PCRE2_ERROR_UTF8_ERR14:\n++ case PCRE2_ERROR_UTF8_ERR15:\n++ case PCRE2_ERROR_UTF8_ERR16:\n++ case PCRE2_ERROR_UTF8_ERR17:\n++ case PCRE2_ERROR_UTF8_ERR18:\n++ case PCRE2_ERROR_UTF8_ERR19:\n++ case PCRE2_ERROR_UTF8_ERR20:\n++ case PCRE2_ERROR_UTF8_ERR21:\n+ {\n++ char errbuf[120];\n++\n++ pcre2_get_error_message(rc, reinterpret_cast<PCRE2_UCHAR*>(errbuf), sizeof(errbuf));\n+ const size_t startPos = (m_iOvector[0] > fragmentLen) ? CUtf8Utils::RFindValidUtf8Char(m_subject, m_iOvector[0] - fragmentLen) : 0;\n+- if (m_iOvector[0] >= 0 && startPos != std::string::npos)\n++ if ((int)m_iOvector[0] >= 0 && startPos != std::string::npos)\n+ CLog::Log(LOGERROR,\n+ \"PCRE: Bad UTF-8 character, error code: {}, position: {}. Text before bad \"\n+ \"char: \\\"{}\\\"\",\n+- m_iOvector[1], m_iOvector[0],\n+- m_subject.substr(startPos, m_iOvector[0] - startPos + 1));\n++ errbuf, offset, m_subject.substr(startPos, m_iOvector[0] - startPos + 1));\n+ else\n+- CLog::Log(LOGERROR, \"PCRE: Bad UTF-8 character, error code: {}, position: {}\",\n+- m_iOvector[1], m_iOvector[0]);\n++ CLog::Log(LOGERROR, \"PCRE: Bad UTF-8 character, error code: {}, position: {}\", errbuf,\n++ offset);\n+ return -1;\n+ }\n+- case PCRE_ERROR_BADUTF8_OFFSET:\n+- CLog::Log(LOGERROR, \"PCRE: Offset is pointing to the middle of UTF-8 character\");\n+- return -1;\n++ case PCRE2_ERROR_BADUTFOFFSET:\n++ CLog::Log(LOGERROR, \"PCRE: Offset is pointing to the middle of UTF-8 character\");\n++ return -1;\n+ \n+- default:\n+- CLog::Log(LOGERROR, \"PCRE: Unknown error: {}\", rc);\n+- return -1;\n++ default:\n++ CLog::Log(LOGERROR, \"PCRE: Unknown error: {}\", rc);\n++ return -1;\n+ }\n+ }\n+ m_offset = startoffset;\n+@@ -423,7 +429,7 @@ int CRegExp::GetCaptureTotal() const\n+ {\n+ int c = -1;\n+ if (m_re)\n+- pcre_fullinfo(m_re, NULL, PCRE_INFO_CAPTURECOUNT, &c);\n++ pcre2_pattern_info(m_re, PCRE2_INFO_CAPTURECOUNT, &c);\n+ return c;\n+ }\n+ \n+@@ -528,23 +534,21 @@ void CRegExp::Cleanup()\n+ {\n+ if (m_re)\n+ {\n+- pcre_free(m_re);\n+- m_re = NULL;\n++ pcre2_code_free(m_re);\n++ m_re = nullptr;\n+ }\n+ \n+- if (m_sd)\n++ if (m_ctxt)\n+ {\n+- pcre_free_study(m_sd);\n+- m_sd = NULL;\n++ pcre2_match_context_free(m_ctxt);\n++ m_ctxt = nullptr;\n+ }\n+ \n+-#ifdef PCRE_HAS_JIT_CODE\n+ if (m_jitStack)\n+ {\n+- pcre_jit_stack_free(m_jitStack);\n++ pcre2_jit_stack_free(m_jitStack);\n+ m_jitStack = NULL;\n+ }\n+-#endif\n+ }\n+ \n+ inline bool CRegExp::IsValidSubNumber(int iSub) const\n+@@ -557,7 +561,7 @@ bool CRegExp::IsUtf8Supported(void)\n+ {\n+ if (m_Utf8Supported == -1)\n+ {\n+- if (pcre_config(PCRE_CONFIG_UTF8, &m_Utf8Supported) != 0)\n++ if (pcre2_config(PCRE2_CONFIG_UNICODE, &m_Utf8Supported) < 0)\n+ m_Utf8Supported = 0;\n+ }\n+ \n+@@ -566,13 +570,11 @@ bool CRegExp::IsUtf8Supported(void)\n+ \n+ bool CRegExp::AreUnicodePropertiesSupported(void)\n+ {\n+-#if defined(PCRE_CONFIG_UNICODE_PROPERTIES) && PCRE_UCP != 0\n+ if (m_UcpSupported == -1)\n+ {\n+- if (pcre_config(PCRE_CONFIG_UNICODE_PROPERTIES, &m_UcpSupported) != 0)\n++ if (pcre2_config(PCRE2_CONFIG_UNICODE, &m_UcpSupported) < 0)\n+ m_UcpSupported = 0;\n+ }\n+-#endif\n+ \n+ return m_UcpSupported == 1;\n+ }\n+@@ -595,13 +597,13 @@ bool CRegExp::LogCheckUtf8Support(void)\n+ \n+ if (!utf8FullSupport)\n+ {\n++ char ver[24];\n++\n++ pcre2_config(PCRE2_CONFIG_VERSION, ver);\n+ CLog::Log(LOGINFO,\n+- \"Consider installing PCRE lib version 8.10 or later with enabled Unicode properties \"\n++ \"Consider installing PCRE lib version 10.10 or later with enabled Unicode properties \"\n+ \"and UTF-8 support. Your PCRE lib version: {}\",\n+- PCRE::pcre_version());\n+-#if PCRE_UCP == 0\n+- CLog::Log(LOGINFO, \"You will need to rebuild XBMC after PCRE lib update.\");\n+-#endif\n++ ver);\n+ }\n+ \n+ return utf8FullSupport;\n+@@ -611,9 +613,7 @@ bool CRegExp::IsJitSupported(void)\n+ {\n+ if (m_JitSupported == -1)\n+ {\n+-#ifdef PCRE_HAS_JIT_CODE\n+- if (pcre_config(PCRE_CONFIG_JIT, &m_JitSupported) != 0)\n+-#endif\n++ if (pcre2_config(PCRE2_CONFIG_JIT, &m_JitSupported) < 0)\n+ m_JitSupported = 0;\n+ }\n+ \n+diff --git a/xbmc/utils/RegExp.h b/xbmc/utils/RegExp.h\n+index feea89cd0d..90d3db541e 100644\n+--- a/xbmc/utils/RegExp.h\n++++ b/xbmc/utils/RegExp.h\n+@@ -13,16 +13,8 @@\n+ #include <string>\n+ #include <vector>\n+ \n+-/* make sure stdlib.h is included before including pcre.h inside the\n+- namespace; this works around stdlib.h definitions also living in\n+- the PCRE namespace */\n+-#include <stdlib.h>\n+-\n+-namespace PCRE {\n+-struct real_pcre_jit_stack; // forward declaration for PCRE without JIT\n+-typedef struct real_pcre_jit_stack pcre_jit_stack;\n+-#include <pcre.h>\n+-}\n++#define PCRE2_CODE_UNIT_WIDTH 8\n++#include <pcre2.h>\n+ \n+ class CRegExp\n+ {\n+@@ -138,17 +130,17 @@ private:\n+ void Cleanup();\n+ inline bool IsValidSubNumber(int iSub) const;\n+ \n+- PCRE::pcre* m_re;\n+- PCRE::pcre_extra* m_sd;\n++ pcre2_code* m_re;\n++ pcre2_match_context* m_ctxt;\n+ static const int OVECCOUNT=(m_MaxNumOfBackrefrences + 1) * 3;\n+ unsigned int m_offset;\n+- int m_iOvector[OVECCOUNT];\n++ PCRE2_SIZE* m_iOvector;\n+ utf8Mode m_utf8Mode;\n+ int m_iMatchCount;\n+- int m_iOptions;\n++ uint32_t m_iOptions;\n+ bool m_jitCompiled;\n+ bool m_bMatched;\n+- PCRE::pcre_jit_stack* m_jitStack;\n++ pcre2_jit_stack* m_jitStack;\n+ std::string m_subject;\n+ std::string m_pattern;\n+ static int m_Utf8Supported;\n+diff --git a/xbmc/utils/StringUtils.cpp b/xbmc/utils/StringUtils.cpp\n+index 2c77e58ebd..d390113dd7 100644\n+--- a/xbmc/utils/StringUtils.cpp\n++++ b/xbmc/utils/StringUtils.cpp\n+@@ -30,6 +30,7 @@\n+ #include \"LangInfo.h\"\n+ #include \"StringUtils.h\"\n+ #include \"XBDateTime.h\"\n++#include \"utils/RegExp.h\"\n+ \n+ #include <algorithm>\n+ #include <array>\n+@@ -46,11 +47,6 @@\n+ #include <fstrcmp.h>\n+ #include <memory.h>\n+ \n+-// don't move or std functions end up in PCRE namespace\n+-// clang-format off\n+-#include \"utils/RegExp.h\"\n+-// clang-format on\n+-\n+ #define FORMAT_BLOCK_SIZE 512 // # of bytes for initial allocation for printf\n+ \n+ namespace\n+-- \n+2.47.3\n+\ndiff --git a/package/kodi/Config.in b/package/kodi/Config.in\nindex 9661ab47bc..a05a180eb3 100644\n--- a/package/kodi/Config.in\n+++ b/package/kodi/Config.in\n@@ -91,8 +91,7 @@ menuconfig BR2_PACKAGE_KODI\n \tselect BR2_PACKAGE_LIBPNG\n \tselect BR2_PACKAGE_LZO\n \tselect BR2_PACKAGE_OPENSSL\n-\tselect BR2_PACKAGE_PCRE\n-\tselect BR2_PACKAGE_PCRE_UCP\n+\tselect BR2_PACKAGE_PCRE2\n \tselect BR2_PACKAGE_PYTHON3_2TO3\n \tselect BR2_PACKAGE_PYTHON3_PYEXPAT\n \tselect BR2_PACKAGE_PYTHON3_SQLITE\ndiff --git a/package/kodi/kodi.mk b/package/kodi/kodi.mk\nindex c31e789503..0c177a94dd 100644\n--- a/package/kodi/kodi.mk\n+++ b/package/kodi/kodi.mk\n@@ -47,7 +47,7 @@ KODI_DEPENDENCIES = \\\n \tlibpng \\\n \tlzo \\\n \topenssl \\\n-\tpcre \\\n+\tpcre2 \\\n \tpython3 \\\n \trapidjson \\\n \tspdlog \\\n", "prefixes": [ "16/20" ] }