With a bit of help from upstream I figured out how to do cross-builds the way upstream intends to.
Signed-off-by: Alexander Kanavin <alex.kana...@gmail.com> --- ...-our-hand-build-native-src-generator.patch | 32 ------------------- meta/recipes-support/libical/libical_3.0.9.bb | 12 +++---- 2 files changed, 5 insertions(+), 39 deletions(-) delete mode 100644 meta/recipes-support/libical/libical/0001-Use-our-hand-build-native-src-generator.patch diff --git a/meta/recipes-support/libical/libical/0001-Use-our-hand-build-native-src-generator.patch b/meta/recipes-support/libical/libical/0001-Use-our-hand-build-native-src-generator.patch deleted file mode 100644 index 0813641ee9..0000000000 --- a/meta/recipes-support/libical/libical/0001-Use-our-hand-build-native-src-generator.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 378df7d6ef9207d3e11a3de54ffd05c04c6c0e0b Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kana...@gmail.com> -Date: Wed, 24 Feb 2021 20:28:22 +0000 -Subject: [PATCH] Use our hand-build native src-generator - -Upstream-Status: Inappropriate [reported at https://github.com/libical/libical/issues/481] -Signed-off-by: Alexander Kanavin <alex.kana...@gmail.com> ---- - src/libical-glib/CMakeLists.txt | 7 +------ - 1 file changed, 1 insertion(+), 6 deletions(-) - -diff --git a/src/libical-glib/CMakeLists.txt b/src/libical-glib/CMakeLists.txt -index 13f77aa..c337c9e 100644 ---- a/src/libical-glib/CMakeLists.txt -+++ b/src/libical-glib/CMakeLists.txt -@@ -74,12 +74,7 @@ endforeach() - - if(CMAKE_CROSSCOMPILING) - # import native ical-glib-src-generator when cross-compiling -- set(IMPORT_ICAL_GLIB_SRC_GENERATOR "ICAL_GLIB_SRC_GENERATOR-NOTFOUND" -- CACHE FILEPATH -- "Path to exported ical-glib-src-generator target from native build" -- ) -- include(${IMPORT_ICAL_GLIB_SRC_GENERATOR}) -- set(ical-glib-src-generator_EXE native-ical-glib-src-generator) -+ set(ical-glib-src-generator_EXE ${CMAKE_BINARY_DIR}/src-generator) - else() - set(ical-glib-src-generator_EXE ical-glib-src-generator) - endif() --- -2.17.1 - diff --git a/meta/recipes-support/libical/libical_3.0.9.bb b/meta/recipes-support/libical/libical_3.0.9.bb index 6f8b491190..de4395d7a0 100644 --- a/meta/recipes-support/libical/libical_3.0.9.bb +++ b/meta/recipes-support/libical/libical_3.0.9.bb @@ -9,19 +9,13 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=1910a2a76ddf6a9ba369182494170d87 \ SECTION = "libs" SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz \ - file://0001-Use-our-hand-build-native-src-generator.patch \ " SRC_URI[sha256sum] = "bd26d98b7fcb2eb0cd5461747bbb02024ebe38e293ca53a7dfdcb2505265a728" UPSTREAM_CHECK_URI = "https://github.com/libical/libical/releases" inherit cmake pkgconfig -do_compile_prepend() { - # As long as https://github.com/libical/libical/issues/481 is open build native src-generator manually - NATIVE_CFLAGS="${BUILD_CFLAGS} `pkg-config-native --cflags glib-2.0` `pkg-config-native --cflags libxml-2.0`" - NATIVE_LDFLAGS="${BUILD_LDFLAGS} `pkg-config-native --libs glib-2.0` `pkg-config-native --libs libxml-2.0`" - ${BUILD_CC} $NATIVE_CFLAGS ${S}/src/libical-glib/tools/generator.c ${S}/src/libical-glib/tools/xml-parser.c -o ${B}/src-generator $NATIVE_LDFLAGS -} +DEPENDS_append_class-target = "libical-native" PACKAGECONFIG ??= "icu glib" PACKAGECONFIG[bdb] = ",-DCMAKE_DISABLE_FIND_PACKAGE_BDB=True,db" @@ -34,6 +28,8 @@ EXTRA_OECMAKE += "-DPERL_EXECUTABLE=${HOSTTOOLS_DIR}/perl" # doc build fails with linker error (??) for libical-glib so disable it EXTRA_OECMAKE += "-DICAL_BUILD_DOCS=false" +EXTRA_OECMAKE_append_class-target = " -DIMPORT_ICAL_GLIB_SRC_GENERATOR=${STAGING_LIBDIR_NATIVE}/cmake/LibIcal/IcalGlibSrcGenerator.cmake" + do_install_append () { # Remove build host references sed -i \ @@ -42,3 +38,5 @@ do_install_append () { ${D}${libdir}/cmake/LibIcal/LibIcal*.cmake \ ${D}${libdir}/cmake/LibIcal/Ical*.cmake } + +BBCLASSEXTEND = "native" -- 2.29.2
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#148811): https://lists.openembedded.org/g/openembedded-core/message/148811 Mute This Topic: https://lists.openembedded.org/mt/81005363/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-