libical: improve buildpath situation

Take an upstream patch to remove buildpaths from the generator's CMake
files, so we don't need to sed them out.

Also, the generator tool is only needed when cross-compiling libical,
so we don't actually need to install it in the target package. This has
the nice side-effect of removing libxml2 from the target RDEPENDS as it
is only used in the tool.

(From OE-Core rev: 01ac9719b32088a809ca1553fceba71cec31054d)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton
2025-09-10 14:48:07 +01:00
committed by Richard Purdie
parent b735ab8056
commit a821638e78
2 changed files with 48 additions and 5 deletions

View File

@@ -0,0 +1,40 @@
From a5642fa1cd8c835209b39ec99e534d341779c985 Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
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 <ross.burton@arm.com>
---
src/libical-glib/CMakeLists.txt | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/libical-glib/CMakeLists.txt b/src/libical-glib/CMakeLists.txt
index 9f69e9c5..aa55e013 100644
--- a/src/libical-glib/CMakeLists.txt
+++ b/src/libical-glib/CMakeLists.txt
@@ -8,8 +8,8 @@ add_executable(ical-glib-src-generator
tools/xml-parser.h
)
-target_compile_options(ical-glib-src-generator PUBLIC ${GLIB_CFLAGS} ${LIBXML_CFLAGS} -DG_LOG_DOMAIN=\"src-generator\")
-target_link_libraries(ical-glib-src-generator ${GLIB_LIBRARIES} ${LIBXML_LIBRARIES})
+target_compile_options(ical-glib-src-generator PRIVATE ${GLIB_CFLAGS} ${LIBXML_CFLAGS} -DG_LOG_DOMAIN=\"src-generator\")
+target_link_libraries(ical-glib-src-generator PRIVATE ${GLIB_LIBRARIES} ${LIBXML_LIBRARIES})
install(
TARGETS ical-glib-src-generator
@@ -130,7 +130,7 @@ target_link_libraries(ical-glib PRIVATE ical ${GLIB_LIBRARIES})
if(NOT SHARED_ONLY AND NOT STATIC_ONLY)
add_library(ical-glib-static STATIC ${LIBICAL_GLIB_SOURCES})
add_dependencies(ical-glib-static ical-header)
- target_compile_options(ical-glib-static PUBLIC ${GLIB_CFLAGS} -DG_LOG_DOMAIN="libical-glib" -DLIBICAL_GLIB_COMPILATION)
+ target_compile_options(ical-glib-static PRIVATE ${GLIB_CFLAGS} -DG_LOG_DOMAIN="libical-glib" -DLIBICAL_GLIB_COMPILATION)
target_link_libraries(ical-glib-static ${GLIB_LIBRARIES})
endif()

View File

@@ -14,6 +14,7 @@ SECTION = "libs"
SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BP}.tar.gz \
file://0001-cmake-Do-not-export-CC-into-gir-compiler.patch \
file://flags.patch \
"
SRC_URI[sha256sum] = "e73de92f5a6ce84c1b00306446b290a2b08cdf0a80988eca0a2c9d5c3510b4c2"
@@ -45,11 +46,13 @@ EXTRA_OECMAKE:append:class-target = " -DIMPORT_ICAL_GLIB_SRC_GENERATOR=${STAGING
do_install:append () {
# Remove build host references (https://github.com/libical/libical/issues/532)
sed -i \
-e 's,${STAGING_LIBDIR},${libdir},g' \
-e 's,${STAGING_INCDIR},${includedir},g' \
${D}${libdir}/cmake/LibIcal/LibIcal*.cmake \
${D}${libdir}/cmake/LibIcal/Ical*.cmake
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
do_install:append:class-target() {
rm -f ${D}${libexecdir}/libical/ical-glib-src-generator
rm -f ${D}${libdir}/cmake/LibIcal/IcalGlibSrcGenerator*.cmake
}
BBCLASSEXTEND = "native"