aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/libmrss
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/libmrss
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
downloadopenembedded-709c4d66e0b107ca606941b988bad717c0b45d9b.tar.gz
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/libmrss')
-rw-r--r--recipes/libmrss/files/better-parse-url-r0.patch97
-rw-r--r--recipes/libmrss/libmrss_0.17.2.bb15
2 files changed, 112 insertions, 0 deletions
diff --git a/recipes/libmrss/files/better-parse-url-r0.patch b/recipes/libmrss/files/better-parse-url-r0.patch
new file mode 100644
index 0000000000..5909eee173
--- /dev/null
+++ b/recipes/libmrss/files/better-parse-url-r0.patch
@@ -0,0 +1,97 @@
+upstream: mailed to bakunin_at_autistici_dot_org by Laibsch
+status: committed in upstream CVS on Feb 26th 2008
+comment: API addition to not manually setup the CURL connection and still
+be able to get the transfered feed and save it to secondary storage. done
+by zecke for the Openmoko RSS reader.
+
+
+Index: libmrss-0.17.2/src/mrss.h
+===================================================================
+--- libmrss-0.17.2.orig/src/mrss.h 2007-04-02 14:42:55.000000000 +0200
++++ libmrss-0.17.2/src/mrss.h 2007-05-19 20:56:08.000000000 +0200
+@@ -523,6 +523,22 @@
+ mrss_t ** mrss,
+ mrss_options_t * options);
+
++/**
++ * Like the previous function but you take ownership of the downloaded buffer in case of success
++ * \param url The url to be parsed
++ * \param mrss the pointer to your data struct
++ * \param options a pointer to a options data struct
++ * \param feed_content a pointer to the buffer with the document. This is not NULL terminated
++ * \param feed_size the size of the buffer above
++ * \return the error code
++ */
++mrss_error_t mrss_parse_url_and_transfer_buffer
++ (char * url,
++ mrss_t ** mrss,
++ mrss_options_t * options,
++ char ** feed_content,
++ int * feed_size);
++
+ /**
+ * Parses a file and creates the data struct of the feed RSS url
+ * \param file The file to be parsed
+Index: libmrss-0.17.2/src/mrss_parser.c
+===================================================================
+--- libmrss-0.17.2.orig/src/mrss_parser.c 2007-05-19 20:47:08.000000000 +0200
++++ libmrss-0.17.2/src/mrss_parser.c 2007-05-19 20:56:37.000000000 +0200
+@@ -1075,13 +1075,20 @@
+ mrss_error_t
+ mrss_parse_url (char *url, mrss_t ** ret)
+ {
+- return mrss_parse_url_with_options (url, ret, NULL);
++ return mrss_parse_url_and_transfer_buffer (url, ret, NULL, NULL, NULL);
+ }
+
+ mrss_error_t
+ mrss_parse_url_with_options (char *url, mrss_t ** ret,
+ mrss_options_t * options)
+ {
++ return mrss_parse_url_and_transfer_buffer (url, ret, options, NULL, NULL);
++}
++
++mrss_error_t
++mrss_parse_url_and_transfer_buffer (char *url, mrss_t ** ret,
++ mrss_options_t * options, char **download_buffer, int *download_size)
++{
+ nxml_t *doc;
+ mrss_error_t err;
+ char *buffer;
+@@ -1117,7 +1124,8 @@
+
+ if (nxml_parse_buffer (doc, buffer, size) != NXML_OK)
+ {
+- free (buffer);
++ if (!download_buffer)
++ free (buffer);
+ nxml_free (doc);
+
+ return MRSS_ERR_PARSER;
+@@ -1127,7 +1135,8 @@
+ {
+ if (!((*ret)->file = strdup (url)))
+ {
+- free (buffer);
++ if (!download_buffer)
++ free (buffer);
+
+ mrss_free (*ret);
+ nxml_free (doc);
+@@ -1138,9 +1147,15 @@
+ (*ret)->size = size;
+ }
+
+- free (buffer);
++ if (!download_buffer)
++ free (buffer);
+ nxml_free (doc);
+
++ /* transfer ownership */
++ if (download_buffer)
++ *download_buffer = buffer;
++ if (download_size)
++ *download_size = size;
+ return err;
+ }
+
diff --git a/recipes/libmrss/libmrss_0.17.2.bb b/recipes/libmrss/libmrss_0.17.2.bb
new file mode 100644
index 0000000000..f536468479
--- /dev/null
+++ b/recipes/libmrss/libmrss_0.17.2.bb
@@ -0,0 +1,15 @@
+DESCRIPTION = "mRSS is a C library for parsing, writing and creating RSS (0.91, 0.92, 1.0, 2.0) files or streams"
+LICENSE = "LGPL"
+HOMEPAGE = "http://www2.autistici.org/bakunin/codes.php"
+
+DEPENDS = "libnxml curl"
+PR = "r1"
+
+inherit autotools pkgconfig
+
+SRC_URI = "http://www2.autistici.org/bakunin/libmrss/libmrss-${PV}.tar.gz \
+ file://better-parse-url-r0.patch;patch=1 "
+
+do_stage() {
+ autotools_stage_all
+}