This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 4cc9990ed779e39651a59427c09c6ee78097161b
Author: Jim Jagielski <[email protected]>
AuthorDate: Thu Aug 6 12:15:28 2026 -0400

    libxslt: pin to bundled libxml2 and fix static xsltproc output path
    
    The macOS static-build config (c46d036de4) didn't stop libxslt's own
    configure from discovering libxml2 via pkg-config, which resolves to
    whatever libxml2 a package manager (MacPorts, Homebrew) has registered
    -- not the bundled copy. Modern libxml2 turns xmlParserMaxDepth into a
    macro, breaking xsltproc.c's assignment to it.  --with-libxml-prefix
    pins the lookup to the bundled xml2-config instead.
    
    Separately, --enable-shared=no makes libtool link xsltproc directly
    without a .libs wrapper dir (unlike the static .a archives, which still
    land in .libs), so OUT2BIN's path was wrong and the binary never made
    it into the solver.
---
 main/libxslt/makefile.mk | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/main/libxslt/makefile.mk b/main/libxslt/makefile.mk
index 64bf9ffcb1..c4ca26c56b 100644
--- a/main/libxslt/makefile.mk
+++ b/main/libxslt/makefile.mk
@@ -111,7 +111,14 @@ CONFIGURE_ACTION=.$/configure
 # Community builds bundle a static libxslt/libexslt rather than a dylib --
 # see main/xmlsecurity/util/makefile.mk and main/forms/util/makefile.mk
 # for the analogous libxml2 case.
-CONFIGURE_FLAGS=--enable-ipv6=no --without-crypto --without-python 
--enable-static=yes --enable-shared=no --with-sax1=yes 
ac_cv_func_clock_gettime=false
+#
+# libxslt's own configure otherwise discovers libxml2 via pkg-config,
+# which resolves to whatever libxml2 a package manager (MacPorts,
+# Homebrew, ...) has registered there -- not the bundled copy this
+# module just built. --with-libxml-prefix pins it to the bundled
+# xml2-config instead, matching the consumer-side fix in xmlsecurity/
+# forms.
+CONFIGURE_FLAGS=--enable-ipv6=no --without-crypto --without-python 
--enable-static=yes --enable-shared=no --with-sax1=yes 
--with-libxml-prefix=$(SOLARVERSION)/$(INPATH) ac_cv_func_clock_gettime=false
 .ELSE
 CONFIGURE_FLAGS=--enable-ipv6=no --without-crypto --without-python 
--enable-static=no --with-sax1=yes ac_cv_func_clock_gettime=false
 .ENDIF
@@ -125,7 +132,9 @@ OUT2INC=libxslt$/*.h
 .IF "$(OS)"=="MACOSX"
 OUT2LIB+=libxslt$/.libs$/libxslt.a
 OUT2LIB+=libexslt$/.libs$/libexslt.a
-OUT2BIN+=xsltproc$/.libs$/xsltproc
+# With --enable-shared=no, libtool links xsltproc directly (no .libs
+# wrapper dir, unlike the static .a archives above).
+OUT2BIN+=xsltproc$/xsltproc
 OUT2BIN+=xslt-config
 .ELIF "$(OS)"=="WNT"
 .IF "$(COM)"=="GCC"

Reply via email to