From 7a1c9089db795cbc2574fcc329d68d6b1c9f6fe5a12c7f90ed3b1c08f4e8515f Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 5 Dec 2020 17:10:10 +0000 Subject: [PATCH] Accepting request 853201 from home:mgorse:branches:devel:libraries:c_c++ - Add 0001-Fix-build-with-icu-68.1.patch: fix build with icu 68.1. OBS-URL: https://build.opensuse.org/request/show/853201 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libical?expand=0&rev=72 --- 0001-Fix-build-with-icu-68.1.patch | 79 ++++++++++++++++++++++++++++++ libical.changes | 7 ++- libical.spec | 1 + 3 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-build-with-icu-68.1.patch diff --git a/0001-Fix-build-with-icu-68.1.patch b/0001-Fix-build-with-icu-68.1.patch new file mode 100644 index 0000000..6f188f0 --- /dev/null +++ b/0001-Fix-build-with-icu-68.1.patch @@ -0,0 +1,79 @@ +From a3308a23912bba2db654a8c456165c31888cc897 Mon Sep 17 00:00:00 2001 +From: Allen Winter +Date: Sat, 31 Oct 2020 17:38:01 -0400 +Subject: [PATCH] Fix build with icu-68.1 + +Use stdbool.h to define true and false when possible + +Issue#448 +--- + ConfigureChecks.cmake | 1 + + ReleaseNotes.txt | 1 + + config.h.cmake | 3 +++ + src/libical/icalrecur.c | 10 ++++++++-- + 4 files changed, 13 insertions(+), 2 deletions(-) + +diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake +index e4d0e2ec..bba33fa9 100644 +--- a/ConfigureChecks.cmake ++++ b/ConfigureChecks.cmake +@@ -10,6 +10,7 @@ check_include_files(sys/utsname.h HAVE_SYS_UTSNAME_H) + check_include_files(fcntl.h HAVE_FCNTL_H) + check_include_files(unistd.h HAVE_UNISTD_H) + check_include_files(wctype.h HAVE_WCTYPE_H) ++check_include_files(stdbool.h HAVE_STDBOOL_H) + + include(CheckFunctionExists) + if(WIN32 AND MSVC) +diff --git a/config.h.cmake b/config.h.cmake +index 8fd3421b..c8008692 100644 +--- a/config.h.cmake ++++ b/config.h.cmake +@@ -39,6 +39,9 @@ + /* Define to 1 if you have the header file. */ + #cmakedefine HAVE_DIRENT_H 1 + ++/* Define to 1 if you have the header file. */ ++#cmakedefine HAVE_STDBOOL_H 1 ++ + /* Define if we have pthread. */ + #cmakedefine HAVE_PTHREAD_ATTR_GET_NP 1 + #cmakedefine HAVE_PTHREAD_GETATTR_NP 1 +diff --git a/src/libical/icalrecur.c b/src/libical/icalrecur.c +index 38ee2bb3..64ec9732 100644 +--- a/src/libical/icalrecur.c ++++ b/src/libical/icalrecur.c +@@ -145,6 +145,12 @@ + #if defined(HAVE_LIBICU) + #include + #include ++#if defined(HAVE_STDBOOL_H) ++#include ++#else ++#define false 0 ++#define true 1 ++#endif + #define RSCALE_IS_SUPPORTED 1 + #else + #define RSCALE_IS_SUPPORTED 0 +@@ -1018,7 +1024,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 +1417,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 + diff --git a/libical.changes b/libical.changes index 6d0af6c..b348486 100644 --- a/libical.changes +++ b/libical.changes @@ -1,8 +1,13 @@ +------------------------------------------------------------------- +Fri Dec 4 23:18:50 UTC 2020 - Michael Gorse + +- Add 0001-Fix-build-with-icu-68.1.patch: fix build with icu 68.1. + ------------------------------------------------------------------- Tue Nov 17 18:49:00 UTC 2020 - Michael Gorse - Add libical-read-v2-v3-data.patch: correctly read slim timezone - data (bsc#1178412). + data (bsc#1178412). ------------------------------------------------------------------- Sat Apr 11 19:46:49 UTC 2020 - Bjørn Lie diff --git a/libical.spec b/libical.spec index c255347..921cac3 100644 --- a/libical.spec +++ b/libical.spec @@ -49,6 +49,7 @@ Patch3: 0003-vcc.y-fix-infinite-loop-with-non-hex-digits.patch Patch4: 0004-vobject.c-vCard-Unicode-reading-support.patch Patch5: 0005-vcc.y-do-not-ignore-field-separator-in-QUOTED-PRINTA.patch Patch6: libical-read-v2-v3-data.patch +Patch7: 0001-Fix-build-with-icu-68.1.patch BuildRequires: c++_compiler BuildRequires: cmake >= 3.1