public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Michel Lind <salimma@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/claws-mail] rawhide: Backport upstream libical 4 support for the vCalendar plugin
Date: Mon, 09 Nov 2026 10:44:52 GMT [thread overview]
Message-ID: <179422109200.1.16140274259602690172.rpms-claws-mail-7225e32f6d0a@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/claws-mail
Branch : rawhide
Commit : 7225e32f6d0aa0d81af1ba4e16f1a834515bce57
Author : Michel Lind <salimma@fedoraproject.org>
Date : 2026-11-05T22:04:26+00:00
Stats : +490/-3 in 4 file(s)
URL : https://src.fedoraproject.org/rpms/claws-mail/c/7225e32f6d0aa0d81af1ba4e16f1a834515bce57?branch=rawhide
Log:
Backport upstream libical 4 support for the vCalendar plugin
Carry upstream commit 1ad848218 (claws-mail bug 4942), which adapts the
plugin to libical 4, with its follow-ups f754d8d9a and 9b6b82879, which
keep it building with libical 3 (ICAL_CHECK_VERSION() in the code
instead of a configure test). The patches are fetched from upstream
gitweb, so spectool can verify them; two reverted attempts in between
cancel out and are not included.
Also apply the patches unconditionally: the Fedora version guard
predates every supported release, and the crypto policies the other
patch relies on exist on all of them.
Signed-off-by: Michel Lind <salimma@fedoraproject.org>
---
diff --git a/claws-mail-vcalendar-libical3-compat.patch b/claws-mail-vcalendar-libical3-compat.patch
new file mode 100644
index 0000000..22f91e8
--- /dev/null
+++ b/claws-mail-vcalendar-libical3-compat.patch
@@ -0,0 +1,30 @@
+From f754d8d9ae50f2beb1385798c541af623d5c2820 Mon Sep 17 00:00:00 2001
+From: wwp <subscript@free.fr>
+Date: Fri, 26 Jun 2026 20:08:26 +0200
+Subject: [PATCH] Fix detecting/compiling with libical 3 (at last).
+
+---
+ configure.ac | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index f6e796880..60f88ff3c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1292,9 +1292,10 @@ AC_SUBST(LIBGUMBO_LIBS)
+ dnl libical ********************************************************************
+ PKG_CHECK_MODULES(LIBICAL, libical >= 2.0, HAVE_LIBICAL=yes, HAVE_LIBICAL=no)
+ if test x"$HAVE_LIBICAL" = xyes; then
+- PKG_CHECK_MODULES(LIBICAL, libical >= 4.0, [
+- AC_DEFINE(HAVE_LIBICAL_V4, 1, [Define if libical v4 is detected.])
+- ], [ ])
++ PKG_CHECK_MODULES(HAVE_LIBICAL_V4, libical >= 4.0, HAVE_LIBICAL_V4=yes, HAVE_LIBICAL_V4=no)
++ if test x"$HAVE_LIBICAL_V4" = xyes; then
++ AC_DEFINE(HAVE_LIBICAL_V4, 1, [Define if libical v4 is detected])
++ fi
+ fi
+ AC_SUBST(LIBICAL_CFLAGS)
+ AC_SUBST(LIBICAL_LIBS)
+--
+2.43.0
+
diff --git a/claws-mail-vcalendar-libical4-version-check.patch b/claws-mail-vcalendar-libical4-version-check.patch
new file mode 100644
index 0000000..4ad8adf
--- /dev/null
+++ b/claws-mail-vcalendar-libical4-version-check.patch
@@ -0,0 +1,202 @@
+From 9b6b82879c75ceb52d93eaa137eafe04b258136e Mon Sep 17 00:00:00 2001
+From: Paul <paul@claws-mail.org>
+Date: Sat, 18 Jul 2026 17:44:47 +0100
+Subject: [PATCH] check for libical 4.x.x the right way. thanks to Funda Wang
+
+---
+ AUTHORS | 1 +
+ configure.ac | 6 ------
+ src/gtk/authors.h | 1 +
+ src/plugins/vcalendar/vcal_folder.c | 24 ++++++++++++------------
+ src/plugins/vcalendar/vcal_manager.c | 4 ++--
+ src/plugins/vcalendar/vcal_meeting_gtk.c | 2 +-
+ 6 files changed, 17 insertions(+), 21 deletions(-)
+
+diff --git a/AUTHORS b/AUTHORS
+index 540e420ba..1b8a4412e 100644
+--- a/AUTHORS
++++ b/AUTHORS
+@@ -361,3 +361,4 @@ contributors (in addition to the above; based on Changelog)
+ Peter Wagner
+ Giacomo Tesio
+ Chris Billington
++ Funda Wang
+diff --git a/configure.ac b/configure.ac
+index 60f88ff3c..01865ed0a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1291,12 +1291,6 @@ AC_SUBST(LIBGUMBO_LIBS)
+
+ dnl libical ********************************************************************
+ PKG_CHECK_MODULES(LIBICAL, libical >= 2.0, HAVE_LIBICAL=yes, HAVE_LIBICAL=no)
+-if test x"$HAVE_LIBICAL" = xyes; then
+- PKG_CHECK_MODULES(HAVE_LIBICAL_V4, libical >= 4.0, HAVE_LIBICAL_V4=yes, HAVE_LIBICAL_V4=no)
+- if test x"$HAVE_LIBICAL_V4" = xyes; then
+- AC_DEFINE(HAVE_LIBICAL_V4, 1, [Define if libical v4 is detected])
+- fi
+-fi
+ AC_SUBST(LIBICAL_CFLAGS)
+ AC_SUBST(LIBICAL_LIBS)
+
+diff --git a/src/gtk/authors.h b/src/gtk/authors.h
+index 2128fd0a6..ff038eb63 100644
+--- a/src/gtk/authors.h
++++ b/src/gtk/authors.h
+@@ -338,6 +338,7 @@ static char *CONTRIBS_LIST[] = {
+ "Botalov Vyacheslav",
+ "Radek Vybiral",
+ "Peter Wagner",
++"Funda Wang",
+ "Jonathan Ware",
+ "Watanabe",
+ "Rafal Weglarz",
+diff --git a/src/plugins/vcalendar/vcal_folder.c b/src/plugins/vcalendar/vcal_folder.c
+index 608fbb786..d3922ce69 100644
+--- a/src/plugins/vcalendar/vcal_folder.c
++++ b/src/plugins/vcalendar/vcal_folder.c
+@@ -536,7 +536,7 @@ static gint feed_fetch(FolderItem *fitem, MsgNumberList ** list, gboolean *old_u
+ while (evt) {
+ icalproperty *prop;
+ icalproperty *rprop = icalcomponent_get_first_property(evt, ICAL_RRULE_PROPERTY);
+-#ifdef HAVE_LIBICAL_V4
++#if ICAL_CHECK_VERSION(4, 0, 0)
+ struct icalrecurrencetype* recur;
+ #else
+ struct icalrecurrencetype recur;
+@@ -563,7 +563,7 @@ static gint feed_fetch(FolderItem *fitem, MsgNumberList ** list, gboolean *old_u
+ gchar *orig_uid = NULL;
+ gchar *uid = g_strdup(icalproperty_get_uid(prop));
+ IcalFeedData *data = icalfeeddata_new(
+-#ifdef HAVE_LIBICAL_V4
++#if ICAL_CHECK_VERSION(4, 0, 0)
+ icalcomponent_clone(evt),
+ #else
+ icalcomponent_new_clone(evt),
+@@ -619,7 +619,7 @@ add_new:
+ struct icaldurationtype ical_dur;
+ struct icaltimetype dtstart = icaltime_null_time();
+ struct icaltimetype dtend = icaltime_null_time();
+-#ifdef HAVE_LIBICAL_V4
++#if ICAL_CHECK_VERSION(4, 0, 0)
+ evt = icalcomponent_clone(evt);
+ #else
+ evt = icalcomponent_new_clone(evt);
+@@ -639,7 +639,7 @@ add_new:
+ dtend = icalproperty_get_dtend(prop);
+ else
+ debug_print("event has no DTEND!\n");
+-#ifdef HAVE_LIBICAL_V4
++#if ICAL_CHECK_VERSION(4, 0, 0)
+ ical_dur = icalduration_from_times(dtend, dtstart);
+ #else
+ ical_dur = icaltime_subtract(dtend, dtstart);
+@@ -652,7 +652,7 @@ add_new:
+
+ prop = icalcomponent_get_first_property(evt, ICAL_DTEND_PROPERTY);
+ if (prop)
+-#ifdef HAVE_LIBICAL_V4
++#if ICAL_CHECK_VERSION(4, 0, 0)
+ icalproperty_set_dtend(prop, icalduration_extend(next, ical_dur));
+ #else
+ icalproperty_set_dtend(prop, icaltime_add(next, ical_dur));
+@@ -790,7 +790,7 @@ GSList *vcal_get_events_list(FolderItem *item)
+ if ((status == ICAL_PARTSTAT_ACCEPTED
+ || status == ICAL_PARTSTAT_TENTATIVE)
+ && event->recur && *(event->recur)) {
+-#ifdef HAVE_LIBICAL_V4
++#if ICAL_CHECK_VERSION(4, 0, 0)
+ struct icalrecurrencetype* recur;
+ #else
+ struct icalrecurrencetype recur;
+@@ -803,7 +803,7 @@ GSList *vcal_get_events_list(FolderItem *item)
+ int i = 0;
+
+ debug_print("dumping recurring events from main event %s\n", d);
+-#ifdef HAVE_LIBICAL_V4
++#if ICAL_CHECK_VERSION(4, 0, 0)
+ recur = icalrecurrencetype_new_from_string(event->recur);
+ #else
+ recur = icalrecurrencetype_from_string(event->recur);
+@@ -813,7 +813,7 @@ GSList *vcal_get_events_list(FolderItem *item)
+ duration = icaltime_as_timet(icaltime_from_string(event->dtend))
+ - icaltime_as_timet(icaltime_from_string(event->dtstart));
+
+-#ifdef HAVE_LIBICAL_V4
++#if ICAL_CHECK_VERSION(4, 0, 0)
+ ical_dur = icaldurationtype_from_seconds(duration);
+ #else
+ ical_dur = icaldurationtype_from_int(duration);
+@@ -830,7 +830,7 @@ GSList *vcal_get_events_list(FolderItem *item)
+ gchar *uid = g_strdup_printf("%s-%d", event->uid, i);
+ new_start = icaltime_as_ical_string(next);
+ new_end = icaltime_as_ical_string(
+-#ifdef HAVE_LIBICAL_V4
++#if ICAL_CHECK_VERSION(4, 0, 0)
+ icalduration_extend(next, ical_dur)
+ #else
+ icaltime_add(next, ical_dur)
+@@ -861,7 +861,7 @@ GSList *vcal_get_events_list(FolderItem *item)
+ i++;
+ }
+ icalrecur_iterator_free(ritr);
+-#ifdef HAVE_LIBICAL_V4
++#if ICAL_CHECK_VERSION(4, 0, 0)
+ icalrecurrencetype_unref(recur);
+ #endif
+ }
+@@ -2418,7 +2418,7 @@ VCalEvent *vcal_get_event_from_ical(const gchar *ical, const gchar *charset)
+ if (prop) {
+ itt = icalproperty_get_dtstart(prop);
+ icalproperty_free(prop);
+-#ifdef HAVE_LIBICAL_V4
++#if ICAL_CHECK_VERSION(4, 0, 0)
+ dtend = g_strdup(icaltime_as_ical_string(icalduration_extend(itt,duration)));
+ #else
+ dtend = g_strdup(icaltime_as_ical_string(icaltime_add(itt,duration)));
+@@ -2477,7 +2477,7 @@ VCalEvent *vcal_get_event_from_ical(const gchar *ical, const gchar *charset)
+ }
+ GET_PROP(comp, prop, ICAL_RRULE_PROPERTY);
+ if (prop) {
+-#ifdef HAVE_LIBICAL_V4
++#if ICAL_CHECK_VERSION(4, 0, 0)
+ struct icalrecurrencetype* rrule = icalproperty_get_rrule(prop);
+ recur = g_strdup(icalrecurrencetype_as_string(rrule));
+ #else
+diff --git a/src/plugins/vcalendar/vcal_manager.c b/src/plugins/vcalendar/vcal_manager.c
+index 30d60ef67..645499c8f 100644
+--- a/src/plugins/vcalendar/vcal_manager.c
++++ b/src/plugins/vcalendar/vcal_manager.c
+@@ -402,7 +402,7 @@ gchar *vcal_manager_event_dump(VCalEvent *event, gboolean is_reply, gboolean is_
+ icalproperty_vanew_dtend((icaltime_from_string(event->dtend)), (void*)0));
+ if (event->recur && *(event->recur)) {
+ icalcomponent_add_property(ievent,
+-#ifdef HAVE_LIBICAL_V4
++#if ICAL_CHECK_VERSION(4, 0, 0)
+ icalproperty_vanew_rrule((icalrecurrencetype_new_from_string(event->recur)), (void*)0));
+ #else
+ icalproperty_vanew_rrule((icalrecurrencetype_from_string(event->recur)), (void*)0));
+@@ -693,7 +693,7 @@ gchar *vcal_manager_icalevent_dump(icalcomponent *event, gchar *orga, icalcompon
+ icalproperty *prop;
+ icalcomponent *ievent = NULL;
+ int i = 0;
+-#ifdef HAVE_LIBICAL_V4
++#if ICAL_CHECK_VERSION(4, 0, 0)
+ ievent = icalcomponent_clone(event);
+ #else
+ ievent = icalcomponent_new_clone(event);
+diff --git a/src/plugins/vcalendar/vcal_meeting_gtk.c b/src/plugins/vcalendar/vcal_meeting_gtk.c
+index f6c412fde..7d05a999f 100644
+--- a/src/plugins/vcalendar/vcal_meeting_gtk.c
++++ b/src/plugins/vcalendar/vcal_meeting_gtk.c
+@@ -2110,7 +2110,7 @@ gboolean vcal_meeting_export_freebusy(const gchar *path, const gchar *user,
+
+ ipt.start = icaltime_from_string(event->dtstart);
+ ipt.end = icaltime_from_string(event->dtend);
+-#ifdef HAVE_LIBICAL_V4
++#if ICAL_CHECK_VERSION(4, 0, 0)
+ ipt.duration = icalduration_from_times(ipt.end, ipt.start);
+ #else
+ ipt.duration = icaltime_subtract(ipt.end, ipt.start);
+--
+2.43.0
+
diff --git a/claws-mail-vcalendar-libical4.patch b/claws-mail-vcalendar-libical4.patch
new file mode 100644
index 0000000..8ac81a1
--- /dev/null
+++ b/claws-mail-vcalendar-libical4.patch
@@ -0,0 +1,243 @@
+From 1ad8482186cdcd056047aa5f9e2d495e6296a1bb Mon Sep 17 00:00:00 2001
+From: Paul <paul@claws-mail.org>
+Date: Wed, 24 Jun 2026 09:49:45 +0100
+Subject: [PATCH] fix bug 4942, 'Build fails with with libical 4.x'
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf8
+Content-Transfer-Encoding: 8bit
+
+based on original patch by Antonio Rojas, modified by Páder RezsŠand me
+---
+ configure.ac | 5 +++
+ src/plugins/vcalendar/vcal_folder.c | 56 ++++++++++++++++++++++--
+ src/plugins/vcalendar/vcal_manager.c | 14 ++++--
+ src/plugins/vcalendar/vcal_meeting_gtk.c | 4 ++
+ 4 files changed, 71 insertions(+), 8 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 01865ed0a..f6e796880 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1291,6 +1291,11 @@ AC_SUBST(LIBGUMBO_LIBS)
+
+ dnl libical ********************************************************************
+ PKG_CHECK_MODULES(LIBICAL, libical >= 2.0, HAVE_LIBICAL=yes, HAVE_LIBICAL=no)
++if test x"$HAVE_LIBICAL" = xyes; then
++ PKG_CHECK_MODULES(LIBICAL, libical >= 4.0, [
++ AC_DEFINE(HAVE_LIBICAL_V4, 1, [Define if libical v4 is detected.])
++ ], [ ])
++fi
+ AC_SUBST(LIBICAL_CFLAGS)
+ AC_SUBST(LIBICAL_LIBS)
+
+diff --git a/src/plugins/vcalendar/vcal_folder.c b/src/plugins/vcalendar/vcal_folder.c
+index edcf8e8b8..608fbb786 100644
+--- a/src/plugins/vcalendar/vcal_folder.c
++++ b/src/plugins/vcalendar/vcal_folder.c
+@@ -536,7 +536,11 @@ static gint feed_fetch(FolderItem *fitem, MsgNumberList ** list, gboolean *old_u
+ while (evt) {
+ icalproperty *prop;
+ icalproperty *rprop = icalcomponent_get_first_property(evt, ICAL_RRULE_PROPERTY);
++#ifdef HAVE_LIBICAL_V4
++ struct icalrecurrencetype* recur;
++#else
+ struct icalrecurrencetype recur;
++#endif
+ struct icaltimetype next;
+ icalrecur_iterator* ritr = NULL;
+ EventTime days;
+@@ -559,7 +563,12 @@ static gint feed_fetch(FolderItem *fitem, MsgNumberList ** list, gboolean *old_u
+ gchar *orig_uid = NULL;
+ gchar *uid = g_strdup(icalproperty_get_uid(prop));
+ IcalFeedData *data = icalfeeddata_new(
+- icalcomponent_new_clone(evt), NULL);
++#ifdef HAVE_LIBICAL_V4
++ icalcomponent_clone(evt),
++#else
++ icalcomponent_new_clone(evt),
++#endif
++ NULL);
+ int i = 0;
+ orig_uid = g_strdup(uid);
+
+@@ -610,7 +619,11 @@ add_new:
+ struct icaldurationtype ical_dur;
+ struct icaltimetype dtstart = icaltime_null_time();
+ struct icaltimetype dtend = icaltime_null_time();
++#ifdef HAVE_LIBICAL_V4
++ evt = icalcomponent_clone(evt);
++#else
+ evt = icalcomponent_new_clone(evt);
++#endif
+ prop = icalcomponent_get_first_property(evt, ICAL_RRULE_PROPERTY);
+ if (prop) {
+ icalcomponent_remove_property(evt, prop);
+@@ -626,7 +639,11 @@ add_new:
+ dtend = icalproperty_get_dtend(prop);
+ else
+ debug_print("event has no DTEND!\n");
++#ifdef HAVE_LIBICAL_V4
++ ical_dur = icalduration_from_times(dtend, dtstart);
++#else
+ ical_dur = icaltime_subtract(dtend, dtstart);
++#endif
+ next = icalrecur_iterator_next(ritr);
+ if (!icaltime_is_null_time(next) &&
+ !icaltime_is_null_time(dtstart) && i < 100) {
+@@ -635,8 +652,11 @@ add_new:
+
+ prop = icalcomponent_get_first_property(evt, ICAL_DTEND_PROPERTY);
+ if (prop)
++#ifdef HAVE_LIBICAL_V4
++ icalproperty_set_dtend(prop, icalduration_extend(next, ical_dur));
++#else
+ icalproperty_set_dtend(prop, icaltime_add(next, ical_dur));
+-
++#endif
+ prop = icalcomponent_get_first_property(evt, ICAL_UID_PROPERTY);
+ uid = g_strdup_printf("%s-%d", orig_uid, i);
+ icalproperty_set_uid(prop, uid);
+@@ -770,7 +790,11 @@ GSList *vcal_get_events_list(FolderItem *item)
+ if ((status == ICAL_PARTSTAT_ACCEPTED
+ || status == ICAL_PARTSTAT_TENTATIVE)
+ && event->recur && *(event->recur)) {
++#ifdef HAVE_LIBICAL_V4
++ struct icalrecurrencetype* recur;
++#else
+ struct icalrecurrencetype recur;
++#endif
+ struct icaltimetype dtstart;
+ struct icaltimetype next;
+ icalrecur_iterator* ritr;
+@@ -779,14 +803,21 @@ GSList *vcal_get_events_list(FolderItem *item)
+ int i = 0;
+
+ debug_print("dumping recurring events from main event %s\n", d);
++#ifdef HAVE_LIBICAL_V4
++ recur = icalrecurrencetype_new_from_string(event->recur);
++#else
+ recur = icalrecurrencetype_from_string(event->recur);
++#endif
+ dtstart = icaltime_from_string(event->dtstart);
+
+ duration = icaltime_as_timet(icaltime_from_string(event->dtend))
+ - icaltime_as_timet(icaltime_from_string(event->dtstart));
+
++#ifdef HAVE_LIBICAL_V4
++ ical_dur = icaldurationtype_from_seconds(duration);
++#else
+ ical_dur = icaldurationtype_from_int(duration);
+-
++#endif
+ ritr = icalrecur_iterator_new(recur, dtstart);
+
+ next = icalrecur_iterator_next(ritr); /* skip first one */
+@@ -799,7 +830,12 @@ GSList *vcal_get_events_list(FolderItem *item)
+ gchar *uid = g_strdup_printf("%s-%d", event->uid, i);
+ new_start = icaltime_as_ical_string(next);
+ new_end = icaltime_as_ical_string(
+- icaltime_add(next, ical_dur));
++#ifdef HAVE_LIBICAL_V4
++ icalduration_extend(next, ical_dur)
++#else
++ icaltime_add(next, ical_dur)
++#endif
++ );
+ debug_print("adding with start/end %s:%s\n", new_start, new_end);
+ nevent = vcal_manager_new_event(uid, event->organizer, event->orgname,
+ event->location, event->summary, event->description,
+@@ -825,6 +861,9 @@ GSList *vcal_get_events_list(FolderItem *item)
+ i++;
+ }
+ icalrecur_iterator_free(ritr);
++#ifdef HAVE_LIBICAL_V4
++ icalrecurrencetype_unref(recur);
++#endif
+ }
+ } else {
+ vcal_manager_free_event(event);
+@@ -2379,7 +2418,11 @@ VCalEvent *vcal_get_event_from_ical(const gchar *ical, const gchar *charset)
+ if (prop) {
+ itt = icalproperty_get_dtstart(prop);
+ icalproperty_free(prop);
++#ifdef HAVE_LIBICAL_V4
++ dtend = g_strdup(icaltime_as_ical_string(icalduration_extend(itt,duration)));
++#else
+ dtend = g_strdup(icaltime_as_ical_string(icaltime_add(itt,duration)));
++#endif
+ TO_UTF8(dtend);
+ }
+ }
+@@ -2434,8 +2477,13 @@ VCalEvent *vcal_get_event_from_ical(const gchar *ical, const gchar *charset)
+ }
+ GET_PROP(comp, prop, ICAL_RRULE_PROPERTY);
+ if (prop) {
++#ifdef HAVE_LIBICAL_V4
++ struct icalrecurrencetype* rrule = icalproperty_get_rrule(prop);
++ recur = g_strdup(icalrecurrencetype_as_string(rrule));
++#else
+ struct icalrecurrencetype rrule = icalproperty_get_rrule(prop);
+ recur = g_strdup(icalrecurrencetype_as_string(&rrule));
++#endif
+ TO_UTF8(recur);
+ icalproperty_free(prop);
+ }
+diff --git a/src/plugins/vcalendar/vcal_manager.c b/src/plugins/vcalendar/vcal_manager.c
+index 4e008a332..30d60ef67 100644
+--- a/src/plugins/vcalendar/vcal_manager.c
++++ b/src/plugins/vcalendar/vcal_manager.c
+@@ -1,6 +1,6 @@
+ /*
+ * Claws Mail -- a GTK based, lightweight, and fast e-mail client
+- * Copyright (C) 1999-2023 the Claws Mail team and Colin Leroy <colin@colino.net>
++ * Copyright (C) 1999-2026 the Claws Mail team and Colin Leroy <colin@colino.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+@@ -401,8 +401,12 @@ gchar *vcal_manager_event_dump(VCalEvent *event, gboolean is_reply, gboolean is_
+ icalcomponent_add_property(ievent,
+ icalproperty_vanew_dtend((icaltime_from_string(event->dtend)), (void*)0));
+ if (event->recur && *(event->recur)) {
+- icalcomponent_add_property(ievent,
++ icalcomponent_add_property(ievent,
++#ifdef HAVE_LIBICAL_V4
++ icalproperty_vanew_rrule((icalrecurrencetype_new_from_string(event->recur)), (void*)0));
++#else
+ icalproperty_vanew_rrule((icalrecurrencetype_from_string(event->recur)), (void*)0));
++#endif
+ }
+ icalcomponent_add_property(ievent,
+ icalproperty_new_description(event->description));
+@@ -689,9 +693,11 @@ gchar *vcal_manager_icalevent_dump(icalcomponent *event, gchar *orga, icalcompon
+ icalproperty *prop;
+ icalcomponent *ievent = NULL;
+ int i = 0;
+-
++#ifdef HAVE_LIBICAL_V4
++ ievent = icalcomponent_clone(event);
++#else
+ ievent = icalcomponent_new_clone(event);
+-
++#endif
+ prop = icalcomponent_get_first_property(ievent, ICAL_UID_PROPERTY);
+ if (prop) {
+ gchar *sanitized_uid = g_strdup(icalproperty_get_uid(prop));
+diff --git a/src/plugins/vcalendar/vcal_meeting_gtk.c b/src/plugins/vcalendar/vcal_meeting_gtk.c
+index c4bf1d2ea..f6c412fde 100644
+--- a/src/plugins/vcalendar/vcal_meeting_gtk.c
++++ b/src/plugins/vcalendar/vcal_meeting_gtk.c
+@@ -2110,7 +2110,11 @@ gboolean vcal_meeting_export_freebusy(const gchar *path, const gchar *user,
+
+ ipt.start = icaltime_from_string(event->dtstart);
+ ipt.end = icaltime_from_string(event->dtend);
++#ifdef HAVE_LIBICAL_V4
++ ipt.duration = icalduration_from_times(ipt.end, ipt.start);
++#else
+ ipt.duration = icaltime_subtract(ipt.end, ipt.start);
++#endif
+ if (icaltime_as_timet(ipt.start) <= icaltime_as_timet(itt_end)
+ && icaltime_as_timet(ipt.end) >= icaltime_as_timet(itt_start)) {
+ prop = icalproperty_new_freebusy(ipt);
+--
+2.43.0
+
diff --git a/claws-mail.spec b/claws-mail.spec
index 36e4444..4428d3c 100644
--- a/claws-mail.spec
+++ b/claws-mail.spec
@@ -26,7 +26,7 @@ Obsoletes: claws-mail-plugin-gdata < 4.2.0-1
Name: claws-mail
Version: 4.4.0
-Release: 9%{?dist}
+Release: 10%{?dist}
Summary: Email client and news reader based on GTK+
# Automatically converted from old format: GPLv3+ - review is highly recommended.
License: GPL-3.0-or-later
@@ -35,6 +35,12 @@ Source0: https://claws-mail.org/releases/%{name}-%{version}.tar.xz
# rhbz#1179279
Patch11: claws-mail-system-crypto-policies.patch
+# vCalendar plugin: build with libical 4 (claws-mail bug 4942), and keep
+# building with libical 3; upstream commits, in order (two reverted
+# attempts in between cancel out)
+Patch12: https://git.claws-mail.org/?p=claws.git;a=patch;h=1ad8482186cdcd056047aa5f9e2d495e6296a1bb#/claws-mail-vcalendar-libical4.patch
+Patch13: https://git.claws-mail.org/?p=claws.git;a=patch;h=f754d8d9ae50f2beb1385798c541af623d5c2820#/claws-mail-vcalendar-libical3-compat.patch
+Patch14: https://git.claws-mail.org/?p=claws.git;a=patch;h=9b6b82879c75ceb52d93eaa137eafe04b258136e#/claws-mail-vcalendar-libical4-version-check.patch
BuildRequires: gcc, flex, bison, make
BuildRequires: pkgconfig(glib-2.0) >= 2.20
@@ -423,9 +429,10 @@ exporting of your meetings or all your calendars.
%prep
%setup -q
-%if 0%{?fedora} > 20
%patch 11 -p1 -b.syscrypto
-%endif
+%patch 12 -p1 -b.libical4
+%patch 13 -p1 -b.libical3
+%patch 14 -p1 -b.libical4check
# guard for pluginapi
SOURCEAPI=$(grep -A 1 VERSION_NUMERIC src/common/version.h | tr -d '\n' | perl -ne 's/[\\\s]//g; m/(\d+),(\d+),(\d+),(\d+)/; print("$1.$2.$3.$4");')
@@ -652,6 +659,11 @@ touch -r NEWS %{buildroot}%{_includedir}/%{name}/config.h
%changelog
+* Thu Nov 05 2026 Michel Lind <salimma@fedoraproject.org> - 4.4.0-10
+- Backport upstream libical 4 support for the vCalendar plugin
+ (claws-mail bug 4942 and follow-up fixes)
+- Apply patches unconditionally
+
* Wed Sep 02 2026 Gwyn Ciesla <gwync@protonmail.com> - 4.4.0-9
- gumbo-parser rebuild
reply other threads:[~2026-11-09 10:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179422109200.1.16140274259602690172.rpms-claws-mail-7225e32f6d0a@fedoraproject.org \
--to=salimma@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox