summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/libical
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2020-11-10 10:47:53 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-11-11 10:08:12 +0000
commit57f75912e994aea40a7ea48f28be2f0d7d8522dc (patch)
treee72627694dc57ddbef1bc6befe4ac703d21bcc29 /meta/recipes-support/libical
parent78dc72be45b16316340b453bb2e4bbe06b6cb58b (diff)
downloadpoky-57f75912e994aea40a7ea48f28be2f0d7d8522dc.tar.gz
libical: backport a patch to fix build with ICU 68.1
(From OE-Core rev: b5950dbe48cace0370ff513ad8117c355a310ff8) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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_3.0.8.bb1
2 files changed, 82 insertions, 0 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
new file mode 100644
index 0000000000..79e1475c6c
--- /dev/null
+++ b/meta/recipes-support/libical/libical/0001-Fix-build-with-icu-68.1.patch
@@ -0,0 +1,81 @@
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_3.0.8.bb b/meta/recipes-support/libical/libical_3.0.8.bb
index efb9433412..6230f09eca 100644
--- a/meta/recipes-support/libical/libical_3.0.8.bb
+++ b/meta/recipes-support/libical/libical_3.0.8.bb
@@ -11,6 +11,7 @@ SECTION = "libs"
11SRC_URI = " \ 11SRC_URI = " \
12 https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz \ 12 https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz \
13 file://0001-Use-our-hand-build-native-src-generator.patch \ 13 file://0001-Use-our-hand-build-native-src-generator.patch \
14 file://0001-Fix-build-with-icu-68.1.patch \
14" 15"
15SRC_URI[md5sum] = "41bd1f1fcdcb4779cea478bb55cf07bf" 16SRC_URI[md5sum] = "41bd1f1fcdcb4779cea478bb55cf07bf"
16SRC_URI[sha256sum] = "09fecacaf75ba5a242159e3a9758a5446b5ce4d0ab684f98a7040864e1d1286f" 17SRC_URI[sha256sum] = "09fecacaf75ba5a242159e3a9758a5446b5ce4d0ab684f98a7040864e1d1286f"