From 9e6355fd34d08e68fa36701d16cf3cc1f5a80180 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 6 Jan 2020 17:01:40 +0100 Subject: [PATCH] Update to 3.0.7; Remove patch to fix ICalAttach handling of the icalattach native structure (fixed upstream) --- libical-3.0.6-ICalAttach.patch | 138 --------------------------------- libical.spec | 12 +-- sources | 2 +- 3 files changed, 7 insertions(+), 145 deletions(-) delete mode 100644 libical-3.0.6-ICalAttach.patch diff --git a/libical-3.0.6-ICalAttach.patch b/libical-3.0.6-ICalAttach.patch deleted file mode 100644 index 53cd306..0000000 --- a/libical-3.0.6-ICalAttach.patch +++ /dev/null @@ -1,138 +0,0 @@ -From 3e25fb01f0909308b87dfbd90ef53d54a8dc203f Mon Sep 17 00:00:00 2001 -From: Milan Crha -Date: Mon, 14 Oct 2019 13:45:02 +0200 -Subject: [PATCH 1/2] libical-glib: Fix ICalAttach handling of the icalattach - native structure - -The icalattach structure is specific, it has its own ref-counting, thus -let the ICalAttach wrapper depend on it, rather than depend on the owner -ICalProperty or ICalValue. This way the "owner" can be freed and the ICalAttach -will still hold valid structure. ---- - src/libical-glib/api/i-cal-attach.xml | 2 +- - src/libical-glib/tools/generator.c | 10 ++++++++++ - .../source-structure-boilerplate-template | 1 + - src/libical-glib/tools/xml-parser.c | 20 +++++++++++++++++++ - src/libical-glib/tools/xml-parser.h | 1 + - 6 files changed, 34 insertions(+), 2 deletions(-) - -diff --git a/src/libical-glib/api/i-cal-attach.xml b/src/libical-glib/api/i-cal-attach.xml -index c0c1e108..e4fcf0d2 100644 ---- a/src/libical-glib/api/i-cal-attach.xml -+++ b/src/libical-glib/api/i-cal-attach.xml -@@ -13,7 +13,7 @@ - You should have received a copy of the GNU Lesser General Public License - along with this library. If not, see . - --> -- -+ - - - -diff --git a/src/libical-glib/tools/generator.c b/src/libical-glib/tools/generator.c -index 712d9bc1..64a9f5ea 100644 ---- a/src/libical-glib/tools/generator.c -+++ b/src/libical-glib/tools/generator.c -@@ -911,6 +911,12 @@ void generate_code_from_template(FILE *in, FILE *out, Structure *structure, GHas - val = g_hash_table_lookup(table, buffer); - write_str(out, val); - val = NULL; -+ -+ if (g_strcmp0(buffer, "new_full_extraCode") == 0) -+ write_str(out, "\n "); -+ } else if (g_strcmp0(buffer, "new_full_extraCode") == 0) { -+ /* For simplicity, after lookup in the 'table', to -+ not force declaration of it in every .xml file */ - } else if (g_strcmp0(buffer, "structure_boilerplate") == 0) { - if (structure->native != NULL) - generate_header_structure_boilerplate(out, structure, table); -@@ -1266,6 +1272,10 @@ GHashTable *get_hash_table_from_structure(Structure *structure) - (void)g_hash_table_insert(table, (gchar *)"defaultNative", - g_strdup(structure->defaultNative)); - } -+ if (structure->new_full_extraCode && *structure->new_full_extraCode) { -+ (void)g_hash_table_insert(table, (gchar *)"new_full_extraCode", -+ g_strdup(structure->new_full_extraCode)); -+ } - } - - (void)g_hash_table_insert(table, (char *)"native", g_strdup(structure->native)); -diff --git a/src/libical-glib/tools/source-structure-boilerplate-template b/src/libical-glib/tools/source-structure-boilerplate-template -index ceddd505..77d20aae 100644 ---- a/src/libical-glib/tools/source-structure-boilerplate-template -+++ b/src/libical-glib/tools/source-structure-boilerplate-template -@@ -26,6 +26,7 @@ ${new_full} - ${native} *clone;^$$^!${isBare} - if (native == NULL) - return NULL;^$ -+ ${new_full_extraCode} - $^${isBare} - clone = g_new (${native}, 1); - *clone = native;^$ -diff --git a/src/libical-glib/tools/xml-parser.c b/src/libical-glib/tools/xml-parser.c -index e7b1b42f..c5520119 100644 ---- a/src/libical-glib/tools/xml-parser.c -+++ b/src/libical-glib/tools/xml-parser.c -@@ -27,6 +27,7 @@ Structure *structure_new() - structure->methods = NULL; - structure->isBare = FALSE; - structure->isPossibleGlobal = FALSE; -+ structure->new_full_extraCode = NULL; - structure->enumerations = NULL; - structure->destroyFunc = NULL; - structure->cloneFunc = NULL; -@@ -68,6 +69,7 @@ void structure_free(Structure * structure) - g_free(structure->destroyFunc); - g_free(structure->cloneFunc); - g_free(structure->defaultNative); -+ g_free(structure->new_full_extraCode); - g_hash_table_destroy(structure->dependencies); - g_free(structure); - } -@@ -251,6 +253,22 @@ void enumeration_free(Enumeration * enumeration) - g_free(enumeration); - } - -+static gchar *dup_attribute_value(xmlDocPtr doc, const xmlNode * list, int inLine) -+{ -+ xmlChar *xml_value; -+ gchar *glib_value; -+ -+ xml_value = xmlNodeListGetString(doc, list, inLine); -+ if (!xml_value) -+ return NULL; -+ -+ glib_value = g_strdup((const gchar *) xml_value); -+ -+ xmlFree(xml_value); -+ -+ return glib_value; -+} -+ - GList *get_list_from_string(const gchar * str) - { - gchar **ret; -@@ -530,6 +548,8 @@ gboolean parse_structure(xmlNode * node, Structure * structure) - structure->destroyFunc = (gchar *) xmlNodeListGetString(attr->doc, attr->children, 1); - } else if (xmlStrcmp(attr->name, (xmlChar *) "clone_func") == 0) { - structure->cloneFunc = (gchar *) xmlNodeListGetString(attr->doc, attr->children, 1); -+ } else if (xmlStrcmp(attr->name, (xmlChar *) "new_full_extra_code") == 0) { -+ structure->new_full_extraCode = dup_attribute_value(attr->doc, attr->children, 1); - } else if (xmlStrcmp(attr->name, (xmlChar *) "default_native") == 0) { - structure->defaultNative = (gchar *) xmlNodeListGetString(attr->doc, attr->children, 1); - } else if (xmlStrcmp(attr->name, (xmlChar *) "is_bare") == 0) { -diff --git a/src/libical-glib/tools/xml-parser.h b/src/libical-glib/tools/xml-parser.h -index 33527c0c..3313753f 100644 ---- a/src/libical-glib/tools/xml-parser.h -+++ b/src/libical-glib/tools/xml-parser.h -@@ -61,6 +61,7 @@ typedef struct Structure { - GList *methods; - gboolean isBare; - gboolean isPossibleGlobal; -+ gchar *new_full_extraCode; - GList *enumerations; - GHashTable *dependencies; - gchar *destroyFunc; --- -2.21.0 - diff --git a/libical.spec b/libical.spec index 4206067..18fd1fb 100644 --- a/libical.spec +++ b/libical.spec @@ -1,16 +1,13 @@ Summary: Reference implementation of the iCalendar data type and serialization format Name: libical -Version: 3.0.6 -Release: 3%{?dist} +Version: 3.0.7 +Release: 1%{?dist} License: LGPLv2 or MPLv2.0 URL: https://libical.github.io/libical/ Source: https://github.com/%{name}/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz Patch01: libical-3.0.3-load-builtin-timezone.patch -# https://github.com/libical/libical/pull/412 -Patch02: libical-3.0.6-ICalAttach.patch - BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake @@ -67,7 +64,6 @@ Development files needed for building things which link against %{name}-glib. %setup -q %patch01 -p1 -b .load-builtin-timezone -%patch02 -p1 -b .ICalAttach %build mkdir -p %{_target_platform} @@ -137,6 +133,10 @@ make test ARGS="-V" -C %{_target_platform} %{_datadir}/gtk-doc/html/%{name}-glib %changelog +* Mon Jan 06 2020 Milan Crha - 3.0.7-1 +- Update to 3.0.7 +- Remove patch to fix ICalAttach handling of the icalattach native structure (fixed upstream) + * Fri Nov 01 2019 Pete Walter - 3.0.6-3 - Rebuild for ICU 65 diff --git a/sources b/sources index 4c0737e..71ef84e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libical-3.0.6.tar.gz) = d1a3397071c2989983893e3bbaeb088f7cb9a3639dca39709e9422c334dd1e9a869bba9292a250f83eb2a5b6727bd91b73c8e420bd1814422d97aff9fc6b26fc +SHA512 (libical-3.0.7.tar.gz) = 4e1df3fad9c9df795da441243471d05168287519b6155b148b5aa28092ecac687626fa92713b280864a41f6ffc0c7fb43d2770fb1821396cb838e96e76d8d9d8