diff options
| author | Peter Marko <peter.marko@siemens.com> | 2025-05-26 21:33:58 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-05-27 09:01:17 +0100 |
| commit | 2b2d5930ea841ca71750617cad1e13860e04c0ad (patch) | |
| tree | 485b83363e554c4bc2fc17292b5f4f5ee0921ee6 /meta | |
| parent | 16e762124a6be9722e6f3e8a363b54dec901ff3c (diff) | |
| download | poky-2b2d5930ea841ca71750617cad1e13860e04c0ad.tar.gz | |
libxml2: revert commit breaking patchs in cmake file
Make a revert of commit which breaks cross-compilation of depending
components.
This commit changes path calculation from relative to cmake file to
absolute from includedir, which points then the host /usr/include.
Submitted upstream ticket [1] to clarify how this should be fixed in
libxml2 upstream.
[1] https://gitlab.gnome.org/GNOME/libxml2/-/issues/898#note_2452864
(From OE-Core rev: bc93853c8d2e1da10c000a477093e293fa637761)
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-core/libxml/libxml2/0001-Revert-cmake-Fix-installation-directories-in-libxml2.patch | 81 | ||||
| -rw-r--r-- | meta/recipes-core/libxml/libxml2_2.14.3.bb | 1 |
2 files changed, 82 insertions, 0 deletions
diff --git a/meta/recipes-core/libxml/libxml2/0001-Revert-cmake-Fix-installation-directories-in-libxml2.patch b/meta/recipes-core/libxml/libxml2/0001-Revert-cmake-Fix-installation-directories-in-libxml2.patch new file mode 100644 index 0000000000..6ea5adafa2 --- /dev/null +++ b/meta/recipes-core/libxml/libxml2/0001-Revert-cmake-Fix-installation-directories-in-libxml2.patch | |||
| @@ -0,0 +1,81 @@ | |||
| 1 | From 55ed199fdb55a1a600616ba14ad0feedcf828d86 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Peter Marko <peter.marko@siemens.com> | ||
| 3 | Date: Mon, 26 May 2025 21:11:14 +0200 | ||
| 4 | Subject: [PATCH] Revert "cmake: Fix installation directories in | ||
| 5 | libxml2-config.cmake" | ||
| 6 | |||
| 7 | This reverts commit 75dde50b20215a2a3a445b62f36a67c8ed337cab. | ||
| 8 | |||
| 9 | Upstream-Status: Inappropriate [upstream ticket https://gitlab.gnome.org/GNOME/libxml2/-/issues/898#note_2452864] | ||
| 10 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
| 11 | --- | ||
| 12 | configure.ac | 11 ----------- | ||
| 13 | libxml2-config.cmake.in | 11 +++++++---- | ||
| 14 | meson.build | 3 --- | ||
| 15 | 3 files changed, 7 insertions(+), 18 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/configure.ac b/configure.ac | ||
| 18 | index 40e75151..d21ebfe5 100644 | ||
| 19 | --- a/configure.ac | ||
| 20 | +++ b/configure.ac | ||
| 21 | @@ -1061,17 +1061,6 @@ AC_SUBST(XML_PRIVATE_LIBS) | ||
| 22 | AC_SUBST(XML_PRIVATE_CFLAGS) | ||
| 23 | AC_SUBST(XML_INCLUDEDIR) | ||
| 24 | |||
| 25 | -# for libxml2-config.cmake.in | ||
| 26 | -AX_RECURSIVE_EVAL(["$bindir"], [INSTALL_BINDIR]) | ||
| 27 | -AX_RECURSIVE_EVAL(["$includedir"], [INSTALL_INCLUDEDIR]) | ||
| 28 | -AX_RECURSIVE_EVAL(["$libdir"], [INSTALL_LIBDIR]) | ||
| 29 | -AC_SUBST(INSTALL_BINDIR) | ||
| 30 | -AC_SUBST(INSTALL_INCLUDEDIR) | ||
| 31 | -AC_SUBST(INSTALL_LIBDIR) | ||
| 32 | -AM_SUBST_NOTMAKE(INSTALL_BINDIR) | ||
| 33 | -AM_SUBST_NOTMAKE(INSTALL_INCLUDEDIR) | ||
| 34 | -AM_SUBST_NOTMAKE(INSTALL_LIBDIR) | ||
| 35 | - | ||
| 36 | AX_RECURSIVE_EVAL(["$sysconfdir"], [XML_SYSCONFDIR]) | ||
| 37 | AC_DEFINE_UNQUOTED([XML_SYSCONFDIR], ["$XML_SYSCONFDIR"], | ||
| 38 | [System configuration directory (/etc)]) | ||
| 39 | diff --git a/libxml2-config.cmake.in b/libxml2-config.cmake.in | ||
| 40 | index 4945dda4..31036805 100644 | ||
| 41 | --- a/libxml2-config.cmake.in | ||
| 42 | +++ b/libxml2-config.cmake.in | ||
| 43 | @@ -24,17 +24,20 @@ | ||
| 44 | # LibXml2::LibXml2 - the LibXml2 library | ||
| 45 | # LibXml2::xmllint - the xmllint command-line executable | ||
| 46 | |||
| 47 | +get_filename_component(_libxml2_rootdir ${CMAKE_CURRENT_LIST_DIR}/../../../ ABSOLUTE) | ||
| 48 | + | ||
| 49 | set(LIBXML2_VERSION_MAJOR @LIBXML_MAJOR_VERSION@) | ||
| 50 | set(LIBXML2_VERSION_MINOR @LIBXML_MINOR_VERSION@) | ||
| 51 | set(LIBXML2_VERSION_MICRO @LIBXML_MICRO_VERSION@) | ||
| 52 | set(LIBXML2_VERSION_STRING "@VERSION@") | ||
| 53 | set(LIBXML2_DEFINITIONS "@XML_CFLAGS@") | ||
| 54 | -set(LIBXML2_INCLUDE_DIR @INSTALL_INCLUDEDIR@/libxml2) | ||
| 55 | -set(LIBXML2_LIBRARY_DIR @INSTALL_LIBDIR@) | ||
| 56 | +set(LIBXML2_INSTALL_PREFIX ${_libxml2_rootdir}) | ||
| 57 | +set(LIBXML2_INCLUDE_DIR ${_libxml2_rootdir}/include/libxml2) | ||
| 58 | +set(LIBXML2_LIBRARY_DIR ${_libxml2_rootdir}/lib) | ||
| 59 | |||
| 60 | find_library(LIBXML2_LIBRARY NAMES xml2 HINTS ${LIBXML2_LIBRARY_DIR} NO_DEFAULT_PATH) | ||
| 61 | -find_program(LIBXML2_XMLCATALOG_EXECUTABLE NAMES xmlcatalog HINTS @INSTALL_BINDIR@ NO_DEFAULT_PATH) | ||
| 62 | -find_program(LIBXML2_XMLLINT_EXECUTABLE NAMES xmllint HINTS @INSTALL_BINDIR@ NO_DEFAULT_PATH) | ||
| 63 | +find_program(LIBXML2_XMLCATALOG_EXECUTABLE NAMES xmlcatalog HINTS ${_libxml2_rootdir}/bin NO_DEFAULT_PATH) | ||
| 64 | +find_program(LIBXML2_XMLLINT_EXECUTABLE NAMES xmllint HINTS ${_libxml2_rootdir}/bin NO_DEFAULT_PATH) | ||
| 65 | |||
| 66 | set(LIBXML2_LIBRARIES ${LIBXML2_LIBRARY}) | ||
| 67 | set(LIBXML2_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIR}) | ||
| 68 | diff --git a/meson.build b/meson.build | ||
| 69 | index 4c59211d..3e5f25d3 100644 | ||
| 70 | --- a/meson.build | ||
| 71 | +++ b/meson.build | ||
| 72 | @@ -599,9 +599,6 @@ config_cmake = configuration_data() | ||
| 73 | config_cmake.set('LIBXML_MAJOR_VERSION', v_maj) | ||
| 74 | config_cmake.set('LIBXML_MINOR_VERSION', v_min) | ||
| 75 | config_cmake.set('LIBXML_MICRO_VERSION', v_mic) | ||
| 76 | -config_cmake.set('INSTALL_BINDIR', dir_bin) | ||
| 77 | -config_cmake.set('INSTALL_INCLUDEDIR', dir_include) | ||
| 78 | -config_cmake.set('INSTALL_LIBDIR', dir_lib) | ||
| 79 | config_cmake.set('VERSION', meson.project_version()) | ||
| 80 | config_cmake.set('WITH_HTTP', want_http.to_int().to_string()) | ||
| 81 | config_cmake.set('WITH_ICONV', want_iconv.to_int().to_string()) | ||
diff --git a/meta/recipes-core/libxml/libxml2_2.14.3.bb b/meta/recipes-core/libxml/libxml2_2.14.3.bb index d5d144f793..da75cbe450 100644 --- a/meta/recipes-core/libxml/libxml2_2.14.3.bb +++ b/meta/recipes-core/libxml/libxml2_2.14.3.bb | |||
| @@ -17,6 +17,7 @@ inherit gnomebase | |||
| 17 | SRC_URI += "http://www.w3.org/XML/Test/xmlts20130923.tar;subdir=${BP};name=testtar \ | 17 | SRC_URI += "http://www.w3.org/XML/Test/xmlts20130923.tar;subdir=${BP};name=testtar \ |
| 18 | file://run-ptest \ | 18 | file://run-ptest \ |
| 19 | file://install-tests.patch \ | 19 | file://install-tests.patch \ |
| 20 | file://0001-Revert-cmake-Fix-installation-directories-in-libxml2.patch \ | ||
| 20 | " | 21 | " |
| 21 | 22 | ||
| 22 | SRC_URI[archive.sha256sum] = "6de55cacc8c2bc758f2ef6f93c313cb30e4dd5d84ac5d3c7ccbd9344d8cc6833" | 23 | SRC_URI[archive.sha256sum] = "6de55cacc8c2bc758f2ef6f93c313cb30e4dd5d84ac5d3c7ccbd9344d8cc6833" |
