mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 21:32:12 +02:00
libical: drop the ad hoc native generator build
With a bit of help from upstream I figured out how to do cross-builds the way upstream intends to. (From OE-Core rev: f13c2cd727b01a3a11211a42c682ebb5eef9aa11) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
be8062b071
commit
ef39fa61d5
@@ -1,32 +0,0 @@
|
||||
From 378df7d6ef9207d3e11a3de54ffd05c04c6c0e0b Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Kanavin <alex.kanavin@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.kanavin@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
|
||||
|
||||
@@ -13,19 +13,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"
|
||||
@@ -38,6 +32,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 \
|
||||
@@ -46,3 +42,5 @@ do_install_append () {
|
||||
${D}${libdir}/cmake/LibIcal/LibIcal*.cmake \
|
||||
${D}${libdir}/cmake/LibIcal/Ical*.cmake
|
||||
}
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
||||
Reference in New Issue
Block a user