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/bijiben] avovk/fixups: Add patch to build against newer evolution-data-server (libecal-2.0)
Date: Wed, 21 Oct 2026 02:04:40 GMT	[thread overview]
Message-ID: <179254828034.1.2156836989522524962.rpms-bijiben-32f0a7fa2b58@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/bijiben
Branch : avovk/fixups
Commit : 32f0a7fa2b581b0f254845841813fb6280976162
Author : Milan Crha <mcrha@redhat.com>
Date   : 2019-05-21T12:24:07+02:00
Stats  : +468/-4 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/bijiben/c/32f0a7fa2b581b0f254845841813fb6280976162?branch=avovk/fixups

Log:
Add patch to build against newer evolution-data-server (libecal-2.0)

---
diff --git a/bijiben-eds-libecal-2.0.patch b/bijiben-eds-libecal-2.0.patch
new file mode 100644
index 0000000..fc84fdf
--- /dev/null
+++ b/bijiben-eds-libecal-2.0.patch
@@ -0,0 +1,460 @@
+From a92efbdfd8f5ac0c22719d67168eace58988ddab Mon Sep 17 00:00:00 2001
+From: Milan Crha <mcrha@redhat.com>
+Date: Tue, 16 Apr 2019 16:04:59 +0200
+Subject: [PATCH 1/3] Port to libecal-2.0
+
+---
+ meson.build                               |  2 +-
+ src/libbiji/provider/biji-memo-note.c     | 54 +++++++-------
+ src/libbiji/provider/biji-memo-provider.c | 86 ++++++++++++-----------
+ src/libbiji/provider/biji-memo-provider.h |  5 +-
+ 4 files changed, 73 insertions(+), 74 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index c23f030..c9a83d1 100644
+--- a/meson.build
++++ b/meson.build
+@@ -114,7 +114,7 @@ bijiben_deps = [
+   dependency('glib-2.0', version: '>= 2.53.4'),
+   dependency('goa-1.0'),
+   dependency('gtk+-3.0', version: '>= 3.19.3'),
+-  dependency('libecal-1.2', version: '>= 3.13.90'),
++  dependency('libecal-2.0', version: '>= 3.33.2'),
+   dependency('libedataserver-1.2', version: '>= 3.13.90'),
+   dependency('libxml-2.0'),
+   dependency('uuid'),
+diff --git a/src/libbiji/provider/biji-memo-note.c b/src/libbiji/provider/biji-memo-note.c
+index 6a31abb..a02f30d 100644
+--- a/src/libbiji/provider/biji-memo-note.c
++++ b/src/libbiji/provider/biji-memo-note.c
+@@ -54,7 +54,7 @@ cal_comp_is_on_server (ECalComponent *comp,
+ {
+   const gchar *uid;
+   gchar *rid = NULL;
+-  icalcomponent *icalcomp = NULL;
++  ICalComponent *icalcomp = NULL;
+   GError *error = NULL;
+ 
+   g_return_val_if_fail (comp != NULL, FALSE);
+@@ -68,7 +68,7 @@ cal_comp_is_on_server (ECalComponent *comp,
+    * confirm and we can just delete the event.  Otherwise, we ask
+    * the user.
+    */
+-  e_cal_component_get_uid (comp, &uid);
++  uid = e_cal_component_get_uid (comp);
+ 
+   /* TODO We should not be checking for this here. But since
+    *	e_cal_util_construct_instance does not create the instances
+@@ -83,7 +83,7 @@ cal_comp_is_on_server (ECalComponent *comp,
+ 
+   if (icalcomp != NULL)
+   {
+-    icalcomponent_free (icalcomp);
++    g_clear_object (&icalcomp);
+     g_free (rid);
+ 
+     return TRUE;
+@@ -113,26 +113,26 @@ fill_in_components (ECalComponent *comp,
+                     ECalComponent *clone,
+ 		    BijiMemoNote  *self)
+ {
+-  ECalComponentText  text;
++  ECalComponentText *text;
+   GSList             l;
+   glong              mtime;
+-  icaltimetype       t;
++  ICalTime          *t;
+ 
+ 
+   /* ----------------- FIELDS FROM "memo_page_fill_components"------------------ */
+ 
+ 
+   /* Set : title */
+-  text.value = biji_item_get_title (BIJI_ITEM (self));
+-  text.altrep = NULL;
+-  e_cal_component_set_summary (clone, &text);
++  text = e_cal_component_text_new (biji_item_get_title (BIJI_ITEM (self)), NULL);
++  e_cal_component_set_summary (clone, text);
++  e_cal_component_text_free (text);
+ 
+   /* Set : content */
+-  text.value = biji_note_obj_get_raw_text (BIJI_NOTE_OBJ (self));
+-  text.altrep = NULL;
+-  l.data = &text;
++  text = e_cal_component_text_new (biji_note_obj_get_raw_text (BIJI_NOTE_OBJ (self)), NULL);
++  l.data = text;
+   l.next = NULL;
+-  e_cal_component_set_description_list (clone, &l);
++  e_cal_component_set_descriptions (clone, &l);
++  e_cal_component_text_free (text);
+ 
+ 
+   /* dtstart : we'd rather use "created", "modified" */
+@@ -167,8 +167,12 @@ fill_in_components (ECalComponent *comp,
+   */
+ 
+   mtime = biji_item_get_mtime (BIJI_ITEM (self));
+-  if (icaltime_from_time_val (mtime, &t))
+-    e_cal_component_set_last_modified (clone, &t);
++  t = icaltime_from_time_val (mtime);
++  if (t)
++  {
++    e_cal_component_set_last_modified (clone, t);
++    g_object_unref (t);
++  }
+ }
+ 
+ 
+@@ -181,12 +185,10 @@ memo_note_save (BijiNoteObj *note)
+ {
+   BijiMemoNote *self = BIJI_MEMO_NOTE (note);
+   BijiMemoNotePrivate *priv = self->priv;
+-  const gchar *orig_uid;
+-  icalcomponent *icalcomp;
++  ICalComponent *icalcomp;
+   gboolean result;
+   GError *error;
+   ECalComponent *clone;
+-  //gchar *orig_uid_copy;
+ 
+   clone = e_cal_component_clone (priv->ecal);
+   fill_in_components (priv->ecal, clone, self);
+@@ -196,11 +198,6 @@ memo_note_save (BijiNoteObj *note)
+   g_object_unref (priv->ecal);
+   priv->ecal = clone;
+ 
+-  e_cal_component_get_uid (priv->ecal, &orig_uid);
+-
+-  /* Make a copy of it, because call of e_cal_create_object()
+-   * rewrites the internal uid.
+-   orig_uid_copy = g_strdup (orig_uid); */
+   icalcomp = e_cal_component_get_icalcomponent (priv->ecal);
+ 
+ 
+@@ -208,10 +205,10 @@ memo_note_save (BijiNoteObj *note)
+   {
+     gchar *uid = NULL;
+     result = e_cal_client_create_object_sync (
+-    priv->client, icalcomp, &uid, NULL, &error);
++    priv->client, icalcomp, E_CAL_OPERATION_FLAG_NONE, &uid, NULL, &error);
+       if (result)
+       {
+-        icalcomponent_set_uid (icalcomp, uid);
++        i_cal_component_set_uid (icalcomp, uid);
+ 	g_free (uid);
+         //g_signal_emit_by_name (editor, "object_created");
+       }
+@@ -220,7 +217,7 @@ memo_note_save (BijiNoteObj *note)
+   else
+   {
+     result = e_cal_client_modify_object_sync (
+-      priv->client, icalcomp, E_CAL_OBJ_MOD_THIS, NULL, &error);
++      priv->client, icalcomp, E_CAL_OBJ_MOD_THIS, E_CAL_OPERATION_FLAG_NONE, NULL, &error);
+     e_cal_component_commit_sequence (clone);
+   }
+ }
+@@ -349,11 +346,12 @@ memo_delete (BijiNoteObj *note)
+   const gchar *uid;
+ 
+   self = BIJI_MEMO_NOTE (note);
+-  e_cal_component_get_uid (self->priv->ecal, &uid);
++  uid = e_cal_component_get_uid (self->priv->ecal);
+   e_cal_client_remove_object (self->priv->client,
+                               uid,
+                               NULL,               /* rid : all occurences */
+                               E_CAL_OBJ_MOD_ALL,  /*       all occurences */
++                              E_CAL_OPERATION_FLAG_NONE,
+                               NULL,               /* Cancellable */
+                               on_memo_deleted,
+                               self);
+@@ -377,8 +375,8 @@ memo_get_basename (BijiNoteObj *note)
+ {
+   const gchar *out;
+ 
+-  e_cal_component_get_uid (
+-    BIJI_MEMO_NOTE (note)->priv->ecal, &out);
++  out = e_cal_component_get_uid (
++    BIJI_MEMO_NOTE (note)->priv->ecal);
+ 
+   return g_strdup (out);
+ }
+diff --git a/src/libbiji/provider/biji-memo-provider.c b/src/libbiji/provider/biji-memo-provider.c
+index 665c18c..22e6a72 100644
+--- a/src/libbiji/provider/biji-memo-provider.c
++++ b/src/libbiji/provider/biji-memo-provider.c
+@@ -72,7 +72,7 @@ static GParamSpec *properties[BIJI_MEMO_PROP] = { NULL, };
+ 
+ 
+ gboolean
+-time_val_from_icaltime (icaltimetype *itt, glong *result)
++time_val_from_icaltime (ICalTime *itt, glong *result)
+ {
+   GTimeVal t;
+   gchar *iso;
+@@ -83,7 +83,7 @@ time_val_from_icaltime (icaltimetype *itt, glong *result)
+   t.tv_sec = 0;
+   t.tv_usec = 0;
+ 
+-  iso = isodate_from_time_t (icaltime_as_timet (*itt));
++  iso = isodate_from_time_t (i_cal_time_as_timet (itt));
+ 
+   if (g_time_val_from_iso8601 (iso, &t))
+   {
+@@ -97,23 +97,24 @@ time_val_from_icaltime (icaltimetype *itt, glong *result)
+ 
+ 
+ 
+-gboolean
+-icaltime_from_time_val (glong t, icaltimetype *out)
++ICalTime *
++icaltime_from_time_val (glong t)
+ {
+   GTimeVal tv;
+   GDate    *date;
++  ICalTime *out;
+ 
+   tv.tv_sec = t;
+   tv.tv_usec = 0;
+ 
+   date = g_date_new ();
+   g_date_set_time_val (date, &tv);
+-  *out = icaltime_from_day_of_year (
++  out = i_cal_time_from_day_of_year (
+     g_date_get_day_of_year (date),
+     g_date_get_year (date));
+ 
+   g_date_free (date);
+-  return TRUE;
++  return out;
+ }
+ 
+ 
+@@ -259,12 +260,11 @@ on_object_list_got (GObject      *obj,
+   for (l = self->memos; l != NULL; l = l->next)
+   {
+     ECalComponent      *co; /* Memo */
+-    ECalComponentText   text;
+-    const gchar        *uid;
++    ECalComponentText  *text;
+     BijiMemoItem       *item;
+-    icaltimetype       *t;
++    ICalTime           *t;
+     glong               time, dtstart;
+-    ECalComponentDateTime tz;
++    ECalComponentDateTime *tz;
+ 
+ 
+     item = memo_item_new (self);
+@@ -272,43 +272,43 @@ on_object_list_got (GObject      *obj,
+     co = item->ecal = e_cal_component_new_from_icalcomponent (l->data);
+ 
+     /* Summary, url */
+-    e_cal_component_get_summary (co, &text);
+-    item->set.title = g_strdup (text.value);
+-    e_cal_component_get_uid (co, &uid);
+-    item->set.url = g_strdup (uid);
++    text = e_cal_component_get_summary (co);
++    item->set.title = text ? g_strdup (e_cal_component_text_get_value (text)) : NULL;
++    e_cal_component_text_free (text);
++    item->set.url = g_strdup (e_cal_component_get_uid (co));
+ 
+ 
+     /* Last modified, created */
+-    e_cal_component_get_dtstart (co, &tz);
+-    if (time_val_from_icaltime (tz.value, &time))
++    tz = e_cal_component_get_dtstart (co);
++    if (time_val_from_icaltime (tz ? e_cal_component_datetime_get_value (tz) : NULL, &time))
+       dtstart = time;
+     else
+       dtstart = 0;
+-    e_cal_component_free_datetime(&tz);
++    e_cal_component_datetime_free (tz);
+ 
+-    e_cal_component_get_last_modified (co, &t); // or dtstart
++    t = e_cal_component_get_last_modified (co); /* or dtstart */
+     if (time_val_from_icaltime (t, &time))
+       item->set.mtime = time;
+     else
+       item->set.mtime = dtstart;
+-    e_cal_component_free_icaltimetype (t);
++    g_clear_object (&t);
+ 
+-    e_cal_component_get_created (co, &t); // or dtstart
++    t = e_cal_component_get_created (co); /* or dtstart */
+     if (time_val_from_icaltime (t, &time))
+       item->set.created = time;
+     else
+       item->set.created = dtstart;
+-    e_cal_component_free_icaltimetype (t);
++    g_clear_object (&t);
+ 
+     /* Description */
+-    e_cal_component_get_description_list (co, &desc);
++    desc = e_cal_component_get_descriptions (co);
+     for (ll=desc; ll!=NULL; ll=ll->next)
+     {
+       ECalComponentText *txt = ll->data;
+ 
+-      if (txt->value != NULL)
++      if (txt && e_cal_component_text_get_value (txt) != NULL)
+       {
+-        item->set.content = g_strdup (txt->value);
++        item->set.content = g_strdup (e_cal_component_text_get_value (txt));
+ 	break;
+       }
+     }
+@@ -317,7 +317,7 @@ on_object_list_got (GObject      *obj,
+       g_warning ("note %s has no content", item->set.title);
+ 
+ 
+-    e_cal_component_free_text_list (desc);
++    g_slist_free_full (desc, e_cal_component_text_free);
+     g_queue_push_head (self->queue, item);
+   }
+ 
+@@ -537,13 +537,13 @@ memo_create_note (BijiProvider *provider,
+   BijiMemoProvider *self = BIJI_MEMO_PROVIDER (provider);
+   BijiInfoSet    info;
+   BijiNoteObj   *note;
+-  icalcomponent *icalcomp;
++  ICalComponent *icalcomp;
+   ECalComponent *comp;
+   gchar         *title, *html;
+   time_t         dttime;
+-  ECalComponentDateTime dt;
+-  icaltimezone  *zone;
+-  struct icaltimetype itt;
++  ECalComponentDateTime *dt;
++  ICalTimezone  *zone;
++  ICalTime      *itt;
+ 
+ 
+   title = NULL;
+@@ -564,12 +564,12 @@ memo_create_note (BijiProvider *provider,
+     self->client, &icalcomp, NULL, NULL);
+ 
+   if (icalcomp == NULL)
+-    icalcomp = icalcomponent_new (ICAL_VJOURNAL_COMPONENT);
++    icalcomp = i_cal_component_new (I_CAL_VJOURNAL_COMPONENT);
+ 
+   comp = e_cal_component_new ();
+   if (!e_cal_component_set_icalcomponent (comp, icalcomp))
+   {
+-    icalcomponent_free (icalcomp);
++    g_object_unref (icalcomp);
+     e_cal_component_set_new_vtype (comp, E_CAL_COMPONENT_JOURNAL);
+   }
+ 
+@@ -580,15 +580,16 @@ memo_create_note (BijiProvider *provider,
+ 
+   if (dttime)
+   {
+-    itt = icaltime_from_timet_with_zone (
++    itt = i_cal_time_from_timet_with_zone (
+       dttime, FALSE, zone);
+-    dt.value = &itt;
+-    dt.tzid = icaltimezone_get_tzid (zone);
++    dt = e_cal_component_datetime_new_take (itt, g_strdup (zone ? i_cal_timezone_get_tzid (zone) : NULL));
++
++    e_cal_component_set_dtstart (comp, dt);
++    e_cal_component_set_dtend (comp, dt);
++    e_cal_component_set_last_modified (comp, itt);
++    e_cal_component_set_created (comp, itt);
+ 
+-    e_cal_component_set_dtstart (comp, &dt);
+-    e_cal_component_set_dtend (comp, &dt);
+-    e_cal_component_set_last_modified (comp, &itt);
+-    e_cal_component_set_created (comp, &itt);
++    e_cal_component_datetime_free (dt);
+   }
+ 
+   if (dttime)
+@@ -596,12 +597,12 @@ memo_create_note (BijiProvider *provider,
+ 
+ 
+   /* make sure the component has an UID and info get it */
+-  if (! (info.url = (gchar *) icalcomponent_get_uid (icalcomp)))
++  if (! (info.url = (gchar *) i_cal_component_get_uid (icalcomp)))
+   {
+     gchar *uid;
+ 
+-    uid = e_cal_component_gen_uid ();
+-    icalcomponent_set_uid (icalcomp, uid);
++    uid = e_util_generate_uid ();
++    i_cal_component_set_uid (icalcomp, uid);
+     info.url = uid;
+   }
+ 
+@@ -625,6 +626,7 @@ memo_create_note (BijiProvider *provider,
+ 
+   e_cal_client_create_object (self->client,
+                               icalcomp,
++                              E_CAL_OPERATION_FLAG_NONE,
+                               NULL, /* GCancellable */
+                               on_object_created,
+                               self);
+@@ -651,7 +653,7 @@ biji_memo_provider_finalize (GObject *object)
+ {
+   BijiMemoProvider *self = BIJI_MEMO_PROVIDER (object);
+ 
+-  e_cal_client_free_icalcomp_slist (self->memos);
++  g_slist_free_full (self->memos, g_object_unref);
+ 
+   g_hash_table_unref (self->tracker);
+   g_hash_table_unref (self->items);
+diff --git a/src/libbiji/provider/biji-memo-provider.h b/src/libbiji/provider/biji-memo-provider.h
+index c68d210..735a7d2 100644
+--- a/src/libbiji/provider/biji-memo-provider.h
++++ b/src/libbiji/provider/biji-memo-provider.h
+@@ -37,11 +37,10 @@ BijiProvider   *biji_memo_provider_new          (BijiManager *manager,
+ 
+ 
+ 
+-gboolean        icaltime_from_time_val          (glong          t,
+-                                                 icaltimetype *out);
++ICalTime *      icaltime_from_time_val          (glong t);
+ 
+ 
+-gboolean        time_val_from_icaltime          (icaltimetype *itt,
++gboolean        time_val_from_icaltime          (ICalTime *itt,
+                                                  glong *result);
+ 
+ 
+-- 
+2.18.1
+
+
+From 4f2a6d4da12a87b7993dc7dc2119a5ce4eed2b7f Mon Sep 17 00:00:00 2001
+From: Milan Crha <mcrha@redhat.com>
+Date: Thu, 2 May 2019 13:58:33 +0200
+Subject: [PATCH 2/3] Adapt to the latest libical-glib API changes
+
+---
+ src/libbiji/provider/biji-memo-provider.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/libbiji/provider/biji-memo-provider.c b/src/libbiji/provider/biji-memo-provider.c
+index 22e6a72..b96ebfd 100644
+--- a/src/libbiji/provider/biji-memo-provider.c
++++ b/src/libbiji/provider/biji-memo-provider.c
+@@ -109,7 +109,7 @@ icaltime_from_time_val (glong t)
+ 
+   date = g_date_new ();
+   g_date_set_time_val (date, &tv);
+-  out = i_cal_time_from_day_of_year (
++  out = i_cal_time_new_from_day_of_year (
+     g_date_get_day_of_year (date),
+     g_date_get_year (date));
+ 
+@@ -580,7 +580,7 @@ memo_create_note (BijiProvider *provider,
+ 
+   if (dttime)
+   {
+-    itt = i_cal_time_from_timet_with_zone (
++    itt = i_cal_time_new_from_timet_with_zone (
+       dttime, FALSE, zone);
+     dt = e_cal_component_datetime_new_take (itt, g_strdup (zone ? i_cal_timezone_get_tzid (zone) : NULL));
+ 
+-- 
+2.18.1
+

diff --git a/bijiben.spec b/bijiben.spec
index 4cfc50c..06929be 100644
--- a/bijiben.spec
+++ b/bijiben.spec
@@ -1,6 +1,6 @@
 Name:		bijiben
 Version:	3.32.1
-Release:	2%{?dist}
+Release:	3%{?dist}
 Summary:	Simple Note Viewer
 
 # Bijiben is GPLv3+ apart a few files "LGPLv2 or LGPLv3"
@@ -8,6 +8,7 @@ Summary:	Simple Note Viewer
 License:	GPLv3+ and LGPLv3 and LGPLv2+
 Url:		http://www.gnome.org
 Source0:	http://download.gnome.org/sources/%{name}/3.32/%{name}-%{version}.tar.xz
+Patch01:	bijiben-eds-libecal-2.0.patch
 
 BuildRequires:	desktop-file-utils
 BuildRequires:	itstool
@@ -16,8 +17,8 @@ BuildRequires:  meson
 BuildRequires:  pkgconfig(gio-unix-2.0) >= 2.28
 BuildRequires:  pkgconfig(goa-1.0)
 BuildRequires:  pkgconfig(gtk+-3.0) >= 3.11.4
-BuildRequires:  pkgconfig(libecal-1.2) >= 3.13.90
-BuildRequires:  pkgconfig(libedataserverui-1.2) >= 3.13.90
+BuildRequires:  pkgconfig(libecal-2.0) >= 3.33.2
+BuildRequires:  pkgconfig(libedataserverui-1.2) >= 3.33.2
 BuildRequires:  pkgconfig(libxml-2.0)
 BuildRequires:  pkgconfig(tracker-sparql-2.0)
 BuildRequires:  pkgconfig(uuid)
@@ -40,7 +41,7 @@ notes, quickly find it back.
 
 %prep
 %setup -q
-
+%patch01 -p1 -b .eds-libecal-2.0
 
 %build
 %meson
@@ -79,6 +80,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.Notes.deskt
 %{_libexecdir}/bijiben-shell-search-provider
 
 %changelog
+* Tue May 21 2019 Milan Crha <mcrha@redhat.com> - 3.32.1-3
+- Add patch to build against newer evolution-data-server (libecal-2.0)
+
 * Tue Apr 16 2019 Adam Williamson <awilliam@redhat.com> - 3.32.1-2
 - Rebuild with Meson fix for #1699099
 

                 reply	other threads:[~2026-10-21  2:04 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=179254828034.1.2156836989522524962.rpms-bijiben-32f0a7fa2b58@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