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/gnome-panel] rawhide: Fix build with libical 4
Date: Wed, 04 Nov 2026 00:08:41 GMT	[thread overview]
Message-ID: <179375092137.1.4750947102285111551.rpms-gnome-panel-31a6997c5e20@fedoraproject.org> (raw)

            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

                 reply	other threads:[~2026-11-04  0:08 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=179375092137.1.4750947102285111551.rpms-gnome-panel-31a6997c5e20@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