diff --git a/pkg.info b/pkg.info index 7e85576..51b6d26 100644 --- a/pkg.info +++ b/pkg.info @@ -1,18 +1,18 @@ name: libxml2 description: XML C parser and toolkit -version: 2.15.1 -revision: 2 +version: 2.15.2 +revision: 1 url: https://gitlab.gnome.org/GNOME/libxml2 license: MIT +maintainers: + - enumdev@enumerated.dev architecture: any type: source depends: - bash - glibc - icu - - ncurses - readline - - xz-utils - zlib optional_depends: - python3 @@ -24,4 +24,4 @@ downloads: - url: https://download.gnome.org/sources/libxml2/${BPM_PKG_VERSION%.*}/libxml2-${BPM_PKG_VERSION}.tar.xz extract_to: ${BPM_SOURCE} extract_strip_components: 1 - checksum: c008bac08fd5c7b4a87f7b8a71f283fa581d80d80ff8d2efd3b26224c39bc54c + checksum: c8b9bc81f8b590c33af8cc6c336dbff2f53409973588a351c95f1c621b13d09d diff --git a/source-files/0001-catalog-Free-xmlCatalogResolveCache-on-cleanup.patch b/source-files/0001-catalog-Free-xmlCatalogResolveCache-on-cleanup.patch new file mode 100644 index 0000000..54c965e --- /dev/null +++ b/source-files/0001-catalog-Free-xmlCatalogResolveCache-on-cleanup.patch @@ -0,0 +1,25 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" +Date: Wed, 4 Mar 2026 19:08:16 +0100 +Subject: [PATCH] catalog: Free xmlCatalogResolveCache on cleanup + +Otherwise the `tstLastError.py` test will complain about a memory leak. + +Fixes: b706c5c5b7ce11d002a5b77ff938aa3693931c12 (Add xmlCatalogResolveCache) +Fixes: https://gitlab.gnome.org/GNOME/libxml2/-/issues/1069 +--- + catalog.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/catalog.c b/catalog.c +index 8a5ca77a6ae1..bfaf099f47a4 100644 +--- a/catalog.c ++++ b/catalog.c +@@ -3338,6 +3338,7 @@ xmlCatalogCleanup(void) { + if (xmlDebugCatalogs) + xmlCatalogPrintDebug( + "Catalogs cleanup\n"); ++ xmlResetCatalogResolveCache(); + if (xmlCatalogXMLFiles != NULL) + xmlHashFree(xmlCatalogXMLFiles, xmlFreeCatalogHashEntryList); + xmlCatalogXMLFiles = NULL; diff --git a/source.sh b/source.sh index b4cae6c..597cccc 100644 --- a/source.sh +++ b/source.sh @@ -2,10 +2,17 @@ # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT +# The prepare function is executed in the root of the temp directory +# This function is used for putting downloaded files to the correct location or applying patches +prepare() { + cd "$BPM_SOURCE" + patch -Np1 -i "$BPM_WORKDIR"/0001-catalog-Free-xmlCatalogResolveCache-on-cleanup.patch +} + # The build function is executed in the source directory # This function is used to compile the source code build() { - PYTHON=/usr/bin/python3 meson setup --prefix=/usr -Dreadline=enabled -Dpython=enabled -Dicu=enabled -Dlegacy=enabled -Ddocs=enabled build + meson setup --prefix=/usr -Dreadline=enabled -Dpython=enabled -Dicu=enabled -Dlegacy=enabled -Ddocs=enabled build meson compile -C build }