diff mbox series

libical: refresh build path removal

Message ID 20260901171931.2580614-1-ross.burton@arm.com
State Under Review
Headers show
Series libical: refresh build path removal | expand

Commit Message

Ross Burton Sept. 1, 2026, 5:19 p.m. UTC
Change a do_install:append sed expression into a patch that has been
submitted upstream.

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

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 .../libical/libical/icu-flags.patch           | 35 +++++++++++++++++++
 meta/recipes-support/libical/libical_4.0.5.bb |  7 ++--
 2 files changed, 37 insertions(+), 5 deletions(-)
 create mode 100644 meta/recipes-support/libical/libical/icu-flags.patch
diff mbox series

Patch

diff --git a/meta/recipes-support/libical/libical/icu-flags.patch b/meta/recipes-support/libical/libical/icu-flags.patch
new file mode 100644
index 00000000000..bbe7977f741
--- /dev/null
+++ b/meta/recipes-support/libical/libical/icu-flags.patch
@@ -0,0 +1,35 @@ 
+From febd94a4aa1968396959be44909ce580312f8930 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@arm.com>
+Date: Tue, 1 Sep 2026 16:25:18 +0100
+Subject: [PATCH] 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.
+
+Upstream-Status: Submitted [https://github.com/libical/libical/pull/1366]
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+---
+ src/libical/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+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_4.0.5.bb b/meta/recipes-support/libical/libical_4.0.5.bb
index 8ec656edd21..4760772a02c 100644
--- a/meta/recipes-support/libical/libical_4.0.5.bb
+++ b/meta/recipes-support/libical/libical_4.0.5.bb
@@ -12,6 +12,7 @@  SECTION = "libs"
 
 SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BP}.tar.gz \
            file://flags.patch \
+           file://icu-flags.patch \
            "
 SRC_URI[sha256sum] = "cc09a3ac41d60e6144e644bd3fcf97d47106d659c4a0b8965102581401e67c9c"
 
@@ -43,12 +44,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