public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Milan Crha <mcrha@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gnome-calendar] rawhide: Add patch to build against libical 4.x
Date: Tue, 03 Nov 2026 09:41:09 GMT [thread overview]
Message-ID: <179369886939.1.5942821710060673433.rpms-gnome-calendar-0e76aabe4f48@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/gnome-calendar
Branch : rawhide
Commit : 0e76aabe4f489ec4e0dfbf08222575ae76ad07b6
Author : Milan Crha <mcrha@redhat.com>
Date : 2026-11-03T10:40:41+01:00
Stats : +93/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/gnome-calendar/c/0e76aabe4f489ec4e0dfbf08222575ae76ad07b6?branch=rawhide
Log:
Add patch to build against libical 4.x
[skip changelog]
---
diff --git a/0001-libical-4.x.patch b/0001-libical-4.x.patch
new file mode 100644
index 0000000..8ab4c84
--- /dev/null
+++ b/0001-libical-4.x.patch
@@ -0,0 +1,91 @@
+From 8cdfd64e38179644e94487c045b8eca1b3a49502 Mon Sep 17 00:00:00 2001
+Date: Sun, 10 May 2026 02:42:16 +0200
+Subject: [PATCH] Support libical 4.0.0
+
+---
+ src/core/gcal-recurrence.c | 18 ++++++++++++++++++
+ src/gui/importer/gcal-importer.c | 4 ++++
+ src/utils/gcal-utils.h | 2 ++
+ 3 files changed, 24 insertions(+)
+
+diff --git a/src/core/gcal-recurrence.c b/src/core/gcal-recurrence.c
+index 3d2710366..a28f9acdc 100644
+--- a/src/core/gcal-recurrence.c
++++ b/src/core/gcal-recurrence.c
+@@ -185,6 +185,14 @@ gcal_recurrence_parse_recurrence_rules (ECalComponent *comp)
+
+ case I_CAL_WEEKLY_RECURRENCE:
+ {
++#if ICAL_CHECK_VERSION(4, 0, 0)
++ if (i_cal_recurrence_get_by_array_size (rrule, I_CAL_BY_DAY) == 5 &&
++ i_cal_recurrence_get_by (rrule, I_CAL_BY_DAY, 0) == I_CAL_MONDAY_WEEKDAY &&
++ i_cal_recurrence_get_by (rrule, I_CAL_BY_DAY, 1) == I_CAL_TUESDAY_WEEKDAY &&
++ i_cal_recurrence_get_by (rrule, I_CAL_BY_DAY, 2) == I_CAL_WEDNESDAY_WEEKDAY &&
++ i_cal_recurrence_get_by (rrule, I_CAL_BY_DAY, 3) == I_CAL_THURSDAY_WEEKDAY &&
++ i_cal_recurrence_get_by (rrule, I_CAL_BY_DAY, 4) == I_CAL_FRIDAY_WEEKDAY)
++#else
+ if (i_cal_recurrence_get_by_day (rrule, 0) == I_CAL_MONDAY_WEEKDAY &&
+ i_cal_recurrence_get_by_day (rrule, 1) == I_CAL_TUESDAY_WEEKDAY &&
+ i_cal_recurrence_get_by_day (rrule, 2) == I_CAL_WEDNESDAY_WEEKDAY &&
+@@ -192,6 +200,7 @@ gcal_recurrence_parse_recurrence_rules (ECalComponent *comp)
+ i_cal_recurrence_get_by_day (rrule, 4) == I_CAL_FRIDAY_WEEKDAY &&
+ i_cal_recurrence_get_by_day (rrule, 5) != I_CAL_SATURDAY_WEEKDAY &&
+ i_cal_recurrence_get_by_day (rrule, 6) != I_CAL_SUNDAY_WEEKDAY)
++#endif
+ {
+ recur->frequency = GCAL_RECURRENCE_MON_FRI;
+ }
+@@ -289,11 +298,20 @@ gcal_recurrence_to_rrule (GcalRecurrence *recur)
+ case GCAL_RECURRENCE_MON_FRI:
+ {
+ i_cal_recurrence_set_freq (rrule, I_CAL_WEEKLY_RECURRENCE);
++#if ICAL_CHECK_VERSION(4, 0, 0)
++ i_cal_recurrence_resize_by_array (rrule, I_CAL_BY_DAY, 5);
++ i_cal_recurrence_set_by (rrule, I_CAL_BY_DAY, 0, I_CAL_MONDAY_WEEKDAY);
++ i_cal_recurrence_set_by (rrule, I_CAL_BY_DAY, 1, I_CAL_TUESDAY_WEEKDAY);
++ i_cal_recurrence_set_by (rrule, I_CAL_BY_DAY, 2, I_CAL_WEDNESDAY_WEEKDAY);
++ i_cal_recurrence_set_by (rrule, I_CAL_BY_DAY, 3, I_CAL_THURSDAY_WEEKDAY);
++ i_cal_recurrence_set_by (rrule, I_CAL_BY_DAY, 4, I_CAL_FRIDAY_WEEKDAY);
++#else
+ i_cal_recurrence_set_by_day (rrule, 0, I_CAL_MONDAY_WEEKDAY);
+ i_cal_recurrence_set_by_day (rrule, 1, I_CAL_TUESDAY_WEEKDAY);
+ i_cal_recurrence_set_by_day (rrule, 2, I_CAL_WEDNESDAY_WEEKDAY);
+ i_cal_recurrence_set_by_day (rrule, 3, I_CAL_THURSDAY_WEEKDAY);
+ i_cal_recurrence_set_by_day (rrule, 4, I_CAL_FRIDAY_WEEKDAY);
++#endif
+ break;
+ }
+
+diff --git a/src/gui/importer/gcal-importer.c b/src/gui/importer/gcal-importer.c
+index 7b0bbf105..ec2b27419 100644
+--- a/src/gui/importer/gcal-importer.c
++++ b/src/gui/importer/gcal-importer.c
+@@ -147,7 +147,11 @@ read_file_in_thread (GTask *task,
+ g_assert (g_utf8_validate (contents, length, NULL));
+
+ component = i_cal_parser_parse_string (contents);
++#if ICAL_CHECK_VERSION(4, 0, 0)
++ ical_error = i_cal_error_icalerrno ();
++#else
+ ical_error = i_cal_errno_return ();
++#endif
+
+ if (ical_error != I_CAL_NO_ERROR)
+ {
+diff --git a/src/utils/gcal-utils.h b/src/utils/gcal-utils.h
+index 2c7d47e3e..d2b31e843 100644
+--- a/src/utils/gcal-utils.h
++++ b/src/utils/gcal-utils.h
+@@ -51,7 +51,9 @@ typedef void (*GcalAskRecurrenceCallback) (GcalEvent *event,
+ GcalRecurrenceModType modtype,
+ gpointer user_data);
+
++#if !ICAL_CHECK_VERSION(4, 0, 0)
+ G_DEFINE_AUTOPTR_CLEANUP_FUNC (ICalTime, g_object_unref)
++#endif
+
+ gchar* gcal_get_weekday (gint i);
+
+--
+GitLab
+
diff --git a/gnome-calendar.spec b/gnome-calendar.spec
index 8bda8d2..857dc92 100644
--- a/gnome-calendar.spec
+++ b/gnome-calendar.spec
@@ -15,6 +15,8 @@ License: GPL-3.0-or-later AND CC0-1.0
URL: https://wiki.gnome.org/Apps/Calendar
Source0: https://download.gnome.org/sources/%{name}/%{gnome_major_version}/%{name}-%{gnome_tarball_version}.tar.xz
+Patch: 0001-libical-4.x.patch
+
%gnome_check_version
BuildRequires: blueprint-compiler
reply other threads:[~2026-11-03 9:41 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=179369886939.1.5942821710060673433.rpms-gnome-calendar-0e76aabe4f48@fedoraproject.org \
--to=mcrha@redhat.com \
--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