Hello community,

here is the log from the commit of package sratom for openSUSE:Factory checked 
in at 2013-09-11 13:44:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/sratom (Old)
 and      /work/SRC/openSUSE:Factory/.sratom.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "sratom"

Changes:
--------
--- /work/SRC/openSUSE:Factory/sratom/sratom.changes    2012-08-31 
10:02:05.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.sratom.new/sratom.changes       2013-09-11 
13:44:28.000000000 +0200
@@ -1,0 +2,13 @@
+Thu Sep  5 20:54:44 UTC 2013 - [email protected]
+
+- Update to 0.4.2
+  * Fix serialisation of nested tuples
+  * Fix memory leaks
+  * Use new sord API to clean up and shrink code
+  * Disable timestamps in HTML documentation for reproducible build
+  * Update to waf 1.7.9 and autowaf r90 (install docs to versioned directory)
+- Remove sratom-0.4.0-build_compare.patch, applied upstream
+- The minimum serd version is now 0.12.0
+- The documentation directory is now versioned
+
+-------------------------------------------------------------------

Old:
----
  sratom-0.4.0-build_compare.patch
  sratom-0.4.0.tar.bz2

New:
----
  sratom-0.4.2.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ sratom.spec ++++++
--- /var/tmp/diff_new_pack.Q1F3G7/_old  2013-09-11 13:44:29.000000000 +0200
+++ /var/tmp/diff_new_pack.Q1F3G7/_new  2013-09-11 13:44:29.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package sratom
 #
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,21 +19,20 @@
 %define soname 0
 
 Name:           sratom
-Version:        0.4.0
+Version:        0.4.2
 Release:        0
 Summary:        A library for serialising LV2 atoms to/from RDF
 License:        ISC
 Group:          System/Libraries
 Url:            http://drobilla.net/software/sratom/
 Source0:        http://download.drobilla.net/sratom-%{version}.tar.bz2
-Patch0:         sratom-0.4.0-build_compare.patch
 BuildRequires:  doxygen
 BuildRequires:  graphviz
 BuildRequires:  pkg-config
 BuildRequires:  python-base
 BuildRequires:  pkgconfig(lv2) >= 1.0.0
 BuildRequires:  pkgconfig(serd-0) >= 0.14.0
-BuildRequires:  pkgconfig(sord-0) >= 0.8.0
+BuildRequires:  pkgconfig(sord-0) >= 0.12.0
 
 %description
 A library for serialising LV2 atoms to/from RDF, particularly the Turtle 
syntax.
@@ -55,7 +54,6 @@
 
 %prep
 %setup -q
-%patch0
 
 %build
 export CFLAGS='%{optflags}'
@@ -85,7 +83,7 @@
 %{_libdir}/libsratom-0.so
 %{_includedir}/sratom-0/
 %{_libdir}/pkgconfig/sratom-0.pc
-%{_defaultdocdir}/sratom/
+%{_defaultdocdir}/sratom-0/
 %{_mandir}/man3/*
 
 %changelog

++++++ sratom-0.4.0.tar.bz2 -> sratom-0.4.2.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sratom-0.4.0/NEWS new/sratom-0.4.2/NEWS
--- old/sratom-0.4.0/NEWS       2012-08-23 07:11:09.000000000 +0200
+++ new/sratom-0.4.2/NEWS       2013-02-18 17:59:00.000000000 +0100
@@ -1,3 +1,13 @@
+sratom (0.4.2) stable;
+
+  * Fix serialisation of nested tuples
+  * Fix memory leaks
+  * Use new sord API to clean up and shrink code
+  * Disable timestamps in HTML documentation for reproducible build
+  * Update to waf 1.7.9 and autowaf r90 (install docs to versioned directory)
+
+ -- David Robillard <[email protected]>  Mon, 18 Feb 2013 11:17:01 -0500
+
 sratom (0.4.0) stable;
 
   * Correctly read objects with several rdf:type properties
@@ -13,4 +23,3 @@
   * Initial release
 
  -- David Robillard <[email protected]>  Wed, 18 Apr 2012 15:14:11 -0400
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sratom-0.4.0/doc/reference.doxygen.in 
new/sratom-0.4.2/doc/reference.doxygen.in
--- old/sratom-0.4.0/doc/reference.doxygen.in   2012-08-04 21:44:30.000000000 
+0200
+++ new/sratom-0.4.2/doc/reference.doxygen.in   2012-09-09 09:13:07.000000000 
+0200
@@ -939,7 +939,7 @@
 # page will contain the date and time when the page was generated. Setting
 # this to NO can help when comparing the output of multiple runs.
 
-HTML_TIMESTAMP         = YES
+HTML_TIMESTAMP         = NO
 
 # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
 # documentation will contain sections that can be hidden and shown after the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sratom-0.4.0/sratom/sratom.h 
new/sratom-0.4.2/sratom/sratom.h
--- old/sratom-0.4.0/sratom/sratom.h    2012-05-22 04:11:45.000000000 +0200
+++ new/sratom-0.4.2/sratom/sratom.h    2012-11-22 02:40:56.000000000 +0100
@@ -130,7 +130,7 @@
 */
 SRATOM_API
 void
-sratom_set_object_mode(Sratom*        sratom,
+sratom_set_object_mode(Sratom*          sratom,
                        SratomObjectMode object_mode);
 
 /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sratom-0.4.0/sratom.pc.in 
new/sratom-0.4.2/sratom.pc.in
--- old/sratom-0.4.0/sratom.pc.in       2012-03-26 06:17:16.000000000 +0200
+++ new/sratom-0.4.2/sratom.pc.in       2012-09-10 20:11:33.000000000 +0200
@@ -6,6 +6,6 @@
 Name: Sratom
 Version: @SRATOM_VERSION@
 Description: LV2 Atom RDF serialisation library
-Requires: serd-0 sord-0 lv2
-Libs: -L${libdir} -lsratom-@SRATOM_MAJOR_VERSION@
+Requires: lv2 @PKG_serd_0@ @PKG_sord_0@
+Libs: -L${libdir} -l@LIB_SRATOM@
 Cflags: -I${includedir}/sratom-@SRATOM_MAJOR_VERSION@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sratom-0.4.0/src/sratom.c 
new/sratom-0.4.2/src/sratom.c
--- old/sratom-0.4.0/src/sratom.c       2012-08-09 03:26:39.000000000 +0200
+++ new/sratom-0.4.2/src/sratom.c       2013-02-18 18:37:57.000000000 +0100
@@ -14,6 +14,8 @@
   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */
 
+#define __STDC_LIMIT_MACROS 1
+
 #include <assert.h>
 #include <ctype.h>
 #include <stdio.h>
@@ -89,6 +91,7 @@
 void
 sratom_free(Sratom* sratom)
 {
+       serd_node_free(&sratom->base_uri);
        free(sratom);
 }
 
@@ -183,7 +186,11 @@
        if (subject && predicate) {
                sratom->write_statement(sratom->handle, 
*flags|SERD_ANON_O_BEGIN, NULL,
                                        subject, predicate, node, NULL, NULL);
+               // Start abbreviating object properties
                *flags |= SERD_ANON_CONT;
+
+               // Object is in a list, stop list abbreviating if necessary
+               *flags &= ~SERD_LIST_CONT;
        }
        if (type) {
                SerdNode p = serd_node_from_string(SERD_URI, NS_RDF "type");
@@ -228,6 +235,7 @@
        } else if (type_urid == sratom->forge.Chunk) {
                datatype = serd_node_from_string(SERD_URI, NS_XSD 
"base64Binary");
                object   = serd_node_new_blob(body, size, true);
+               new_node = true;
        } else if (type_urid == sratom->forge.Literal) {
                const LV2_Atom_Literal_Body* lit = (const 
LV2_Atom_Literal_Body*)body;
                const uint8_t*         str = USTR(lit + 1);
@@ -474,26 +482,10 @@
 
        serd_writer_free(writer);
        serd_env_free(env);
+       serd_node_free(&base);
        return (char*)serd_chunk_sink_finish(&str);
 }
 
-static const SordNode*
-get_object(SordModel*      model,
-           const SordNode* subject,
-           const SordNode* predicate)
-{
-       const SordNode* object = NULL;
-       SordQuad        q      = { subject, predicate, 0, 0 };
-       SordIter*       i      = sord_find(model, q);
-       if (!sord_iter_end(i)) {
-               SordQuad quad;
-               sord_iter_get(i, quad);
-               object = quad[SORD_OBJECT];
-       }
-       sord_iter_free(i);
-       return object;
-}
-
 static void
 read_list_value(Sratom*         sratom,
                 LV2_Atom_Forge* forge,
@@ -502,12 +494,14 @@
                 const SordNode* node,
                 ReadMode        mode)
 {
-       const SordNode* first = get_object(model, node, 
sratom->nodes.rdf_first);
-       const SordNode* rest  = get_object(model, node, sratom->nodes.rdf_rest);
-       if (first && rest) {
-               read_node(sratom, forge, world, model, first, mode);
-               read_list_value(sratom, forge, world, model, rest, mode);
+       SordNode* fst = sord_get(model, node, sratom->nodes.rdf_first, NULL, 
NULL);
+       SordNode* rst = sord_get(model, node, sratom->nodes.rdf_rest, NULL, 
NULL);
+       if (fst && rst) {
+               read_node(sratom, forge, world, model, fst, mode);
+               read_list_value(sratom, forge, world, model, rst, mode);
        }
+       sord_node_free(world, rst);
+       sord_node_free(world, fst);
 }
 
 static void
@@ -636,8 +630,10 @@
                        lv2_atom_forge_urid(forge, map->map(map->handle, str));
                }
        } else {
-               const SordNode* type  = get_object(model, node, 
sratom->nodes.rdf_type);
-               const SordNode* value = get_object(model, node, 
sratom->nodes.rdf_value);
+               SordNode* type = sord_get(
+                       model, node, sratom->nodes.rdf_type, NULL, NULL);
+               SordNode* value = sord_get(
+                       model, node, sratom->nodes.rdf_value, NULL, NULL);
 
                const uint8_t* type_uri  = NULL;
                uint32_t       type_urid = 0;
@@ -648,13 +644,14 @@
 
                LV2_Atom_Forge_Frame frame = { 0, 0 };
                if (mode == MODE_SEQUENCE) {
-                       const SordNode* frame_time = get_object(
-                               model, node, sratom->nodes.atom_frameTime);
+                       SordNode* frame_time = sord_get(
+                               model, node, sratom->nodes.atom_frameTime, 
NULL, NULL);
                        const char* frame_time_str = frame_time
                                ? (const char*)sord_node_get_string(frame_time)
                                : "";
                        lv2_atom_forge_frame_time(forge, 
serd_strtod(frame_time_str, NULL));
                        read_node(sratom, forge, world, model, value, 
MODE_BODY);
+                       sord_node_free(world, frame_time);
                } else if (type_urid == sratom->forge.Tuple) {
                        lv2_atom_forge_tuple(forge, &frame);
                        read_list_value(sratom, forge, world, model, value, 
MODE_BODY);
@@ -662,8 +659,8 @@
                        lv2_atom_forge_sequence_head(forge, &frame, 0);
                        read_list_value(sratom, forge, world, model, value, 
MODE_SEQUENCE);
                } else if (type_urid == sratom->forge.Vector) {
-                       const SordNode* child_type_node = get_object(
-                               model, node, sratom->nodes.atom_childType);
+                       SordNode* child_type_node = sord_get(
+                               model, node, sratom->nodes.atom_childType, 
NULL, NULL);
                        uint32_t child_type = map->map(
                                map->handle, (const 
char*)sord_node_get_string(child_type_node));
                        uint32_t child_size = atom_size(sratom, child_type);
@@ -671,6 +668,7 @@
                                lv2_atom_forge_vector_head(forge, &frame, 
child_size, child_type);
                                read_list_value(sratom, forge, world, model, 
value, MODE_BODY);
                        }
+                       sord_node_free(world, child_type_node);
                } else if (value && 
sord_node_equals(sord_node_get_datatype(value),
                                                     
sratom->nodes.xsd_base64Binary)) {
                        size_t         vlen = 0;
@@ -691,6 +689,8 @@
                if (frame.ref) {
                        lv2_atom_forge_pop(forge, &frame);
                }
+               sord_node_free(world, value);
+               sord_node_free(world, type);
        }
 }
 
@@ -764,16 +764,13 @@
                        &sratom->forge, sratom_forge_sink, sratom_forge_deref, 
&out);
                if (subject && predicate) {
                        SordNode* p = sord_node_from_serd_node(world, env, 
predicate, 0, 0);
-                       SordQuad  q = { s, p, 0, 0 };
-                       SordIter* i = sord_find(model, q);
-                       if (!sord_iter_end(i)) {
-                               SordQuad result;
-                               sord_iter_get(i, result);
-                               sratom_read(sratom, &sratom->forge, world, 
model, result[SORD_OBJECT]);
+                       SordNode* o = sord_get(model, s, p, NULL, NULL);
+                       if (o) {
+                               sratom_read(sratom, &sratom->forge, world, 
model, o);
+                               sord_node_free(world, o);
                        } else {
                                fprintf(stderr, "Failed to find node\n");
                        }
-                       sord_iter_free(i);
                } else {
                        sratom_read(sratom, &sratom->forge, world, model, s);
                }
@@ -785,6 +782,7 @@
        serd_env_free(env);
        sord_free(model);
        sord_world_free(world);
+       serd_node_free(&base);
 
        return (LV2_Atom*)out.buf;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sratom-0.4.0/tests/sratom_test.c 
new/sratom-0.4.2/tests/sratom_test.c
--- old/sratom-0.4.0/tests/sratom_test.c        2012-08-09 03:24:30.000000000 
+0200
+++ new/sratom-0.4.2/tests/sratom_test.c        2013-01-22 04:57:06.000000000 
+0100
@@ -105,8 +105,9 @@
        LV2_URID eg_blob    = urid_map(NULL, "http://example.org/n-blob";);
        LV2_URID eg_blank   = urid_map(NULL, "http://example.org/o-blank";);
        LV2_URID eg_tuple   = urid_map(NULL, "http://example.org/p-tuple";);
-       LV2_URID eg_vector  = urid_map(NULL, "http://example.org/q-vector";);
-       LV2_URID eg_seq     = urid_map(NULL, "http://example.org/r-seq";);
+       LV2_URID eg_rectup  = urid_map(NULL, "http://example.org/q-rectup";);
+       LV2_URID eg_vector  = urid_map(NULL, "http://example.org/r-vector";);
+       LV2_URID eg_seq     = urid_map(NULL, "http://example.org/s-seq";);
 
        uint8_t buf[1024];
        lv2_atom_forge_set_buffer(&forge, buf, sizeof(buf));
@@ -203,6 +204,19 @@
        lv2_atom_forge_bool(&forge, true);
        lv2_atom_forge_pop(&forge, &tuple_frame);
 
+       // eg_rectup = "foo",true,("bar",false)
+       lv2_atom_forge_property_head(&forge, eg_rectup, 0);
+       LV2_Atom_Forge_Frame rectup_frame;
+       lv2_atom_forge_tuple(&forge, &rectup_frame);
+       lv2_atom_forge_string(&forge, "foo", strlen("foo"));
+       lv2_atom_forge_bool(&forge, true);
+       LV2_Atom_Forge_Frame subrectup_frame;
+       lv2_atom_forge_tuple(&forge, &subrectup_frame);
+       lv2_atom_forge_string(&forge, "bar", strlen("bar"));
+       lv2_atom_forge_bool(&forge, false);
+       lv2_atom_forge_pop(&forge, &subrectup_frame);
+       lv2_atom_forge_pop(&forge, &rectup_frame);
+
        // eg_vector = (Vector<Int32>)1,2,3,4
        lv2_atom_forge_property_head(&forge, eg_vector, 0);
        int32_t elems[] = { 1, 2, 3, 4 };
Files old/sratom-0.4.0/waf and new/sratom-0.4.2/waf differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sratom-0.4.0/wscript new/sratom-0.4.2/wscript
--- old/sratom-0.4.0/wscript    2012-08-23 07:08:17.000000000 +0200
+++ new/sratom-0.4.2/wscript    2013-02-18 22:33:24.000000000 +0100
@@ -1,28 +1,21 @@
 #!/usr/bin/env python
 import os
 import subprocess
-
-from waflib.extras import autowaf as autowaf
 import waflib.Options as Options
+import waflib.extras.autowaf as autowaf
 
-# Version of this package (even if built as a child)
-SRATOM_VERSION       = '0.4.0'
-SRATOM_MAJOR_VERSION = '0'
-
-# Library version (UNIX style major, minor, micro)
+# Library and package version (UNIX style major, minor, micro)
 # major increment <=> incompatible changes
 # minor increment <=> compatible changes (additions)
 # micro increment <=> no interface changes
-# Sratom uses the same version number for both library and package
-SRATOM_LIB_VERSION = SRATOM_VERSION
+SRATOM_VERSION       = '0.4.2'
+SRATOM_MAJOR_VERSION = '0'
 
-# Variables for 'waf dist'
-APPNAME = 'sratom'
-VERSION = SRATOM_VERSION
-
-# Mandatory variables
-top = '.'
-out = 'build'
+# Mandatory waf variables
+APPNAME = 'sratom'        # Package name for waf dist
+VERSION = SRATOM_VERSION  # Package version for waf dist
+top     = '.'             # Source directory
+out     = 'build'         # Build directory
 
 def options(opt):
     opt.load('compiler_c')
@@ -53,19 +46,21 @@
                       define_name='HAVE_GCOV',
                       mandatory=False)
 
-    autowaf.check_pkg(conf, 'lv2', atleast_version='1.0.0', uselib_store='LV2')
+    autowaf.check_pkg(conf, 'lv2', uselib_store='LV2',
+                      atleast_version='1.0.0', mandatory=True)
     autowaf.check_pkg(conf, 'serd-0', uselib_store='SERD',
                       atleast_version='0.14.0', mandatory=True)
     autowaf.check_pkg(conf, 'sord-0', uselib_store='SORD',
-                      atleast_version='0.8.0', mandatory=True)
+                      atleast_version='0.12.0', mandatory=True)
 
     autowaf.define(conf, 'SRATOM_VERSION', SRATOM_VERSION)
+    autowaf.set_lib_env(conf, 'sratom', SRATOM_VERSION)
     conf.write_config_header('sratom_config.h', remove=False)
 
     autowaf.display_msg(conf, "Unit tests", str(conf.env.BUILD_TESTS))
     print('')
 
-lib_source = [ 'src/sratom.c' ]
+lib_source = ['src/sratom.c']
 
 def build(bld):
     # C Headers
@@ -94,7 +89,7 @@
                   lib             = libs,
                   name            = 'libsratom',
                   target          = 'sratom-%s' % SRATOM_MAJOR_VERSION,
-                  vnum            = SRATOM_LIB_VERSION,
+                  vnum            = SRATOM_VERSION,
                   install_path    = '${LIBDIR}',
                   defines         = defines + ['SRATOM_SHARED', 
'SRATOM_INTERNAL'],
                   cflags          = libflags)
@@ -109,7 +104,7 @@
                   lib             = libs,
                   name            = 'libsratom_static',
                   target          = 'sratom-%s' % SRATOM_MAJOR_VERSION,
-                  vnum            = SRATOM_LIB_VERSION,
+                  vnum            = SRATOM_VERSION,
                   install_path    = '${LIBDIR}',
                   defines         = defines + ['SRATOM_INTERNAL'])
         autowaf.use_lib(bld, obj, 'SERD SORD LV2')

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to