public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gnome-panel] rawhide: Fix build with libical 4
@ 2026-11-04  0:08 Michel Lind
  0 siblings, 0 replies; only message in thread
From: Michel Lind @ 2026-11-04  0:08 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/gnome-panel
            Branch : rawhide
            Commit : 31a6997c5e20941bca62a067575787d21c770146
            Author : Michel Lind <salimma@fedoraproject.org>
            Date   : 2026-11-03T22:02:13+00:00
            Stats  : +37/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/gnome-panel/c/31a6997c5e20941bca62a067575787d21c770146?branch=rawhide

            Log:
            Fix build with libical 4

libical-glib 4 changed two APIs used by the clock applet's calendar
client:

- the i_cal_property_get_*() getters now take a const ICalProperty *,
  which no longer matches the get_time_from_property() callback type
  (an error with GCC 16's -Wincompatible-pointer-types)
- i_cal_duration_as_int() was removed. Its documented successor,
  i_cal_duration_as_seconds(), treats days/weeks as an error, which
  would break the all-day check for DURATION:P1D events, so use
  i_cal_duration_as_utc_seconds() (days count as 24 hours) instead

Both changes are conditional on ICAL_CHECK_VERSION(4, 0, 0), following
gnome-shell's calendar server, so the patch still builds against
libical 3. Submitted upstream:
https://gitlab.gnome.org/GNOME/gnome-panel/-/merge_requests/85

Tested with local mock builds (rawhide, aarch64, --postinst): unpatched
3.58.1-7 builds against stock libical 3.0.20 but fails in
calendar-client.c against libical 4.0.7 from f46-build-side-158330;
patched, it builds and installs against libical 4.0.7 with no new
compiler warnings.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Michel Lind <salimma@fedoraproject.org>

---
diff --git a/gnome-panel-3.58.1-libical4.patch b/gnome-panel-3.58.1-libical4.patch
new file mode 100644
index 0000000..b792d3f
--- /dev/null
+++ b/gnome-panel-3.58.1-libical4.patch
@@ -0,0 +1,34 @@
+--- a/modules/clock/calendar-client.c
++++ b/modules/clock/calendar-client.c
+@@ -457,10 +457,16 @@
+   return utctime != -1 ? isodate_from_time_t (utctime) : NULL;
+ }
+ 
++#if ICAL_CHECK_VERSION(4, 0, 0)
++typedef ICalTime * (* GetICalPropFunc) (const ICalProperty *prop);
++#else
++typedef ICalTime * (* GetICalPropFunc) (ICalProperty *prop);
++#endif
++
+ static time_t
+ get_time_from_property (ICalComponent    *icomp,
+                         ICalPropertyKind  prop_kind,
+-                        ICalTime         * (* get_prop_func) (ICalProperty *prop),
++                        GetICalPropFunc   get_prop_func,
+                         ICalTimezone     *default_zone)
+ {
+   ICalProperty *prop;
+@@ -622,7 +628,13 @@
+   duration = i_cal_property_get_duration (prop);
+   g_object_unref (prop);
+ 
++#if ICAL_CHECK_VERSION(4, 0, 0)
++  /* as_seconds() rejects days/weeks; as_utc_seconds() keeps the old
++   * as_int() behaviour of counting a day as 24 hours */
++  is_all_day = i_cal_duration_as_utc_seconds (duration) % 86400 == 0;
++#else
+   is_all_day = i_cal_duration_as_int (duration) % 86400 == 0;
++#endif
+   g_object_unref (duration);
+ 
+   return is_all_day;

diff --git a/gnome-panel.spec b/gnome-panel.spec
index 38c9bb7..7cffbdc 100644
--- a/gnome-panel.spec
+++ b/gnome-panel.spec
@@ -10,6 +10,9 @@ Summary:        GNOME Flashback panel
 License:        GPL-2.0-or-later AND LGPL-2.1-or-later
 URL:            https://wiki.gnome.org/Projects/GnomePanel
 Source:         https://download.gnome.org/sources/%{name}/3.58/%{name}-%{version}.tar.xz
+# clock: build with libical 4 (const property getters, duration_as_int removal)
+# https://gitlab.gnome.org/GNOME/gnome-panel/-/merge_requests/85
+Patch:          gnome-panel-3.58.1-libical4.patch
 
 BuildRequires:  autoconf
 BuildRequires:  automake >= 1.16.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-04  0:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04  0:08 [rpms/gnome-panel] rawhide: Fix build with libical 4 Michel Lind

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox