build: Support libical 4

libical 4 changed several APIs used by GNOME Calendar:

 - libical-glib now provides autoptr cleanup for ICalTime, so only
   define it ourselves for older versions.
 - i_cal_recurrence_get/set_by_day() were removed in favor of the
   dynamically sized by-rule arrays; add local helpers on top of
   i_cal_recurrence_get/set_by().
 - i_cal_errno_return() was renamed to i_cal_error_icalerrno().

Also make the create-tzid event test independent of line folding,
which differs between libical versions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-29 08:44:07 -06:00
co-authored by Claude Opus 5.5
parent 8d9eb034c7
commit 8be61e439a
4 changed files with 36 additions and 2 deletions
+2
View File
@@ -60,7 +60,9 @@ typedef void (*GcalAskRecurrenceCallback) (GcalEvent *event,
GcalRecurrenceModType modtype,
gpointer user_data);
#if ICAL_MAJOR_VERSION < 4
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ICalTime, g_object_unref)
#endif
gchar* gcal_util_get_weekday (gint i);