Fixes have been merged upstream, so replace our patch and a sed with an
upstreamed patch that will be in libical 4.0.6.

Add a link to the relevant upstream bug for the ical-glib-src-generator
removal.

Signed-off-by: Ross Burton <[email protected]>
---
 ...001-Mark-ICU-as-private-linkage-1366.patch | 76 +++++++++++++++++++
 .../libical/libical/flags.patch               | 38 ----------
 meta/recipes-support/libical/libical_4.0.5.bb |  8 +-
 3 files changed, 78 insertions(+), 44 deletions(-)
 create mode 100644 
meta/recipes-support/libical/libical/0001-Mark-ICU-as-private-linkage-1366.patch
 delete mode 100644 meta/recipes-support/libical/libical/flags.patch

diff --git 
a/meta/recipes-support/libical/libical/0001-Mark-ICU-as-private-linkage-1366.patch
 
b/meta/recipes-support/libical/libical/0001-Mark-ICU-as-private-linkage-1366.patch
new file mode 100644
index 00000000000..53bd1683af2
--- /dev/null
+++ 
b/meta/recipes-support/libical/libical/0001-Mark-ICU-as-private-linkage-1366.patch
@@ -0,0 +1,76 @@
+From 13642054f650795446f6020d9d2e14d147b8da51 Mon Sep 17 00:00:00 2001
+From: Ross Burton <[email protected]>
+Date: Wed, 2 Sep 2026 16:14:44 +0100
+Subject: [PATCH] Mark ICU as private linkage (#1366)
+
+* libical-glib: Hide some target options in the installed CMake files
+
+The build paths could be shown in the installed .cmake files, thus
+hide them from there, because they are not needed.
+
+Closes https://github.com/libical/libical/issues/532
+
+* libical: mark ICU linkage as private
+
+There's no need to expose the ICU linkage publically as the .so will
+pull this in itself.
+
+This has a side-effect of removing build/sysroot paths from the installed
+.cmake files.
+
+Closes #532.
+
+---------
+
+Co-authored-by: Milan Crha <[email protected]>
+(cherry picked from commit 38c7e6d31a3a1a4bd67479f402c323fb0679271e)
+
+Upstream-Status: Backport [libical 13642054f650795446f6020d9d2e14d147b8da51]
+Signed-off-by: Ross Burton <[email protected]>
+---
+ src/libical-glib/CMakeLists.txt | 9 +++++----
+ src/libical/CMakeLists.txt      | 2 +-
+ 2 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/src/libical-glib/CMakeLists.txt b/src/libical-glib/CMakeLists.txt
+index d63bbf3c..470a4d22 100644
+--- a/src/libical-glib/CMakeLists.txt
++++ b/src/libical-glib/CMakeLists.txt
+@@ -24,16 +24,17 @@ if(NOT DEFINED LIBXML2_DEFINITIONS)
+ endif()
+ target_compile_options(
+   ical-glib-src-generator
+-  PUBLIC
++  PRIVATE
+     ${GLIB_CFLAGS}
+     ${LIBXML2_DEFINITIONS}
+     -DG_LOG_DOMAIN=\"src-generator\"
+ )
+ target_link_libraries(
+   ical-glib-src-generator
+-  ${GLIB_LDFLAGS}
+-  ${GOBJECT_LDFLAGS}
+-  ${LIBXML2_LIBRARIES}
++  PRIVATE
++    ${GLIB_LDFLAGS}
++    ${GOBJECT_LDFLAGS}
++    ${LIBXML2_LIBRARIES}
+ )
+ 
+ install(
+diff --git a/src/libical/CMakeLists.txt b/src/libical/CMakeLists.txt
+index 6fc2e953..583f2eeb 100644
+--- a/src/libical/CMakeLists.txt
++++ b/src/libical/CMakeLists.txt
+@@ -294,7 +294,7 @@ if(DEFINED CMAKE_THREAD_LIBS_INIT)
+   target_link_libraries(ical ${CMAKE_THREAD_LIBS_INIT})
+ endif()
+ if(ICU_FOUND)
+-  target_link_libraries(ical ${ICU_LIBRARIES})
++  target_link_libraries(ical PRIVATE ${ICU_LIBRARIES})
+   if(VCPKG_MANIFEST_MODE)
+     if(NOT APPLE AND NOT WIN32)
+       target_link_libraries(ical "m;stdc++")
+-- 
+2.43.0
+
diff --git a/meta/recipes-support/libical/libical/flags.patch 
b/meta/recipes-support/libical/libical/flags.patch
deleted file mode 100644
index 868314591c3..00000000000
--- a/meta/recipes-support/libical/libical/flags.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From cba8f762f6a3270530550915d957c01f3da9a601 Mon Sep 17 00:00:00 2001
-From: Milan Crha <[email protected]>
-Date: Wed, 10 Sep 2025 09:52:37 +0200
-Subject: [PATCH] libical-glib: Hide some target options in the installed CMake
-
- files
-
-The build paths could be shown in the installed .cmake files, thus
-hide them from there, because they are needed.
-
-Closes https://github.com/libical/libical/issues/532
-
-Upstream-Status: Submitted [https://github.com/libical/libical/pull/1010]
-Signed-off-by: Ross Burton <[email protected]>
----
- src/libical-glib/CMakeLists.txt | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/libical-glib/CMakeLists.txt b/src/libical-glib/CMakeLists.txt
-index d63bbf3..d820160 100644
---- a/src/libical-glib/CMakeLists.txt
-+++ b/src/libical-glib/CMakeLists.txt
-@@ -24,13 +24,14 @@ if(NOT DEFINED LIBXML2_DEFINITIONS)
- endif()
- target_compile_options(
-   ical-glib-src-generator
--  PUBLIC
-+  PRIVATE
-     ${GLIB_CFLAGS}
-     ${LIBXML2_DEFINITIONS}
-     -DG_LOG_DOMAIN=\"src-generator\"
- )
- target_link_libraries(
-   ical-glib-src-generator
-+  PRIVATE
-   ${GLIB_LDFLAGS}
-   ${GOBJECT_LDFLAGS}
-   ${LIBXML2_LIBRARIES}
diff --git a/meta/recipes-support/libical/libical_4.0.5.bb 
b/meta/recipes-support/libical/libical_4.0.5.bb
index 8ec656edd21..952e2c60540 100644
--- a/meta/recipes-support/libical/libical_4.0.5.bb
+++ b/meta/recipes-support/libical/libical_4.0.5.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = 
"file://LICENSE.txt;md5=6d9294493d031c817783b0400a126c89 \
 SECTION = "libs"
 
 SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BP}.tar.gz \
-           file://flags.patch \
+           file://0001-Mark-ICU-as-private-linkage-1366.patch \
            "
 SRC_URI[sha256sum] = 
"cc09a3ac41d60e6144e644bd3fcf97d47106d659c4a0b8965102581401e67c9c"
 
@@ -43,12 +43,8 @@ EXTRA_OECMAKE += "-DLIBICAL_JAVA_BINDINGS=False"
 # Tell the cross-libical where the tool it needs to build is
 EXTRA_OECMAKE:append:class-target = " 
-DIMPORT_ICAL_GLIB_SRC_GENERATOR=${STAGING_LIBDIR_NATIVE}/cmake/LibIcal/IcalGlibSrcGenerator.cmake"
 
-do_install:append () {
-    # Remove build host references 
(https://github.com/libical/libical/issues/532)
-    sed -i -e 's,${STAGING_LIBDIR},${libdir},g' 
${D}${libdir}/cmake/LibIcal/LibIcalTargets.cmake
-}
-
 # This tool is only needed to cross-compile, delete it from the target packages
+# https://github.com/libical/libical/issues/1365
 do_install:append:class-target() {
     rm -f ${D}${libexecdir}/libical/ical-glib-src-generator
     rm -f ${D}${libdir}/cmake/LibIcal/IcalGlibSrcGenerator*.cmake
-- 
2.43.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#245126): 
https://lists.openembedded.org/g/openembedded-core/message/245126
Mute This Topic: https://lists.openembedded.org/mt/121089691/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to