pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/gnome-panel use time_t consistently rather than GT...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/dbfaba438a23
branches:  trunk
changeset: 556323:dbfaba438a23
user:      drochner <drochner%pkgsrc.org@localhost>
date:      Thu Mar 19 18:54:42 2009 +0000

description:
use time_t consistently rather than GTime, fixes Y2038 issues on
platforms with 64bit time_t
see gnome bugzilla #569113

diffstat:

 x11/gnome-panel/distinfo         |    6 +-
 x11/gnome-panel/patches/patch-ab |  200 ++++++++++++++++++++++++++++++++++++++-
 x11/gnome-panel/patches/patch-ac |   40 +++++++
 x11/gnome-panel/patches/patch-af |  125 ++++++++++++++++++++++++
 4 files changed, 365 insertions(+), 6 deletions(-)

diffs (truncated from 414 to 300 lines):

diff -r e08bf304f500 -r dbfaba438a23 x11/gnome-panel/distinfo
--- a/x11/gnome-panel/distinfo  Thu Mar 19 18:49:21 2009 +0000
+++ b/x11/gnome-panel/distinfo  Thu Mar 19 18:54:42 2009 +0000
@@ -1,9 +1,11 @@
-$NetBSD: distinfo,v 1.53 2009/03/16 23:49:20 jmcneill Exp $
+$NetBSD: distinfo,v 1.54 2009/03/19 18:54:42 drochner Exp $
 
 SHA1 (gnome-panel-2.26.0.tar.bz2) = 8b3012a1f080cb7b30c25d867ca371119fc538f4
 RMD160 (gnome-panel-2.26.0.tar.bz2) = 5c25eaeba9886d3cccf189f2304581e6a277afd6
 Size (gnome-panel-2.26.0.tar.bz2) = 3421179 bytes
 SHA1 (patch-aa) = e19be3cb14a38e1ea98f368a1fd1f53e1a7d6513
-SHA1 (patch-ab) = 681079355d2f10f4ae40fa90772f457a1fc42f41
+SHA1 (patch-ab) = 5a3788a3eaf6ba4c0c7832e390e2ebe3bbf15161
+SHA1 (patch-ac) = 5b9855e1cf0bb00635be234ed24a740dd33f5b67
 SHA1 (patch-ad) = c24a5d0a8c1c88d46edfa3e8fc3e4528637a8d31
 SHA1 (patch-ae) = d85575dc403c67a4fcb0818904ab9b0517f7b8e0
+SHA1 (patch-af) = 49057b4991a404a24da3e00b8b8bc64f901abf89
diff -r e08bf304f500 -r dbfaba438a23 x11/gnome-panel/patches/patch-ab
--- a/x11/gnome-panel/patches/patch-ab  Thu Mar 19 18:49:21 2009 +0000
+++ b/x11/gnome-panel/patches/patch-ab  Thu Mar 19 18:54:42 2009 +0000
@@ -1,8 +1,94 @@
-$NetBSD: patch-ab,v 1.6 2009/02/18 17:50:24 drochner Exp $
+$NetBSD: patch-ab,v 1.7 2009/03/19 18:54:42 drochner Exp $
 
 --- applets/clock/calendar-client.c.orig       2009-01-13 01:02:20.000000000 +0100
 +++ applets/clock/calendar-client.c
-@@ -909,11 +909,12 @@ resolve_timezone_id (const char *tzid,
+@@ -523,7 +523,7 @@ calendar_client_new (void)
+  *
+  * "What?", you say, "Something useful in libc?"
+  */
+-static inline GTime
++static inline time_t
+ make_time_for_day_begin (int day,
+                        int month,
+                        int year)
+@@ -543,14 +543,14 @@ make_isodate_for_day_begin (int day,
+                           int month,
+                           int year)
+ {
+-  GTime utctime;
++  time_t utctime;
+ 
+   utctime = make_time_for_day_begin (day, month, year);
+ 
+   return utctime != -1 ? isodate_from_time_t (utctime) : NULL;
+ }
+ 
+-static GTime
++static time_t
+ get_time_from_property (icalcomponent         *ical,
+                       icalproperty_kind      prop_kind,
+                       struct icaltimetype (* get_prop_func) (const icalproperty *prop),
+@@ -624,7 +624,7 @@ get_ical_description (icalcomponent *ica
+   return g_strdup (icalproperty_get_description (prop));
+ }
+ 
+-static inline GTime
++static inline time_t
+ get_ical_start_time (icalcomponent *ical,
+                      icaltimezone  *default_zone)
+ {
+@@ -634,7 +634,7 @@ get_ical_start_time (icalcomponent *ical
+                                  default_zone);
+ }
+ 
+-static inline GTime
++static inline time_t
+ get_ical_end_time (icalcomponent *ical,
+                    icaltimezone  *default_zone)
+ {
+@@ -646,13 +646,12 @@ get_ical_end_time (icalcomponent *ical,
+ 
+ static gboolean
+ get_ical_is_all_day (icalcomponent *ical,
+-                     GTime          start_gtime,
++                     time_t         start_time,
+                      icaltimezone  *default_zone)
+ {
+   icalproperty            *prop;
+-  time_t                   start_time;
+   struct tm               *start_tm;
+-  GTime                    end_time;
++  time_t                   end_time;
+   struct icaldurationtype  duration;
+   struct icaltimetype      start_icaltime;
+ 
+@@ -660,7 +659,6 @@ get_ical_is_all_day (icalcomponent *ical
+   if (start_icaltime.is_date)
+     return TRUE;
+ 
+-  start_time = (time_t) start_gtime;
+   start_tm = gmtime (&start_time);
+   if (start_tm->tm_sec  != 0 ||
+       start_tm->tm_min  != 0 ||
+@@ -679,7 +677,7 @@ get_ical_is_all_day (icalcomponent *ical
+   return icaldurationtype_as_int (duration) % 86400 == 0;
+ }
+ 
+-static inline GTime
++static inline time_t
+ get_ical_due_time (icalcomponent *ical,
+                    icaltimezone  *default_zone)
+ {
+@@ -713,7 +711,7 @@ get_ical_percent_complete (icalcomponent
+   return CLAMP (percent_complete, 0, 100);
+ }
+ 
+-static inline GTime
++static inline time_t
+ get_ical_completed_time (icalcomponent *ical,
+                          icaltimezone  *default_zone)
+ {
+@@ -909,11 +907,12 @@ resolve_timezone_id (const char *tzid,
  
  static gboolean
  calendar_appointment_collect_occurrence (ECalComponent  *component,
@@ -18,7 +104,18 @@
  
    occurrence             = g_new0 (CalendarOccurrence, 1);
    occurrence->start_time = occurrence_start;
-@@ -943,7 +944,7 @@ calendar_appointment_generate_ocurrences
+@@ -928,8 +927,8 @@ static void
+ calendar_appointment_generate_ocurrences (CalendarAppointment *appointment,
+                                         icalcomponent       *ical,
+                                         ECal                *source,
+-                                        GTime                start,
+-                                        GTime                end,
++                                        time_t               start,
++                                        time_t               end,
+                                           icaltimezone        *default_zone)
+ {
+   ECalComponent *ecal;
+@@ -943,7 +942,7 @@ calendar_appointment_generate_ocurrences
    e_cal_recur_generate_instances (ecal,
                                  start,
                                  end,
@@ -27,7 +124,102 @@
                                  &appointment->occurrences,
                                  (ECalRecurResolveTimezoneFn) resolve_timezone_id,
                                  source,
-@@ -2124,7 +2125,7 @@ calendar_client_set_task_completed (Cale
+@@ -1160,8 +1159,8 @@ static void
+ calendar_event_generate_ocurrences (CalendarEvent *event,
+                                   icalcomponent *ical,
+                                   ECal          *source,
+-                                  GTime          start,
+-                                  GTime          end,
++                                  time_t         start,
++                                  time_t         end,
+                                     icaltimezone  *default_zone)
+ {
+   if (event->type != CALENDAR_EVENT_APPOINTMENT)
+@@ -1332,8 +1331,8 @@ calendar_client_handle_query_result (Cal
+   gboolean             emit_signal;
+   gboolean             events_changed;
+   GList               *l;
+-  GTime                month_begin;
+-  GTime                month_end;
++  time_t               month_begin;
++  time_t               month_end;
+ 
+   client = source->client;
+ 
+@@ -1846,8 +1845,8 @@ typedef struct
+ {
+   CalendarClient *client;
+   GSList         *events;
+-  GTime           start_time;
+-  GTime           end_time;
++  time_t          start_time;
++  time_t          end_time;
+ } FilterData;
+ 
+ typedef void (* CalendarEventFilterFunc) (const char    *uid,
+@@ -1870,8 +1869,8 @@ filter_appointment (const char    *uid,
+   for (l = occurrences; l; l = l->next)
+     {
+       CalendarOccurrence *occurrence = l->data;
+-      GTime start_time = occurrence->start_time;
+-      GTime end_time   = occurrence->end_time;
++      time_t start_time = occurrence->start_time;
++      time_t end_time   = occurrence->end_time;
+ 
+       if ((start_time >= filter_data->start_time &&
+            start_time < filter_data->end_time) ||
+@@ -1924,8 +1923,8 @@ static GSList *
+ calendar_client_filter_events (CalendarClient          *client,
+                              GSList                  *sources,
+                              CalendarEventFilterFunc  filter_func,
+-                             GTime                    start_time,
+-                             GTime                    end_time)
++                             time_t                   start_time,
++                             time_t                   end_time)
+ {
+   FilterData  filter_data;
+   GSList     *l;
+@@ -1966,8 +1965,8 @@ calendar_client_get_events (CalendarClie
+ {
+   GSList *appointments;
+   GSList *tasks;
+-  GTime   day_begin;
+-  GTime   day_end;
++  time_t  day_begin;
++  time_t  day_end;
+ 
+   g_return_val_if_fail (CALENDAR_IS_CLIENT (client), NULL);
+   g_return_val_if_fail (client->priv->day   != -1 &&
+@@ -2021,8 +2020,8 @@ calendar_client_foreach_appointment_day 
+ {
+   GSList   *appointments, *l;
+   gboolean  marked_days [32] = { FALSE, };
+-  GTime     month_begin;
+-  GTime     month_end;
++  time_t    month_begin;
++  time_t    month_end;
+   int       i;
+ 
+   g_return_if_fail (CALENDAR_IS_CLIENT (client));
+@@ -2048,7 +2047,7 @@ calendar_client_foreach_appointment_day 
+ 
+       if (appointment->start_time)
+         {
+-          GTime day_time = appointment->start_time;
++          time_t day_time = appointment->start_time;
+ 
+           if (day_time >= month_begin)
+             marked_days [day_from_time_t (day_time)] = TRUE;
+@@ -2060,7 +2059,7 @@ calendar_client_foreach_appointment_day 
+             /* mark the days for the appointment, no need to add an extra one when duration is a multiple of 86400 */
+               for (day_offset = 1; day_offset <= duration / 86400 && duration != day_offset * 86400; day_offset++)
+                 {
+-                  GTime day_tm = appointment->start_time + day_offset * 86400;
++                  time_t day_tm = appointment->start_time + day_offset * 86400;
+ 
+                   if (day_tm > month_end)
+                     break;
+@@ -2124,7 +2123,7 @@ calendar_client_set_task_completed (Cale
      {
        struct icaltimetype  completed_time;
  
diff -r e08bf304f500 -r dbfaba438a23 x11/gnome-panel/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/gnome-panel/patches/patch-ac  Thu Mar 19 18:54:42 2009 +0000
@@ -0,0 +1,40 @@
+$NetBSD: patch-ac,v 1.9 2009/03/19 18:54:42 drochner Exp $
+
+--- applets/clock/calendar-client.h.orig       2009-03-04 09:49:20.000000000 +0100
++++ applets/clock/calendar-client.h
+@@ -65,8 +65,8 @@ struct _CalendarClientClass
+ 
+ typedef struct
+ {
+-  GTime start_time;
+-  GTime end_time;
++  time_t start_time;
++  time_t end_time;
+ } CalendarOccurrence;
+ 
+ typedef struct
+@@ -77,8 +77,8 @@ typedef struct
+   char   *summary;
+   char   *description;
+   char   *color_string;
+-  GTime   start_time;
+-  GTime   end_time;
++  time_t  start_time;
++  time_t  end_time;
+   guint   is_all_day : 1;
+ 
+   /* Only used internally */
+@@ -92,10 +92,10 @@ typedef struct
+   char  *description;
+   char  *color_string;
+   char  *url;
+-  GTime  start_time;
+-  GTime  due_time;
++  time_t start_time;
++  time_t due_time;
+   guint  percent_complete;
+-  GTime  completed_time;
++  time_t completed_time;
+   int    priority;
+ } CalendarTask;
+ 
diff -r e08bf304f500 -r dbfaba438a23 x11/gnome-panel/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/gnome-panel/patches/patch-af  Thu Mar 19 18:54:42 2009 +0000
@@ -0,0 +1,125 @@
+$NetBSD: patch-af,v 1.4 2009/03/19 18:54:42 drochner Exp $
+
+--- applets/clock/calendar-window.c.orig       2009-03-04 09:59:24.000000000 +0100
++++ applets/clock/calendar-window.c
+@@ -280,12 +280,12 @@ handle_tasks_changed (CalendarWindow *ca
+                                     TASK_COLUMN_UID,                   task->uid,
+                                     TASK_COLUMN_SUMMARY,               task->summary,
+                                     TASK_COLUMN_DESCRIPTION,           task->description,
+-                                    TASK_COLUMN_START_TIME,            task->start_time,
+-                                    TASK_COLUMN_DUE_TIME,              task->due_time,
++                                    TASK_COLUMN_START_TIME,            (gint64)task->start_time,



Home | Main Index | Thread Index | Old Index