summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2006-05-10 12:26:48 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-05-10 12:26:48 +0000
commit4a7622d3f3944296c5c702f0c7cae167a2b777cc (patch)
treed393cdefb32ae990fb8158eca7b87a9c9654e9ae /packages
parent22e48b2859280d7dbb51581c8315dc6d6bd0cd38 (diff)
parentb589eb58df1d20b27bc9e05fb25eb74f66a9affe (diff)
merge of 314e9e28fab0e5aff2e8901741180ce581d7e1fa
and 9ef3a8d33b02c1d8a4cc2ad6eaee9326b019c33a
Diffstat (limited to 'packages')
-rw-r--r--packages/libmimedir/files/.mtn2git_empty0
-rw-r--r--packages/libmimedir/files/mimedir-duration.diff77
-rw-r--r--packages/libmimedir/libmimedir_0.3.1.bb5
3 files changed, 80 insertions, 2 deletions
diff --git a/packages/libmimedir/files/.mtn2git_empty b/packages/libmimedir/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/libmimedir/files/.mtn2git_empty
diff --git a/packages/libmimedir/files/mimedir-duration.diff b/packages/libmimedir/files/mimedir-duration.diff
new file mode 100644
index 0000000000..6f991f6aa2
--- /dev/null
+++ b/packages/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/packages/libmimedir/libmimedir_0.3.1.bb b/packages/libmimedir/libmimedir_0.3.1.bb
index 21fb6c7d8f..7739b45184 100644
--- a/packages/libmimedir/libmimedir_0.3.1.bb
+++ b/packages/libmimedir/libmimedir_0.3.1.bb
@@ -3,11 +3,12 @@ SECTION = "libs"
PRIORITY = "optional"
LICENSE = "LGPL"
DEPENDS = "intltool-native"
-PR = "r1"
+PR = "r2"
DEFAULT_PREFERENCE = 1
-SRC_URI = "http://www.rittau.org/mimedir/${P}.tar.gz"
+SRC_URI = "http://www.rittau.org/mimedir/${P}.tar.gz \
+ file://mimedir-duration.diff;patch=1"
inherit autotools pkgconfig