summaryrefslogtreecommitdiff
path: root/recipes/libmimedir
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/libmimedir
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/libmimedir')
-rw-r--r--recipes/libmimedir/files/gslist-fix.patch11
-rw-r--r--recipes/libmimedir/files/libmimedir-0.4.0-duration-wkst.patch258
-rw-r--r--recipes/libmimedir/files/mimedir-duration.diff77
-rw-r--r--recipes/libmimedir/files/mimedir-update.patch403
-rw-r--r--recipes/libmimedir/files/mimedir-write-sequence.patch51
-rw-r--r--recipes/libmimedir/libmimedir_0.0-20040307.bb25
-rw-r--r--recipes/libmimedir/libmimedir_0.3.1.bb27
-rw-r--r--recipes/libmimedir/libmimedir_0.4.2.bb19
-rw-r--r--recipes/libmimedir/libmimedir_svn.bb28
9 files changed, 899 insertions, 0 deletions
diff --git a/recipes/libmimedir/files/gslist-fix.patch b/recipes/libmimedir/files/gslist-fix.patch
new file mode 100644
index 0000000000..ef28ecdc53
--- /dev/null
+++ b/recipes/libmimedir/files/gslist-fix.patch
@@ -0,0 +1,11 @@
+--- /tmp/mimedir-attribute.c 2006-08-12 19:55:04.000000000 +0200
++++ libmimedir/mimedir/mimedir-attribute.c 2006-08-12 19:55:49.938306000 +0200
+@@ -1768,7 +1768,7 @@
+ }
+ break;
+ case ',':
+- g_slist_append (list, g_string_free (string, FALSE));
++ list = g_slist_append (list, g_string_free (string, FALSE));
+ string = g_string_new ("");
+ break;
+ case '\r':
diff --git a/recipes/libmimedir/files/libmimedir-0.4.0-duration-wkst.patch b/recipes/libmimedir/files/libmimedir-0.4.0-duration-wkst.patch
new file mode 100644
index 0000000000..10843182e9
--- /dev/null
+++ b/recipes/libmimedir/files/libmimedir-0.4.0-duration-wkst.patch
@@ -0,0 +1,258 @@
+diff -uNr libmimedir-0.4.0/bin/ical-dump.c libmimedir-0.4.0cvs20061111/bin/ical-dump.c
+--- libmimedir-0.4.0/bin/ical-dump.c 2005-09-01 17:36:27.000000000 +0200
++++ libmimedir-0.4.0cvs20061111/bin/ical-dump.c 2006-11-11 19:14:19.000000000 +0100
+@@ -144,7 +144,7 @@
+ print_component (MIMEDirVComponent *component)
+ {
+ gchar *s, *summary, *categories, *uid;
+- guint priority, seq;
++ guint priority, seq, duration;
+ MIMEDirDateTime *dtstart, *dtend, *due;
+ MIMEDirRecurrence *recur;
+
+@@ -161,6 +161,7 @@
+
+ "dtstart", &dtstart,
+ "dtend", &dtend,
++ "duration", &duration,
+ "due", &due,
+ "recurrence", &recur,
+
+@@ -207,6 +208,9 @@
+
+ }
+ }
++ if (duration) {
++ printf (_(" Duration: %ds\n"), duration);
++ }
+ if (due && mimedir_datetime_is_valid (due)) {
+ s = mimedir_datetime_to_string (due);
+ if (s) {
+diff -uNr libmimedir-0.4.0/mimedir/mimedir-recurrence.c libmimedir-0.4.0cvs20061111/mimedir/mimedir-recurrence.c
+--- libmimedir-0.4.0/mimedir/mimedir-recurrence.c 2005-10-08 08:46:36.000000000 +0200
++++ libmimedir-0.4.0cvs20061111/mimedir/mimedir-recurrence.c 2006-11-11 15:47:28.000000000 +0100
+@@ -56,7 +56,8 @@
+ PROP_COUNT,
+ PROP_INTERVAL,
+ PROP_UNIT,
+- PROP_UNITLIST
++ PROP_UNITLIST,
++ PROP_WKST
+ };
+
+ struct _MIMEDirRecurrencePriv {
+@@ -67,6 +68,7 @@
+
+ MIMEDirRecurrenceUnit unit;
+ gchar *units;
++ guint8 wkst;
+ };
+
+ static GObjectClass *parent_class = NULL;
+@@ -167,6 +169,50 @@
+ return -1;
+ }
+
++static const gchar *
++weekday_to_string (GDateWeekday weekday)
++{
++ switch (weekday) {
++ case G_DATE_MONDAY:
++ return "MO";
++ case G_DATE_TUESDAY:
++ return "TU";
++ case G_DATE_WEDNESDAY:
++ return "WE";
++ case G_DATE_THURSDAY:
++ return "TH";
++ case G_DATE_FRIDAY:
++ return "FR";
++ case G_DATE_SATURDAY:
++ return "SA";
++ case G_DATE_SUNDAY:
++ return "SU";
++ default:
++ g_return_val_if_reached (NULL);
++ }
++}
++
++static GDateWeekday
++string_to_weekday (const gchar *s)
++{
++ if (strcmp (s, "MO") == 0)
++ return G_DATE_MONDAY;
++ else if (strcmp (s, "TU") == 0)
++ return G_DATE_TUESDAY;
++ else if (strcmp (s, "WE") == 0)
++ return G_DATE_WEDNESDAY;
++ else if (strcmp (s, "TH") == 0)
++ return G_DATE_THURSDAY;
++ else if (strcmp (s, "FR") == 0)
++ return G_DATE_FRIDAY;
++ else if (strcmp (s, "SA") == 0)
++ return G_DATE_SATURDAY;
++ else if (strcmp (s, "SU") == 0)
++ return G_DATE_SUNDAY;
++ else
++ return G_DATE_BAD_WEEKDAY;
++}
++
+ /*
+ * Class and Object Management
+ */
+@@ -261,6 +307,14 @@
+ NULL,
+ G_PARAM_READWRITE);
+ g_object_class_install_property (gobject_class, PROP_UNITLIST, pspec);
++ pspec = g_param_spec_uint ("wkst",
++ _("Workweek start"),
++ _("The day on which the workweek starts"),
++ G_DATE_BAD_WEEKDAY,
++ G_DATE_SUNDAY,
++ G_DATE_BAD_WEEKDAY,
++ G_PARAM_READWRITE);
++ g_object_class_install_property (gobject_class, PROP_WKST, pspec);
+ }
+
+
+@@ -273,6 +327,7 @@
+ recurrence->priv = g_new0 (MIMEDirRecurrencePriv, 1);
+ recurrence->priv->freq = RECURRENCE_DAILY;
+ recurrence->priv->unit = RECURRENCE_UNIT_NONE;
++ recurrence->priv->wkst = G_DATE_BAD_WEEKDAY;
+ }
+
+
+@@ -335,6 +390,9 @@
+ case PROP_UNITLIST:
+ mimedir_utils_set_property_string (&priv->units, value);
+ break;
++ case PROP_WKST:
++ priv->wkst = g_value_get_uint (value);
++ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ break;
+@@ -375,6 +433,9 @@
+ case PROP_UNITLIST:
+ g_value_set_string (value, priv->units);
+ break;
++ case PROP_WKST:
++ g_value_set_uint (value, priv->wkst);
++ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+ return;
+@@ -512,6 +573,17 @@
+ g_object_set (G_OBJECT (recurrence), "unit", unit, NULL);
+ g_object_set (G_OBJECT (recurrence), "units", value, NULL);
+ }
++ else if (!strcasecmp (name, "WKST")) {
++ GDateWeekday weekday;
++
++ weekday = string_to_weekday (value);
++ if (!g_date_valid_weekday (weekday)) {
++ ret = FALSE;
++ break;
++ }
++
++ g_object_set (G_OBJECT (recurrence), "wkst", weekday, NULL);
++ }
+ else {
+ ret = FALSE;
+ break;
+@@ -571,5 +643,11 @@
+ g_string_append_printf (string, ";%s=%s", unit, priv->units);
+ }
+
++ if (g_date_valid_weekday (priv->wkst)) {
++ const gchar *weekday;
++ weekday = weekday_to_string (priv->wkst);
++ g_string_append_printf (string, ";WKST=%s", weekday);
++ }
++
+ return g_string_free (string, FALSE);
+ }
+
+--- libmimedir-0.4.0/mimedir/mimedir-vcomponent.c 2006-12-01 12:53:26.000000000 +0100
++++ libmimedir-0.4.0cvs20061111/mimedir/mimedir-vcomponent.c 2006-11-11 19:08:26.000000000 +0100
+@@ -908,6 +905,7 @@
+ const gchar *s;
+ gint duration = 0;
+ gboolean neg = FALSE;
++ gboolean dur_week = FALSE;
+
+ g_return_val_if_fail (error == NULL || *error == NULL, 0);
+
+@@ -939,48 +937,52 @@
+
+ if (s[0] == 'D' || s[0] == 'd')
+ duration = num * SECS_PER_DAY;
+- else if (s[0] == 'W' || s[0] == 'w')
++ else if (s[0] == 'W' || s[0] == 'w') {
+ duration = num * SECS_PER_WEEK;
+- else {
++ dur_week = TRUE;
++ } else {
+ g_set_error (error, MIMEDIR_ATTRIBUTE_ERROR, MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT, MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT_STR, "DURATION", name);
+ return 0;
+ }
+ s++;
+ }
+
+- if (s[0] == 'T' || s[0] == 't') {
+- GError *err = NULL;
+- guint num;
++ if ((s[0] == 'T' || s[0] == 't') && !dur_week) {
++ guint state = 0;
+
+ s++;
+
+- while (s[0] != '\0') {
++ while (state < 3) {
++ GError *err = NULL;
++ guint num;
++
+ num = mimedir_vcomponent_parse_number (name, "DURATION", &s, &err);
+ if (err) {
+ g_propagate_error (error, err);
+ return 0;
+ }
+-
+- switch (s[0]) {
+- case 'H':
+- s++;
++ if (s[0] == 'H' && state < 1) {
+ duration += num * SECS_PER_HOUR;
+- break;
+- case 'M':
+- s++;
++ state = 1;
++ } else if (s[0] == 'M' && state < 2) {
+ duration += num * SECS_PER_MINUTE;
+- break;
+- case 'S':
+- s++;
+- duration += num;
+- break;
+- default:
++ state = 2;
++ } else if (s[0] == 'S' && state < 3) {
++ duration += num ;
++ state = 3;
++ } else {
+ g_set_error (error, MIMEDIR_ATTRIBUTE_ERROR, MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT, MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT_STR, "DURATION", name);
+ return 0;
+ }
++ s++;
+ }
+ }
+
++ if (s[0] != '\0') {
++ g_set_error (error, MIMEDIR_ATTRIBUTE_ERROR, MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT, MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT_STR, "DURATION", name);
++ return 0;
++ }
++
+ return neg ? -duration : duration;
+ }
+
diff --git a/recipes/libmimedir/files/mimedir-duration.diff b/recipes/libmimedir/files/mimedir-duration.diff
new file mode 100644
index 0000000000..6f991f6aa2
--- /dev/null
+++ b/recipes/libmimedir/files/mimedir-duration.diff
@@ -0,0 +1,77 @@
+2006-05-10 Neal H. Walfield <neal@gnu.org>
+
+ * mimedir/mimedir-vcomponent.c
+ (mimedir_vcomponent_get_value_duration): Be more accepting when
+ parsing the DURATION field.
+
+
+--- libmimedir-gnome-0.3.1/mimedir/mimedir-vcomponent.c.orig 2005-11-03 18:04:21.000000000 +0100
++++ libmimedir-gnome-0.3.1/mimedir/mimedir-vcomponent.c 2006-05-10 14:17:24.000000000 +0200
+@@ -951,52 +951,33 @@ mimedir_vcomponent_get_value_duration (M
+
+ s++;
+
+- num = mimedir_vcomponent_parse_number (name, "DURATION", &s, &err);
+- if (err) {
+- g_propagate_error (error, err);
+- return 0;
+- }
+- if (s[0] != 'H') {
+- g_set_error (error, MIMEDIR_ATTRIBUTE_ERROR, MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT, MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT_STR, "DURATION", name);
+- return 0;
+- }
+- s++;
+- duration += num * SECS_PER_HOUR;
+-
+- if (s[0]) {
++ while (s[0] != '\0') {
+ num = mimedir_vcomponent_parse_number (name, "DURATION", &s, &err);
+ if (err) {
+ g_propagate_error (error, err);
+ return 0;
+ }
+- if (s[0] != 'M') {
+- g_set_error (error, MIMEDIR_ATTRIBUTE_ERROR, MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT, MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT_STR, "DURATION", name);
+- return 0;
+- }
+- s++;
+- duration += num * SECS_PER_MINUTE;
+- }
+
+- if (s[0]) {
+- num = mimedir_vcomponent_parse_number (name, "DURATION", &s, &err);
+- if (err) {
+- g_propagate_error (error, err);
+- return 0;
+- }
+- if (s[0] != 'S') {
++ switch (s[0]) {
++ case 'H':
++ s++;
++ duration += num * SECS_PER_HOUR;
++ break;
++ case 'M':
++ s++;
++ duration += num * SECS_PER_MINUTE;
++ break;
++ case 'S':
++ s++;
++ duration += num;
++ break;
++ default:
+ g_set_error (error, MIMEDIR_ATTRIBUTE_ERROR, MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT, MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT_STR, "DURATION", name);
+ return 0;
+ }
+- s++;
+- duration += num;
+ }
+ }
+
+- if (s[0] != '\0') {
+- g_set_error (error, MIMEDIR_ATTRIBUTE_ERROR, MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT, MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT_STR, "DURATION", name);
+- return 0;
+- }
+-
+ return neg ? -duration : duration;
+ }
+
diff --git a/recipes/libmimedir/files/mimedir-update.patch b/recipes/libmimedir/files/mimedir-update.patch
new file mode 100644
index 0000000000..f3be39eb53
--- /dev/null
+++ b/recipes/libmimedir/files/mimedir-update.patch
@@ -0,0 +1,403 @@
+diff -Nur libmimedir_orig/Makefile.am libmimedir/Makefile.am
+--- libmimedir_orig/Makefile.am 2002-08-15 15:36:01.000000000 +0200
++++ libmimedir/Makefile.am 2006-08-04 15:51:06.000000000 +0200
+@@ -5,7 +5,22 @@
+ mimedir-1.0.pc.in \
+ intltool-extract.in \
+ intltool-merge.in \
+- intltool-update.in
++ intltool-update.in \
++ debian/changelog \
++ debian/copyright \
++ debian/control \
++ debian/compat \
++ debian/rules \
++ debian/libmimedir0.files \
++ debian/libmimedir-dev.files
++
+
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = mimedir-1.0.pc
++
++deb: dist
++ -mkdir $(top_builddir)/debian-build
++ cd $(top_builddir)/debian-build && tar zxf ../$(top_builddir)/$(PACKAGE)-$(VERSION).tar.gz
++ cd $(top_builddir)/debian-build/$(PACKAGE)-$(VERSION) && dpkg-buildpackage -S -D -rfakeroot
++ cd $(top_builddir)/debian-build/$(PACKAGE)-$(VERSION) && dpkg-buildpackage -D -rfakeroot
++ -rm -rf $(top_builddir)/debian-build/$(PACKAGE)-$(VERSION)
+diff -Nur libmimedir_orig/configure.in libmimedir/configure.in
+--- libmimedir_orig/configure.in 2006-02-09 13:30:13.000000000 +0100
++++ libmimedir/configure.in 2006-08-04 15:51:06.000000000 +0200
+@@ -3,7 +3,7 @@
+ AC_INIT(MIME Directory Library, 0.4.0, mailto:srittau@jroger.in-berlin.de, libmimedir)
+ AC_PREREQ(2.53)
+ AC_CONFIG_SRCDIR(mimedir/mimedir-attribute.c)
+-AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
++AM_INIT_AUTOMAKE(libmimedir, AC_PACKAGE_VERSION)
+ AC_PROG_INTLTOOL
+ AM_CONFIG_HEADER(config.h)
+
+diff -Nur libmimedir_orig/mimedir/Makefile.am libmimedir/mimedir/Makefile.am
+--- libmimedir_orig/mimedir/Makefile.am 2002-12-19 16:21:27.000000000 +0100
++++ libmimedir/mimedir/Makefile.am 2006-08-04 15:56:36.000000000 +0200
+@@ -26,6 +26,7 @@
+ mimedir-period.c \
+ mimedir-profile.c \
+ mimedir-recurrence.c \
++ mimedir-recurrence-rule.c \
+ mimedir-utils.c \
+ mimedir-utils.h \
+ mimedir-valarm.c \
+@@ -52,6 +53,7 @@
+ mimedir-period.h \
+ mimedir-profile.h \
+ mimedir-recurrence.h \
++ mimedir-recurrence-rule.h \
+ mimedir-valarm.h \
+ mimedir-vcal.h \
+ mimedir-vcard.h \
+diff -Nur libmimedir_orig/mimedir/mimedir-attribute.c libmimedir/mimedir/mimedir-attribute.c
+--- libmimedir_orig/mimedir/mimedir-attribute.c 2006-01-01 04:38:29.000000000 +0100
++++ libmimedir/mimedir/mimedir-attribute.c 2006-08-04 15:51:06.000000000 +0200
+@@ -1417,7 +1417,7 @@
+ g_return_val_if_fail (parameter != NULL, FALSE);
+
+ p = mimedir_attribute_get_parameter (attribute, parameter);
+- if (p)
++ if (p && p->values)
+ return (gchar *) p->values->data;
+ else
+ return NULL;
+diff -Nur libmimedir_orig/mimedir/mimedir-recurrence-rule.c libmimedir/mimedir/mimedir-recurrence-rule.c
+--- libmimedir_orig/mimedir/mimedir-recurrence-rule.c 1970-01-01 01:00:00.000000000 +0100
++++ libmimedir/mimedir/mimedir-recurrence-rule.c 2006-08-04 15:52:39.000000000 +0200
+@@ -0,0 +1,171 @@
++/* RFC 2445 iCal Recurrence Rule Object
++ * Copyright (C) 2004 Phil Blundell <pb@nexus.co.uk>
++ *
++ * $Id: mimedir-recurrence.h,v 1.1 2002/08/28 04:57:12 srittau Exp $
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ */
++
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
++
++#include "mimedir-recurrence-rule.h"
++
++
++#ifndef _
++#define _(x) (dgettext(GETTEXT_PACKAGE, (x)))
++#endif
++
++
++static void mimedir_recurrence_rule_class_init (MIMEDirRecurrenceRuleClass *klass);
++static void mimedir_recurrence_rule_init (MIMEDirRecurrenceRule *recurrence);
++static void mimedir_recurrence_rule_dispose (GObject *object);
++
++
++struct _MIMEDirRecurrenceRulePriv {
++ MIMEDirRecurrenceFrequency frequency;
++ int interval;
++};
++
++static GObjectClass *parent_class = NULL;
++
++/*
++ * Class and Object Management
++ */
++
++GType
++mimedir_recurrence_rule_get_type (void)
++{
++ static GType mimedir_recurrence_rule_type = 0;
++
++ if (!mimedir_recurrence_rule_type) {
++ static const GTypeInfo mimedir_recurrence_rule_info = {
++ sizeof (MIMEDirRecurrenceRuleClass),
++ NULL, /* base_init */
++ NULL, /* base_finalize */
++ (GClassInitFunc) mimedir_recurrence_rule_class_init,
++ NULL, /* class_finalize */
++ NULL, /* class_data */
++ sizeof (MIMEDirRecurrenceRule),
++ 1, /* n_preallocs */
++ (GInstanceInitFunc) mimedir_recurrence_rule_init,
++ };
++
++ mimedir_recurrence_rule_type = g_type_register_static (G_TYPE_OBJECT,
++ "MIMEDirRecurrenceRule",
++ &mimedir_recurrence_rule_info,
++ 0);
++ }
++
++ return mimedir_recurrence_rule_type;
++}
++
++
++static void
++mimedir_recurrence_rule_class_init (MIMEDirRecurrenceRuleClass *klass)
++{
++ GObjectClass *gobject_class;
++
++ g_return_if_fail (klass != NULL);
++ g_return_if_fail (MIMEDIR_IS_RECURRENCE_RULE_CLASS (klass));
++
++ gobject_class = G_OBJECT_CLASS (klass);
++
++ gobject_class->dispose = mimedir_recurrence_rule_dispose;
++
++ parent_class = g_type_class_peek_parent (klass);
++}
++
++
++static void
++mimedir_recurrence_rule_init (MIMEDirRecurrenceRule *rule)
++{
++ MIMEDirRecurrenceRulePriv *priv;
++
++ g_return_if_fail (rule != NULL);
++ g_return_if_fail (MIMEDIR_IS_RECURRENCE_RULE (rule));
++
++ priv = g_new0 (MIMEDirRecurrenceRulePriv, 1);
++ rule->priv = priv;
++}
++
++
++static void
++mimedir_recurrence_rule_dispose (GObject *object)
++{
++ MIMEDirRecurrenceRule *rule;
++
++ g_return_if_fail (object != NULL);
++ g_return_if_fail (MIMEDIR_IS_RECURRENCE_RULE (object));
++
++ rule = MIMEDIR_RECURRENCE_RULE (object);
++
++ g_free (rule->priv);
++ rule->priv = NULL;
++
++ G_OBJECT_CLASS (parent_class)->dispose (object);
++}
++
++/*
++ * Public Methods
++ */
++
++/**
++ * mimedir_recurrence_rule_new:
++ *
++ * Creates a new iCal recurrence object.
++ *
++ * Return value: a new recurrence object
++ **/
++MIMEDirRecurrenceRule *
++mimedir_recurrence_rule_new (void)
++{
++ MIMEDirRecurrenceRule *rule;
++
++ rule = g_object_new (MIMEDIR_TYPE_RECURRENCE_RULE, NULL);
++
++ return rule;
++}
++
++/**
++ * mimedir_recurrence_rule_get_frequency:
++ *
++ * Retrieves the base frequency for the corresponding recurrence object.
++ *
++ * Return value: a #MIMEDirRecurrenceFrequency
++ **/
++MIMEDirRecurrenceFrequency
++mimedir_recurrence_rule_get_frequency (MIMEDirRecurrenceRule *rule)
++{
++ g_return_val_if_fail (MIMEDIR_IS_RECURRENCE_RULE (rule), 0);
++
++ return rule->priv->frequency;
++}
++
++/**
++ * mimedir_recurrence_rule_get_interval:
++ *
++ * Retrieves the interval for the corresponding recurrence object.
++ *
++ * Return value: an #int
++ **/
++int
++mimedir_recurrence_rule_get_interval (MIMEDirRecurrenceRule *rule)
++{
++ g_return_val_if_fail (MIMEDIR_IS_RECURRENCE_RULE (rule), 0);
++
++ return rule->priv->interval;
++}
+diff -Nur libmimedir_orig/mimedir/mimedir-recurrence-rule.h libmimedir/mimedir/mimedir-recurrence-rule.h
+--- libmimedir_orig/mimedir/mimedir-recurrence-rule.h 1970-01-01 01:00:00.000000000 +0100
++++ libmimedir/mimedir/mimedir-recurrence-rule.h 2006-08-04 15:52:39.000000000 +0200
+@@ -0,0 +1,74 @@
++/* RFC 2445 iCal Recurrence Rule Object
++ * Copyright (C) 2004 Phil Blundell <pb@nexus.co.uk>
++ *
++ * $Id: mimedir-recurrence.h,v 1.1 2002/08/28 04:57:12 srittau Exp $
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ */
++
++#ifndef __MIMEDIR_RECURRENCE_RULE_H__
++#define __MIMEDIR_RECURRENCE_RULE_H__
++
++#include <glib.h>
++#include <glib-object.h>
++
++#include "mimedir/mimedir-datetime.h"
++
++#define MIMEDIR_TYPE_RECURRENCE_RULE (mimedir_recurrence_get_type())
++#define MIMEDIR_RECURRENCE_RULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIMEDIR_TYPE_RECURRENCE_RULE, MIMEDirRecurrenceRule))
++#define MIMEDIR_RECURRENCE_RULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIMEDIR_TYPE_RECURRENCE_RULE, MIMEDirRecurrenceRuleClass))
++#define MIMEDIR_IS_RECURRENCE_RULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIMEDIR_TYPE_RECURRENCE_RULE))
++#define MIMEDIR_IS_RECURRENCE_RULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MIMEDIR_TYPE_RECURRENCE_RULE))
++
++typedef struct _MIMEDirRecurrenceRule MIMEDirRecurrenceRule;
++typedef struct _MIMEDirRecurrenceRulePriv MIMEDirRecurrenceRulePriv;
++typedef struct _MIMEDirRecurrenceRuleClass MIMEDirRecurrenceRuleClass;
++
++typedef enum {
++ MIMEDIR_RECURRENCE_RULE_SECONDLY,
++ MIMEDIR_RECURRENCE_RULE_MINUTELY,
++ MIMEDIR_RECURRENCE_RULE_HOURLY,
++ MIMEDIR_RECURRENCE_RULE_DAILY,
++ MIMEDIR_RECURRENCE_RULE_WEEKLY,
++ MIMEDIR_RECURRENCE_RULE_MONTHLY,
++ MIMEDIR_RECURRENCE_RULE_YEARLY,
++} MIMEDirRecurrenceFrequency;
++
++struct _MIMEDirRecurrenceRule
++{
++ GObject parent;
++
++ MIMEDirRecurrenceRulePriv *priv;
++};
++
++struct _MIMEDirRecurrenceRuleClass
++{
++ GObjectClass parent_class;
++};
++
++MIMEDirRecurrenceFrequency mimedir_recurrence_rule_get_frequency (MIMEDirRecurrenceRule *);
++int mimedir_recurrence_rule_get_interval (MIMEDirRecurrenceRule *);
++int mimedir_recurrence_rule_get_count (MIMEDirRecurrenceRule *);
++MIMEDirDateTime *mimedir_recurrence_rule_get_end_date (MIMEDirRecurrenceRule *);
++
++void mimedir_recurrence_rule_set (MIMEDirRecurrenceRule *,
++ MIMEDirRecurrenceFrequency freq,
++ int interval);
++
++GType mimedir_recurrence_rule_get_type (void);
++MIMEDirRecurrenceRule *mimedir_recurrence_rule_new (void);
++
++#endif
++
+diff -Nur libmimedir_orig/mimedir/mimedir-vcomponent.c libmimedir/mimedir/mimedir-vcomponent.c
+--- libmimedir_orig/mimedir/mimedir-vcomponent.c 2005-11-26 16:40:20.000000000 +0100
++++ libmimedir/mimedir/mimedir-vcomponent.c 2006-08-04 15:51:06.000000000 +0200
+@@ -951,52 +951,33 @@
+
+ s++;
+
+- num = mimedir_vcomponent_parse_number (name, "DURATION", &s, &err);
+- if (err) {
+- g_propagate_error (error, err);
+- return 0;
+- }
+- if (s[0] != 'H') {
+- g_set_error (error, MIMEDIR_ATTRIBUTE_ERROR, MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT, MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT_STR, "DURATION", name);
+- return 0;
+- }
+- s++;
+- duration += num * SECS_PER_HOUR;
+-
+- if (s[0]) {
++ while (s[0] != '\0') {
+ num = mimedir_vcomponent_parse_number (name, "DURATION", &s, &err);
+ if (err) {
+ g_propagate_error (error, err);
+ return 0;
+ }
+- if (s[0] != 'M') {
+- g_set_error (error, MIMEDIR_ATTRIBUTE_ERROR, MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT, MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT_STR, "DURATION", name);
+- return 0;
+- }
+- s++;
+- duration += num * SECS_PER_MINUTE;
+- }
+
+- if (s[0]) {
+- num = mimedir_vcomponent_parse_number (name, "DURATION", &s, &err);
+- if (err) {
+- g_propagate_error (error, err);
+- return 0;
+- }
+- if (s[0] != 'S') {
++ switch (s[0]) {
++ case 'H':
++ s++;
++ duration += num * SECS_PER_HOUR;
++ break;
++ case 'M':
++ s++;
++ duration += num * SECS_PER_MINUTE;
++ break;
++ case 'S':
++ s++;
++ duration += num;
++ break;
++ default:
+ g_set_error (error, MIMEDIR_ATTRIBUTE_ERROR, MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT, MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT_STR, "DURATION", name);
+ return 0;
+ }
+- s++;
+- duration += num;
+ }
+ }
+
+- if (s[0] != '\0') {
+- g_set_error (error, MIMEDIR_ATTRIBUTE_ERROR, MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT, MIMEDIR_ATTRIBUTE_ERROR_INVALID_FORMAT_STR, "DURATION", name);
+- return 0;
+- }
+-
+ return neg ? -duration : duration;
+ }
+
+@@ -2996,7 +2977,7 @@
+ g_free (priv->location);
+ g_free (priv->location_alt);
+ priv->location = g_strdup (location);
+- priv->location_alt = g_strdup (uri);
++ priv->location_alt = uri ? g_strdup (uri) : NULL;
+ }
+
+ /**
diff --git a/recipes/libmimedir/files/mimedir-write-sequence.patch b/recipes/libmimedir/files/mimedir-write-sequence.patch
new file mode 100644
index 0000000000..b03c5d9ca7
--- /dev/null
+++ b/recipes/libmimedir/files/mimedir-write-sequence.patch
@@ -0,0 +1,51 @@
+? mimedir/.deps
+? mimedir/.libs
+? mimedir/libmimedir.la
+? mimedir/mimedir-attachment.lo
+? mimedir/mimedir-attendee.lo
+? mimedir/mimedir-attribute.lo
+? mimedir/mimedir-datetime.lo
+? mimedir/mimedir-init.lo
+? mimedir/mimedir-marshal.lo
+? mimedir/mimedir-period.lo
+? mimedir/mimedir-profile.lo
+? mimedir/mimedir-recurrence.lo
+? mimedir/mimedir-utils.lo
+? mimedir/mimedir-valarm.lo
+? mimedir/mimedir-vcal.lo
+? mimedir/mimedir-vcard-address.lo
+? mimedir/mimedir-vcard-email.lo
+? mimedir/mimedir-vcard-phone.lo
+? mimedir/mimedir-vcard.lo
+? mimedir/mimedir-vcomponent.lo
+? mimedir/mimedir-vevent.lo
+? mimedir/mimedir-vfreebusy.lo
+? mimedir/mimedir-vjournal.lo
+? mimedir/mimedir-vtimezone.lo
+? mimedir/mimedir-vtodo.lo
+Index: mimedir/mimedir-vcomponent.c
+===================================================================
+RCS file: /cvs/gnome/libmimedir/mimedir/mimedir-vcomponent.c,v
+retrieving revision 1.28
+diff -B -b -u -r1.28 mimedir-vcomponent.c
+--- mimedir/mimedir-vcomponent.c 26 Nov 2005 15:40:20 -0000 1.28
++++ mimedir/mimedir-vcomponent.c 7 Aug 2006 12:20:01 -0000
+@@ -456,7 +456,7 @@
+ _("Sequence"),
+ _("Sequence number"),
+ 0, G_MAXINT, 0,
+- G_PARAM_READABLE);
++ G_PARAM_READWRITE);
+ g_object_class_install_property (gobject_class, PROP_SEQ, pspec);
+ }
+
+@@ -684,6 +684,9 @@
+ g_object_ref (G_OBJECT (priv->last_modified));
+ break;
+ }
++ case PROP_SEQ:
++ priv->sequence = g_value_get_uint (value);
++ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
diff --git a/recipes/libmimedir/libmimedir_0.0-20040307.bb b/recipes/libmimedir/libmimedir_0.0-20040307.bb
new file mode 100644
index 0000000000..98c410a736
--- /dev/null
+++ b/recipes/libmimedir/libmimedir_0.0-20040307.bb
@@ -0,0 +1,25 @@
+DESCRIPTION = "RFC2425 MIME Directory Profile library, supporting vCard and iCalendar"
+SECTION = "libs"
+PRIORITY = "optional"
+LICENSE = "LGPL"
+DEPENDS = "intltool-native"
+PR = "r1"
+
+SRC_URI = "${GPE_MIRROR}/libmimedir-snapshot-20040307.tar.gz"
+S = "${WORKDIR}/libmimedir"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--disable-gtk-doc"
+
+headers = "mimedir-attachment.h mimedir-attendee.h mimedir-attribute.h mimedir-datetime.h mimedir-init.h mimedir-period.h mimedir-profile.h mimedir-recurrence-rule.h mimedir-recurrence.h mimedir-valarm.h mimedir-vcal.h mimedir-vcard-address.h mimedir-vcard-email.h mimedir-vcard-phone.h mimedir-vcard.h mimedir-vcomponent.h mimedir-vevent.h mimedir-vfreebusy.h mimedir-vjournal.h mimedir-vtimezone.h mimedir-vtodo.h mimedir.h"
+
+do_stage() {
+ install -d ${STAGING_INCDIR}/mimedir-1.0/mimedir
+ for i in ${headers}; do
+ install -m 0644 ${S}/mimedir/$i ${STAGING_INCDIR}/mimedir-1.0/mimedir/$i
+ done
+
+ oe_libinstall -so -C mimedir libmimedir-0.2 ${STAGING_LIBDIR}
+ ln -sf libmimedir-0.2.so ${STAGING_LIBDIR}/libmimedir.so
+}
diff --git a/recipes/libmimedir/libmimedir_0.3.1.bb b/recipes/libmimedir/libmimedir_0.3.1.bb
new file mode 100644
index 0000000000..2429b798c2
--- /dev/null
+++ b/recipes/libmimedir/libmimedir_0.3.1.bb
@@ -0,0 +1,27 @@
+DESCRIPTION = "RFC2425 MIME Directory Profile library, supporting vCard and iCalendar"
+SECTION = "libs"
+PRIORITY = "optional"
+LICENSE = "LGPL"
+DEPENDS = "intltool-native"
+PR = "r4"
+
+# 0.3.1 has at least 2 known bugs which may lead to data corruption/loss:
+# 1. Arbitrary cutting off of NOTE field during parsing.
+# 2. Parsing only one value from CATEGORIES field.
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI = "http://www.rittau.org/mimedir/${P}.tar.gz \
+ file://mimedir-duration.diff;patch=1"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--disable-gtk-doc"
+
+do_stage() {
+autotools_stage_all
+}
+
+
+PACKAGES += "libmimedir-utils"
+FILES_libmimedir-utils = "${bindir}"
+FILES_${PN} = "${libdir}/*.so.*"
diff --git a/recipes/libmimedir/libmimedir_0.4.2.bb b/recipes/libmimedir/libmimedir_0.4.2.bb
new file mode 100644
index 0000000000..2f7cc4c3e8
--- /dev/null
+++ b/recipes/libmimedir/libmimedir_0.4.2.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "RFC2425 MIME Directory Profile library, supporting vCard and iCalendar"
+SECTION = "libs"
+PRIORITY = "optional"
+LICENSE = "LGPL"
+DEPENDS = "intltool-native"
+PR = "r0"
+
+inherit autotools pkgconfig gpe
+
+EXTRA_OECONF = "--disable-gtk-doc"
+
+do_stage() {
+ autotools_stage_all
+}
+
+
+PACKAGES += "libmimedir-utils"
+FILES_libmimedir-utils = "${bindir}"
+FILES_${PN} = "${libdir}/*.so.*"
diff --git a/recipes/libmimedir/libmimedir_svn.bb b/recipes/libmimedir/libmimedir_svn.bb
new file mode 100644
index 0000000000..8bd7cc47ca
--- /dev/null
+++ b/recipes/libmimedir/libmimedir_svn.bb
@@ -0,0 +1,28 @@
+DESCRIPTION = "RFC2425 MIME Directory Profile library, supporting vCard and iCalendar"
+SECTION = "libs"
+PRIORITY = "optional"
+LICENSE = "LGPL"
+DEPENDS = "intltool-native"
+
+DEFAULT_PREFERENCE = "-1"
+
+PV = "0.4.1+svn${SRCDATE}"
+PR = "r1"
+
+SRC_URI = "${GPE_SVN}"
+
+S = "${WORKDIR}/libmimedir"
+
+inherit autotools pkgconfig lib_package
+
+EXTRA_OECONF = "--disable-gtk-doc"
+
+do_stage() {
+ autotools_stage_all
+}
+
+PACKAGES += "libmimedir-utils"
+
+FILES_libmimedir-utils = "${bindir}"
+FILES_${PN} = "${libdir}/*.so.*"
+