distro-configs/LibreOfficeLinux.conf              |    1 -
 download.lst                                      |   14 +++++++-------
 external/libxml2/ExternalPackage_libxml2.mk       |    2 +-
 external/libxml2/ExternalProject_libxml2.mk       |    4 ++--
 external/libxml2/UnpackedTarball_libxml2.mk       |    1 +
 external/libxml2/libxml2-XMLCALL-redefine.patch.0 |   11 +++++++++++
 external/libxml2/libxml2-global-symbols.patch     |   14 +++++++++++++-
 external/libxml2/libxml2-icu-sym.patch.0          |    2 +-
 external/libxml2/libxml2-icu.patch.0              |    2 +-
 external/libxslt/ExternalPackage_libxslt.mk       |    2 +-
 external/libxslt/README                           |    2 +-
 external/redland/UnpackedTarball_raptor.mk        |    1 +
 external/redland/raptor/raptor-libxml2-11.patch.1 |   15 +++++++++++++++
 filter/source/xsltfilter/LibXSLTTransformer.cxx   |   16 ++++++++++++++++
 helpcompiler/source/HelpCompiler.cxx              |   14 ++++++++++++++
 xmlsecurity/source/xmlsec/saxhelper.cxx           |   15 ++++++++++++++-
 16 files changed, 99 insertions(+), 17 deletions(-)

New commits:
commit 5ffb9f751f782953b382f8be4b6e4649049f7ce0
Author:     Michael Stahl <[email protected]>
AuthorDate: Thu Feb 15 13:06:32 2024 +0100
Commit:     Michael Stahl <[email protected]>
CommitDate: Thu Feb 22 20:58:45 2024 +0100

    tdf#159502 remove --without-system-libxml from LibreOfficeLinux.conf
    
    configure.ac explicitly excludes libxml from --without-system-libs but
    this distro-config "helpfully" adds it explicitly, when the system
    already contains a usable libxml/libxslt anyway.
    
    Change-Id: I79d65d9ed9185277ffde8624efc152b290a6ffb3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163438
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <[email protected]>
    (cherry picked from commit 6f6364e572a0570fb097fec098314bffadc5b474)

diff --git a/distro-configs/LibreOfficeLinux.conf 
b/distro-configs/LibreOfficeLinux.conf
index db759a8cb4e5..fba02d362d31 100644
--- a/distro-configs/LibreOfficeLinux.conf
+++ b/distro-configs/LibreOfficeLinux.conf
@@ -4,7 +4,6 @@
 --without-system-poppler
 --without-system-openssl
 --without-system-libpng
---without-system-libxml
 --without-system-jpeg
 --without-system-jars
 --without-system-postgresql
commit d917555bde27adf2d4a4ec921d9c999d4d2c9393
Author:     Michael Stahl <[email protected]>
AuthorDate: Thu Feb 22 11:57:37 2024 +0100
Commit:     Michael Stahl <[email protected]>
CommitDate: Thu Feb 22 20:58:45 2024 +0100

    libxml2: upgrade to release 2.12.5
    
    Fixes CVE-2024-25062
    
    Change-Id: I0e98fd919328e9633a602c4872de0b06eb972cc0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163734
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <[email protected]>
    (cherry picked from commit 4c3ee61e3eda0cbfd812443f80af89aa3a24ac73)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163753
    Reviewed-by: Xisco Fauli <[email protected]>
    (cherry picked from commit ca089311678ca6f84771c145178bf4153243ed45)

diff --git a/download.lst b/download.lst
index b23e0c54bd0d..163c5794f1e0 100644
--- a/download.lst
+++ b/download.lst
@@ -360,8 +360,8 @@ XMLSEC_TARBALL := xmlsec1-1.2.34.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-LIBXML_SHA256SUM := 
8c8f1092340a89ff32bc44ad5c9693aff9bc8a7a3e161bb239666e5d15ac9aaa
-LIBXML_VERSION_MICRO := 3
+LIBXML_SHA256SUM := 
a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21
+LIBXML_VERSION_MICRO := 5
 LIBXML_TARBALL := libxml2-2.12.$(LIBXML_VERSION_MICRO).tar.xz
 # three static lines
 # so that git cherry-pick
commit aed256f2a86ac53144c4edc0942a5ea713f1c3f5
Author:     Caolán McNamara <[email protected]>
AuthorDate: Wed Jan 3 20:45:14 2024 +0000
Commit:     Michael Stahl <[email protected]>
CommitDate: Thu Feb 22 20:58:45 2024 +0100

    upgrade libxml2, libxslt & liblangtag
    
    what I'm really after is some vexating not-reproducible oss-fuzz msan
    warnings when using libxml2 in the fodt2pdf fuzzer. So lets upgrade
    libxml2 to the latest, which requires bumping libxslt, and then requires
    a newer liblangtag because of no longer implicit includes that it
    depended on.
    
    xmlKeepBlanksDefaultValue and xmlSubstituteEntitiesDefault are
    deprecated, we should get around to updating those uses
    
    Change-Id: I8fda0dffda0a7ea65407d246a3121875cb8ad4a4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161598
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>
    (cherry picked from commit 6875c975f80d8b813b1829a530162869a1e2d92e)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163751
    Reviewed-by: Michael Stahl <[email protected]>
    (cherry picked from commit 050a2db3964d5f02e2dd149cb7f76342457a6719)

diff --git a/download.lst b/download.lst
index e7f88eb925c0..b23e0c54bd0d 100644
--- a/download.lst
+++ b/download.lst
@@ -335,8 +335,8 @@ LIBGPGERROR_TARBALL := libgpg-error-1.43.tar.bz2
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-LIBLANGTAG_SHA256SUM := 
1f12a20a02ec3a8d22e54dedb8b683a43c9c160bda1ba337bf1060607ae733bd
-LIBLANGTAG_TARBALL := liblangtag-0.6.3.tar.bz2
+LIBLANGTAG_SHA256SUM := 
5ed6bcd4ae3f3c05c912e62f216cd1a44123846147f729a49fb5668da51e030e
+LIBLANGTAG_TARBALL := liblangtag-0.6.7.tar.bz2
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
@@ -360,14 +360,14 @@ XMLSEC_TARBALL := xmlsec1-1.2.34.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-LIBXML_SHA256SUM := 
737e1d7f8ab3f139729ca13a2494fd17bf30ddb4b7a427cf336252cab57f57f7
-LIBXML_VERSION_MICRO := 4
-LIBXML_TARBALL := libxml2-2.11.$(LIBXML_VERSION_MICRO).tar.xz
+LIBXML_SHA256SUM := 
8c8f1092340a89ff32bc44ad5c9693aff9bc8a7a3e161bb239666e5d15ac9aaa
+LIBXML_VERSION_MICRO := 3
+LIBXML_TARBALL := libxml2-2.12.$(LIBXML_VERSION_MICRO).tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-LIBXSLT_SHA256SUM := 
1f32450425819a09acaff2ab7a5a7f8a2ec7956e505d7beeb45e843d0e1ecab1
-LIBXSLT_VERSION_MICRO := 38
+LIBXSLT_SHA256SUM := 
2a20ad621148339b0759c4d4e96719362dee64c9a096dbba625ba053846349f0
+LIBXSLT_VERSION_MICRO := 39
 LIBXSLT_TARBALL := libxslt-1.1.$(LIBXSLT_VERSION_MICRO).tar.xz
 # three static lines
 # so that git cherry-pick
diff --git a/external/libxml2/ExternalPackage_libxml2.mk 
b/external/libxml2/ExternalPackage_libxml2.mk
index 3c399970cd5b..799044575f9a 100644
--- a/external/libxml2/ExternalPackage_libxml2.mk
+++ b/external/libxml2/ExternalPackage_libxml2.mk
@@ -21,7 +21,7 @@ else # COM=MSC
 $(eval $(call 
gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.dll,win32/bin.msvc/libxml2.dll))
 endif
 else # OS!=WNT
-$(eval $(call 
gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.so.2,.libs/libxml2.so.2.11.$(LIBXML_VERSION_MICRO)))
+$(eval $(call 
gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.so.2,.libs/libxml2.so.2.12.$(LIBXML_VERSION_MICRO)))
 endif
 endif # DISABLE_DYNLOADING
 
diff --git a/external/libxml2/libxml2-global-symbols.patch 
b/external/libxml2/libxml2-global-symbols.patch
index cbbe5a622284..32146da4b3d7 100644
--- a/external/libxml2/libxml2-global-symbols.patch
+++ b/external/libxml2/libxml2-global-symbols.patch
@@ -13,7 +13,7 @@
  } LIBXML2_2.6.28;
  
  LIBXML2_2.6.32 {
-@@ -2231,3 +2231,49 @@
+@@ -2231,3 +2231,55 @@
    xmlPopOutputCallbacks;
  } LIBXML2_2.9.8;
  
@@ -23,6 +23,12 @@
 +    xmlNewSAXParserCtxt;
 +} LIBXML2_2.9.11;
 +
++LIBXML2_2.12.3 {
++    global:
++    xmlCtxtSetMaxAmplification;
++    xmlTextReaderSetMaxAmplification;
++} LIBXML2_2.11.4;
++
 +# HACK: export global variable accessor functions (globals.h)
 +LIBXML2_GLOBAL_VARIABLES {
 +    global:
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx 
b/filter/source/xsltfilter/LibXSLTTransformer.cxx
index 1a7c34805f1b..324404cf33cc 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
@@ -503,7 +503,23 @@ namespace XSLT
         {   // backward compatibility for old clients using createInstance
             params = args;
         }
+
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+#if defined(_MSC_VER)
+#pragma warning(push)
+#pragma warning(disable:4996)
+#endif
         xmlSubstituteEntitiesDefault(0);
+#if defined(_MSC_VER)
+#pragma warning(pop)
+#endif
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
+
         m_parameters.clear();
         for (const Any& p : std::as_const(params))
         {
diff --git a/helpcompiler/source/HelpCompiler.cxx 
b/helpcompiler/source/HelpCompiler.cxx
index ee4a27461afa..d0bdf8ab456b 100644
--- a/helpcompiler/source/HelpCompiler.cxx
+++ b/helpcompiler/source/HelpCompiler.cxx
@@ -38,7 +38,21 @@ HelpCompiler::HelpCompiler(StreamTable &in_streamTable, 
const fs::path &in_input
     src(in_src), zipdir(in_zipdir), module(in_module), lang(in_lang), 
resCompactStylesheet(in_resCompactStylesheet),
     resEmbStylesheet(in_resEmbStylesheet), bExtensionMode( in_bExtensionMode )
 {
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+#if defined(_MSC_VER)
+#pragma warning(push)
+#pragma warning(disable:4996)
+#endif
     xmlKeepBlanksDefaultValue = 0;
+#if defined(_MSC_VER)
+#pragma warning(pop)
+#endif
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
     char* os = getenv("OS");
     if (os)
     {
diff --git a/xmlsecurity/source/xmlsec/saxhelper.cxx 
b/xmlsecurity/source/xmlsec/saxhelper.cxx
index ff576db49673..0d395848941d 100644
--- a/xmlsecurity/source/xmlsec/saxhelper.cxx
+++ b/xmlsecurity/source/xmlsec/saxhelper.cxx
@@ -118,11 +118,24 @@ SAXHelper::SAXHelper( )
      * compile error:
      * xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS ;
      */
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+#if defined(_MSC_VER)
+#pragma warning(push)
+#pragma warning(disable:4996)
+#endif
     xmlSubstituteEntitiesDefault(0) ;
-
 #ifndef XMLSEC_NO_XSLT
     xmlIndentTreeOutput = 1 ;
 #endif /* XMLSEC_NO_XSLT */
+#if defined(_MSC_VER)
+#pragma warning(pop)
+#endif
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
 
     m_pParserCtxt = xmlNewParserCtxt() ;
 
commit 87fecb9acf16294d5e3e503ee914e2da58f4100e
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Tue Jul 4 08:31:28 2023 +0200
Commit:     Michael Stahl <[email protected]>
CommitDate: Thu Feb 22 20:58:45 2024 +0100

    Fix Linux --without-system-libxml build
    
    ...after 362dfc50a28a918ec73609a00d2851eb3058375d "libxslt: upgrade to 
release
    1.1.38"
    
    Change-Id: Id0ebf5676f79c43bb4fab3a33a2a19e303881aef
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153942
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <[email protected]>
    (cherry picked from commit d1fc1c326470461def5ab092a311afee31950880)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154000
    Reviewed-by: Taichi Haradaguchi <[email protected]>
    (cherry picked from commit 2808d5a6874d5956d99e02feb0fbf55a7343d63c)

diff --git a/external/libxslt/ExternalPackage_libxslt.mk 
b/external/libxslt/ExternalPackage_libxslt.mk
index c22a2e1b5dad..c1a8ee1217f1 100644
--- a/external/libxslt/ExternalPackage_libxslt.mk
+++ b/external/libxslt/ExternalPackage_libxslt.mk
@@ -25,7 +25,7 @@ $(eval $(call 
gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libexslt.dl
 endif
 else # OS!=WNT
 $(eval $(call 
gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libxslt.so.1,libxslt/.libs/libxslt.so.1.1.$(LIBXSLT_VERSION_MICRO)))
-$(eval $(call 
gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libexslt.so.0,libexslt/.libs/libexslt.so.0.8.20))
+$(eval $(call 
gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libexslt.so.0,libexslt/.libs/libexslt.so.0.8.21))
 endif
 endif # DISABLE_DYNLOADING
 
commit 0970701ee0a338b5ab3ece2d411c7e89ea4fd121
Author:     Taichi Haradaguchi <[email protected]>
AuthorDate: Mon Jul 3 18:38:33 2023 +0900
Commit:     Michael Stahl <[email protected]>
CommitDate: Thu Feb 22 20:48:17 2024 +0100

    libxslt: upgrade to release 1.1.38
    
    Change-Id: I0534d7e02c9486b3d58f56e1a26fe6846b4a20b7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153874
    Tested-by: Jenkins
    Reviewed-by: Taichi Haradaguchi <[email protected]>
    (cherry picked from commit 362dfc50a28a918ec73609a00d2851eb3058375d)

diff --git a/download.lst b/download.lst
index 30f4b5d03ccf..e7f88eb925c0 100644
--- a/download.lst
+++ b/download.lst
@@ -366,8 +366,8 @@ LIBXML_TARBALL := 
libxml2-2.11.$(LIBXML_VERSION_MICRO).tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-LIBXSLT_SHA256SUM := 
8247f33e9a872c6ac859aa45018bc4c4d00b97e2feac9eebc10c93ce1f34dd79
-LIBXSLT_VERSION_MICRO := 35
+LIBXSLT_SHA256SUM := 
1f32450425819a09acaff2ab7a5a7f8a2ec7956e505d7beeb45e843d0e1ecab1
+LIBXSLT_VERSION_MICRO := 38
 LIBXSLT_TARBALL := libxslt-1.1.$(LIBXSLT_VERSION_MICRO).tar.xz
 # three static lines
 # so that git cherry-pick
diff --git a/external/libxslt/README b/external/libxslt/README
index dd69a9d732c3..2eb71661b903 100644
--- a/external/libxslt/README
+++ b/external/libxslt/README
@@ -1 +1 @@
-Gnome xslt library written in C, from [http://xmlsoft.org/xslt/]
+libxslt is an XSLT processor based on libxml2, from 
[https://gitlab.gnome.org/GNOME/libxslt/]
commit e12a6892f6216587b1047702dfe99e8761f02ad4
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Fri May 26 09:13:04 2023 +0200
Commit:     Michael Stahl <[email protected]>
CommitDate: Thu Feb 22 20:48:17 2024 +0100

    external/libxml2: Fix missing external symbols needed by xmllint
    
    After 5b42f148e206cda19467e76c2f9915fc2b6fa5f6 "ExternalProject_libxml2 
still
    needs to build the xmllint executable" (which I had happened to prepare on
    macOS, so didn't originally notice the issue addressed here now), Linux 
builds
    like <https://ci.libreoffice.org/job/lo_callgrind_linux/13374/> started to 
fail
    with
    
    >   CCLD     xmllint
    > /opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: 
xmllint-xmllint.o: in function `testSAX':
    > 
/home/tdf/lode/jenkins/workspace/lo_callgrind_linux/workdir/UnpackedTarball/libxml2/xmllint.c:1646:
 undefined reference to `xmlNewSAXParserCtxt'
    > /opt/rh/devtoolset-11/root/usr/libexec/gcc/x86_64-redhat-linux/11/ld: 
xmllint-xmllint.o: in function `myReallocFunc':
    > 
/home/tdf/lode/jenkins/workspace/lo_callgrind_linux/workdir/UnpackedTarball/libxml2/xmllint.c:357:
 undefined reference to `xmlMemSize'
    > collect2: error: ld returned 1 exit status
    > make[2]: *** [Makefile:1007: xmllint] Error 1
    > make[1]: *** 
[/home/tdf/lode/jenkins/workspace/lo_callgrind_linux/external/libxml2/ExternalProject_libxml2.mk:37:
 
/home/tdf/lode/jenkins/workspace/lo_callgrind_linux/workdir/ExternalProject/libxml2/build]
 Error 1
    
    Turns out that those two functions have been introduced after the previously
    used libxml2 2.10.4.  No idea how things are supposed to work (given that
    workdir/UnpackedTarball/libxml2/libxml2.syms starts off with "Retained for
    backward compatibility. Don't add new symbols.", it appears that there 
should be
    some other mechanism at play to make xmllint on Linux find the libxml2.so
    symbols it needs, but which doesn't work as intended in our build), but 
just add
    those two symbols to libxml2.syms for now.  (With a new version named
    LIBXML2_2.11.4, even if the symbols can actually have been introduced in 
some
    other version between 2.10.4 and 2.11.4, but who cares.)
    
    Change-Id: Ib9d5c7901fe94b8014a87b049fc27ef5658fd954
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152292
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <[email protected]>
    (cherry picked from commit 7d9b3393e2632247624d8a1e3129365290d1b60b)

diff --git a/external/libxml2/libxml2-global-symbols.patch 
b/external/libxml2/libxml2-global-symbols.patch
index cfec9c530281..cbbe5a622284 100644
--- a/external/libxml2/libxml2-global-symbols.patch
+++ b/external/libxml2/libxml2-global-symbols.patch
@@ -13,10 +13,16 @@
  } LIBXML2_2.6.28;
  
  LIBXML2_2.6.32 {
-@@ -2231,3 +2231,43 @@
+@@ -2231,3 +2231,49 @@
    xmlPopOutputCallbacks;
  } LIBXML2_2.9.8;
  
++LIBXML2_2.11.4 {
++    global:
++    xmlMemSize;
++    xmlNewSAXParserCtxt;
++} LIBXML2_2.9.11;
++
 +# HACK: export global variable accessor functions (globals.h)
 +LIBXML2_GLOBAL_VARIABLES {
 +    global:
commit d33fb316856c15f3175dcb2e2ca1458e9cfe7d25
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Thu May 25 08:21:20 2023 +0200
Commit:     Michael Stahl <[email protected]>
CommitDate: Thu Feb 22 20:48:17 2024 +0100

    ExternalProject_libxml2 still needs to build the xmllint executable
    
    No idea why fd6cbd983a3021d22321854d0414bdc42c6cb1b7 "upgrade to 
libxml2-2.11.4"
    started to only explicitly make libxml2.la (the commit message doesn't 
say), but
    that caused at least <https://ci.libreoffice.org/job/lo_ubsan/2788/> to fail
    with
    
    > make[1]: *** Deleting file 
'/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/CustomTarget/sfx2/classification/example.validated'
    > [build VAL] CustomTarget/sfx2/classification/example.validated
    > /bin/sh: 
/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/UnpackedTarball/libxml2//xmllint:
 No such file or directory
    > make[1]: *** 
[/home/tdf/lode/jenkins/workspace/lo_ubsan/sfx2/CustomTarget_classification.mk:20:
 
/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/CustomTarget/sfx2/classification/example.validated]
 Error 1
    
    Change-Id: I7e7aa2bae05cf8674720cfd72c78840cd7a28919
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152256
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <[email protected]>
    (cherry picked from commit 5b42f148e206cda19467e76c2f9915fc2b6fa5f6)

diff --git a/external/libxml2/ExternalProject_libxml2.mk 
b/external/libxml2/ExternalProject_libxml2.mk
index 3054fc14093d..7c9a8875172a 100644
--- a/external/libxml2/ExternalProject_libxml2.mk
+++ b/external/libxml2/ExternalProject_libxml2.mk
@@ -45,7 +45,7 @@ $(call gb_ExternalProject_get_state_target,libxml2,build):
                                $(if $(SYSBASE),-I$(SYSBASE)/usr/include) \
                                $(call 
gb_ExternalProject_get_build_flags,libxml2)" \
                        $(if $(filter 
TRUE,$(DISABLE_DYNLOADING)),--disable-shared,--disable-static) \
-               && $(MAKE) libxml2.la \
+               && $(MAKE) libxml2.la xmllint \
        )
        $(call gb_Trace_EndRange,libxml2,EXTERNAL)
 endif
commit 2897ab7e26501a80588aa9a4d6ed70637ff03ab5
Author:     Caolán McNamara <[email protected]>
AuthorDate: Tue May 23 21:15:52 2023 +0100
Commit:     Michael Stahl <[email protected]>
CommitDate: Thu Feb 22 20:48:17 2024 +0100

    upgrade to libxml2-2.11.4
    
    'checked' field removed with:
    
https://gitlab.gnome.org/GNOME/libxml2/-/commit/ce76ebfd1312459951d555ad9d87fb9a89eede55
    
    win32 'run_debug' removed with:
    
https://gitlab.gnome.org/GNOME/libxml2/-/commit/59f2f60e3eff07324f1c7cd861a444d714be750b
    
    add libxml2-XMLCALL-redefine.patch.0 to avoid:
    UnpackedTarball\libxml2\include\libxml/xmlexports.h(41): error C2220: the 
following warning is treated as an error
    UnpackedTarball\libxml2\include\libxml/xmlexports.h(41): warning C4005: 
'XMLCALL': macro redefinition
    UnpackedTarballxpat\libxpat_external.h(69): note: see previous definition 
of 'XMLCALL'
    
    Change-Id: Ia9b1540dc1b4eccf91662c8d995c036f71de6fc6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152176
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>
    (cherry picked from commit fd6cbd983a3021d22321854d0414bdc42c6cb1b7)

diff --git a/download.lst b/download.lst
index 99a33feb67e0..30f4b5d03ccf 100644
--- a/download.lst
+++ b/download.lst
@@ -360,9 +360,9 @@ XMLSEC_TARBALL := xmlsec1-1.2.34.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-LIBXML_SHA256SUM := 
ed0c91c5845008f1936739e4eee2035531c1c94742c6541f44ee66d885948d45
+LIBXML_SHA256SUM := 
737e1d7f8ab3f139729ca13a2494fd17bf30ddb4b7a427cf336252cab57f57f7
 LIBXML_VERSION_MICRO := 4
-LIBXML_TARBALL := libxml2-2.10.$(LIBXML_VERSION_MICRO).tar.xz
+LIBXML_TARBALL := libxml2-2.11.$(LIBXML_VERSION_MICRO).tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/libxml2/ExternalPackage_libxml2.mk 
b/external/libxml2/ExternalPackage_libxml2.mk
index 6338fb20b9df..3c399970cd5b 100644
--- a/external/libxml2/ExternalPackage_libxml2.mk
+++ b/external/libxml2/ExternalPackage_libxml2.mk
@@ -21,7 +21,7 @@ else # COM=MSC
 $(eval $(call 
gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.dll,win32/bin.msvc/libxml2.dll))
 endif
 else # OS!=WNT
-$(eval $(call 
gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.so.2,.libs/libxml2.so.2.10.$(LIBXML_VERSION_MICRO)))
+$(eval $(call 
gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.so.2,.libs/libxml2.so.2.11.$(LIBXML_VERSION_MICRO)))
 endif
 endif # DISABLE_DYNLOADING
 
diff --git a/external/libxml2/ExternalProject_libxml2.mk 
b/external/libxml2/ExternalProject_libxml2.mk
index 7bb2b58956b9..3054fc14093d 100644
--- a/external/libxml2/ExternalProject_libxml2.mk
+++ b/external/libxml2/ExternalProject_libxml2.mk
@@ -26,7 +26,7 @@ $(call gb_ExternalProject_get_state_target,libxml2,build):
        $(call gb_Trace_StartRange,libxml2,EXTERNAL)
        $(call gb_ExternalProject_run,build,\
                cscript /e:javascript configure.js \
-                       iconv=no icu=yes sax1=yes $(if 
$(MSVC_USE_DEBUG_RUNTIME),run_debug=yes cruntime=/MDd) \
+                       iconv=no icu=yes sax1=yes $(if 
$(MSVC_USE_DEBUG_RUNTIME),cruntime=/MDd) \
                        $(if $(filter TRUE,$(ENABLE_DBGUTIL)),debug=yes) \
                && nmake \
        ,win32)
@@ -45,7 +45,7 @@ $(call gb_ExternalProject_get_state_target,libxml2,build):
                                $(if $(SYSBASE),-I$(SYSBASE)/usr/include) \
                                $(call 
gb_ExternalProject_get_build_flags,libxml2)" \
                        $(if $(filter 
TRUE,$(DISABLE_DYNLOADING)),--disable-shared,--disable-static) \
-               && $(MAKE) \
+               && $(MAKE) libxml2.la \
        )
        $(call gb_Trace_EndRange,libxml2,EXTERNAL)
 endif
diff --git a/external/libxml2/UnpackedTarball_libxml2.mk 
b/external/libxml2/UnpackedTarball_libxml2.mk
index 8c81c3d26e4c..d50d52cbeef8 100644
--- a/external/libxml2/UnpackedTarball_libxml2.mk
+++ b/external/libxml2/UnpackedTarball_libxml2.mk
@@ -16,6 +16,7 @@ $(eval $(call 
gb_UnpackedTarball_update_autoconf_configs,libxml2))
 $(eval $(call gb_UnpackedTarball_add_patches,libxml2,\
        external/libxml2/libxml2-global-symbols.patch \
        external/libxml2/libxml2-vc10.patch \
+       external/libxml2/libxml2-XMLCALL-redefine.patch.0 \
        $(if $(filter ANDROID,$(OS)),external/libxml2/libxml2-android.patch) \
        $(if $(gb_Module_CURRENTMODULE_SYMBOLS_ENABLED), \
                external/libxml2/libxml2-icu-sym.patch.0, \
diff --git a/external/libxml2/libxml2-XMLCALL-redefine.patch.0 
b/external/libxml2/libxml2-XMLCALL-redefine.patch.0
new file mode 100644
index 000000000000..d9ca23be7ce4
--- /dev/null
+++ b/external/libxml2/libxml2-XMLCALL-redefine.patch.0
@@ -0,0 +1,11 @@
+--- include/libxml/xmlexports.h        2023-05-24 12:48:46.179570708 +0100
++++ include/libxml/xmlexports.h        2023-05-24 12:48:56.563577488 +0100
+@@ -38,8 +38,6 @@
+ 
+ /** DOC_DISABLE */
+ /* Compatibility */
+-#define XMLCALL
+-#define XMLCDECL
+ #if !defined(LIBXML_DLL_IMPORT)
+ #define LIBXML_DLL_IMPORT XMLPUBVAR
+ #endif
diff --git a/external/libxml2/libxml2-icu-sym.patch.0 
b/external/libxml2/libxml2-icu-sym.patch.0
index aac9d09ef13e..07676228da19 100644
--- a/external/libxml2/libxml2-icu-sym.patch.0
+++ b/external/libxml2/libxml2-icu-sym.patch.0
@@ -25,7 +25,7 @@ diff -up win32/Makefile.msvc.dt win32/Makefile.msvc
  !if "$(STATIC)" == "1"
  LIBS = $(LIBS) advapi32.lib sicuuc.lib sicuin.lib sicudt.lib
  !else
-+!if "$(WITH_RUN_DEBUG)" == "1"
++!if "$(DEBUG)" == "1"
 +LIBS = $(LIBS) icuind.lib icuucd.lib icudtd.lib
 +!else
  LIBS = $(LIBS) icuuc.lib icuin.lib icudt.lib
diff --git a/external/libxml2/libxml2-icu.patch.0 
b/external/libxml2/libxml2-icu.patch.0
index b390b03d8787..84197763f878 100644
--- a/external/libxml2/libxml2-icu.patch.0
+++ b/external/libxml2/libxml2-icu.patch.0
@@ -23,7 +23,7 @@ diff -up win32/Makefile.msvc.dt win32/Makefile.msvc
  !if "$(STATIC)" == "1"
  LIBS = $(LIBS) advapi32.lib sicuuc.lib sicuin.lib sicudt.lib
  !else
-+!if "$(WITH_RUN_DEBUG)" == "1"
++!if "$(DEBUG)" == "1"
 +LIBS = $(LIBS) icuind.lib icuucd.lib icudtd.lib
 +!else
  LIBS = $(LIBS) icuuc.lib icuin.lib icudt.lib
diff --git a/external/redland/UnpackedTarball_raptor.mk 
b/external/redland/UnpackedTarball_raptor.mk
index fbdc8b6f5510..92bc586a3e60 100644
--- a/external/redland/UnpackedTarball_raptor.mk
+++ b/external/redland/UnpackedTarball_raptor.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,raptor,\
        
external/redland/raptor/0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch.1
 \
        
external/redland/raptor/0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch.1
 \
        external/redland/raptor/libtool.patch \
+       external/redland/raptor/raptor-libxml2-11.patch.1 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/redland/raptor/raptor-libxml2-11.patch.1 
b/external/redland/raptor/raptor-libxml2-11.patch.1
new file mode 100644
index 000000000000..9bed29e50d0b
--- /dev/null
+++ b/external/redland/raptor/raptor-libxml2-11.patch.1
@@ -0,0 +1,15 @@
+--- raptor/src/raptor_libxml.c 2023-05-24 09:55:21.589275008 +0100
++++ raptor/src/raptor_libxml.c 2023-05-24 09:56:41.100324810 +0100
+@@ -246,9 +246,11 @@
+     
+     ret->owner = 1;
+ 
+-#if LIBXML_VERSION >= 20627
++#if LIBXML_VERSION >= 20627 && LIBXML_VERSION < 21100
+     /* Checked field was released in 2.6.27 on 2006-10-25
+      * 
http://git.gnome.org/browse/libxml2/commit/?id=a37a6ad91a61d168ecc4b29263def3363fff4da6
++     * and removed with
++     * 
https://gitlab.gnome.org/GNOME/libxml2/-/commit/ce76ebfd1312459951d555ad9d87fb9a89eede55
+      *
+      */
+ 

Reply via email to