summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/libical
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/libical')
-rw-r--r--meta/recipes-support/libical/libical/0001-Fix-build-with-icu-68.1.patch81
-rw-r--r--meta/recipes-support/libical/libical/0001-Use-our-hand-build-native-src-generator.patch33
-rw-r--r--meta/recipes-support/libical/libical/0001-cmake-Do-not-export-CC-into-gir-compiler.patch33
-rw-r--r--meta/recipes-support/libical/libical_3.0.18.bb55
-rw-r--r--meta/recipes-support/libical/libical_3.0.8.bb46
5 files changed, 88 insertions, 160 deletions
diff --git a/meta/recipes-support/libical/libical/0001-Fix-build-with-icu-68.1.patch b/meta/recipes-support/libical/libical/0001-Fix-build-with-icu-68.1.patch
deleted file mode 100644
index 79e1475c6c..0000000000
--- a/meta/recipes-support/libical/libical/0001-Fix-build-with-icu-68.1.patch
+++ /dev/null
@@ -1,81 +0,0 @@
1Upstream-Status: Backport
2Signed-off-by: Ross Burton <ross.burton@arm.com>
3
4From 52d603212173d4502800bf746436a93f806a8898 Mon Sep 17 00:00:00 2001
5From: Allen Winter <allen.winter@kdab.com>
6Date: Sat, 31 Oct 2020 17:38:01 -0400
7Subject: [PATCH] Fix build with icu-68.1
8
9Use stdbool.h to define true and false when possible
10
11Issue#448
12---
13 ConfigureChecks.cmake | 1 +
14 config.h.cmake | 3 +++
15 src/libical/icalrecur.c | 10 ++++++++--
16 3 files changed, 12 insertions(+), 2 deletions(-)
17
18diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
19index e4d0e2ec..bba33fa9 100644
20--- a/ConfigureChecks.cmake
21+++ b/ConfigureChecks.cmake
22@@ -10,6 +10,7 @@ check_include_files(sys/utsname.h HAVE_SYS_UTSNAME_H)
23 check_include_files(fcntl.h HAVE_FCNTL_H)
24 check_include_files(unistd.h HAVE_UNISTD_H)
25 check_include_files(wctype.h HAVE_WCTYPE_H)
26+check_include_files(stdbool.h HAVE_STDBOOL_H)
27
28 include(CheckFunctionExists)
29 if(WIN32 AND MSVC)
30diff --git a/config.h.cmake b/config.h.cmake
31index 8fd3421b..c8008692 100644
32--- a/config.h.cmake
33+++ b/config.h.cmake
34@@ -39,6 +39,9 @@
35 /* Define to 1 if you have the <dirent.h> header file. */
36 #cmakedefine HAVE_DIRENT_H 1
37
38+/* Define to 1 if you have the <stdbool.h> header file. */
39+#cmakedefine HAVE_STDBOOL_H 1
40+
41 /* Define if we have pthread. */
42 #cmakedefine HAVE_PTHREAD_ATTR_GET_NP 1
43 #cmakedefine HAVE_PTHREAD_GETATTR_NP 1
44diff --git a/src/libical/icalrecur.c b/src/libical/icalrecur.c
45index 73178450..b3f054b8 100644
46--- a/src/libical/icalrecur.c
47+++ b/src/libical/icalrecur.c
48@@ -145,6 +145,12 @@
49 #if defined(HAVE_LIBICU)
50 #include <unicode/ucal.h>
51 #include <unicode/ustring.h>
52+#if defined(HAVE_STDBOOL_H)
53+#include <stdbool.h>
54+#else
55+#define false 0
56+#define true 1
57+#endif
58 #define RSCALE_IS_SUPPORTED 1
59 #else
60 #define RSCALE_IS_SUPPORTED 0
61@@ -1018,7 +1024,7 @@ icalarray *icalrecurrencetype_rscale_supported_calendars(void)
62
63 calendars = icalarray_new(sizeof(const char **), 20);
64
65- en = ucal_getKeywordValuesForLocale("calendar", NULL, FALSE, &status);
66+ en = ucal_getKeywordValuesForLocale("calendar", NULL, false, &status);
67 while ((cal = uenum_next(en, NULL, &status))) {
68 cal = icalmemory_tmp_copy(cal);
69 icalarray_append(calendars, &cal);
70@@ -1411,7 +1417,7 @@ static int initialize_rscale(icalrecur_iterator *impl)
71 }
72
73 /* Check if specified calendar is supported */
74- en = ucal_getKeywordValuesForLocale("calendar", NULL, FALSE, &status);
75+ en = ucal_getKeywordValuesForLocale("calendar", NULL, false, &status);
76 while ((cal = uenum_next(en, NULL, &status))) {
77 if (!strcmp(cal, rule.rscale)) {
78 is_hebrew = !strcmp(rule.rscale, "hebrew");
79--
802.25.1
81
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 b7b757d74b..0000000000
--- a/meta/recipes-support/libical/libical/0001-Use-our-hand-build-native-src-generator.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1From e33bc310238bba1690f2c71ad333e10b9e422ea9 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
3Date: Sat, 19 Oct 2019 14:23:06 +0200
4Subject: [PATCH] Use our hand-build native src-generator
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Upstream-Status: Inappropriate [oe-core specific]
10
11Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
12---
13 src/libical-glib/CMakeLists.txt | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/src/libical-glib/CMakeLists.txt b/src/libical-glib/CMakeLists.txt
17index f3704e6..ce9db16 100644
18--- a/src/libical-glib/CMakeLists.txt
19+++ b/src/libical-glib/CMakeLists.txt
20@@ -63,8 +63,8 @@ endforeach()
21
22 add_custom_command (
23 OUTPUT ${LIBICAL_GLIB_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/libical-glib-private.h ${CMAKE_CURRENT_BINARY_DIR}/i-cal-forward-declarations.h
24- COMMAND ${EXECUTABLE_OUTPUT_PATH}/src-generator "${CMAKE_CURRENT_SOURCE_DIR}/tools" "${CMAKE_CURRENT_SOURCE_DIR}/api"
25- DEPENDS ${EXECUTABLE_OUTPUT_PATH}/src-generator ${xml_files}
26+ COMMAND ${CMAKE_BINARY_DIR}/src-generator "${CMAKE_CURRENT_SOURCE_DIR}/tools" "${CMAKE_CURRENT_SOURCE_DIR}/api"
27+ DEPENDS ${CMAKE_BINARY_DIR}/src-generator ${xml_files}
28 )
29
30 configure_file(
31--
322.21.0
33
diff --git a/meta/recipes-support/libical/libical/0001-cmake-Do-not-export-CC-into-gir-compiler.patch b/meta/recipes-support/libical/libical/0001-cmake-Do-not-export-CC-into-gir-compiler.patch
new file mode 100644
index 0000000000..3841c060ee
--- /dev/null
+++ b/meta/recipes-support/libical/libical/0001-cmake-Do-not-export-CC-into-gir-compiler.patch
@@ -0,0 +1,33 @@
1From c06d8a8990c996cbb854508a944202ba70ba7a7c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 3 Mar 2022 20:10:04 -0800
4Subject: [PATCH] cmake: Do not export CC into gir compiler
5
6this helps cross compilers where full compiler commandline defines the
7compiler rather than just CC variable, therefore let it use the default
8values from environment and not synthesize it from CMAKE_C_COMPILER just
9for this case.
10
11Upstream-Status: Submitted [https://github.com/libical/libical/pull/552]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 cmake/modules/GObjectIntrospectionMacros.cmake | 3 +--
15 1 file changed, 1 insertion(+), 2 deletions(-)
16
17diff --git a/cmake/modules/GObjectIntrospectionMacros.cmake b/cmake/modules/GObjectIntrospectionMacros.cmake
18index 83aff931..d7d3f898 100644
19--- a/cmake/modules/GObjectIntrospectionMacros.cmake
20+++ b/cmake/modules/GObjectIntrospectionMacros.cmake
21@@ -50,8 +50,7 @@ macro(gir_add_introspections introspections_girs)
22 set(_gir_libtool "--no-libtool")
23
24 add_custom_command(
25- COMMAND ${CMAKE_COMMAND} -E env "CC='${CMAKE_C_COMPILER}'"
26- ${GObjectIntrospection_SCANNER}
27+ COMMAND ${GObjectIntrospection_SCANNER}
28 ${GObjectIntrospection_SCANNER_ARGS}
29 --namespace=${_gir_namespace}
30 --nsversion=${_gir_version}
31--
322.35.1
33
diff --git a/meta/recipes-support/libical/libical_3.0.18.bb b/meta/recipes-support/libical/libical_3.0.18.bb
new file mode 100644
index 0000000000..052ca57cfb
--- /dev/null
+++ b/meta/recipes-support/libical/libical_3.0.18.bb
@@ -0,0 +1,55 @@
1SUMMARY = "iCal and scheduling (RFC 2445, 2446, 2447) library"
2DESCRIPTION = "An Open Source implementation of the iCalendar protocols \
3and protocol data units. The iCalendar specification describes how \
4calendar clients can communicate with calendar servers so users can store \
5their calendar data and arrange meetings with other users. "
6HOMEPAGE = "https://github.com/libical/libical"
7BUGTRACKER = "https://github.com/libical/libical/issues"
8LICENSE = "LGPL-2.1-only | MPL-2.0"
9LIC_FILES_CHKSUM = "file://LICENSE;md5=1910a2a76ddf6a9ba369182494170d87 \
10 file://LICENSE.LGPL21.txt;md5=8f690bb538f4b301d931374a6eb864d0 \
11 file://LICENSE.MPL2.txt;md5=f75d2927d3c1ed2414ef72048f5ad640 \
12 "
13SECTION = "libs"
14
15SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${BP}.tar.gz \
16 file://0001-cmake-Do-not-export-CC-into-gir-compiler.patch \
17 "
18SRC_URI[sha256sum] = "72b7dc1a5937533aee5a2baefc990983b66b141dd80d43b51f80aced4aae219c"
19
20inherit cmake pkgconfig gobject-introspection vala github-releases
21
22DEPENDS += "libical-native"
23
24PACKAGECONFIG ??= "icu glib"
25PACKAGECONFIG[bdb] = ",-DCMAKE_DISABLE_FIND_PACKAGE_BDB=True,db"
26PACKAGECONFIG[glib] = "-DICAL_GLIB=True,-DICAL_GLIB=False,glib-2.0-native libxml2-native glib-2.0 libxml2"
27# ICU is used for RSCALE (RFC7529) support
28PACKAGECONFIG[icu] = ",-DCMAKE_DISABLE_FIND_PACKAGE_ICU=True,icu"
29
30# No need to use perl-native, the host perl is sufficient.
31EXTRA_OECMAKE += "-DPERL_EXECUTABLE=${HOSTTOOLS_DIR}/perl"
32# Disable the test suite as we can't install it
33EXTRA_OECMAKE += "-DLIBICAL_BUILD_TESTING=false"
34# doc build fails with linker error (??) for libical-glib so disable it
35EXTRA_OECMAKE += "-DICAL_BUILD_DOCS=false"
36# gobject-introspection
37EXTRA_OECMAKE:append:class-target = " -DGObjectIntrospection_COMPILER=${STAGING_BINDIR}/g-ir-compiler-wrapper"
38EXTRA_OECMAKE:append:class-target = " -DGObjectIntrospection_SCANNER=${STAGING_BINDIR}/g-ir-scanner-wrapper"
39EXTRA_OECMAKE += "-DVAPIGEN=${STAGING_BINDIR_NATIVE}/vapigen"
40EXTRA_OECMAKE += "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DGOBJECT_INTROSPECTION=ON -DICAL_GLIB_VAPI=ON', '-DGOBJECT_INTROSPECTION=OFF -DICAL_GLIB_VAPI=OFF', d)}"
41EXTRA_OECMAKE:append:class-native = " -DGOBJECT_INTROSPECTION=OFF -DICAL_GLIB_VAPI=OFF"
42
43# Tell the cross-libical where the tool it needs to build is
44EXTRA_OECMAKE:append:class-target = " -DIMPORT_ICAL_GLIB_SRC_GENERATOR=${STAGING_LIBDIR_NATIVE}/cmake/LibIcal/IcalGlibSrcGenerator.cmake"
45
46do_install:append () {
47 # Remove build host references (https://github.com/libical/libical/issues/532)
48 sed -i \
49 -e 's,${STAGING_LIBDIR},${libdir},g' \
50 -e 's,${STAGING_INCDIR},${includedir},g' \
51 ${D}${libdir}/cmake/LibIcal/LibIcal*.cmake \
52 ${D}${libdir}/cmake/LibIcal/Ical*.cmake
53}
54
55BBCLASSEXTEND = "native"
diff --git a/meta/recipes-support/libical/libical_3.0.8.bb b/meta/recipes-support/libical/libical_3.0.8.bb
deleted file mode 100644
index 6230f09eca..0000000000
--- a/meta/recipes-support/libical/libical_3.0.8.bb
+++ /dev/null
@@ -1,46 +0,0 @@
1SUMMARY = "iCal and scheduling (RFC 2445, 2446, 2447) library"
2HOMEPAGE = "https://github.com/libical/libical"
3BUGTRACKER = "https://github.com/libical/libical/issues"
4LICENSE = "LGPLv2.1 | MPL-2.0"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=1910a2a76ddf6a9ba369182494170d87 \
6 file://LICENSE.LGPL21.txt;md5=933adb561f159e7c3da079536f0ed871 \
7 file://LICENSE.MPL2.txt;md5=f75d2927d3c1ed2414ef72048f5ad640 \
8 "
9SECTION = "libs"
10
11SRC_URI = " \
12 https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz \
13 file://0001-Use-our-hand-build-native-src-generator.patch \
14 file://0001-Fix-build-with-icu-68.1.patch \
15"
16SRC_URI[md5sum] = "41bd1f1fcdcb4779cea478bb55cf07bf"
17SRC_URI[sha256sum] = "09fecacaf75ba5a242159e3a9758a5446b5ce4d0ab684f98a7040864e1d1286f"
18UPSTREAM_CHECK_URI = "https://github.com/libical/libical/releases"
19
20inherit cmake pkgconfig
21
22do_compile_prepend() {
23 # As long as https://github.com/libical/libical/issues/394 is open build native src-generator manually
24 NATIVE_CFLAGS="${BUILD_CFLAGS} `pkg-config-native --cflags glib-2.0` `pkg-config-native --cflags libxml-2.0`"
25 NATIVE_LDFLAGS="${BUILD_LDFLAGS} `pkg-config-native --libs glib-2.0` `pkg-config-native --libs libxml-2.0`"
26 ${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
27}
28
29PACKAGECONFIG ??= "icu glib"
30PACKAGECONFIG[bdb] = ",-DCMAKE_DISABLE_FIND_PACKAGE_BDB=True,db"
31PACKAGECONFIG[glib] = "-DICAL_GLIB=True,-DICAL_GLIB=False,glib-2.0-native libxml2-native glib-2.0 libxml2"
32# ICU is used for RSCALE (RFC7529) support
33PACKAGECONFIG[icu] = ",-DCMAKE_DISABLE_FIND_PACKAGE_ICU=True,icu"
34
35# No need to use perl-native, the host perl is sufficient.
36EXTRA_OECMAKE += "-DPERL_EXECUTABLE=${HOSTTOOLS_DIR}/perl"
37# doc build fails with linker error (??) for libical-glib so disable it
38EXTRA_OECMAKE += "-DICAL_BUILD_DOCS=false"
39
40do_install_append () {
41 # Remove build host references
42 sed -i \
43 -e 's,${STAGING_LIBDIR},${libdir},g' \
44 -e 's,${STAGING_INCDIR},${includedir},g' \
45 ${D}${libdir}/cmake/LibIcal/LibIcal*.cmake
46}