From 462b56a8967b3c582a31a7448f18ff73abeeb553 Mon Sep 17 00:00:00 2001 From: Clayton Craft Date: Mon, 4 Nov 2024 15:38:18 -0800 Subject: [PATCH] community/khal: add upstream patch to support icalendar 6.0.0 This was submitted upstream but hasn't been merged yet because they are trying to figure out how to maintain backwards compatibility with older py3-icalendar versions. https://github.com/pimutils/khal/pull/1364 --- .../khal/0001-support-icalendar-6.0.0.patch | 38 +++++++++++++++++++ community/khal/APKBUILD | 4 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 community/khal/0001-support-icalendar-6.0.0.patch diff --git a/community/khal/0001-support-icalendar-6.0.0.patch b/community/khal/0001-support-icalendar-6.0.0.patch new file mode 100644 index 000000000000..021fd756d9bf --- /dev/null +++ b/community/khal/0001-support-icalendar-6.0.0.patch @@ -0,0 +1,38 @@ +From 0b5975e17296d5e52f19abbbb4790a64b153d710 Mon Sep 17 00:00:00 2001 +From: Clayton Craft +Date: Mon, 4 Nov 2024 19:46:04 -0800 +Subject: [PATCH] support icalendar>=6.0.0 + +Based on: https://github.com/pimutils/khal/pull/1364 +--- + khal/icalendar.py | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/khal/icalendar.py b/khal/icalendar.py +index 5ae1787..c108ad0 100644 +--- a/khal/icalendar.py ++++ b/khal/icalendar.py +@@ -37,6 +37,9 @@ from .utils import generate_random_uid, localize_strip_tz, to_unix_time + + logger = logging.getLogger('khal') + ++# Force use of pytz because we rely on functionalities not available in ++# zoneinfo. ++icalendar.use_pytz() + + def split_ics(ics: str, random_uid: bool=False, default_timezone=None): + """split an ics string into several according to VEVENT's UIDs +@@ -56,8 +59,8 @@ def split_ics(ics: str, random_uid: bool=False, default_timezone=None): + # Standard Time' for 'Pacific/Auckland' in Olson format), we convert any + # Windows format timezones to Olson. + if item.name == 'VTIMEZONE': +- if item['TZID'] in icalendar.windows_to_olson.WINDOWS_TO_OLSON: +- key = icalendar.windows_to_olson.WINDOWS_TO_OLSON[item['TZID']] ++ if item['TZID'] in icalendar.timezone.windows_to_olson.WINDOWS_TO_OLSON: ++ key = icalendar.timezone.windows_to_olson.WINDOWS_TO_OLSON[item['TZID']] + else: + key = item['TZID'] + tzs[key] = item +-- +2.46.2 + diff --git a/community/khal/APKBUILD b/community/khal/APKBUILD index 6ad825f6d8ad..336b3eae975e 100644 --- a/community/khal/APKBUILD +++ b/community/khal/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Galen Abell pkgname=khal pkgver=0.11.3 -pkgrel=2 +pkgrel=3 pkgdesc="CLI calendar application build around CalDAV" url="https://lostpackets.de/khal" arch="noarch" @@ -39,6 +39,7 @@ subpackages=" " source="https://files.pythonhosted.org/packages/source/k/khal/khal-$pkgver.tar.gz fix-doc-intersphinx-mapping.patch + 0001-support-icalendar-6.0.0.patch " case "$CARCH" in s390x) @@ -84,4 +85,5 @@ package() { sha512sums=" 1f7f82e04ad913df9e2e4bd315a70b9832b1af3f6d2db794018c780645f5bdb6df39efb45a36b38e3c1327932a1cb91d4c735f578b29a9326ef0f163fecd7bba khal-0.11.3.tar.gz 6d076eaa73274d360f89e2fba7a3cfcfb655a0f101ecc6ad6636d0d9fadc68c6caba9c51cf6229f7994677eb6e5e68c0dd5b17c4c7e437f4b5e543c4ff3c9ad0 fix-doc-intersphinx-mapping.patch +4554bdaa3dcdf963927b6b7924fa580dd045e99e2be254594863f1a8c63f868893a415ef0f4c2d469160f6ca4d3fd63593518c6d99cb576959d96556cbcb5cbc 0001-support-icalendar-6.0.0.patch "