diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-05-30 13:23:16 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-12-03 00:31:31 +0100 |
commit | 8b9f8f0f9d38cc64f742fe5358fce88d0f82391a (patch) | |
tree | 5225ce426678fb8ae1faa9504b37b56b4262d550 /external | |
parent | 29145df0977baa866e7da94d1d385b772ae1e6ce (diff) |
libxml2: use xml2-config dummy for internal build
When building a static LO with --disable-dynloading on Linux,
--without-system-libs failed for me. And it left me really puzzled:
raptor configure failed and claimed it couldn't link libxml2.
raptor's config.log showed missing math functions. xml2-config of
LO's build is patched and it includes a -lm. The xml2-config in my
chroot doesn't. But we explicitly pass the xml2-config for
non-system-libxml2 build. Reading the configure from raptor didn't
reveal a way, that it could somehow pick up the xml2-config from
the chroot, but that code is autoconf-complex...
When running "sh -x configure", it turned out the configure script
actually picks up the LIBXML_* flags from the environment, which
are set by LO's config_host.mk. These just add -lm for Android.
So this adds a xml2-config.in "dummy", which overwrites the one
from the libxml2 source and just echos LO's LIBXML_* values and
it adds -lm for all DISABLE_DYNLOADING targets.
Change-Id: Ia713cf80c8e7dc989cf23c224e7a0f7ea1210a87
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116409
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'external')
-rw-r--r-- | external/libxml2/UnpackedTarball_libxml2.mk | 3 | ||||
-rw-r--r-- | external/libxml2/libxml2-config.patch.1 | 43 | ||||
-rw-r--r-- | external/libxml2/xml2-config.in | 28 | ||||
-rw-r--r-- | external/redland/UnpackedTarball_raptor.mk | 1 | ||||
-rw-r--r-- | external/redland/raptor/libxml-override.patch | 13 |
5 files changed, 30 insertions, 58 deletions
diff --git a/external/libxml2/UnpackedTarball_libxml2.mk b/external/libxml2/UnpackedTarball_libxml2.mk index 83df02849cb3..8c81c3d26e4c 100644 --- a/external/libxml2/UnpackedTarball_libxml2.mk +++ b/external/libxml2/UnpackedTarball_libxml2.mk @@ -14,7 +14,6 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libxml2,$(LIBXML_TARBALL),,libxml2) $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libxml2)) $(eval $(call gb_UnpackedTarball_add_patches,libxml2,\ - external/libxml2/libxml2-config.patch.1 \ external/libxml2/libxml2-global-symbols.patch \ external/libxml2/libxml2-vc10.patch \ $(if $(filter ANDROID,$(OS)),external/libxml2/libxml2-android.patch) \ @@ -23,4 +22,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,libxml2,\ external/libxml2/libxml2-icu.patch.0) \ )) +$(eval $(call gb_UnpackedTarball_add_file,libxml2,xml2-config.in,external/libxml2/xml2-config.in)) + # vim: set noet sw=4 ts=4: diff --git a/external/libxml2/libxml2-config.patch.1 b/external/libxml2/libxml2-config.patch.1 deleted file mode 100644 index 5a2ef1485e92..000000000000 --- a/external/libxml2/libxml2-config.patch.1 +++ /dev/null @@ -1,43 +0,0 @@ -Hack the xml2-config to return paths into WORKDIR. - ---- a/xml2-config.in 2009-12-17 11:45:20.000000000 +0000 -+++ b/xml2-config.in 2009-12-17 11:45:36.000000000 +0000 -@@ -1,9 +1,14 @@ - #! /bin/sh - --prefix=@prefix@ --exec_prefix=@exec_prefix@ --includedir=@includedir@ --libdir=@libdir@ -+#prefix=@prefix@ -+#exec_prefix=@exec_prefix@ -+#includedir=@includedir@ -+#libdir=@libdir@ -+ -+prefix=${WORKDIR}/UnpackedTarball/libxml2 -+exec_prefix=${WORKDIR}/UnpackedTarball/libxml2 -+includedir=${WORKDIR}/UnpackedTarball/libxml2/include -+libdir=${WORKDIR}/UnpackedTarball/libxml2/.libs - cflags= - libs= - -@@ -67,7 +72,8 @@ - ;; - - --cflags) -- cflags="@XML_INCLUDEDIR@ @XML_CFLAGS@" -+ #cflags="@XML_INCLUDEDIR@ @XML_CFLAGS@" -+ cflags="-I${includedir}" - ;; - - --libtool-libs) -@@ -91,7 +96,8 @@ - libs="@XML_LIBDIR@ $libs" - fi - -- libs="$libs @WIN32_EXTRA_LIBADD@" -+ #libs="$libs @WIN32_EXTRA_LIBADD@" -+ libs="-L${libdir} -lxml2 -lm" - ;; - - *) diff --git a/external/libxml2/xml2-config.in b/external/libxml2/xml2-config.in new file mode 100644 index 000000000000..164508e47e67 --- /dev/null +++ b/external/libxml2/xml2-config.in @@ -0,0 +1,28 @@ +#! /bin/sh + +while test $# -gt 0; do + case "$1" in + -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; + esac + + case "$1" in + --version) + echo @VERSION@ + exit 0 + ;; + --cflags) + cflags="$LIBXML_CFLAGS" + ;; + --libs) + libs="$LIBXML_LIBS" + ;; + esac + shift +done + +if test -n "$cflags$libs"; then + echo $cflags $libs +fi + +exit 0 diff --git a/external/redland/UnpackedTarball_raptor.mk b/external/redland/UnpackedTarball_raptor.mk index c5ff226168d8..fbdc8b6f5510 100644 --- a/external/redland/UnpackedTarball_raptor.mk +++ b/external/redland/UnpackedTarball_raptor.mk @@ -30,7 +30,6 @@ $(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/libxml-override.patch \ )) # vim: set noet sw=4 ts=4: diff --git a/external/redland/raptor/libxml-override.patch b/external/redland/raptor/libxml-override.patch deleted file mode 100644 index edc2d0d497a4..000000000000 --- a/external/redland/raptor/libxml-override.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- configure -+++ configure -@@ -14387,8 +14387,8 @@ - - libxml_source=no - if test "X$XML_CONFIG" != "X"; then -- LIBXML_CFLAGS=`$XML_CONFIG --cflags` -- LIBXML_LIBS=`$XML_CONFIG --libs` -+ : ${LIBXML_CFLAGS=`$XML_CONFIG --cflags`} -+ : ${LIBXML_LIBS=`$XML_CONFIG --libs`} - - CPPFLAGS="$LIBXML_CFLAGS $CPPFLAGS" - LIBS="$LIBS $LIBXML_LIBS" |