libical: include a patch to build against icu 68
This commit is contained in:
parent
c15d4054a0
commit
145b859b25
@ -1,5 +1,6 @@
|
||||
untrusted comment: verify with /etc/ports/contrib.pub
|
||||
RWSagIOpLGJF37TCKt5mm8RG4/oAtBAx3sCjho8I4vRYO+u7Bz7PrS8qREUAWF9ASpKhHF/ReyP/3g6YEyHRSZQz75uHy5iNuA8=
|
||||
SHA256 (Pkgfile) = b3ed625ce92dd1e014899970ca918d4d86d3e37b8c44d38d2f02a561dece81e2
|
||||
RWSagIOpLGJF3+tXgf3w646zmGUuoXpn6n8exLkmwkbqponyq7gQTczbgyycMm7kwER1DlglrR/Hl6KgYUblK97C4oPu8ys9fwM=
|
||||
SHA256 (Pkgfile) = 37fa3fbd138a1b9bc65f240b77faf92207dda9ff20e17bc688c53ad9b7953530
|
||||
SHA256 (.footprint) = d1a385335cc807f8b066454c2c7e35faf99ecbe880937899e2b44985bcf091c3
|
||||
SHA256 (libical-3.0.8.tar.gz) = 09fecacaf75ba5a242159e3a9758a5446b5ce4d0ab684f98a7040864e1d1286f
|
||||
SHA256 (icu-68.1.patch) = 35baa04a18b66441ecc5a67e674e11c020e596e124f57cbf94a69595c4ca581c
|
||||
|
@ -6,9 +6,14 @@
|
||||
name=libical
|
||||
version=3.0.8
|
||||
release=1
|
||||
source=(https://github.com/libical/libical/archive/v$version/$name-$version.tar.gz)
|
||||
source=(https://github.com/libical/libical/archive/v$version/$name-$version.tar.gz
|
||||
# https://github.com/libical/libical/commit/a3308a23912bba2db654a8c456165c31888cc897
|
||||
# i removed the ReleaseNotes.txt as it failed to apply on the tagged ball
|
||||
icu-68.1.patch)
|
||||
|
||||
build() {
|
||||
[ $(pkginfo -i | awk '/^icu / {split($2,a,"."); print a[1]}') -ge 68 ] && \
|
||||
patch -p1 -d $name-$version -i $SRC/icu-68.1.patch
|
||||
cmake -S $name-$version -B build -G Ninja \
|
||||
-D CMAKE_INSTALL_PREFIX=/usr \
|
||||
-D CMAKE_INSTALL_LIBDIR=lib \
|
||||
|
78
libical/icu-68.1.patch
Normal file
78
libical/icu-68.1.patch
Normal file
@ -0,0 +1,78 @@
|
||||
From a3308a23912bba2db654a8c456165c31888cc897 Mon Sep 17 00:00:00 2001
|
||||
From: Allen Winter <allen.winter@kdab.com>
|
||||
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 +
|
||||
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)
|
||||
|
||||
Version 3.0.8 (07 March 2020):
|
||||
------------------------------
|
||||
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 <dirent.h> header file. */
|
||||
#cmakedefine HAVE_DIRENT_H 1
|
||||
|
||||
+/* Define to 1 if you have the <stdbool.h> 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 <unicode/ucal.h>
|
||||
#include <unicode/ustring.h>
|
||||
+#if defined(HAVE_STDBOOL_H)
|
||||
+#include <stdbool.h>
|
||||
+#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");
|
Loading…
Reference in New Issue
Block a user