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/orage] rawhide: Fix build with libical 4
Date: Wed, 04 Nov 2026 13:59:36 GMT	[thread overview]
Message-ID: <179380077660.1.12351482513256625721.rpms-orage-1a1805f899c3@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/orage
            Branch : rawhide
            Commit : 1a1805f899c373ff6cb464ae2e2b65ccf6a46f2c
            Author : Milan Crha <mcrha@redhat.com>
            Date   : 2026-11-04T12:42:45+00:00
            Stats  : +997/-0 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/orage/c/1a1805f899c373ff6cb464ae2e2b65ccf6a46f2c?branch=rawhide

            Log:
            Fix build with libical 4

libical 4 renamed several time/duration and component clone functions,
made recurrence rules reference counted, marks the icalproperty_vanew_*
constructors as needing a NULL sentinel, and its libical.pc no longer
pulls in libicalss. The patches, from Milan's libical-4.x COPR, cover
all of these behind ICAL_CHECK_VERSION(4, 0, 0) and patch the
generated autotools files as well, since the spec does not run
autoreconf.

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

---
diff --git a/orage-4.20.3-libical4-null-sentinels.patch b/orage-4.20.3-libical4-null-sentinels.patch
new file mode 100644
index 0000000..3041ffa
--- /dev/null
+++ b/orage-4.20.3-libical4-null-sentinels.patch
@@ -0,0 +1,59 @@
+diff --git a/src/ical-archive.c b/src/ical-archive.c
+index b406b88..a7b63cc 100644
+--- a/src/ical-archive.c
++++ b/src/ical-archive.c
+@@ -259,7 +259,7 @@ static void xfical_icalcomponent_archive_recurrent (icalcomponent *e,
+             icalcomponent_add_property(e
+                     , icalproperty_vanew_dtstart(nsdate
+                             , icalparameter_new_tzid(stz_loc)
+-                            , 0));
++                            , NULL));
+         if (upd_edate) {
+             if (!has_orig_dtend) {
+                 text = g_strdup(icalproperty_as_ical_string(pdtend));
+@@ -276,7 +276,7 @@ static void xfical_icalcomponent_archive_recurrent (icalcomponent *e,
+                 icalcomponent_add_property(e
+                         , icalproperty_vanew_dtend(nedate
+                                 , icalparameter_new_tzid(etz_loc)
+-                                , 0));
++                                , NULL));
+         }
+     }
+ }
+diff --git a/src/ical-code.c b/src/ical-code.c
+index 322748b..b0d6416 100644
+--- a/src/ical-code.c
++++ b/src/ical-code.c
+@@ -991,7 +991,7 @@ static icalcomponent *appt_add_alarm_internal_base(xfical_appt *appt
+         icalcomponent_add_property(ialarm
+                 , icalproperty_vanew_trigger(trg
+                         , icalparameter_new_related(ICAL_RELATED_END)
+-                        , 0));
++                        , NULL));
+     if (appt->alarm_persistent)
+         icalcomponent_add_property(ialarm
+                 , icalproperty_new_from_string("X-ORAGE-PERSISTENT-ALARM:YES"));
+@@ -1276,7 +1276,7 @@ static void appt_add_starttime_internal (const xfical_appt *appt,
+                 icalcomponent_add_property(icmp
+                         , icalproperty_vanew_dtstart(wtime
+                                 , icalparameter_new_tzid(appt->start_tz_loc)
+-                                , 0));
++                                , NULL));
+             }
+         }
+         else { /* floating time */
+@@ -1322,12 +1322,12 @@ static void appt_add_endtime_internal (const xfical_appt *appt,
+                     icalcomponent_add_property(icmp
+                         , icalproperty_vanew_dtend(wtime
+                                 , icalparameter_new_tzid(appt->end_tz_loc)
+-                                , 0));
++                                , NULL));
+                 else if (appt->type == XFICAL_TYPE_TODO)
+                     icalcomponent_add_property(icmp
+                         , icalproperty_vanew_due(wtime
+                                 , icalparameter_new_tzid(appt->end_tz_loc)
+-                                , 0));
++                                , NULL));
+                 end_time_done = TRUE;
+             }
+         }

diff --git a/orage-4.20.3-libical4.patch b/orage-4.20.3-libical4.patch
new file mode 100644
index 0000000..1cf78c9
--- /dev/null
+++ b/orage-4.20.3-libical4.patch
@@ -0,0 +1,931 @@
+diff --git a/Makefile.in b/Makefile.in
+index 743e4db..7877b6c 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -195,7 +195,7 @@ am__define_uniq_tagged_files = \
+ DIST_SUBDIRS = $(SUBDIRS)
+ am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+ 	ABOUT-NLS AUTHORS COPYING NEWS README.md compile config.guess \
+-	config.rpath config.sub install-sh ltmain.sh missing
++	config.rpath config.sub depcomp install-sh ltmain.sh missing
+ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ distdir = $(PACKAGE)-$(VERSION)
+ top_distdir = $(distdir)
+@@ -300,6 +300,10 @@ LIBGTK_CFLAGS = @LIBGTK_CFLAGS@
+ LIBGTK_LIBS = @LIBGTK_LIBS@
+ LIBGTK_REQUIRED_VERSION = @LIBGTK_REQUIRED_VERSION@
+ LIBGTK_VERSION = @LIBGTK_VERSION@
++LIBICALSS_CFLAGS = @LIBICALSS_CFLAGS@
++LIBICALSS_LIBS = @LIBICALSS_LIBS@
++LIBICALSS_REQUIRED_VERSION = @LIBICALSS_REQUIRED_VERSION@
++LIBICALSS_VERSION = @LIBICALSS_VERSION@
+ LIBICAL_CFLAGS = @LIBICAL_CFLAGS@
+ LIBICAL_LIBS = @LIBICAL_LIBS@
+ LIBICAL_REQUIRED_VERSION = @LIBICAL_REQUIRED_VERSION@
+diff --git a/config.h.in b/config.h.in
+index 6a1808e..c698e50 100644
+--- a/config.h.in
++++ b/config.h.in
+@@ -58,6 +58,9 @@
+ /* Define to 1 if you have the <inttypes.h> header file. */
+ #undef HAVE_INTTYPES_H
+ 
++/* Define if libicalss >= libical_minimum_version present */
++#undef HAVE_LIBICALSS
++
+ /* Define if libX11 is available */
+ #undef HAVE_LIBX11
+ 
+diff --git a/configure b/configure
+index 9e1f5a8..fe58831 100755
+--- a/configure
++++ b/configure
+@@ -674,6 +674,12 @@ LIBXFCE4UI_REQUIRED_VERSION
+ LIBXFCE4UI_LIBS
+ LIBXFCE4UI_CFLAGS
+ LIBXFCE4UI_VERSION
++HAVE_LIBICALSS_FALSE
++HAVE_LIBICALSS_TRUE
++LIBICALSS_REQUIRED_VERSION
++LIBICALSS_LIBS
++LIBICALSS_CFLAGS
++LIBICALSS_VERSION
+ LIBICAL_REQUIRED_VERSION
+ LIBICAL_LIBS
+ LIBICAL_CFLAGS
+@@ -874,6 +880,7 @@ enable_rpath
+ with_libiconv_prefix
+ with_libintl_prefix
+ with_x
++enable_
+ enable_libnotify
+ enable_debug
+ enable_archive
+@@ -1547,6 +1554,8 @@ Optional Features:
+   --disable-libtool-lock  avoid locking (might break parallel builds)
+   --disable-nls           do not use Native Language Support
+   --disable-rpath         do not hardcode runtime library paths
++  --enable-               Enable checking for (default=[])
++  --disable-              Disable checking for
+   --enable-libnotify      Enable checking for LIBNOTIFY support
+                           (default=[])
+   --disable-libnotify     Disable checking for LIBNOTIFY support
+@@ -19106,6 +19115,266 @@ printf "%s\n" "not found" >&6; }
+ 
+ 
+ 
++
++  # Check whether --enable- was given.
++if test ${enable_+y}
++then :
++  enableval=$enable_; xdt_cv_LIBICALSS_check=$enableval
++else case e in #(
++  e) xdt_cv_LIBICALSS_check=yes ;;
++esac
++fi
++
++
++  if test x"$xdt_cv_LIBICALSS_check" = x"yes"; then
++    if $PKG_CONFIG --exists "libicalss >= 3.0" >/dev/null 2>&1; then
++
++
++  # minimum supported version of pkg-config
++  xdt_cv_PKG_CONFIG_MIN_VERSION=0.9.0
++
++
++
++
++
++
++
++
++
++if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
++	if test -n "$ac_tool_prefix"; then
++  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
++set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
++{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++printf %s "checking for $ac_word... " >&6; }
++if test ${ac_cv_path_PKG_CONFIG+y}
++then :
++  printf %s "(cached) " >&6
++else case e in #(
++  e) case $PKG_CONFIG in
++  [\\/]* | ?:[\\/]*)
++  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
++  ;;
++  *)
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  case $as_dir in #(((
++    '') as_dir=./ ;;
++    */) ;;
++    *) as_dir=$as_dir/ ;;
++  esac
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
++    ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
++    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++  ;;
++esac ;;
++esac
++fi
++PKG_CONFIG=$ac_cv_path_PKG_CONFIG
++if test -n "$PKG_CONFIG"; then
++  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
++printf "%s\n" "$PKG_CONFIG" >&6; }
++else
++  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
++printf "%s\n" "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_path_PKG_CONFIG"; then
++  ac_pt_PKG_CONFIG=$PKG_CONFIG
++  # Extract the first word of "pkg-config", so it can be a program name with args.
++set dummy pkg-config; ac_word=$2
++{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++printf %s "checking for $ac_word... " >&6; }
++if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
++then :
++  printf %s "(cached) " >&6
++else case e in #(
++  e) case $ac_pt_PKG_CONFIG in
++  [\\/]* | ?:[\\/]*)
++  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
++  ;;
++  *)
++  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  case $as_dir in #(((
++    '') as_dir=./ ;;
++    */) ;;
++    *) as_dir=$as_dir/ ;;
++  esac
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
++    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
++    printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++  ;;
++esac ;;
++esac
++fi
++ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
++if test -n "$ac_pt_PKG_CONFIG"; then
++  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
++printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
++else
++  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
++printf "%s\n" "no" >&6; }
++fi
++
++  if test "x$ac_pt_PKG_CONFIG" = x; then
++    PKG_CONFIG=""
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    PKG_CONFIG=$ac_pt_PKG_CONFIG
++  fi
++else
++  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
++fi
++
++fi
++if test -n "$PKG_CONFIG"; then
++	_pkg_min_version=$xdt_cv_PKG_CONFIG_MIN_VERSION
++	{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
++printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
++	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
++		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
++printf "%s\n" "yes" >&6; }
++	else
++		{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
++printf "%s\n" "no" >&6; }
++		PKG_CONFIG=""
++	fi
++fi
++if test -z "$PKG_CONFIG"; then
++	as_fn_error $? "pkg-config not found" "$LINENO" 5
++fi
++
++      if test x"$PKG_CONFIG" = x""; then
++        echo
++        echo "*** Your version of pkg-config is too old. You need atleast"
++        echo "*** pkg-config $xdt_cv_PKG_CONFIG_MIN_VERSION or newer. You can download pkg-config"
++        echo "*** from the freedesktop.org software repository at"
++        echo "***"
++        echo "***    https://www.freedesktop.org/wiki/Software/pkg-config/"
++        echo "***"
++        exit 1;
++      fi
++
++
++
++  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libicalss >= 3.0" >&5
++printf %s "checking for libicalss >= 3.0... " >&6; }
++  if $PKG_CONFIG "--atleast-version=3.0" "libicalss" >/dev/null 2>&1; then
++    LIBICALSS_VERSION=`$PKG_CONFIG --modversion "libicalss"`
++    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICALSS_VERSION" >&5
++printf "%s\n" "$LIBICALSS_VERSION" >&6; }
++
++    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LIBICALSS_CFLAGS" >&5
++printf %s "checking LIBICALSS_CFLAGS... " >&6; }
++    LIBICALSS_CFLAGS=`$PKG_CONFIG --cflags "libicalss"`
++    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICALSS_CFLAGS" >&5
++printf "%s\n" "$LIBICALSS_CFLAGS" >&6; }
++
++    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking LIBICALSS_LIBS" >&5
++printf %s "checking LIBICALSS_LIBS... " >&6; }
++    LIBICALSS_LIBS=`$PKG_CONFIG --libs "libicalss"`
++    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICALSS_LIBS" >&5
++printf "%s\n" "$LIBICALSS_LIBS" >&6; }
++
++    LIBICALSS_REQUIRED_VERSION=3.0
++
++
++
++
++
++
++    if test x"LIBICALSS" = x"GLIB"; then
++
++printf "%s\n" "#define G_LOG_USE_STRUCTURED 1" >>confdefs.h
++
++    fi
++
++
++
++
++
++printf "%s\n" "#define HAVE_LIBICALSS 1" >>confdefs.h
++
++        LIBICALSS_FOUND="yes"
++
++  elif $PKG_CONFIG --exists "libicalss" >/dev/null 2>&1; then
++    xdt_cv_version=`$PKG_CONFIG --modversion "libicalss"`
++    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found, but $xdt_cv_version" >&5
++printf "%s\n" "found, but $xdt_cv_version" >&6; }
++
++
++      echo "*** The required package libicalss was found on your system,"
++      echo "*** but the installed version ($xdt_cv_version) is too old."
++      echo "*** Please upgrade libicalss to atleast version 3.0, or adjust"
++      echo "*** the PKG_CONFIG_PATH environment variable if you installed"
++      echo "*** the new version of the package in a nonstandard prefix so"
++      echo "*** pkg-config is able to find it."
++      exit 1
++
++  else
++    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
++printf "%s\n" "not found" >&6; }
++
++
++      echo "*** The required package libicalss was not found on your system."
++      echo "*** Please install libicalss (atleast version 3.0) or adjust"
++      echo "*** the PKG_CONFIG_PATH environment variable if you"
++      echo "*** installed the package in a nonstandard prefix so that"
++      echo "*** pkg-config is able to find it."
++      exit 1
++
++  fi
++
++    else
++      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for optional package libicalss >= 3.0" >&5
++printf %s "checking for optional package libicalss >= 3.0... " >&6; }
++      { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
++printf "%s\n" "not found" >&6; }
++    fi
++  else
++    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for optional package libicalss" >&5
++printf %s "checking for optional package libicalss... " >&6; }
++    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
++printf "%s\n" "disabled" >&6; }
++  fi
++
++   if test x"$LIBICALSS_FOUND" = x"yes"; then
++  HAVE_LIBICALSS_TRUE=
++  HAVE_LIBICALSS_FALSE='#'
++else
++  HAVE_LIBICALSS_TRUE='#'
++  HAVE_LIBICALSS_FALSE=
++fi
++
++
++
++
+   # minimum supported version of pkg-config
+   xdt_cv_PKG_CONFIG_MIN_VERSION=0.9.0
+ 
+@@ -19621,6 +19890,20 @@ fi
+ 
+ 
+ 
++if test x"$NOTIFY_FOUND" = x"yes"; then
++
++printf "%s\n" "#define HAVE_NOTIFY 1" >>confdefs.h
++
++fi
++ if test x"$NOTIFY_FOUND" = x"yes"; then
++  HAVE_NOTIFY_TRUE=
++  HAVE_NOTIFY_FALSE='#'
++else
++  HAVE_NOTIFY_TRUE='#'
++  HAVE_NOTIFY_FALSE=
++fi
++
++
+ 
+     # Check whether --enable-debug was given.
+ if test ${enable_debug+y}
+@@ -19955,6 +20238,14 @@ if test -z "${HAVE_CYGWIN_TRUE}" && test -z "${HAVE_CYGWIN_FALSE}"; then
+   as_fn_error $? "conditional \"HAVE_CYGWIN\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+ fi
++if test -z "${HAVE_LIBICALSS_TRUE}" && test -z "${HAVE_LIBICALSS_FALSE}"; then
++  as_fn_error $? "conditional \"HAVE_LIBICALSS\" was never defined.
++Usually this means the macro was only invoked conditionally." "$LINENO" 5
++fi
++if test -z "${HAVE_NOTIFY_TRUE}" && test -z "${HAVE_NOTIFY_FALSE}"; then
++  as_fn_error $? "conditional \"HAVE_NOTIFY\" was never defined.
++Usually this means the macro was only invoked conditionally." "$LINENO" 5
++fi
+ if test -z "${HAVE_NOTIFY_TRUE}" && test -z "${HAVE_NOTIFY_FALSE}"; then
+   as_fn_error $? "conditional \"HAVE_NOTIFY\" was never defined.
+ Usually this means the macro was only invoked conditionally." "$LINENO" 5
+diff --git a/configure.ac b/configure.ac
+index d6f498b..3c61335 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -86,6 +86,7 @@ XDT_CHECK_PACKAGE([GIO], [gio-2.0], [glib_minimum_version])
+ XDT_CHECK_PACKAGE([LIBGTK], [gtk+-3.0], [gtk_minimum_version])
+ XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [xfce_minimum_version])
+ XDT_CHECK_PACKAGE([LIBICAL], [libical], [libical_minimum_version])
++XDT_CHECK_OPTIONAL_PACKAGE([LIBICALSS], [libicalss], [libical_minimum_version])
+ XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [xfce_minimum_version])
+ 
+ if test "$LIBICAL_VERSION" = "3.0.15"; then
+@@ -114,6 +115,11 @@ XDT_CHECK_OPTIONAL_PACKAGE([NOTIFY], [libnotify],
+                            [notify_minimum_version], [libnotify],
+                            [LIBNOTIFY support])
+ 
++if test x"$NOTIFY_FOUND" = x"yes"; then
++    AC_DEFINE([HAVE_NOTIFY], [1], [Define if libnotify >= notify_minimum_version present])
++fi
++AM_CONDITIONAL([HAVE_NOTIFY], [test x"$NOTIFY_FOUND" = x"yes"])
++
+ dnl Check for debugging support
+ XDT_FEATURE_DEBUG([xdt_debug_default])
+ 
+diff --git a/icons/128x128/Makefile.in b/icons/128x128/Makefile.in
+index e2158cc..98b7ee6 100644
+--- a/icons/128x128/Makefile.in
++++ b/icons/128x128/Makefile.in
+@@ -217,6 +217,10 @@ LIBGTK_CFLAGS = @LIBGTK_CFLAGS@
+ LIBGTK_LIBS = @LIBGTK_LIBS@
+ LIBGTK_REQUIRED_VERSION = @LIBGTK_REQUIRED_VERSION@
+ LIBGTK_VERSION = @LIBGTK_VERSION@
++LIBICALSS_CFLAGS = @LIBICALSS_CFLAGS@
++LIBICALSS_LIBS = @LIBICALSS_LIBS@
++LIBICALSS_REQUIRED_VERSION = @LIBICALSS_REQUIRED_VERSION@
++LIBICALSS_VERSION = @LIBICALSS_VERSION@
+ LIBICAL_CFLAGS = @LIBICAL_CFLAGS@
+ LIBICAL_LIBS = @LIBICAL_LIBS@
+ LIBICAL_REQUIRED_VERSION = @LIBICAL_REQUIRED_VERSION@
+diff --git a/icons/16x16/Makefile.in b/icons/16x16/Makefile.in
+index c5e8009..0abd5d8 100644
+--- a/icons/16x16/Makefile.in
++++ b/icons/16x16/Makefile.in
+@@ -217,6 +217,10 @@ LIBGTK_CFLAGS = @LIBGTK_CFLAGS@
+ LIBGTK_LIBS = @LIBGTK_LIBS@
+ LIBGTK_REQUIRED_VERSION = @LIBGTK_REQUIRED_VERSION@
+ LIBGTK_VERSION = @LIBGTK_VERSION@
++LIBICALSS_CFLAGS = @LIBICALSS_CFLAGS@
++LIBICALSS_LIBS = @LIBICALSS_LIBS@
++LIBICALSS_REQUIRED_VERSION = @LIBICALSS_REQUIRED_VERSION@
++LIBICALSS_VERSION = @LIBICALSS_VERSION@
+ LIBICAL_CFLAGS = @LIBICAL_CFLAGS@
+ LIBICAL_LIBS = @LIBICAL_LIBS@
+ LIBICAL_REQUIRED_VERSION = @LIBICAL_REQUIRED_VERSION@
+diff --git a/icons/24x24/Makefile.in b/icons/24x24/Makefile.in
+index cb795e9..96f7b8c 100644
+--- a/icons/24x24/Makefile.in
++++ b/icons/24x24/Makefile.in
+@@ -217,6 +217,10 @@ LIBGTK_CFLAGS = @LIBGTK_CFLAGS@
+ LIBGTK_LIBS = @LIBGTK_LIBS@
+ LIBGTK_REQUIRED_VERSION = @LIBGTK_REQUIRED_VERSION@
+ LIBGTK_VERSION = @LIBGTK_VERSION@
++LIBICALSS_CFLAGS = @LIBICALSS_CFLAGS@
++LIBICALSS_LIBS = @LIBICALSS_LIBS@
++LIBICALSS_REQUIRED_VERSION = @LIBICALSS_REQUIRED_VERSION@
++LIBICALSS_VERSION = @LIBICALSS_VERSION@
+ LIBICAL_CFLAGS = @LIBICAL_CFLAGS@
+ LIBICAL_LIBS = @LIBICAL_LIBS@
+ LIBICAL_REQUIRED_VERSION = @LIBICAL_REQUIRED_VERSION@
+diff --git a/icons/32x32/Makefile.in b/icons/32x32/Makefile.in
+index dda94c2..557401b 100644
+--- a/icons/32x32/Makefile.in
++++ b/icons/32x32/Makefile.in
+@@ -217,6 +217,10 @@ LIBGTK_CFLAGS = @LIBGTK_CFLAGS@
+ LIBGTK_LIBS = @LIBGTK_LIBS@
+ LIBGTK_REQUIRED_VERSION = @LIBGTK_REQUIRED_VERSION@
+ LIBGTK_VERSION = @LIBGTK_VERSION@
++LIBICALSS_CFLAGS = @LIBICALSS_CFLAGS@
++LIBICALSS_LIBS = @LIBICALSS_LIBS@
++LIBICALSS_REQUIRED_VERSION = @LIBICALSS_REQUIRED_VERSION@
++LIBICALSS_VERSION = @LIBICALSS_VERSION@
+ LIBICAL_CFLAGS = @LIBICAL_CFLAGS@
+ LIBICAL_LIBS = @LIBICAL_LIBS@
+ LIBICAL_REQUIRED_VERSION = @LIBICAL_REQUIRED_VERSION@
+diff --git a/icons/48x48/Makefile.in b/icons/48x48/Makefile.in
+index 7aa8314..c57cd94 100644
+--- a/icons/48x48/Makefile.in
++++ b/icons/48x48/Makefile.in
+@@ -217,6 +217,10 @@ LIBGTK_CFLAGS = @LIBGTK_CFLAGS@
+ LIBGTK_LIBS = @LIBGTK_LIBS@
+ LIBGTK_REQUIRED_VERSION = @LIBGTK_REQUIRED_VERSION@
+ LIBGTK_VERSION = @LIBGTK_VERSION@
++LIBICALSS_CFLAGS = @LIBICALSS_CFLAGS@
++LIBICALSS_LIBS = @LIBICALSS_LIBS@
++LIBICALSS_REQUIRED_VERSION = @LIBICALSS_REQUIRED_VERSION@
++LIBICALSS_VERSION = @LIBICALSS_VERSION@
+ LIBICAL_CFLAGS = @LIBICAL_CFLAGS@
+ LIBICAL_LIBS = @LIBICAL_LIBS@
+ LIBICAL_REQUIRED_VERSION = @LIBICAL_REQUIRED_VERSION@
+diff --git a/icons/64x64/Makefile.in b/icons/64x64/Makefile.in
+index 7f25a65..c1626e1 100644
+--- a/icons/64x64/Makefile.in
++++ b/icons/64x64/Makefile.in
+@@ -217,6 +217,10 @@ LIBGTK_CFLAGS = @LIBGTK_CFLAGS@
+ LIBGTK_LIBS = @LIBGTK_LIBS@
+ LIBGTK_REQUIRED_VERSION = @LIBGTK_REQUIRED_VERSION@
+ LIBGTK_VERSION = @LIBGTK_VERSION@
++LIBICALSS_CFLAGS = @LIBICALSS_CFLAGS@
++LIBICALSS_LIBS = @LIBICALSS_LIBS@
++LIBICALSS_REQUIRED_VERSION = @LIBICALSS_REQUIRED_VERSION@
++LIBICALSS_VERSION = @LIBICALSS_VERSION@
+ LIBICAL_CFLAGS = @LIBICAL_CFLAGS@
+ LIBICAL_LIBS = @LIBICAL_LIBS@
+ LIBICAL_REQUIRED_VERSION = @LIBICAL_REQUIRED_VERSION@
+diff --git a/icons/Makefile.in b/icons/Makefile.in
+index 6308aa1..682e401 100644
+--- a/icons/Makefile.in
++++ b/icons/Makefile.in
+@@ -246,6 +246,10 @@ LIBGTK_CFLAGS = @LIBGTK_CFLAGS@
+ LIBGTK_LIBS = @LIBGTK_LIBS@
+ LIBGTK_REQUIRED_VERSION = @LIBGTK_REQUIRED_VERSION@
+ LIBGTK_VERSION = @LIBGTK_VERSION@
++LIBICALSS_CFLAGS = @LIBICALSS_CFLAGS@
++LIBICALSS_LIBS = @LIBICALSS_LIBS@
++LIBICALSS_REQUIRED_VERSION = @LIBICALSS_REQUIRED_VERSION@
++LIBICALSS_VERSION = @LIBICALSS_VERSION@
+ LIBICAL_CFLAGS = @LIBICAL_CFLAGS@
+ LIBICAL_LIBS = @LIBICAL_LIBS@
+ LIBICAL_REQUIRED_VERSION = @LIBICAL_REQUIRED_VERSION@
+diff --git a/icons/scalable/Makefile.in b/icons/scalable/Makefile.in
+index e2814e9..c5849e3 100644
+--- a/icons/scalable/Makefile.in
++++ b/icons/scalable/Makefile.in
+@@ -217,6 +217,10 @@ LIBGTK_CFLAGS = @LIBGTK_CFLAGS@
+ LIBGTK_LIBS = @LIBGTK_LIBS@
+ LIBGTK_REQUIRED_VERSION = @LIBGTK_REQUIRED_VERSION@
+ LIBGTK_VERSION = @LIBGTK_VERSION@
++LIBICALSS_CFLAGS = @LIBICALSS_CFLAGS@
++LIBICALSS_LIBS = @LIBICALSS_LIBS@
++LIBICALSS_REQUIRED_VERSION = @LIBICALSS_REQUIRED_VERSION@
++LIBICALSS_VERSION = @LIBICALSS_VERSION@
+ LIBICAL_CFLAGS = @LIBICAL_CFLAGS@
+ LIBICAL_LIBS = @LIBICAL_LIBS@
+ LIBICAL_REQUIRED_VERSION = @LIBICAL_REQUIRED_VERSION@
+diff --git a/plugin/Makefile.in b/plugin/Makefile.in
+index b9410bb..5ca99b5 100644
+--- a/plugin/Makefile.in
++++ b/plugin/Makefile.in
+@@ -215,6 +215,10 @@ LIBGTK_CFLAGS = @LIBGTK_CFLAGS@
+ LIBGTK_LIBS = @LIBGTK_LIBS@
+ LIBGTK_REQUIRED_VERSION = @LIBGTK_REQUIRED_VERSION@
+ LIBGTK_VERSION = @LIBGTK_VERSION@
++LIBICALSS_CFLAGS = @LIBICALSS_CFLAGS@
++LIBICALSS_LIBS = @LIBICALSS_LIBS@
++LIBICALSS_REQUIRED_VERSION = @LIBICALSS_REQUIRED_VERSION@
++LIBICALSS_VERSION = @LIBICALSS_VERSION@
+ LIBICAL_CFLAGS = @LIBICAL_CFLAGS@
+ LIBICAL_LIBS = @LIBICAL_LIBS@
+ LIBICAL_REQUIRED_VERSION = @LIBICAL_REQUIRED_VERSION@
+diff --git a/sounds/Makefile.in b/sounds/Makefile.in
+index 4601329..ca3e472 100644
+--- a/sounds/Makefile.in
++++ b/sounds/Makefile.in
+@@ -215,6 +215,10 @@ LIBGTK_CFLAGS = @LIBGTK_CFLAGS@
+ LIBGTK_LIBS = @LIBGTK_LIBS@
+ LIBGTK_REQUIRED_VERSION = @LIBGTK_REQUIRED_VERSION@
+ LIBGTK_VERSION = @LIBGTK_VERSION@
++LIBICALSS_CFLAGS = @LIBICALSS_CFLAGS@
++LIBICALSS_LIBS = @LIBICALSS_LIBS@
++LIBICALSS_REQUIRED_VERSION = @LIBICALSS_REQUIRED_VERSION@
++LIBICALSS_VERSION = @LIBICALSS_VERSION@
+ LIBICAL_CFLAGS = @LIBICAL_CFLAGS@
+ LIBICAL_LIBS = @LIBICAL_LIBS@
+ LIBICAL_REQUIRED_VERSION = @LIBICAL_REQUIRED_VERSION@
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 8186262..74640dc 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -72,6 +72,7 @@ orage_CFLAGS =							\
+ 	$(LIBXFCE4UTIL_CFLAGS)					\
+ 	$(LIBXFCE4UI_CFLAGS)					\
+ 	$(LIBICAL_CFLAGS)					\
++	$(LIBICALSS_CFLAGS)					\
+ 	$(GIO_CFLAGS)
+ 
+ orage_LDADD =							\
+@@ -80,6 +81,7 @@ orage_LDADD =							\
+ 	$(LIBXFCE4UTIL_LIBS)					\
+ 	$(LIBXFCE4UI_LIBS)					\
+ 	$(LIBICAL_LIBS)						\
++	$(LIBICALSS_LIBS)					\
+ 	$(GIO_LIBS)						\
+ 	-lm							\
+ 	$(INTLLIBS)
+diff --git a/src/Makefile.in b/src/Makefile.in
+index 3f2c7e9..786e1b5 100644
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -162,7 +162,8 @@ am__DEPENDENCIES_1 =
+ orage_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+ 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
++	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
++	$(am__DEPENDENCIES_2)
+ AM_V_lt = $(am__v_lt_@AM_V@)
+ am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+ am__v_lt_0 = --silent
+@@ -313,6 +314,10 @@ LIBGTK_CFLAGS = @LIBGTK_CFLAGS@
+ LIBGTK_LIBS = @LIBGTK_LIBS@
+ LIBGTK_REQUIRED_VERSION = @LIBGTK_REQUIRED_VERSION@
+ LIBGTK_VERSION = @LIBGTK_VERSION@
++LIBICALSS_CFLAGS = @LIBICALSS_CFLAGS@
++LIBICALSS_LIBS = @LIBICALSS_LIBS@
++LIBICALSS_REQUIRED_VERSION = @LIBICALSS_REQUIRED_VERSION@
++LIBICALSS_VERSION = @LIBICALSS_VERSION@
+ LIBICAL_CFLAGS = @LIBICAL_CFLAGS@
+ LIBICAL_LIBS = @LIBICAL_LIBS@
+ LIBICAL_REQUIRED_VERSION = @LIBICAL_REQUIRED_VERSION@
+@@ -468,11 +473,12 @@ orage_CFLAGS = \
+ 	$(LIBXFCE4UTIL_CFLAGS)					\
+ 	$(LIBXFCE4UI_CFLAGS)					\
+ 	$(LIBICAL_CFLAGS)					\
++	$(LIBICALSS_CFLAGS)					\
+ 	$(GIO_CFLAGS)
+ 
+ orage_LDADD = $(LIBGTK_LIBS) $(LIBX11_LIBS) $(LIBXFCE4UTIL_LIBS) \
+-	$(LIBXFCE4UI_LIBS) $(LIBICAL_LIBS) $(GIO_LIBS) -lm $(INTLLIBS) \
+-	$(am__append_2)
++	$(LIBXFCE4UI_LIBS) $(LIBICAL_LIBS) $(LIBICALSS_LIBS) \
++	$(GIO_LIBS) -lm $(INTLLIBS) $(am__append_2)
+ all: all-am
+ 
+ .SUFFIXES:
+diff --git a/src/ical-archive.c b/src/ical-archive.c
+index 9e44fd4..b406b88 100644
+--- a/src/ical-archive.c
++++ b/src/ical-archive.c
+@@ -66,6 +66,12 @@
+ #include "parameters.h"
+ #include "interface.h"
+ 
++#if ICAL_CHECK_VERSION(4, 0, 0)
++#define icalcomponent_new_clone icalcomponent_clone
++#define icaltime_add icalduration_extend
++#define icaltime_subtract icalduration_from_times
++#endif
++
+ #ifdef HAVE_ARCHIVE
+ gboolean xfical_archive_open(void)
+ {
+@@ -129,7 +135,11 @@ static void xfical_icalcomponent_archive_recurrent (icalcomponent *e,
+                                                     const gint threshold_months)
+ {
+     struct icaltimetype sdate, edate, nsdate, nedate;
++    #if ICAL_CHECK_VERSION (4, 0, 0)
++    struct icalrecurrencetype *rrule;
++    #else
+     struct icalrecurrencetype rrule;
++    #endif
+     struct icaldurationtype duration;
+     icalrecur_iterator* ri;
+     gchar *stz_loc = NULL, *etz_loc = NULL;
+diff --git a/src/ical-code.c b/src/ical-code.c
+index b262804..322748b 100644
+--- a/src/ical-code.c
++++ b/src/ical-code.c
+@@ -70,6 +70,13 @@
+ 
+ #define XFICAL_UID_LEN 200
+ 
++#if ICAL_CHECK_VERSION(4, 0, 0)
++#define icaltime_add icalduration_extend
++#define icaltime_subtract icalduration_from_times
++#define icaldurationtype_from_int icaldurationtype_from_seconds
++#define icaldurationtype_as_int icaldurationtype_as_seconds
++#endif
++
+ icalset *ic_fical = NULL;
+ icalcomponent *ic_ical = NULL;
+ #ifdef HAVE_ARCHIVE
+@@ -1080,7 +1087,11 @@ static void appt_add_recur_internal (const xfical_appt *appt,
+                                      icalcomponent *icmp)
+ {
+     gchar recur_str[1001], *recur_p, *recur_p2;
++    #if ICAL_CHECK_VERSION (4, 0, 0)
++    struct icalrecurrencetype *rrule;
++    #else
+     struct icalrecurrencetype rrule;
++    #endif
+     struct icaltimetype wtime;
+     gchar *byday_a[] = {"MO", "TU", "WE", "TH", "FR", "SA", "SU"};
+     const char *text;
+@@ -1115,7 +1126,6 @@ static void appt_add_recur_internal (const xfical_appt *appt,
+             break;
+         default:
+             g_warning ("%s: Unsupported freq", G_STRFUNC);
+-            icalrecurrencetype_clear(&rrule);
+     }
+     if (add_interval) { /* not default, need to insert it */
+         recur_p += g_sprintf(recur_p, ";INTERVAL=%d", appt->interval);
+@@ -1220,8 +1230,14 @@ static void appt_add_recur_internal (const xfical_appt *appt,
+             break;
+     }
+ 
++    #if ICAL_CHECK_VERSION (4, 0, 0)
++    rrule = icalrecurrencetype_new_from_string(recur_str);
++    icalcomponent_add_property(icmp, icalproperty_new_rrule(rrule));
++    icalrecurrencetype_unref(rrule);
++    #else
+     rrule = icalrecurrencetype_from_string(recur_str);
+     icalcomponent_add_property(icmp, icalproperty_new_rrule(rrule));
++    #endif
+     if (appt->type == XFICAL_TYPE_TODO) {
+         if (appt->recur_todo_base_start)
+             icalcomponent_add_property(icmp
+@@ -1735,10 +1751,20 @@ static void ical_appt_get_rrule_internal (G_GNUC_UNUSED icalcomponent *c,
+ {
+     struct icalrecurrencetype rrule;
+     int i, cnt, day;
++    short by_day, by_month;
+     GDateTime *gdt;
+     gint month_day;
+ 
++    #if ICAL_CHECK_VERSION(4, 0, 0)
++    struct icalrecurrencetype *pr;
++    pr = icalproperty_get_rrule(p);
++    if (pr != NULL)
++        rrule = *pr;
++    else
++        memset(&rrule, 0, sizeof(rrule));
++    #else
+     rrule = icalproperty_get_rrule(p);
++    #endif
+     switch (rrule.freq) {
+         case ICAL_DAILY_RECURRENCE:
+             appt->freq = XFICAL_FREQ_DAILY;
+@@ -1748,9 +1774,15 @@ static void ical_appt_get_rrule_internal (G_GNUC_UNUSED icalcomponent *c,
+             break;
+         case ICAL_MONTHLY_RECURRENCE:
+             appt->freq = XFICAL_FREQ_MONTHLY;
++            #if ICAL_CHECK_VERSION(4, 0, 0)
++            if (rrule.by[ICAL_BY_MONTH_DAY].size > 0)
++            {
++                month_day = rrule.by[ICAL_BY_MONTH_DAY].data[0];
++            #else
+             month_day = rrule.by_month_day[0];
+             if (month_day != ICAL_RECURRENCE_ARRAY_MAX)
+             {
++            #endif
+                 if (month_day > 0)
+                 {
+                     appt->recur_month_type = XFICAL_RECUR_MONTH_TYPE_BEGIN;
+@@ -1762,16 +1794,26 @@ static void ical_appt_get_rrule_internal (G_GNUC_UNUSED icalcomponent *c,
+                     appt->recur_month_days = -1 * month_day;
+                 }
+             }
++            #if ICAL_CHECK_VERSION(4, 0, 0)
++            else if (rrule.by[ICAL_BY_DAY].size > 0)
++            #else
+             else if (rrule.by_day[0] != ICAL_RECURRENCE_ARRAY_MAX)
++            #endif
+             {
++                #if ICAL_CHECK_VERSION(4, 0, 0)
++                by_day = rrule.by[ICAL_BY_DAY].data[0];
++                #else
++                by_day = rrule.by_day[0];
++                #endif
++
+                 appt->recur_month_type = XFICAL_RECUR_MONTH_TYPE_EVERY;
+ 
+-                cnt = icalrecurrencetype_day_position (rrule.by_day[0]);
++                cnt = icalrecurrencetype_day_position (by_day);
+ 
+                 appt->recur_week_sel =
+                         cnt < 0 ? XFICAL_RECUR_MONTH_WEEK_LAST : cnt - 1;
+                 appt->recur_day_sel =
+-                        orage_recurrence_type_to_day_of_week (rrule.by_day[0]);
++                        orage_recurrence_type_to_day_of_week (by_day);
+             }
+             else
+                 g_critical ("%s: unknown weekday for %s", G_STRFUNC, appt->uid);
+@@ -1780,14 +1822,28 @@ static void ical_appt_get_rrule_internal (G_GNUC_UNUSED icalcomponent *c,
+         case ICAL_YEARLY_RECURRENCE:
+             appt->freq = XFICAL_FREQ_YEARLY;
+ 
+-            cnt = icalrecurrencetype_day_position (rrule.by_day[0]);
++            #if ICAL_CHECK_VERSION(4, 0, 0)
++            if (rrule.by[ICAL_BY_DAY].size > 0)
++                by_day = rrule.by[ICAL_BY_DAY].data[0];
++            else
++                by_day = -1;
++            if (rrule.by[ICAL_BY_MONTH].size > 0)
++                by_month = rrule.by[ICAL_BY_MONTH].data[0];
++            else
++                by_month = -1;
++            #else
++            by_day = rrule.by_day[0];
++            by_month = rrule.by_month[0];
++            #endif
++
++            cnt = icalrecurrencetype_day_position (by_day);
+ 
+             appt->recur_week_sel =
+                     cnt < 0 ? XFICAL_RECUR_MONTH_WEEK_LAST : cnt - 1;
+             appt->recur_day_sel =
+-                    orage_recurrence_type_to_day_of_week (rrule.by_day[0]);
++                    orage_recurrence_type_to_day_of_week (by_day);
+             appt->recur_month_sel =
+-                    icalrecurrencetype_month_month (rrule.by_month[0]) - 1;
++                    icalrecurrencetype_month_month (by_month) - 1;
+             break;
+         case ICAL_HOURLY_RECURRENCE:
+             appt->freq = XFICAL_FREQ_HOURLY;
+@@ -1812,12 +1868,27 @@ static void ical_appt_get_rrule_internal (G_GNUC_UNUSED icalcomponent *c,
+         else
+             appt->recur_limit = XFICAL_RECUR_NO_LIMIT;
+     }
++    #if ICAL_CHECK_VERSION (4, 0, 0)
++    if (rrule.by[ICAL_BY_DAY].size > 0) {
++    #else
+     if (rrule.by_day[0] != ICAL_RECURRENCE_ARRAY_MAX) {
++    #endif
+         for (i=0; i <= 6; i++)
+             appt->recur_byday[i] = FALSE;
+-        for (i=0; i <= 6 && rrule.by_day[i] != ICAL_RECURRENCE_ARRAY_MAX; i++) {
+-            cnt = (int)floor((double)(rrule.by_day[i]/8));
+-            day = abs(rrule.by_day[i]-8*cnt);
++        for (i=0; i <= 6 &&
++             #if ICAL_CHECK_VERSION (4, 0, 0)
++             i < rrule.by[ICAL_BY_DAY].size;
++             #else
++	     rrule.by_day[i] != ICAL_RECURRENCE_ARRAY_MAX;
++             #endif
++	     i++) {
++            #if ICAL_CHECK_VERSION (4, 0, 0)
++            by_day = rrule.by[ICAL_BY_DAY].data[i];
++            #else
++            by_day = rrule.by_day[i];
++            #endif
++            cnt = (int)floor((double)(by_day/8));
++            day = abs(by_day-8*cnt);
+             switch (day) {
+                 case ICAL_MONDAY_WEEKDAY:
+                     appt->recur_byday[0] = TRUE;
+@@ -1844,7 +1915,7 @@ static void ical_appt_get_rrule_internal (G_GNUC_UNUSED icalcomponent *c,
+                     break;
+                 default:
+                     g_critical ("%s: unknown weekday %s: %d/%d (%x)", G_STRFUNC,
+-                                appt->uid, rrule.by_day[i], i, rrule.by_day[i]);
++                                appt->uid, by_day, i, by_day);
+                     break;
+             }
+         }
+@@ -2557,7 +2628,11 @@ static alarm_struct *process_alarm_trigger(icalcomponent *c
+     struct icaltriggertype trg;
+     icalparameter *trg_related_par;
+     icalparameter_related rel;
++    #if ICAL_CHECK_VERSION(4, 0, 0)
++    struct icalrecurrencetype *rrule;
++    #else
+     struct icalrecurrencetype rrule;
++    #endif
+     icalrecur_iterator* ri;
+     xfical_period per;
+     struct icaltimetype next_alarm_time, next_start_time, next_end_time, 
+@@ -3035,7 +3110,11 @@ static xfical_appt *xfical_appt_get_next_on_day_internal (const gchar *a_day
+     gboolean recurrent_date_found=FALSE;
+     char *uid;
+     xfical_appt *appt;
++    #if ICAL_CHECK_VERSION(4, 0, 0)
++    struct icalrecurrencetype *rrule;
++    #else
+     struct icalrecurrencetype rrule;
++    #endif
+     icalrecur_iterator* ri;
+     icalcomponent_kind ikind = ICAL_VEVENT_COMPONENT;
+     const gchar *start_str;
+@@ -3225,7 +3304,11 @@ static gboolean xfical_mark_calendar_days(GtkCalendar *gtkcal
+ /* note that this not understand timezones, but gets always raw time,
+  * which we need to convert to correct timezone */
+ static void mark_calendar (G_GNUC_UNUSED icalcomponent *c,
++#if ICAL_CHECK_VERSION (4, 0, 0)
++                           const icaltime_span *span,
++#else
+                            icaltime_span *span,
++#endif
+                            void *data)
+ {
+     struct icaltimetype sdate, edate;
+@@ -3293,7 +3376,11 @@ static void xfical_mark_calendar_from_component (GtkCalendar *gtkcal,
+ {
+     xfical_period per;
+     struct icaltimetype nsdate, nedate;
++    #if ICAL_CHECK_VERSION(4, 0, 0)
++    struct icalrecurrencetype *rrule;
++    #else
+     struct icalrecurrencetype rrule;
++    #endif
+     icalrecur_iterator* ri;
+     icalproperty *p = NULL;
+     gboolean marked;
+@@ -3475,7 +3562,11 @@ void xfical_mark_calendar(GtkCalendar *gtkcal)
+ 
+ /* note that this not understand timezones, but gets always raw time,
+  * which we need to convert to correct timezone */
++#if ICAL_CHECK_VERSION(4, 0, 0)
++static void add_appt_to_list(icalcomponent *c, const icaltime_span *span , void *data)
++#else
+ static void add_appt_to_list(icalcomponent *c, icaltime_span *span , void *data)
++#endif
+ {
+     xfical_appt *appt;
+     struct icaltimetype sdate, edate;
+@@ -3620,7 +3711,11 @@ static void xfical_get_each_app_within_time_internal (const gchar *a_day,
+         data1.orig_start_hour = start.hour;
+         /* FIXME: hack to fix year to be newer than 1970 based on BUG 9507 */
+         if (start.year < 1970) {
++            #if ICAL_CHECK_VERSION(4, 0, 0)
++            c2 = icalcomponent_clone(c);
++            #else
+             c2 = icalcomponent_new_clone(c);
++            #endif
+             p = icalcomponent_get_first_property(c2, ICAL_DTSTART_PROPERTY);
+             start = icalproperty_get_dtstart(p);
+             g_debug ("%s: Adjusting temporarily old DTSTART time %d", G_STRFUNC,
+diff --git a/src/ical-expimp.c b/src/ical-expimp.c
+index bf33eb6..11134be 100644
+--- a/src/ical-expimp.c
++++ b/src/ical-expimp.c
+@@ -66,6 +66,10 @@
+ #include "parameters.h"
+ #include "interface.h"
+ 
++#if ICAL_CHECK_VERSION(4, 0, 0)
++#define icalcomponent_new_clone(_c) icalcomponent_clone(_c)
++#endif
++
+ static void add_event (icalcomponent *c, gboolean *ical_opened)
+ {
+     icalcomponent *ca;
+diff --git a/themes/Makefile.in b/themes/Makefile.in
+index 6e6a98a..b9591e3 100644
+--- a/themes/Makefile.in
++++ b/themes/Makefile.in
+@@ -216,6 +216,10 @@ LIBGTK_CFLAGS = @LIBGTK_CFLAGS@
+ LIBGTK_LIBS = @LIBGTK_LIBS@
+ LIBGTK_REQUIRED_VERSION = @LIBGTK_REQUIRED_VERSION@
+ LIBGTK_VERSION = @LIBGTK_VERSION@
++LIBICALSS_CFLAGS = @LIBICALSS_CFLAGS@
++LIBICALSS_LIBS = @LIBICALSS_LIBS@
++LIBICALSS_REQUIRED_VERSION = @LIBICALSS_REQUIRED_VERSION@
++LIBICALSS_VERSION = @LIBICALSS_VERSION@
+ LIBICAL_CFLAGS = @LIBICAL_CFLAGS@
+ LIBICAL_LIBS = @LIBICAL_LIBS@
+ LIBICAL_REQUIRED_VERSION = @LIBICAL_REQUIRED_VERSION@

diff --git a/orage.spec b/orage.spec
index 85f808b..764f8a7 100644
--- a/orage.spec
+++ b/orage.spec
@@ -8,6 +8,13 @@ Summary:        A calendar application
 License:        GPL-2.0-or-later
 URL:            https://gitlab.xfce.org/apps/orage
 Source:         https://archive.xfce.org/src/apps/%{name}/%{xfceversion}/%{name}-%{version}.tar.bz2
+# Build with libical 4: renamed APIs (compat defines), refcounted
+# recurrence rules, and explicit libicalss linking (libical 4's libical.pc
+# no longer pulls it in). Generated autotools files are patched too, as
+# the spec does not run autoreconf. From Milan Crha's libical-4.x COPR
+Patch:          orage-4.20.3-libical4.patch
+# NULL sentinels for icalproperty_vanew_*() (marked sentinel in libical 4)
+Patch:          orage-4.20.3-libical4-null-sentinels.patch
 
 BuildRequires:  desktop-file-utils
 BuildRequires:  gcc

                 reply	other threads:[~2026-11-04 13:59 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=179380077660.1.12351482513256625721.rpms-orage-1a1805f899c3@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