Skip to contentSkip to conversation

libical: Fix build with icu-68

PATCH In review Khem Raj 2 participants 3 messages Nov 10, 2020

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 libical: Fix build with icu-68

icu-68.1 removed TRUE and FALSE public macro definitions

---
 .../0001-Fix-build-with-icu-68.1.patch        | 46 +++++++++++++++++++
 meta/recipes-support/libical/libical_3.0.8.bb |  1 +
 2 files changed, 47 insertions(+)
 create mode 100644 meta/recipes-support/libical/libical/0001-Fix-build-with-icu-68.1.patch
meta/recipes-support/libical/libical/0001-Fix-build-with-icu-68.1.patch new file +46 -0
new file mode 100644
index 0000000000..8f3a6e1563
@@ -0,0 +1,46 @@
+From 6fa716bb11d16a7b073f35a36651c6ef23a7fdac Mon Sep 17 00:00:00 2001
+From: Lars Wendler <[email protected]>
+Date: Fri, 30 Oct 2020 11:24:34 +0100
+Subject: [PATCH] Fix build with icu-68.1
+
+icu-68.1 removed public macro definitions for TRUE and FALSE
+
+Upstream-Status: Pending
+Signed-off-by: Lars Wendler <[email protected]>
+---
+ src/libical/icalrecur.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/libical/icalrecur.c b/src/libical/icalrecur.c
+index 7317845..bd1046f 100644
+--- a/src/libical/icalrecur.c
++++ b/src/libical/icalrecur.c
+@@ -143,6 +143,7 @@
+ #include <stdlib.h>
+ 
+ #if defined(HAVE_LIBICU)
++#include <stdbool.h>
+ #include <unicode/ucal.h>
+ #include <unicode/ustring.h>
+ #define RSCALE_IS_SUPPORTED 1
+@@ -1018,7 +1019,7 @@ icalarray *icalrecurrencetype_rscale_supported_calendars(void)
+ 
+     calendars = icalarray_new(sizeof(const char **), 20);
+ 
+-    en = ucal_getKeywordValuesForLocale("calendar", NULL, FALSE, &status);
++    en = ucal_getKeywordValuesForLocale("calendar", NULL, false, &status);
+     while ((cal = uenum_next(en, NULL, &status))) {
+         cal = icalmemory_tmp_copy(cal);
+         icalarray_append(calendars, &cal);
+@@ -1411,7 +1412,7 @@ static int initialize_rscale(icalrecur_iterator *impl)
+         }
+ 
+         /* Check if specified calendar is supported */
+-        en = ucal_getKeywordValuesForLocale("calendar", NULL, FALSE, &status);
++        en = ucal_getKeywordValuesForLocale("calendar", NULL, false, &status);
+         while ((cal = uenum_next(en, NULL, &status))) {
+             if (!strcmp(cal, rule.rscale)) {
+                 is_hebrew = !strcmp(rule.rscale, "hebrew");
+-- 
+2.29.2
+
meta/recipes-support/libical/libical_3.0.8.bb +1 -0
index efb9433412..6230f09eca 100644
@@ -11,6 +11,7 @@ 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 \
+    file://0001-Fix-build-with-icu-68.1.patch \
 "
 SRC_URI[md5sum] = "41bd1f1fcdcb4779cea478bb55cf07bf"
 SRC_URI[sha256sum] = "09fecacaf75ba5a242159e3a9758a5446b5ce4d0ab684f98a7040864e1d1286f"
Signature · 1 line
2.29.2
#1 lore raw

Can you resend this using the upstream fix:

https://github.com/libical/libical/commit/a3308a23912bba2db654a8c456165c31888cc897

Thanks,
Ross

Quoted 80 lines · Khem Raj

icu-68.1 removed TRUE and FALSE public macro definitions

---
 .../0001-Fix-build-with-icu-68.1.patch        | 46 +++++++++++++++++++
 meta/recipes-support/libical/libical_3.0.8.bb |  1 +
 2 files changed, 47 insertions(+)
 create mode 100644 meta/recipes-support/libical/libical/0001-Fix-build-with-icu-68.1.patch
meta/recipes-support/libical/libical/0001-Fix-build-with-icu-68.1.patch new file +46 -0
new file mode 100644
index 0000000000..8f3a6e1563
@@ -0,0 +1,46 @@
+From 6fa716bb11d16a7b073f35a36651c6ef23a7fdac Mon Sep 17 00:00:00 2001
+From: Lars Wendler <[email protected]>
+Date: Fri, 30 Oct 2020 11:24:34 +0100
+Subject: [PATCH] Fix build with icu-68.1
+
+icu-68.1 removed public macro definitions for TRUE and FALSE
+
+Upstream-Status: Pending
+Signed-off-by: Lars Wendler <[email protected]>
+---
+ src/libical/icalrecur.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/libical/icalrecur.c b/src/libical/icalrecur.c
+index 7317845..bd1046f 100644
+--- a/src/libical/icalrecur.c
++++ b/src/libical/icalrecur.c
+@@ -143,6 +143,7 @@
+ #include <stdlib.h>
+
+ #if defined(HAVE_LIBICU)
++#include <stdbool.h>
+ #include <unicode/ucal.h>
+ #include <unicode/ustring.h>
+ #define RSCALE_IS_SUPPORTED 1
+@@ -1018,7 +1019,7 @@ icalarray *icalrecurrencetype_rscale_supported_calendars(void)
+
+     calendars = icalarray_new(sizeof(const char **), 20);
+
+-    en = ucal_getKeywordValuesForLocale("calendar", NULL, FALSE, &status);
++    en = ucal_getKeywordValuesForLocale("calendar", NULL, false, &status);
+     while ((cal = uenum_next(en, NULL, &status))) {
+         cal = icalmemory_tmp_copy(cal);
+         icalarray_append(calendars, &cal);
+@@ -1411,7 +1412,7 @@ static int initialize_rscale(icalrecur_iterator *impl)
+         }
+
+         /* Check if specified calendar is supported */
+-        en = ucal_getKeywordValuesForLocale("calendar", NULL, FALSE, &status);
++        en = ucal_getKeywordValuesForLocale("calendar", NULL, false, &status);
+         while ((cal = uenum_next(en, NULL, &status))) {
+             if (!strcmp(cal, rule.rscale)) {
+                 is_hebrew = !strcmp(rule.rscale, "hebrew");
+--
+2.29.2
+
meta/recipes-support/libical/libical_3.0.8.bb +1 -1
index efb9433412..6230f09eca 100644
@@ -11,6 +11,7 @@ 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 \
+    file://0001-Fix-build-with-icu-68.1.patch \
 "
 SRC_URI[md5sum] = "41bd1f1fcdcb4779cea478bb55cf07bf"
 SRC_URI[sha256sum] = "09fecacaf75ba5a242159e3a9758a5446b5ce4d0ab684f98a7040864e1d1286f"
--

2.29.2

#2 lore raw

Stand down, I decided to do it myself instead of waiting for you to wake up ;)

Quoted 89 lines · Ross Burton

Can you resend this using the upstream fix:

https://github.com/libical/libical/commit/a3308a23912bba2db654a8c456165c31888cc897

Thanks,
Ross

Quoted 80 lines · Khem Raj

icu-68.1 removed TRUE and FALSE public macro definitions

---
 .../0001-Fix-build-with-icu-68.1.patch        | 46 +++++++++++++++++++
 meta/recipes-support/libical/libical_3.0.8.bb |  1 +
 2 files changed, 47 insertions(+)
 create mode 100644 meta/recipes-support/libical/libical/0001-Fix-build-with-icu-68.1.patch
meta/recipes-support/libical/libical/0001-Fix-build-with-icu-68.1.patch new file +46 -0
new file mode 100644
index 0000000000..8f3a6e1563
@@ -0,0 +1,46 @@
+From 6fa716bb11d16a7b073f35a36651c6ef23a7fdac Mon Sep 17 00:00:00 2001
+From: Lars Wendler <[email protected]>
+Date: Fri, 30 Oct 2020 11:24:34 +0100
+Subject: [PATCH] Fix build with icu-68.1
+
+icu-68.1 removed public macro definitions for TRUE and FALSE
+
+Upstream-Status: Pending
+Signed-off-by: Lars Wendler <[email protected]>
+---
+ src/libical/icalrecur.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/libical/icalrecur.c b/src/libical/icalrecur.c
+index 7317845..bd1046f 100644
+--- a/src/libical/icalrecur.c
++++ b/src/libical/icalrecur.c
+@@ -143,6 +143,7 @@
+ #include <stdlib.h>
+
+ #if defined(HAVE_LIBICU)
++#include <stdbool.h>
+ #include <unicode/ucal.h>
+ #include <unicode/ustring.h>
+ #define RSCALE_IS_SUPPORTED 1
+@@ -1018,7 +1019,7 @@ icalarray *icalrecurrencetype_rscale_supported_calendars(void)
+
+     calendars = icalarray_new(sizeof(const char **), 20);
+
+-    en = ucal_getKeywordValuesForLocale("calendar", NULL, FALSE, &status);
++    en = ucal_getKeywordValuesForLocale("calendar", NULL, false, &status);
+     while ((cal = uenum_next(en, NULL, &status))) {
+         cal = icalmemory_tmp_copy(cal);
+         icalarray_append(calendars, &cal);
+@@ -1411,7 +1412,7 @@ static int initialize_rscale(icalrecur_iterator *impl)
+         }
+
+         /* Check if specified calendar is supported */
+-        en = ucal_getKeywordValuesForLocale("calendar", NULL, FALSE, &status);
++        en = ucal_getKeywordValuesForLocale("calendar", NULL, false, &status);
+         while ((cal = uenum_next(en, NULL, &status))) {
+             if (!strcmp(cal, rule.rscale)) {
+                 is_hebrew = !strcmp(rule.rscale, "hebrew");
+--
+2.29.2
+
meta/recipes-support/libical/libical_3.0.8.bb +1 -1
index efb9433412..6230f09eca 100644
@@ -11,6 +11,7 @@ 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 \
+    file://0001-Fix-build-with-icu-68.1.patch \
 "
 SRC_URI[md5sum] = "41bd1f1fcdcb4779cea478bb55cf07bf"
 SRC_URI[sha256sum] = "09fecacaf75ba5a242159e3a9758a5446b5ce4d0ab684f98a7040864e1d1286f"
--

2.29.2