From bf2a3a665167e5b25f8d47d013b5a6170e4c166b Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Sat, 19 May 2007 19:17:02 +0000 Subject: packages/libmrss: Update to mrss 0.17.2 - Drop the atom-right-date.patch as this was applied upstream - Add a new method that helps the OpenMoko RSS Reader to cache feeds. - Update the checksum, the diff of 0.17.1 to 0.17.2 looked sane --- packages/libmrss/files/atom-right-date.patch | 15 ---- packages/libmrss/files/better-parse-url-r0.patch | 90 ++++++++++++++++++++++++ packages/libmrss/libmrss_0.17.1.bb | 15 ---- packages/libmrss/libmrss_0.17.2.bb | 15 ++++ 4 files changed, 105 insertions(+), 30 deletions(-) delete mode 100644 packages/libmrss/files/atom-right-date.patch create mode 100644 packages/libmrss/files/better-parse-url-r0.patch delete mode 100644 packages/libmrss/libmrss_0.17.1.bb create mode 100644 packages/libmrss/libmrss_0.17.2.bb (limited to 'packages') diff --git a/packages/libmrss/files/atom-right-date.patch b/packages/libmrss/files/atom-right-date.patch deleted file mode 100644 index ba231b2ab4..0000000000 --- a/packages/libmrss/files/atom-right-date.patch +++ /dev/null @@ -1,15 +0,0 @@ -tm_mon goes from 0-11 written dates from 1-12. It is too late to consider security -here. The worst that can happen is that tm_mon == 0 gets negative but I assume -glibc to do range checking. -Index: libmrss-0.17.1/src/mrss_parser.c -=================================================================== ---- libmrss-0.17.1.orig/src/mrss_parser.c 2007-04-08 02:42:23.000000000 +0200 -+++ libmrss-0.17.1/src/mrss_parser.c 2007-04-08 02:43:37.000000000 +0200 -@@ -150,6 +150,7 @@ - { - char datebuf[256]; - stm.tm_year -= 1900; -+ stm.tm_mon -= 1; - - if (!data->c_locale - && !(data->c_locale = newlocale (LC_ALL_MASK, "C", NULL))) diff --git a/packages/libmrss/files/better-parse-url-r0.patch b/packages/libmrss/files/better-parse-url-r0.patch new file mode 100644 index 0000000000..94a78110a2 --- /dev/null +++ b/packages/libmrss/files/better-parse-url-r0.patch @@ -0,0 +1,90 @@ +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/packages/libmrss/libmrss_0.17.1.bb b/packages/libmrss/libmrss_0.17.1.bb deleted file mode 100644 index 6476ee58c6..0000000000 --- a/packages/libmrss/libmrss_0.17.1.bb +++ /dev/null @@ -1,15 +0,0 @@ -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://atom-right-date.patch;patch=1 " - -do_stage() { - autotools_stage_all -} diff --git a/packages/libmrss/libmrss_0.17.2.bb b/packages/libmrss/libmrss_0.17.2.bb new file mode 100644 index 0000000000..f536468479 --- /dev/null +++ b/packages/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 +} -- cgit v1.2.3