openSUSE Commits
Threads by month
- ----- 2025 -----
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
March 2016
- 1 participants
- 1605 discussions
Hello community,
here is the log from the commit of package gnote for openSUSE:Factory checked in at 2016-03-31 13:02:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gnote (Old)
and /work/SRC/openSUSE:Factory/.gnote.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gnote"
Changes:
--------
--- /work/SRC/openSUSE:Factory/gnote/gnote.changes 2015-12-03 13:32:39.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.gnote.new/gnote.changes 2016-03-31 13:02:40.000000000 +0200
@@ -1,0 +2,24 @@
+Sat Mar 26 12:18:17 UTC 2016 - zaitor(a)opensuse.org
+
+- Update to version 3.20.0:
+ + Text menu now uses popover.
+ + Updated translations.
+- Bump soname following upstream changes.
+- Add a define _gnote_version and set it to 3.20, make future
+ soname bumps easier to deal with.
+
+-------------------------------------------------------------------
+Mon Feb 1 08:31:40 UTC 2016 - dimstar(a)opensuse.org
+
+- Update to version 3.19.0:
+ + GTK+ 3.16 is required.
+ + Gtkmm 3.18 is required.
+ + C++11 is required.
+ + configure option --with-x11-support was removed.
+ + Use popover for gear menu.
+ + Updated translations.
+- Drop pkgconfig(x11) BuildRequires: no longer supported.
+- Drop --with-x11-support and --with-cxx11-support configure
+ parameters: no longer recognized.
+
+-------------------------------------------------------------------
Old:
----
gnote-3.18.1.tar.xz
New:
----
gnote-3.20.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gnote.spec ++++++
--- /var/tmp/diff_new_pack.FyYqqF/_old 2016-03-31 13:02:41.000000000 +0200
+++ /var/tmp/diff_new_pack.FyYqqF/_new 2016-03-31 13:02:41.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package gnote
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,19 +15,20 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+%define _gnote_version 3.20
Name: gnote
-Version: 3.18.1
+Version: 3.20.0
Release: 0
Summary: A Port of Tomboy to C++
License: GPL-3.0+
Group: Productivity/Text/Editors
Url: http://live.gnome.org/Gnote
-Source: http://download.gnome.org/sources/gnote/3.18/%{name}-%{version}.tar.xz
+Source: http://download.gnome.org/sources/gnote/3.20/%{name}-%{version}.tar.xz
BuildRequires: boost-devel >= 1.34
BuildRequires: fdupes
BuildRequires: gcc-c++
-BuildRequires: gtkmm3-devel >= 3.10
+BuildRequires: gtkmm3-devel >= 3.18
BuildRequires: intltool
BuildRequires: libuuid-devel
BuildRequires: libxslt-devel
@@ -37,7 +38,6 @@
BuildRequires: pkgconfig(gtkspell3-3.0) >= 3.0.0
BuildRequires: pkgconfig(libsecret-1) >= 0.8
BuildRequires: pkgconfig(libxml-2.0)
-BuildRequires: pkgconfig(x11)
Recommends: %{name}-lang
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%glib2_gsettings_schema_requires
@@ -66,7 +66,7 @@
translation-update-upstream
%build
-%configure --disable-static --with-x11-support --with-cxx11-support
+%configure --disable-static
make %{?_smp_mflags}
%install
@@ -97,7 +97,7 @@
%{_bindir}/gnote
%{_libdir}/gnote/
# Splitting does not make sense as it's just a lib for gnote itself (and it's plugins)
-%{_libdir}/libgnote-3.18.so*
+%{_libdir}/libgnote-%{_gnote_version}.so*
%{_libdir}/libgnote.so
%{_datadir}/applications/gnote.desktop
%{_datadir}/glib-2.0/schemas/org.gnome.gnote.gschema.xml
++++++ gnote-3.18.1.tar.xz -> gnote-3.20.0.tar.xz ++++++
++++ 44923 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package ghc-js-jquery for openSUSE:Factory checked in at 2016-03-31 13:02:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-js-jquery (Old)
and /work/SRC/openSUSE:Factory/.ghc-js-jquery.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-js-jquery"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-js-jquery/ghc-js-jquery.changes 2016-03-01 10:20:52.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-js-jquery.new/ghc-js-jquery.changes 2016-03-31 13:02:39.000000000 +0200
@@ -1,0 +2,5 @@
+Fri Mar 25 08:10:49 UTC 2016 - mimi.vx(a)gmail.com
+
+- update to 1.12.2
+
+-------------------------------------------------------------------
Old:
----
js-jquery-1.12.1.tar.gz
New:
----
js-jquery-1.12.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-js-jquery.spec ++++++
--- /var/tmp/diff_new_pack.ZidlfF/_old 2016-03-31 13:02:39.000000000 +0200
+++ /var/tmp/diff_new_pack.ZidlfF/_new 2016-03-31 13:02:39.000000000 +0200
@@ -19,7 +19,7 @@
%global pkg_name js-jquery
Name: ghc-js-jquery
-Version: 1.12.1
+Version: 1.12.2
Release: 0
Summary: Obtain minified jQuery code
License: MIT
++++++ js-jquery-1.12.1.tar.gz -> js-jquery-1.12.2.tar.gz ++++++
++++ 22114 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package ghc-cmark for openSUSE:Factory checked in at 2016-03-31 13:02:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-cmark (Old)
and /work/SRC/openSUSE:Factory/.ghc-cmark.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-cmark"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-cmark/ghc-cmark.changes 2016-02-05 00:31:25.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-cmark.new/ghc-cmark.changes 2016-03-31 13:02:37.000000000 +0200
@@ -1,0 +2,7 @@
+Tue Mar 29 06:55:28 UTC 2016 - mimi.vx(a)gmail.com
+
+- update to 0.5.2
+* Add flag to allow building with an installed libcmark (Jens Petersen).
+* Updated to libcmark 0.25.2.
+
+-------------------------------------------------------------------
Old:
----
cmark-0.5.1.tar.gz
New:
----
cmark-0.5.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-cmark.spec ++++++
--- /var/tmp/diff_new_pack.TiilDK/_old 2016-03-31 13:02:38.000000000 +0200
+++ /var/tmp/diff_new_pack.TiilDK/_new 2016-03-31 13:02:38.000000000 +0200
@@ -21,7 +21,7 @@
%bcond_with tests
Name: ghc-cmark
-Version: 0.5.1
+Version: 0.5.2
Release: 0
Summary: Fast, accurate CommonMark (Markdown) parser and renderer
License: BSD-3-Clause and BSD-2-Clause and MIT
++++++ cmark-0.5.1.tar.gz -> cmark-0.5.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.5.1/README.md new/cmark-0.5.2/README.md
--- old/cmark-0.5.1/README.md 2016-01-23 06:14:38.000000000 +0100
+++ new/cmark-0.5.2/README.md 2016-03-26 21:36:02.000000000 +0100
@@ -3,8 +3,8 @@
This package provides Haskell bindings for [libcmark], the reference
parser for [CommonMark], a fully specified variant of Markdown.
-It includes sources for [libcmark] (version 0.23.0, implementing
-version 0.23 of the spec) and does not require prior installation of
+It includes sources for [libcmark] (version 0.25.2, implementing
+version 0.25 of the spec) and does not require prior installation of
the C library.
cmark provides the following advantages over existing Markdown
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.5.1/cbits/blocks.c new/cmark-0.5.2/cbits/blocks.c
--- old/cmark-0.5.1/cbits/blocks.c 2016-01-23 06:14:38.000000000 +0100
+++ new/cmark-0.5.2/cbits/blocks.c 2016-03-26 21:36:02.000000000 +0100
@@ -1,3 +1,10 @@
+/**
+ * Block parsing implementation.
+ *
+ * For a high-level overview of the block parsing process,
+ * see http://spec.commonmark.org/0.24/#phase-1-block-structure
+ */
+
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
@@ -17,12 +24,20 @@
#define CODE_INDENT 4
#define TAB_STOP 4
+#ifndef MIN
+#define MIN(x, y) ((x < y) ? x : y)
+#endif
+
#define peek_at(i, n) (i)->data[n]
-static inline bool S_is_line_end_char(char c) {
+static CMARK_INLINE bool S_is_line_end_char(char c) {
return (c == '\n' || c == '\r');
}
+static CMARK_INLINE bool S_is_space_or_tab(char c) {
+ return (c == ' ' || c == '\t');
+}
+
static void S_parser_feed(cmark_parser *parser, const unsigned char *buffer,
size_t len, bool eof);
@@ -70,10 +85,12 @@
parser->first_nonspace_column = 0;
parser->indent = 0;
parser->blank = false;
+ parser->partially_consumed_tab = false;
parser->curline = line;
parser->last_line_length = 0;
parser->linebuf = buf;
parser->options = options;
+ parser->last_buffer_ended_with_cr = false;
return parser;
}
@@ -110,7 +127,7 @@
return true;
}
-static inline bool can_contain(cmark_node_type parent_type,
+static CMARK_INLINE bool can_contain(cmark_node_type parent_type,
cmark_node_type child_type) {
return (parent_type == CMARK_NODE_DOCUMENT ||
parent_type == CMARK_NODE_BLOCK_QUOTE ||
@@ -118,15 +135,32 @@
(parent_type == CMARK_NODE_LIST && child_type == CMARK_NODE_ITEM));
}
-static inline bool accepts_lines(cmark_node_type block_type) {
+static CMARK_INLINE bool accepts_lines(cmark_node_type block_type) {
return (block_type == CMARK_NODE_PARAGRAPH ||
block_type == CMARK_NODE_HEADING ||
block_type == CMARK_NODE_CODE_BLOCK);
}
-static void add_line(cmark_node *node, cmark_chunk *ch, bufsize_t offset) {
+static CMARK_INLINE bool contains_inlines(cmark_node_type block_type) {
+ return (block_type == CMARK_NODE_PARAGRAPH ||
+ block_type == CMARK_NODE_HEADING);
+}
+
+static void add_line(cmark_node *node, cmark_chunk *ch, cmark_parser *parser) {
+ int chars_to_tab;
+ int i;
assert(node->open);
- cmark_strbuf_put(&node->string_content, ch->data + offset, ch->len - offset);
+ if (parser->partially_consumed_tab) {
+ parser->offset += 1; // skip over tab
+ // add space characters:
+ chars_to_tab = TAB_STOP - (parser->column % TAB_STOP);
+ for (i = 0; i < chars_to_tab; i++) {
+ cmark_strbuf_putc(&node->string_content, ' ');
+ }
+ }
+ cmark_strbuf_put(&node->string_content,
+ ch->data + parser->offset,
+ ch->len - parser->offset);
}
static void remove_trailing_blank_lines(cmark_strbuf *ln) {
@@ -336,8 +370,7 @@
while ((ev_type = cmark_iter_next(iter)) != CMARK_EVENT_DONE) {
cur = cmark_iter_get_node(iter);
if (ev_type == CMARK_EVENT_ENTER) {
- if (cur->type == CMARK_NODE_PARAGRAPH ||
- cur->type == CMARK_NODE_HEADING) {
+ if (contains_inlines(cur->type)) {
cmark_parse_inlines(cur, refmap, options);
}
}
@@ -474,6 +507,11 @@
const unsigned char *end = buffer + len;
static const uint8_t repl[] = {239, 191, 189};
+ if (parser->last_buffer_ended_with_cr && *buffer == '\n') {
+ // skip NL if last buffer ended with CR ; see #117
+ buffer++;
+ }
+ parser->last_buffer_ended_with_cr = false;
while (buffer < end) {
const unsigned char *eol;
bufsize_t chunk_len;
@@ -514,8 +552,11 @@
buffer += chunk_len;
// skip over line ending characters:
- if (buffer < end && *buffer == '\r')
+ if (buffer < end && *buffer == '\r') {
buffer++;
+ if (buffer == end)
+ parser->last_buffer_ended_with_cr = true;
+ }
if (buffer < end && *buffer == '\n')
buffer++;
}
@@ -532,13 +573,15 @@
n--;
// Check for a space before the final #s:
- if (n != orig_n && n >= 0 &&
- (peek_at(ch, n) == ' ' || peek_at(ch, n) == '\t')) {
+ if (n != orig_n && n >= 0 && S_is_space_or_tab(peek_at(ch, n))) {
ch->len = n;
cmark_chunk_rtrim(ch);
}
}
+// Find first nonspace character from current offset, setting
+// parser->first_nonspace, parser->first_nonspace_column,
+// parser->indent, and parser->blank. Does not advance parser->offset.
static void S_find_first_nonspace(cmark_parser *parser, cmark_chunk *input) {
char c;
int chars_to_tab = TAB_STOP - (parser->column % TAB_STOP);
@@ -566,17 +609,37 @@
parser->blank = S_is_line_end_char(peek_at(input, parser->first_nonspace));
}
+// Advance parser->offset and parser->column. parser->offset is the
+// byte position in input; parser->column is a virtual column number
+// that takes into account tabs. (Multibyte characters are not taken
+// into account, because the Markdown line prefixes we are interested in
+// analyzing are entirely ASCII.) The count parameter indicates
+// how far to advance the offset. If columns is true, then count
+// indicates a number of columns; otherwise, a number of bytes.
+// If advancing a certain number of columns partially consumes
+// a tab character, parser->partially_consumed_tab is set to true.
static void S_advance_offset(cmark_parser *parser, cmark_chunk *input,
bufsize_t count, bool columns) {
char c;
int chars_to_tab;
+ int chars_to_advance;
while (count > 0 && (c = peek_at(input, parser->offset))) {
if (c == '\t') {
chars_to_tab = TAB_STOP - (parser->column % TAB_STOP);
- parser->column += chars_to_tab;
- parser->offset += 1;
- count -= (columns ? chars_to_tab : 1);
+ if (columns) {
+ parser->partially_consumed_tab = chars_to_tab > count;
+ chars_to_advance = MIN(count, chars_to_tab);
+ parser->column += chars_to_advance;
+ parser->offset += (parser->partially_consumed_tab ? 0 : 1);
+ count -= chars_to_advance;
+ } else {
+ parser->partially_consumed_tab = false;
+ parser->column += chars_to_tab;
+ parser->offset += 1;
+ count -= 1;
+ }
} else {
+ parser->partially_consumed_tab = false;
parser->offset += 1;
parser->column += 1; // assume ascii; block starts are ascii
count -= 1;
@@ -584,263 +647,314 @@
}
}
-static void S_process_line(cmark_parser *parser, const unsigned char *buffer,
- bufsize_t bytes) {
- cmark_node *last_matched_container;
- bufsize_t matched = 0;
- int lev = 0;
- int i;
- cmark_list *data = NULL;
- bool all_matched = true;
- cmark_node *container;
- bool indented;
- cmark_chunk input;
- bool maybe_lazy;
-
- if (parser->options & CMARK_OPT_VALIDATE_UTF8) {
- cmark_utf8proc_check(parser->curline, buffer, bytes);
- } else {
- cmark_strbuf_put(parser->curline, buffer, bytes);
- }
- // ensure line ends with a newline:
- if (bytes == 0 || !S_is_line_end_char(parser->curline->ptr[bytes - 1])) {
- cmark_strbuf_putc(parser->curline, '\n');
- }
- parser->offset = 0;
- parser->column = 0;
- parser->blank = false;
-
- input.data = parser->curline->ptr;
- input.len = parser->curline->size;
-
- // container starts at the document root.
- container = parser->root;
+static bool S_last_child_is_open(cmark_node *container) {
+ return container->last_child && container->last_child->open;
+}
- parser->line_number++;
+static bool parse_block_quote_prefix(cmark_parser *parser,
+ cmark_chunk *input)
+{
+ bool res = false;
+ bufsize_t matched = 0;
- // for each containing node, try to parse the associated line start.
- // bail out on failure: container will point to the last matching node.
+ matched =
+ parser->indent <= 3 && peek_at(input, parser->first_nonspace) == '>';
+ if (matched) {
+
+ S_advance_offset(parser, input, parser->indent + 1, true);
+
+ if (S_is_space_or_tab(peek_at(input, parser->offset))) {
+ S_advance_offset(parser, input, 1, true);
+ }
+
+ res = true;
+ }
+ return res;
+}
+
+static bool parse_node_item_prefix(cmark_parser *parser,
+ cmark_chunk *input,
+ cmark_node *container)
+{
+ bool res = false;
+
+ if (parser->indent >=
+ container->as.list.marker_offset + container->as.list.padding) {
+ S_advance_offset(parser, input, container->as.list.marker_offset +
+ container->as.list.padding,
+ true);
+ res = true;
+ } else if (parser->blank && container->first_child != NULL) {
+ // if container->first_child is NULL, then the opening line
+ // of the list item was blank after the list marker; in this
+ // case, we are done with the list item.
+ S_advance_offset(parser, input,
+ parser->first_nonspace - parser->offset, false);
+ res = true;
+ }
+ return res;
+}
+
+static bool parse_code_block_prefix(cmark_parser *parser,
+ cmark_chunk *input,
+ cmark_node *container,
+ bool *should_continue)
+{
+ bool res = false;
+
+ if (!container->as.code.fenced) { // indented
+ if (parser->indent >= CODE_INDENT) {
+ S_advance_offset(parser, input, CODE_INDENT, true);
+ res = true;
+ } else if (parser->blank) {
+ S_advance_offset(parser, input,
+ parser->first_nonspace - parser->offset, false);
+ res = true;
+ }
+ } else { // fenced
+ bufsize_t matched = 0;
+
+ if (parser->indent <= 3 && (peek_at(input, parser->first_nonspace) ==
+ container->as.code.fence_char)) {
+ matched = scan_close_code_fence(input, parser->first_nonspace);
+ }
+
+ if (matched >= container->as.code.fence_length) {
+ // closing fence - and since we're at
+ // the end of a line, we can stop processing it:
+ *should_continue = false;
+ S_advance_offset(parser, input, matched, false);
+ parser->current = finalize(parser, container);
+ } else {
+ // skip opt. spaces of fence parser->offset
+ int i = container->as.code.fence_offset;
- while (container->last_child && container->last_child->open) {
- container = container->last_child;
+ while (i > 0 && S_is_space_or_tab(peek_at(input, parser->offset))) {
+ S_advance_offset(parser, input, 1, true);
+ i--;
+ }
+ res = true;
+ }
+ }
- S_find_first_nonspace(parser, &input);
+ return res;
+}
- if (container->type == CMARK_NODE_BLOCK_QUOTE) {
- matched =
- parser->indent <= 3 && peek_at(&input, parser->first_nonspace) == '>';
- if (matched) {
- S_advance_offset(parser, &input, parser->indent + 1, true);
- if (peek_at(&input, parser->offset) == ' ')
- parser->offset++;
- } else {
- all_matched = false;
- }
+static bool parse_html_block_prefix(cmark_parser *parser,
+ cmark_node *container)
+{
+ bool res = false;
+ int html_block_type = container->as.html_block_type;
- } else if (container->type == CMARK_NODE_ITEM) {
- if (parser->indent >=
- container->as.list.marker_offset + container->as.list.padding) {
- S_advance_offset(parser, &input, container->as.list.marker_offset +
- container->as.list.padding,
- true);
- } else if (parser->blank && container->first_child != NULL) {
- // if container->first_child is NULL, then the opening line
- // of the list item was blank after the list marker; in this
- // case, we are done with the list item.
- S_advance_offset(parser, &input,
- parser->first_nonspace - parser->offset, false);
- } else {
- all_matched = false;
- }
+ assert(html_block_type >= 1 && html_block_type <= 7);
+ switch (html_block_type) {
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ // these types of blocks can accept blanks
+ res = true;
+ break;
+ case 6:
+ case 7:
+ res = !parser->blank;
+ break;
+ }
- } else if (container->type == CMARK_NODE_CODE_BLOCK) {
+ return res;
+}
- if (!container->as.code.fenced) { // indented
- if (parser->indent >= CODE_INDENT) {
- S_advance_offset(parser, &input, CODE_INDENT, true);
- } else if (parser->blank) {
- S_advance_offset(parser, &input,
- parser->first_nonspace - parser->offset, false);
- } else {
- all_matched = false;
- }
- } else { // fenced
- matched = 0;
- if (parser->indent <= 3 && (peek_at(&input, parser->first_nonspace) ==
- container->as.code.fence_char)) {
- matched = scan_close_code_fence(&input, parser->first_nonspace);
- }
- if (matched >= container->as.code.fence_length) {
- // closing fence - and since we're at
- // the end of a line, we can return:
- all_matched = false;
- S_advance_offset(parser, &input, matched, false);
- parser->current = finalize(parser, container);
- goto finished;
- } else {
- // skip opt. spaces of fence parser->offset
- i = container->as.code.fence_offset;
- while (i > 0 && peek_at(&input, parser->offset) == ' ') {
- S_advance_offset(parser, &input, 1, false);
- i--;
- }
- }
- }
- } else if (container->type == CMARK_NODE_HEADING) {
+/**
+ * For each containing node, try to parse the associated line start.
+ *
+ * Will not close unmatched blocks, as we may have a lazy continuation
+ * line -> http://spec.commonmark.org/0.24/#lazy-continuation-line
+ *
+ * Returns: The last matching node, or NULL
+ */
+static cmark_node *check_open_blocks(cmark_parser *parser,
+ cmark_chunk *input,
+ bool *all_matched)
+{
+ bool should_continue = true;
+ *all_matched = false;
+ cmark_node *container = parser->root;
+ cmark_node_type cont_type;
- // a heading can never contain more than one line
- all_matched = false;
+ while (S_last_child_is_open(container)) {
+ container = container->last_child;
+ cont_type = container->type;
- } else if (container->type == CMARK_NODE_HTML_BLOCK) {
+ S_find_first_nonspace(parser, input);
- switch (container->as.html_block_type) {
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- // these types of blocks can accept blanks
+ switch (cont_type) {
+ case CMARK_NODE_BLOCK_QUOTE:
+ if (!parse_block_quote_prefix(parser, input))
+ goto done;
break;
- case 6:
- case 7:
- if (parser->blank) {
- all_matched = false;
- }
+ case CMARK_NODE_ITEM:
+ if (!parse_node_item_prefix(parser, input, container))
+ goto done;
+ break;
+ case CMARK_NODE_CODE_BLOCK:
+ if (!parse_code_block_prefix(parser, input, container, &should_continue))
+ goto done;
+ break;
+ case CMARK_NODE_HEADING:
+ // a heading can never contain more than one line
+ goto done;
+ case CMARK_NODE_HTML_BLOCK:
+ if (!parse_html_block_prefix(parser, container))
+ goto done;
+ break;
+ case CMARK_NODE_PARAGRAPH:
+ if (parser->blank)
+ goto done;
break;
default:
- fprintf(stderr, "Error (%s:%d): Unknown HTML block type %d\n", __FILE__,
- __LINE__, container->as.html_block_type);
- exit(1);
- }
+ break;
+ }
+ }
- } else if (container->type == CMARK_NODE_PARAGRAPH) {
+ *all_matched = true;
- if (parser->blank) {
- all_matched = false;
- }
- }
+done:
+ if (!*all_matched) {
+ container = container->parent; // back up to last matching node
+ }
- if (!all_matched) {
- container = container->parent; // back up to last matching node
- break;
- }
+ if (!should_continue) {
+ container = NULL;
}
- last_matched_container = container;
+ return container;
+}
- // check to see if we've hit 2nd blank line, break out of list:
- if (parser->blank && container->last_line_blank) {
- break_out_of_lists(parser, &container);
- }
+static void open_new_blocks(cmark_parser *parser,
+ cmark_node **container,
+ cmark_chunk *input,
+ bool all_matched)
+{
+ bool indented;
+ cmark_list *data = NULL;
+ bool maybe_lazy = parser->current->type == CMARK_NODE_PARAGRAPH;
+ cmark_node_type cont_type = (*container)->type;
+ bufsize_t matched = 0;
+ int lev = 0;
+ bool save_partially_consumed_tab;
+ int save_offset;
+ int save_column;
- maybe_lazy = parser->current->type == CMARK_NODE_PARAGRAPH;
- // try new container starts:
- while (container->type != CMARK_NODE_CODE_BLOCK &&
- container->type != CMARK_NODE_HTML_BLOCK) {
+ while (cont_type != CMARK_NODE_CODE_BLOCK &&
+ cont_type != CMARK_NODE_HTML_BLOCK) {
- S_find_first_nonspace(parser, &input);
+ S_find_first_nonspace(parser, input);
indented = parser->indent >= CODE_INDENT;
- if (!indented && peek_at(&input, parser->first_nonspace) == '>') {
+ if (!indented && peek_at(input, parser->first_nonspace) == '>') {
- S_advance_offset(parser, &input,
+ S_advance_offset(parser, input,
parser->first_nonspace + 1 - parser->offset, false);
// optional following character
- if (peek_at(&input, parser->offset) == ' ')
- S_advance_offset(parser, &input, 1, false);
- container = add_child(parser, container, CMARK_NODE_BLOCK_QUOTE,
+ if (S_is_space_or_tab(peek_at(input, parser->offset))) {
+ S_advance_offset(parser, input, 1, true);
+ }
+ *container = add_child(parser, *container, CMARK_NODE_BLOCK_QUOTE,
parser->offset + 1);
} else if (!indented && (matched = scan_atx_heading_start(
- &input, parser->first_nonspace))) {
+ input, parser->first_nonspace))) {
+ bufsize_t hashpos;
+ int level = 0;
- S_advance_offset(parser, &input,
+ S_advance_offset(parser, input,
parser->first_nonspace + matched - parser->offset,
false);
- container =
- add_child(parser, container, CMARK_NODE_HEADING, parser->offset + 1);
+ *container =
+ add_child(parser, *container, CMARK_NODE_HEADING, parser->offset + 1);
- bufsize_t hashpos =
- cmark_chunk_strchr(&input, '#', parser->first_nonspace);
- int level = 0;
+ hashpos = cmark_chunk_strchr(input, '#', parser->first_nonspace);
- while (peek_at(&input, hashpos) == '#') {
+ while (peek_at(input, hashpos) == '#') {
level++;
hashpos++;
}
- container->as.heading.level = level;
- container->as.heading.setext = false;
- } else if (!indented && (matched = scan_open_code_fence(
- &input, parser->first_nonspace))) {
+ (*container)->as.heading.level = level;
+ (*container)->as.heading.setext = false;
- container = add_child(parser, container, CMARK_NODE_CODE_BLOCK,
+ } else if (!indented && (matched = scan_open_code_fence(
+ input, parser->first_nonspace))) {
+ *container = add_child(parser, *container, CMARK_NODE_CODE_BLOCK,
parser->first_nonspace + 1);
- container->as.code.fenced = true;
- container->as.code.fence_char = peek_at(&input, parser->first_nonspace);
- container->as.code.fence_length = matched;
- container->as.code.fence_offset =
+ (*container)->as.code.fenced = true;
+ (*container)->as.code.fence_char = peek_at(input, parser->first_nonspace);
+ (*container)->as.code.fence_length = matched;
+ (*container)->as.code.fence_offset =
(int8_t)(parser->first_nonspace - parser->offset);
- container->as.code.info = cmark_chunk_literal("");
- S_advance_offset(parser, &input,
+ (*container)->as.code.info = cmark_chunk_literal("");
+ S_advance_offset(parser, input,
parser->first_nonspace + matched - parser->offset,
false);
} else if (!indented && ((matched = scan_html_block_start(
- &input, parser->first_nonspace)) ||
- (container->type != CMARK_NODE_PARAGRAPH &&
+ input, parser->first_nonspace)) ||
+ (cont_type != CMARK_NODE_PARAGRAPH &&
(matched = scan_html_block_start_7(
- &input, parser->first_nonspace))))) {
-
- container = add_child(parser, container, CMARK_NODE_HTML_BLOCK,
+ input, parser->first_nonspace))))) {
+ *container = add_child(parser, *container, CMARK_NODE_HTML_BLOCK,
parser->first_nonspace + 1);
- container->as.html_block_type = matched;
+ (*container)->as.html_block_type = matched;
// note, we don't adjust parser->offset because the tag is part of the
// text
-
- } else if (!indented && container->type == CMARK_NODE_PARAGRAPH &&
+ } else if (!indented && cont_type == CMARK_NODE_PARAGRAPH &&
(lev =
- scan_setext_heading_line(&input, parser->first_nonspace))) {
-
- container->type = CMARK_NODE_HEADING;
- container->as.heading.level = lev;
- container->as.heading.setext = true;
- S_advance_offset(parser, &input, input.len - 1 - parser->offset, false);
-
+ scan_setext_heading_line(input, parser->first_nonspace))) {
+ (*container)->type = CMARK_NODE_HEADING;
+ (*container)->as.heading.level = lev;
+ (*container)->as.heading.setext = true;
+ S_advance_offset(parser, input, input->len - 1 - parser->offset, false);
} else if (!indented &&
- !(container->type == CMARK_NODE_PARAGRAPH && !all_matched) &&
+ !(cont_type == CMARK_NODE_PARAGRAPH && !all_matched) &&
(matched =
- scan_thematic_break(&input, parser->first_nonspace))) {
-
+ scan_thematic_break(input, parser->first_nonspace))) {
// it's only now that we know the line is not part of a setext heading:
- container = add_child(parser, container, CMARK_NODE_THEMATIC_BREAK,
+ *container = add_child(parser, *container, CMARK_NODE_THEMATIC_BREAK,
parser->first_nonspace + 1);
- S_advance_offset(parser, &input, input.len - 1 - parser->offset, false);
-
+ S_advance_offset(parser, input, input->len - 1 - parser->offset, false);
} else if ((matched =
- parse_list_marker(&input, parser->first_nonspace, &data)) &&
- (!indented || container->type == CMARK_NODE_LIST)) {
+ parse_list_marker(input, parser->first_nonspace, &data)) &&
+ (!indented || cont_type == CMARK_NODE_LIST)) {
// Note that we can have new list items starting with >= 4
// spaces indent, as long as the list container is still open.
+ int i = 0;
// compute padding:
- S_advance_offset(parser, &input,
+ S_advance_offset(parser, input,
parser->first_nonspace + matched - parser->offset,
false);
- i = 0;
- while (i <= 5 && peek_at(&input, parser->offset + i) == ' ') {
- i++;
- }
- // i = number of spaces after marker, up to 5
- if (i >= 5 || i < 1 ||
- S_is_line_end_char(peek_at(&input, parser->offset))) {
+
+ save_partially_consumed_tab = parser->partially_consumed_tab;
+ save_offset = parser->offset;
+ save_column = parser->column;
+
+ while (parser->column - save_column <= 5 &&
+ S_is_space_or_tab(peek_at(input, parser->offset))) {
+ S_advance_offset(parser, input, 1, true);
+ }
+
+ i = parser->column - save_column;
+ if (i >= 5 || i < 1) {
data->padding = matched + 1;
+ parser->offset = save_offset;
+ parser->column = save_column;
+ parser->partially_consumed_tab = save_partially_consumed_tab;
if (i > 0) {
- S_advance_offset(parser, &input, 1, false);
+ S_advance_offset(parser, input, 1, true);
}
} else {
data->padding = matched + i;
- S_advance_offset(parser, &input, i, true);
}
// check container; if it's a list, see if this list item
@@ -848,50 +962,57 @@
data->marker_offset = parser->indent;
- if (container->type != CMARK_NODE_LIST ||
- !lists_match(&container->as.list, data)) {
- container = add_child(parser, container, CMARK_NODE_LIST,
+ if (cont_type != CMARK_NODE_LIST ||
+ !lists_match(&((*container)->as.list), data)) {
+ *container = add_child(parser, *container, CMARK_NODE_LIST,
parser->first_nonspace + 1);
- memcpy(&container->as.list, data, sizeof(*data));
+ memcpy(&((*container)->as.list), data, sizeof(*data));
}
// add the list item
- container = add_child(parser, container, CMARK_NODE_ITEM,
+ *container = add_child(parser, *container, CMARK_NODE_ITEM,
parser->first_nonspace + 1);
/* TODO: static */
- memcpy(&container->as.list, data, sizeof(*data));
+ memcpy(&((*container)->as.list), data, sizeof(*data));
free(data);
-
} else if (indented && !maybe_lazy && !parser->blank) {
- S_advance_offset(parser, &input, CODE_INDENT, true);
- container = add_child(parser, container, CMARK_NODE_CODE_BLOCK,
+ S_advance_offset(parser, input, CODE_INDENT, true);
+ *container = add_child(parser, *container, CMARK_NODE_CODE_BLOCK,
parser->offset + 1);
- container->as.code.fenced = false;
- container->as.code.fence_char = 0;
- container->as.code.fence_length = 0;
- container->as.code.fence_offset = 0;
- container->as.code.info = cmark_chunk_literal("");
+ (*container)->as.code.fenced = false;
+ (*container)->as.code.fence_char = 0;
+ (*container)->as.code.fence_length = 0;
+ (*container)->as.code.fence_offset = 0;
+ (*container)->as.code.info = cmark_chunk_literal("");
} else {
break;
}
- if (accepts_lines(container->type)) {
+ if (accepts_lines((*container)->type)) {
// if it's a line container, it can't contain other containers
break;
}
+
+ cont_type = (*container)->type;
maybe_lazy = false;
}
+}
+static void add_text_to_container (cmark_parser *parser,
+ cmark_node *container,
+ cmark_node *last_matched_container,
+ cmark_chunk *input)
+{
+ cmark_node *tmp;
// what remains at parser->offset is a text line. add the text to the
// appropriate container.
- S_find_first_nonspace(parser, &input);
+ S_find_first_nonspace(parser, input);
- if (parser->blank && container->last_child) {
+ if (parser->blank && container->last_child)
container->last_child->last_line_blank = true;
- }
// block quote lines are never blank as they start with >
// and we don't count blanks in fenced code for purposes of tight/loose
@@ -906,61 +1027,61 @@
!(container->type == CMARK_NODE_ITEM && container->first_child == NULL &&
container->start_line == parser->line_number));
- cmark_node *cont = container;
- while (cont->parent) {
- cont->parent->last_line_blank = false;
- cont = cont->parent;
+ tmp = container;
+ while (tmp->parent) {
+ tmp->parent->last_line_blank = false;
+ tmp = tmp->parent;
}
+ // If the last line processed belonged to a paragraph node,
+ // and we didn't match all of the line prefixes for the open containers,
+ // and we didn't start any new containers,
+ // and the line isn't blank,
+ // then treat this as a "lazy continuation line" and add it to
+ // the open paragraph.
if (parser->current != last_matched_container &&
- container == last_matched_container && !parser->blank &&
- parser->current->type == CMARK_NODE_PARAGRAPH &&
- cmark_strbuf_len(&parser->current->string_content) > 0) {
-
- add_line(parser->current, &input, parser->offset);
-
+ container == last_matched_container &&
+ !parser->blank &&
+ parser->current->type == CMARK_NODE_PARAGRAPH) {
+ add_line(parser->current, input, parser);
} else { // not a lazy continuation
-
- // finalize any blocks that were not matched and set cur to container:
+ // Finalize any blocks that were not matched and set cur to container:
while (parser->current != last_matched_container) {
parser->current = finalize(parser, parser->current);
assert(parser->current != NULL);
}
if (container->type == CMARK_NODE_CODE_BLOCK) {
-
- add_line(container, &input, parser->offset);
-
+ add_line(container, input, parser);
} else if (container->type == CMARK_NODE_HTML_BLOCK) {
-
- add_line(container, &input, parser->offset);
+ add_line(container, input, parser);
int matches_end_condition;
switch (container->as.html_block_type) {
case 1:
// </script>, </style>, </pre>
matches_end_condition =
- scan_html_block_end_1(&input, parser->first_nonspace);
+ scan_html_block_end_1(input, parser->first_nonspace);
break;
case 2:
// -->
matches_end_condition =
- scan_html_block_end_2(&input, parser->first_nonspace);
+ scan_html_block_end_2(input, parser->first_nonspace);
break;
case 3:
// ?>
matches_end_condition =
- scan_html_block_end_3(&input, parser->first_nonspace);
+ scan_html_block_end_3(input, parser->first_nonspace);
break;
case 4:
// >
matches_end_condition =
- scan_html_block_end_4(&input, parser->first_nonspace);
+ scan_html_block_end_4(input, parser->first_nonspace);
break;
case 5:
// ]]>
matches_end_condition =
- scan_html_block_end_5(&input, parser->first_nonspace);
+ scan_html_block_end_5(input, parser->first_nonspace);
break;
default:
matches_end_condition = 0;
@@ -971,28 +1092,69 @@
container = finalize(parser, container);
assert(parser->current != NULL);
}
-
} else if (parser->blank) {
-
// ??? do nothing
-
} else if (accepts_lines(container->type)) {
-
if (container->type == CMARK_NODE_HEADING &&
container->as.heading.setext == false) {
- chop_trailing_hashtags(&input);
+ chop_trailing_hashtags(input);
}
- add_line(container, &input, parser->first_nonspace);
-
+ S_advance_offset(parser, input, parser->first_nonspace - parser->offset, false);
+ add_line(container, input, parser);
} else {
// create paragraph container for line
container = add_child(parser, container, CMARK_NODE_PARAGRAPH,
parser->first_nonspace + 1);
- add_line(container, &input, parser->first_nonspace);
+ S_advance_offset(parser, input, parser->first_nonspace - parser->offset, false);
+ add_line(container, input, parser);
}
parser->current = container;
}
+}
+
+/* See http://spec.commonmark.org/0.24/#phase-1-block-structure */
+static void S_process_line(cmark_parser *parser, const unsigned char *buffer,
+ bufsize_t bytes) {
+ cmark_node *last_matched_container;
+ bool all_matched = true;
+ cmark_node *container;
+ cmark_chunk input;
+
+ if (parser->options & CMARK_OPT_VALIDATE_UTF8)
+ cmark_utf8proc_check(parser->curline, buffer, bytes);
+ else
+ cmark_strbuf_put(parser->curline, buffer, bytes);
+
+ // ensure line ends with a newline:
+ if (bytes == 0 || !S_is_line_end_char(parser->curline->ptr[bytes - 1]))
+ cmark_strbuf_putc(parser->curline, '\n');
+
+ parser->offset = 0;
+ parser->column = 0;
+ parser->blank = false;
+ parser->partially_consumed_tab = false;
+
+ input.data = parser->curline->ptr;
+ input.len = parser->curline->size;
+
+ parser->line_number++;
+
+ last_matched_container = check_open_blocks(parser, &input, &all_matched);
+
+ if (!last_matched_container)
+ goto finished;
+
+ container = last_matched_container;
+
+ // check to see if we've hit 2nd blank line, break out of list:
+ if (parser->blank && container->last_line_blank)
+ break_out_of_lists(parser, &container);
+
+ open_new_blocks(parser, &container, &input, all_matched);
+
+ add_text_to_container(parser, container, last_matched_container, &input);
+
finished:
parser->last_line_length = input.len;
if (parser->last_line_length &&
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.5.1/cbits/buffer.c new/cmark-0.5.2/cbits/buffer.c
--- old/cmark-0.5.1/cbits/buffer.c 2016-01-23 06:14:38.000000000 +0100
+++ new/cmark-0.5.2/cbits/buffer.c 2016-03-26 21:36:02.000000000 +0100
@@ -33,7 +33,7 @@
abort();
}
-static inline void S_strbuf_grow_by(cmark_strbuf *buf, size_t add) {
+static CMARK_INLINE void S_strbuf_grow_by(cmark_strbuf *buf, size_t add) {
size_t target_size = (size_t)buf->size + add;
if (target_size < add /* Integer overflow. */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.5.1/cbits/cmark.h new/cmark-0.5.2/cbits/cmark.h
--- old/cmark-0.5.1/cbits/cmark.h 2016-01-23 06:14:38.000000000 +0100
+++ new/cmark-0.5.2/cbits/cmark.h 2016-03-26 21:36:02.000000000 +0100
@@ -20,7 +20,7 @@
*/
/** Convert 'text' (assumed to be a UTF-8 encoded string with length
- * 'len' from CommonMark Markdown to HTML, returning a null-terminated,
+ * 'len') from CommonMark Markdown to HTML, returning a null-terminated,
* UTF-8-encoded string.
*/
CMARK_EXPORT
@@ -96,7 +96,7 @@
*/
CMARK_EXPORT cmark_node *cmark_node_new(cmark_node_type type);
-/** Frees the memory allocated for a node.
+/** Frees the memory allocated for a node and any children.
*/
CMARK_EXPORT void cmark_node_free(cmark_node *node);
@@ -418,7 +418,7 @@
* Streaming interface:
*
* cmark_parser *parser = cmark_parser_new(CMARK_OPT_DEFAULT);
- * FILE *fp = fopen("myfile.md", "r");
+ * FILE *fp = fopen("myfile.md", "rb");
* while ((bytes = fread(buffer, 1, sizeof(buffer), fp)) > 0) {
* cmark_parser_feed(parser, buffer, bytes);
* if (bytes < sizeof(buffer)) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.5.1/cbits/cmark_version.h new/cmark-0.5.2/cbits/cmark_version.h
--- old/cmark-0.5.1/cbits/cmark_version.h 2016-01-23 06:14:38.000000000 +0100
+++ new/cmark-0.5.2/cbits/cmark_version.h 2016-03-26 21:36:02.000000000 +0100
@@ -1,7 +1,7 @@
#ifndef CMARK_VERSION_H
#define CMARK_VERSION_H
-#define CMARK_VERSION ((0 << 16) | (23 << 8) | 0)
-#define CMARK_VERSION_STRING "0.23.0"
+#define CMARK_VERSION ((0 << 16) | (25 << 8) | 2)
+#define CMARK_VERSION_STRING "0.25.2"
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.5.1/cbits/commonmark.c new/cmark-0.5.2/cbits/commonmark.c
--- old/cmark-0.5.1/cbits/commonmark.c 2016-01-23 06:14:38.000000000 +0100
+++ new/cmark-0.5.2/cbits/commonmark.c 2016-03-26 21:36:02.000000000 +0100
@@ -17,16 +17,17 @@
#define LIT(s) renderer->out(renderer, s, false, LITERAL)
#define CR() renderer->cr(renderer)
#define BLANKLINE() renderer->blankline(renderer)
+#define ENCODED_SIZE 20
+#define LISTMARKER_SIZE 20
// Functions to convert cmark_nodes to commonmark strings.
-static inline void outc(cmark_renderer *renderer, cmark_escaping escape,
+static CMARK_INLINE void outc(cmark_renderer *renderer, cmark_escaping escape,
int32_t c, unsigned char nextc) {
bool needs_escaping = false;
bool follows_digit =
renderer->buffer->size > 0 &&
cmark_isdigit(renderer->buffer->ptr[renderer->buffer->size - 1]);
- const size_t ENCODED_SIZE = 20;
char encoded[ENCODED_SIZE];
needs_escaping =
@@ -168,7 +169,6 @@
bool entering = (ev_type == CMARK_EVENT_ENTER);
const char *info, *code, *title;
size_t info_len, code_len;
- const size_t LISTMARKER_SIZE = 20;
char listmarker[LISTMARKER_SIZE];
char *emph_delim;
bufsize_t marker_width;
@@ -273,8 +273,8 @@
// begin or end with a blank line, and code isn't
// first thing in a list item
if (info_len == 0 &&
- (code_len > 2 && !isspace(code[0]) &&
- !(isspace(code[code_len - 1]) && isspace(code[code_len - 2]))) &&
+ (code_len > 2 && !isspace((unsigned char)code[0]) &&
+ !(isspace((unsigned char)code[code_len - 1]) && isspace((unsigned char)code[code_len - 2]))) &&
!(node->prev == NULL && node->parent &&
node->parent->type == CMARK_NODE_ITEM)) {
LIT(" ");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.5.1/cbits/config.h new/cmark-0.5.2/cbits/config.h
--- old/cmark-0.5.1/cbits/config.h 2016-01-23 06:14:38.000000000 +0100
+++ new/cmark-0.5.2/cbits/config.h 2016-03-26 21:36:02.000000000 +0100
@@ -1,3 +1,10 @@
+#ifndef CMARK_CONFIG_H
+#define CMARK_CONFIG_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define HAVE_STDBOOL_H
#ifdef HAVE_STDBOOL_H
@@ -23,3 +30,47 @@
#define CMARK_INLINE inline
#endif
#endif
+
+/* snprintf and vsnprintf fallbacks for MSVC before 2015,
+ due to Valentin Milea http://stackoverflow.com/questions/2915672/
+*/
+
+#if defined(_MSC_VER) && _MSC_VER < 1900
+
+#include <stdio.h>
+#include <stdarg.h>
+
+#define snprintf c99_snprintf
+#define vsnprintf c99_vsnprintf
+
+CMARK_INLINE int c99_vsnprintf(char *outBuf, size_t size, const char *format, va_list ap)
+{
+ int count = -1;
+
+ if (size != 0)
+ count = _vsnprintf_s(outBuf, size, _TRUNCATE, format, ap);
+ if (count == -1)
+ count = _vscprintf(format, ap);
+
+ return count;
+}
+
+CMARK_INLINE int c99_snprintf(char *outBuf, size_t size, const char *format, ...)
+{
+ int count;
+ va_list ap;
+
+ va_start(ap, format);
+ count = c99_vsnprintf(outBuf, size, format, ap);
+ va_end(ap);
+
+ return count;
+}
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.5.1/cbits/html.c new/cmark-0.5.2/cbits/html.c
--- old/cmark-0.5.1/cbits/html.c 2016-01-23 06:14:38.000000000 +0100
+++ new/cmark-0.5.2/cbits/html.c 2016-03-26 21:36:02.000000000 +0100
@@ -10,6 +10,8 @@
#include "houdini.h"
#include "scanners.h"
+#define BUFFER_SIZE 100
+
// Functions to convert cmark_nodes to HTML strings.
static void escape_html(cmark_strbuf *dest, const unsigned char *source,
@@ -17,7 +19,7 @@
houdini_escape_html0(dest, source, length, 0);
}
-static inline void cr(cmark_strbuf *html) {
+static CMARK_INLINE void cr(cmark_strbuf *html) {
if (html->size && html->ptr[html->size - 1] != '\n')
cmark_strbuf_putc(html, '\n');
}
@@ -29,7 +31,6 @@
static void S_render_sourcepos(cmark_node *node, cmark_strbuf *html,
int options) {
- const size_t BUFFER_SIZE = 100;
char buffer[BUFFER_SIZE];
if (CMARK_OPT_SOURCEPOS & options) {
snprintf(buffer, BUFFER_SIZE, " data-sourcepos=\"%d:%d-%d:%d\"",
@@ -47,7 +48,6 @@
char start_heading[] = "<h0";
char end_heading[] = "</h0";
bool tight;
- const size_t BUFFER_SIZE = 100;
char buffer[BUFFER_SIZE];
bool entering = (ev_type == CMARK_EVENT_ENTER);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.5.1/cbits/inlines.c new/cmark-0.5.2/cbits/inlines.c
--- old/cmark-0.5.1/cbits/inlines.c 2016-01-23 06:14:38.000000000 +0100
+++ new/cmark-0.5.2/cbits/inlines.c 2016-03-26 21:36:02.000000000 +0100
@@ -48,7 +48,7 @@
delimiter *last_delim;
} subject;
-static inline bool S_is_line_end_char(char c) {
+static CMARK_INLINE bool S_is_line_end_char(char c) {
return (c == '\n' || c == '\r');
}
@@ -62,7 +62,7 @@
static bufsize_t subject_find_special_char(subject *subj, int options);
// Create an inline with a literal string value.
-static inline cmark_node *make_literal(cmark_node_type t, cmark_chunk s) {
+static CMARK_INLINE cmark_node *make_literal(cmark_node_type t, cmark_chunk s) {
cmark_node *e = (cmark_node *)calloc(1, sizeof(*e));
if (e != NULL) {
e->type = t;
@@ -81,7 +81,7 @@
}
// Create an inline with no value.
-static inline cmark_node *make_simple(cmark_node_type t) {
+static CMARK_INLINE cmark_node *make_simple(cmark_node_type t) {
cmark_node *e = (cmark_node *)calloc(1, sizeof(*e));
if (e != NULL) {
e->type = t;
@@ -141,7 +141,7 @@
return cmark_chunk_buf_detach(&buf);
}
-static inline cmark_node *make_autolink(cmark_chunk url, int is_email) {
+static CMARK_INLINE cmark_node *make_autolink(cmark_chunk url, int is_email) {
cmark_node *link = make_simple(CMARK_NODE_LINK);
link->as.link.url = cmark_clean_autolink(&url, is_email);
link->as.link.title = cmark_chunk_literal("");
@@ -159,28 +159,28 @@
e->last_delim = NULL;
}
-static inline int isbacktick(int c) { return (c == '`'); }
+static CMARK_INLINE int isbacktick(int c) { return (c == '`'); }
-static inline unsigned char peek_char(subject *subj) {
+static CMARK_INLINE unsigned char peek_char(subject *subj) {
// NULL bytes should have been stripped out by now. If they're
// present, it's a programming error:
assert(!(subj->pos < subj->input.len && subj->input.data[subj->pos] == 0));
return (subj->pos < subj->input.len) ? subj->input.data[subj->pos] : 0;
}
-static inline unsigned char peek_at(subject *subj, bufsize_t pos) {
+static CMARK_INLINE unsigned char peek_at(subject *subj, bufsize_t pos) {
return subj->input.data[pos];
}
// Return true if there are more characters in the subject.
-static inline int is_eof(subject *subj) {
+static CMARK_INLINE int is_eof(subject *subj) {
return (subj->pos >= subj->input.len);
}
// Advance the subject. Doesn't check for eof.
#define advance(subj) (subj)->pos += 1
-static inline bool skip_spaces(subject *subj) {
+static CMARK_INLINE bool skip_spaces(subject *subj) {
bool skipped = false;
while (peek_char(subj) == ' ' || peek_char(subj) == '\t') {
advance(subj);
@@ -189,7 +189,7 @@
return skipped;
}
-static inline bool skip_line_end(subject *subj) {
+static CMARK_INLINE bool skip_line_end(subject *subj) {
bool seen_line_end_char = false;
if (peek_char(subj) == '\r') {
advance(subj);
@@ -203,7 +203,7 @@
}
// Take characters while a predicate holds, and return a string.
-static inline cmark_chunk take_while(subject *subj, int (*f)(int)) {
+static CMARK_INLINE cmark_chunk take_while(subject *subj, int (*f)(int)) {
unsigned char c;
bufsize_t startpos = subj->pos;
bufsize_t len = 0;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.5.1/cbits/latex.c new/cmark-0.5.2/cbits/latex.c
--- old/cmark-0.5.1/cbits/latex.c 2016-01-23 06:14:38.000000000 +0100
+++ new/cmark-0.5.2/cbits/latex.c 2016-03-26 21:36:02.000000000 +0100
@@ -17,8 +17,9 @@
#define LIT(s) renderer->out(renderer, s, false, LITERAL)
#define CR() renderer->cr(renderer)
#define BLANKLINE() renderer->blankline(renderer)
+#define LIST_NUMBER_STRING_SIZE 20
-static inline void outc(cmark_renderer *renderer, cmark_escaping escape,
+static CMARK_INLINE void outc(cmark_renderer *renderer, cmark_escaping escape,
int32_t c, unsigned char nextc) {
if (escape == LITERAL) {
cmark_render_code_point(renderer, c);
@@ -217,7 +218,6 @@
static int S_render_node(cmark_renderer *renderer, cmark_node *node,
cmark_event_type ev_type, int options) {
int list_number;
- const size_t LIST_NUMBER_STRING_SIZE = 20;
char list_number_string[LIST_NUMBER_STRING_SIZE];
bool entering = (ev_type == CMARK_EVENT_ENTER);
cmark_list_type list_type;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.5.1/cbits/man.c new/cmark-0.5.2/cbits/man.c
--- old/cmark-0.5.1/cbits/man.c 2016-01-23 06:14:38.000000000 +0100
+++ new/cmark-0.5.2/cbits/man.c 2016-03-26 21:36:02.000000000 +0100
@@ -14,6 +14,7 @@
#define LIT(s) renderer->out(renderer, s, false, LITERAL)
#define CR() renderer->cr(renderer)
#define BLANKLINE() renderer->blankline(renderer)
+#define LIST_NUMBER_SIZE 20
// Functions to convert cmark_nodes to groff man strings.
static void S_outc(cmark_renderer *renderer, cmark_escaping escape, int32_t c,
@@ -110,7 +111,6 @@
tmp = tmp->prev;
list_number += 1;
}
- const size_t LIST_NUMBER_SIZE = 20;
char list_number_s[LIST_NUMBER_SIZE];
snprintf(list_number_s, LIST_NUMBER_SIZE, "\"%d.\" 4", list_number);
LIT(list_number_s);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.5.1/cbits/node.c new/cmark-0.5.2/cbits/node.c
--- old/cmark-0.5.1/cbits/node.c 2016-01-23 06:14:38.000000000 +0100
+++ new/cmark-0.5.2/cbits/node.c 2016-03-26 21:36:02.000000000 +0100
@@ -6,7 +6,7 @@
static void S_node_unlink(cmark_node *node);
-static inline bool S_is_block(cmark_node *node) {
+static CMARK_INLINE bool S_is_block(cmark_node *node) {
if (node == NULL) {
return false;
}
@@ -14,7 +14,7 @@
node->type <= CMARK_NODE_LAST_BLOCK;
}
-static inline bool S_is_inline(cmark_node *node) {
+static CMARK_INLINE bool S_is_inline(cmark_node *node) {
if (node == NULL) {
return false;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.5.1/cbits/parser.h new/cmark-0.5.2/cbits/parser.h
--- old/cmark-0.5.1/cbits/parser.h 2016-01-23 06:14:38.000000000 +0100
+++ new/cmark-0.5.2/cbits/parser.h 2016-03-26 21:36:02.000000000 +0100
@@ -22,10 +22,12 @@
bufsize_t first_nonspace_column;
int indent;
bool blank;
+ bool partially_consumed_tab;
cmark_strbuf *curline;
bufsize_t last_line_length;
cmark_strbuf *linebuf;
int options;
+ bool last_buffer_ended_with_cr;
};
#ifdef __cplusplus
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.5.1/cbits/render.c new/cmark-0.5.2/cbits/render.c
--- old/cmark-0.5.1/cbits/render.c 2016-01-23 06:14:38.000000000 +0100
+++ new/cmark-0.5.2/cbits/render.c 2016-03-26 21:36:02.000000000 +0100
@@ -5,13 +5,13 @@
#include "utf8.h"
#include "render.h"
-static inline void S_cr(cmark_renderer *renderer) {
+static CMARK_INLINE void S_cr(cmark_renderer *renderer) {
if (renderer->need_cr < 1) {
renderer->need_cr = 1;
}
}
-static inline void S_blankline(cmark_renderer *renderer) {
+static CMARK_INLINE void S_blankline(cmark_renderer *renderer) {
if (renderer->need_cr < 2) {
renderer->need_cr = 2;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.5.1/cbits/xml.c new/cmark-0.5.2/cbits/xml.c
--- old/cmark-0.5.1/cbits/xml.c 2016-01-23 06:14:38.000000000 +0100
+++ new/cmark-0.5.2/cbits/xml.c 2016-03-26 21:36:02.000000000 +0100
@@ -9,6 +9,8 @@
#include "buffer.h"
#include "houdini.h"
+#define BUFFER_SIZE 100
+
// Functions to convert cmark_nodes to XML strings.
static void escape_xml(cmark_strbuf *dest, const unsigned char *source,
@@ -21,7 +23,7 @@
int indent;
};
-static inline void indent(struct render_state *state) {
+static CMARK_INLINE void indent(struct render_state *state) {
int i;
for (i = 0; i < state->indent; i++) {
cmark_strbuf_putc(state->xml, ' ');
@@ -34,7 +36,6 @@
bool literal = false;
cmark_delim_type delim;
bool entering = (ev_type == CMARK_EVENT_ENTER);
- const size_t BUFFER_SIZE = 100;
char buffer[BUFFER_SIZE];
if (entering) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.5.1/changelog new/cmark-0.5.2/changelog
--- old/cmark-0.5.1/changelog 2016-01-23 06:14:38.000000000 +0100
+++ new/cmark-0.5.2/changelog 2016-03-26 21:36:02.000000000 +0100
@@ -1,3 +1,8 @@
+cmark 0.5.2 (26 Mar 2016)
+
+ * Add flag to allow building with an installed libcmark (Jens Petersen).
+ * Updated to libcmark 0.25.2.
+
cmark 0.5.1 (21 Jan 2016)
* Updated to libcmark 0.24.1.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cmark-0.5.1/cmark.cabal new/cmark-0.5.2/cmark.cabal
--- old/cmark-0.5.1/cmark.cabal 2016-01-23 06:14:38.000000000 +0100
+++ new/cmark-0.5.2/cmark.cabal 2016-03-26 21:36:02.000000000 +0100
@@ -1,12 +1,12 @@
name: cmark
-version: 0.5.1
+version: 0.5.2
synopsis: Fast, accurate CommonMark (Markdown) parser and renderer
description:
This package provides Haskell bindings for
<https://github.com/jgm/cmark libcmark>, the reference
parser for <http://commonmark.org CommonMark>, a fully
specified variant of Markdown. It includes sources for
- libcmark (0.24.1) and does not require prior installation of the
+ libcmark (0.25.2) and does not require prior installation of the
C library.
homepage: https://github.com/jgm/commonmark-hs
@@ -16,7 +16,7 @@
maintainer: jgm(a)berkeley.edu
copyright: (C) 2015 John MacFarlane
category: Text
-tested-with: GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.2
+tested-with: GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.2, GHC == 7.10.3
build-type: Simple
extra-source-files: README.md
changelog
@@ -48,6 +48,10 @@
type: git
location: git://github.com/jgm/cmark-hs.git
+flag pkgconfig
+ default: False
+ description: Use system libcmark via pkgconfig
+
library
exposed-modules: CMark
build-depends: base >=4.5 && < 4.9,
@@ -57,10 +61,13 @@
build-depends: ghc-prim >= 0.2
default-language: Haskell2010
ghc-options: -Wall -fno-warn-unused-do-bind
- cc-options: -Wall -std=c99
- Include-dirs: cbits
- Includes: cmark.h
- c-sources: cbits/houdini_html_u.c
+ if flag(pkgconfig)
+ pkgconfig-depends: libcmark
+ else
+ cc-options: -Wall -std=c99
+ Include-dirs: cbits
+ Includes: cmark.h
+ c-sources: cbits/houdini_html_u.c
cbits/references.c
cbits/utf8.c
cbits/inlines.c
1
0
Hello community,
here is the log from the commit of package getdata for openSUSE:Factory checked in at 2016-03-31 13:02:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/getdata (Old)
and /work/SRC/openSUSE:Factory/.getdata.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "getdata"
Changes:
--------
--- /work/SRC/openSUSE:Factory/getdata/getdata.changes 2015-10-22 12:59:38.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.getdata.new/getdata.changes 2016-03-31 13:02:35.000000000 +0200
@@ -1,0 +2,36 @@
+Sun Mar 27 16:10:39 UTC 2016 - ctrippe(a)opensuse.org
+
+- added patch fix_test_alter_entry_scalar3r.diff to fix the test
+ alter_entry_scalar3r on 32 bit
+
+-------------------------------------------------------------------
+Thu Mar 24 01:50:54 UTC 2016 - dvaleev(a)suse.com
+
+- update to 0.9.2
+ * BUG FIX: When using a FLAC-encoded reference field, gd_nframes()
+ no longer leaks file descriptors.
+ * BUG FIX: A segfault in gd_entry_list() introduced in 0.9.1
+ has been fixed. Reported by Christian Trippe.
+ * BUG FIX: A descriptor leak on error has been plugged
+ in gd_desync().
+ * BUG FIX: A segfault triggered by encountering an I/O error
+ while writing metadata has been fixed.
+ * BUG FIX: Memory leaks in the FLAC and ZZIP encodings, plus
+ single-byte leaks in gd_add_string() and gd_madd_string() have been plugged.
+ * BUG FIX: gd_alter_entry() and gd_[m]alter_spec() no longer
+ mangle the values of entry parameters when asked to remove scalar field codes. Reported by Dan Horák.
+ * PYTHON BUG FIX: Fixed a potential segfault in dirfile.get_carray()
+ on platforms where sizeof size_t != sizeof int. Reported by Dan Horák.
+ * PHP BUG FIX: Calling gd_discard or gd_close on a persistent
+ dirfile now does nothing, instead of closing the Dirfile and corrupting the persistent resource.
+
+-------------------------------------------------------------------
+Fri Feb 19 20:52:18 UTC 2016 - ctrippe(a)opensuse.org
+
+- update 0.9.1
+ * Use perl-ExtUtils-MakeMaker instead of perl-Modul-Build at
+ build time. Relevant BuildRequries where therefore changed.
+ for all relevant changes see
+ https://sourceforge.net/projects/getdata/files/getdata/0.9.1/
+
+-------------------------------------------------------------------
Old:
----
getdata-0.9.0.tar.xz
New:
----
fix_test_alter_entry_scalar3r.diff
getdata-0.9.2.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ getdata.spec ++++++
--- /var/tmp/diff_new_pack.rEWC2a/_old 2016-03-31 13:02:36.000000000 +0200
+++ /var/tmp/diff_new_pack.rEWC2a/_new 2016-03-31 13:02:36.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package getdata
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2011,2012 Christian Trippe <ctrippe(a)opensuse.org>
#
# All modifications and additions to the file contributed by third parties
@@ -18,19 +18,25 @@
Name: getdata
-Version: 0.9.0
+Version: 0.9.2
Release: 0
Summary: Library for reading and writing dirfile data
License: LGPL-2.1+
Group: Development/Libraries/C and C++
Url: http://getdata.sourceforge.net/
Source: %{name}-%{version}.tar.xz
+# PATCH-FIX-UPSTREAM -- Fix test_alter_entry_scalar which was broker on 32bit with 0.9.2
+Patch: fix_test_alter_entry_scalar3r.diff
BuildRequires: bzip2
BuildRequires: gcc-c++
BuildRequires: gcc-fortran
BuildRequires: libtool
BuildRequires: perl
+%if 0%{?suse_version} > 1320
+BuildRequires: perl-ExtUtils-MakeMaker
+%else
BuildRequires: perl-Module-Build
+%endif
BuildRequires: pkg-config
BuildRequires: python-devel
BuildRequires: python-numpy-devel
@@ -138,6 +144,7 @@
%prep
%setup -q
+%patch
%build
%configure --disable-static --enable-modules --with-perl-dir=vendor
@@ -196,7 +203,6 @@
%perl_vendorarch/GetData.pm
%dir %perl_vendorarch/auto
%dir %perl_vendorarch/auto/GetData
-%perl_vendorarch/auto/GetData/GetData.bs
%perl_vendorarch/auto/GetData/GetData.so
%files devel
++++++ fix_test_alter_entry_scalar3r.diff ++++++
Index: test/alter_entry_scalar3r.c
===================================================================
--- test/alter_entry_scalar3r.c.orig 2016-03-05 00:52:57.000000000 +0100
+++ test/alter_entry_scalar3r.c 2016-03-27 19:05:31.492361193 +0200
@@ -50,7 +50,7 @@
n = gd_entry(D, "data", &E);
CHECKI(n,0);
- CHECKF(E.EN(lincom,m)[0], 3.1);
+ CHECKF(E.EN(recip,dividend), 3.1);
CHECKP(E.scalar[0]);
gd_free_entry_strings(&E);
++++++ getdata-0.9.0.tar.xz -> getdata-0.9.2.tar.xz ++++++
++++ 40455 lines of diff (skipped)
1
0
Hello community,
here is the log from the commit of package avogadro for openSUSE:Factory checked in at 2016-03-31 13:02:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/avogadro (Old)
and /work/SRC/openSUSE:Factory/.avogadro.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "avogadro"
Changes:
--------
--- /work/SRC/openSUSE:Factory/avogadro/avogadro.changes 2016-01-10 13:09:21.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.avogadro.new/avogadro.changes 2016-03-31 13:02:32.000000000 +0200
@@ -1,0 +2,5 @@
+Mon Mar 28 13:19:13 UTC 2016 - dvaleev(a)suse.com
+
+- Fix buildfailure with openbabel (avogadro-opanbabel.patch)
+
+-------------------------------------------------------------------
New:
----
avogadro-opanbabel.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ avogadro.spec ++++++
--- /var/tmp/diff_new_pack.sRbnam/_old 2016-03-31 13:02:33.000000000 +0200
+++ /var/tmp/diff_new_pack.sRbnam/_new 2016-03-31 13:02:33.000000000 +0200
@@ -32,6 +32,7 @@
Patch2: avogadro-cmake-3.2.patch
Patch3: arm-qreal-vs-double.patch
Patch4: avogadro-boost.patch
+Patch5: avogadro-opanbabel.patch
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: docbook-utils
@@ -106,6 +107,7 @@
%patch2 -p1
%patch3
%patch4 -p1
+%patch5 -p1
%build
%cmake \
++++++ avogadro-opanbabel.patch ++++++
Index: avogadro-1.1.1/libavogadro/src/python/CMakeLists.txt
===================================================================
--- avogadro-1.1.1.orig/libavogadro/src/python/CMakeLists.txt
+++ avogadro-1.1.1/libavogadro/src/python/CMakeLists.txt
@@ -21,7 +21,7 @@ if (WIN32)
target_link_libraries(python-module avogadro ${PYTHON_LIBRARIES})
else()
target_link_libraries(python-module stdc++ avogadro
- ${QT_LIBRARIES} ${PYTHON_LIBRARIES} ${Boost_LIBRARIES})
+ ${QT_LIBRARIES} ${PYTHON_LIBRARIES} ${OPENBABEL2_LIBRARIES} ${Boost_LIBRARIES})
endif()
# Let's try to use this instead:
1
0
Hello community,
here is the log from the commit of package cabal-rpm for openSUSE:Factory checked in at 2016-03-31 13:02:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cabal-rpm (Old)
and /work/SRC/openSUSE:Factory/.cabal-rpm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cabal-rpm"
Changes:
--------
--- /work/SRC/openSUSE:Factory/cabal-rpm/cabal-rpm.changes 2016-01-28 17:23:49.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.cabal-rpm.new/cabal-rpm.changes 2016-03-31 13:02:31.000000000 +0200
@@ -1,0 +2,9 @@
+Fri Mar 25 07:57:37 UTC 2016 - mimi.vx(a)gmail.com
+
+- update to 0.9.10
+* update no longer tries to grep non-existent .git
+* fix duplicate clibs
+* fix build with ghc-8.0
+* SuSE improvements: no disttag or rpmdev-bumpspec
+
+-------------------------------------------------------------------
Old:
----
cabal-rpm-0.9.9.tar.gz
New:
----
cabal-rpm-0.9.10.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cabal-rpm.spec ++++++
--- /var/tmp/diff_new_pack.1pF7CN/_old 2016-03-31 13:02:32.000000000 +0200
+++ /var/tmp/diff_new_pack.1pF7CN/_new 2016-03-31 13:02:32.000000000 +0200
@@ -17,7 +17,7 @@
Name: cabal-rpm
-Version: 0.9.9
+Version: 0.9.10
Release: 0
Summary: RPM packaging tool for Haskell Cabal-based packages
License: GPL-3.0+
++++++ cabal-rpm-0.9.9.tar.gz -> cabal-rpm-0.9.10.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-rpm-0.9.9/ChangeLog new/cabal-rpm-0.9.10/ChangeLog
--- old/cabal-rpm-0.9.9/ChangeLog 2016-01-25 10:33:19.000000000 +0100
+++ new/cabal-rpm-0.9.10/ChangeLog 2016-03-24 08:29:55.000000000 +0100
@@ -1,3 +1,10 @@
+* 0.9.10 (2016-03-24)
+- bugfixes
+ - update no longer tries to grep non-existent .git
+ - fix duplicate clibs
+- fix build with ghc-8.0 (Cabal-1.23 and time-1.6)
+- SuSE improvements: no disttag or rpmdev-bumpspec
+
* 0.9.9 (2016-01-25)
- couple of minor improvements for SUSE packaging
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-rpm-0.9.9/cabal-rpm.cabal new/cabal-rpm-0.9.10/cabal-rpm.cabal
--- old/cabal-rpm-0.9.9/cabal-rpm.cabal 2016-01-25 10:33:19.000000000 +0100
+++ new/cabal-rpm-0.9.10/cabal-rpm.cabal 2016-03-24 08:29:55.000000000 +0100
@@ -1,5 +1,5 @@
Name: cabal-rpm
-Version: 0.9.9
+Version: 0.9.10
Synopsis: RPM packaging tool for Haskell Cabal-based packages
Description:
This package provides a RPM packaging tool for Haskell Cabal-based packages.
@@ -34,7 +34,7 @@
Executable cblrpm
Main-is: Main.hs
Build-depends: base < 5,
- Cabal > 1.10 && < 1.23,
+ Cabal > 1.10 && < 1.24,
directory,
filepath,
process,
@@ -43,7 +43,7 @@
Build-Depends: old-locale >= 1 && < 1.1,
time >= 1.2 && < 1.5
else
- Build-Depends: time >= 1.5 && < 1.6
+ Build-Depends: time >= 1.5 && < 1.7
Other-modules:
Commands.Depends,
Commands.Diff,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-rpm-0.9.9/src/Commands/Spec.hs new/cabal-rpm-0.9.10/src/Commands/Spec.hs
--- old/cabal-rpm-0.9.9/src/Commands/Spec.hs 2016-01-25 10:33:19.000000000 +0100
+++ new/cabal-rpm-0.9.10/src/Commands/Spec.hs 2016-03-24 08:29:55.000000000 +0100
@@ -17,7 +17,7 @@
-- (at your option) any later version.
module Commands.Spec (
- createSpecFile, createSpecFile_
+ createSpecFile, createSpecFile_, detectDistro, Distro(..)
) where
import Dependencies (notInstalled, packageDependencies, showDep,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-rpm-0.9.9/src/Commands/Update.hs new/cabal-rpm-0.9.10/src/Commands/Update.hs
--- old/cabal-rpm-0.9.9/src/Commands/Update.hs 2016-01-25 10:33:19.000000000 +0100
+++ new/cabal-rpm-0.9.10/src/Commands/Update.hs 2016-03-24 08:29:55.000000000 +0100
@@ -1,6 +1,6 @@
-- |
-- Module : Commands.Update
--- Copyright : (C) 2014-2015 Jens Petersen
+-- Copyright : (C) 2014-2016 Jens Petersen
--
-- Maintainer : Jens Petersen <petersen(a)fedoraproject.org>
-- Stability : alpha
@@ -16,9 +16,9 @@
update
) where
-import Commands.Spec (createSpecFile)
+import Commands.Spec (createSpecFile, detectDistro, Distro(..))
import FileUtils (withTempDirectory)
-import PackageUtils (PackageData (..), bringTarball, latestPkg,
+import PackageUtils (PackageData (..), bringTarball, isGitDir, latestPkg,
packageName, packageVersion, prepare, removePrefix)
import Setup (RpmFlags (..))
import SysCmd (cmd_, cmdBool, shell, (+-+))
@@ -27,7 +27,8 @@
import Distribution.PackageDescription (PackageDescription (..))
import Distribution.Simple.Utils (die)
-import System.Directory (createDirectory, setCurrentDirectory)
+import System.Directory (createDirectory, getCurrentDirectory,
+ setCurrentDirectory)
update :: PackageData -> RpmFlags -> IO ()
update pkgdata flags =
@@ -43,7 +44,8 @@
then error $ current +-+ "is latest version."
else do
bringTarball latest
- rwGit <- cmdBool "grep -q 'url = ssh://' .git/config"
+ gitDir <- getCurrentDirectory >>= isGitDir
+ rwGit <- if gitDir then cmdBool "grep -q 'url = ssh://' .git/config" else return False
when rwGit $
cmd_ "fedpkg" ["new-sources", latest ++ ".tar.gz"]
withTempDirectory $ \cwd -> do
@@ -51,9 +53,13 @@
newspec <- createSpecVersion latest spec
shell $ "diff -u1 -I \"- spec file generated by cabal-rpm\" -I \"Fedora Haskell SIG <haskell(a)lists.fedoraproject.org>\"" +-+ curspec +-+ newspec +-+ "| patch -d" +-+ cwd +-+ "-p1" +-+ "|| :"
setCurrentDirectory cwd
- cmd_ "sed" ["-i", "-e s/^\\(Release: \\).*/\\10%{?dist}/", spec]
+ distro <- detectDistro
+ let suffix = if distro == SUSE then "" else "%{?dist}"
+ cmd_ "sed" ["-i", "-e s/^\\(Release: \\).*/\\10" ++ suffix ++ "/", spec]
let newver = removePrefix (name ++ "-") latest
- cmd_ "rpmdev-bumpspec" ["-c", "update to" +-+ newver, spec]
+ if distro == SUSE
+ then cmd_ "sed" ["-i", "-e s/^\\(Version: \\).*/\\1" ++ newver ++ "/", spec]
+ else cmd_ "rpmdev-bumpspec" ["-c", "update to" +-+ newver, spec]
when rwGit $
cmd_ "git" ["commit", "-a", "-m", "update to" +-+ newver]
where
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-rpm-0.9.9/src/Dependencies.hs new/cabal-rpm-0.9.10/src/Dependencies.hs
--- old/cabal-rpm-0.9.9/src/Dependencies.hs 2016-01-25 10:33:19.000000000 +0100
+++ new/cabal-rpm-0.9.10/src/Dependencies.hs 2016-03-24 08:29:55.000000000 +0100
@@ -117,7 +117,7 @@
tools = filter excludedTools $ nub $ map mapTools tools' ++ chrpath
clibs <- catMaybes <$> mapM resolveLib clibs'
let showPkgCfg p = "pkgconfig(" ++ p ++ ")"
- return (map showDep deps, tools, clibs, map showPkgCfg pkgcfgs, selfdep)
+ return (map showDep deps, tools, nub clibs, map showPkgCfg pkgcfgs, selfdep)
testsuiteDependencies :: PackageDescription -- ^pkg description
-> String -- ^self
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cabal-rpm-0.9.9/src/SysCmd.hs new/cabal-rpm-0.9.10/src/SysCmd.hs
--- old/cabal-rpm-0.9.9/src/SysCmd.hs 2016-01-25 10:33:19.000000000 +0100
+++ new/cabal-rpm-0.9.10/src/SysCmd.hs 2016-03-24 08:29:55.000000000 +0100
@@ -33,21 +33,35 @@
import Data.List ((\\))
import Data.Maybe (fromMaybe, isJust, isNothing)
+import Distribution.Simple.Utils (die)
+#if defined(MIN_VERSION_Cabal) && MIN_VERSION_Cabal(1,18,0)
+import Distribution.Simple.Program.Find (defaultProgramSearchPath,
+ findProgramOnSearchPath)
+#else
import Distribution.Simple.Utils (die, findProgramLocation)
+#endif
import Distribution.Verbosity (normal)
import System.Posix.User (getEffectiveUserID)
import System.Process (readProcess, readProcessWithExitCode, system, rawSystem)
import System.Exit (ExitCode(..))
+findProgram :: String -> IO (Maybe FilePath)
+findProgram =
+#if defined(MIN_VERSION_Cabal) && MIN_VERSION_Cabal(1,18,0)
+ findProgramOnSearchPath normal defaultProgramSearchPath
+#else
+ findProgramLocation normal
+#endif
+
requireProgram :: String -> IO ()
requireProgram c = do
- mavail <- findProgramLocation normal c
+ mavail <- findProgram c
when (isNothing mavail) $ die (c ++ ": command not found")
optionalProgram :: String -> IO Bool
optionalProgram c = do
- mavail <- findProgramLocation normal c
+ mavail <- findProgram c
return $ isJust mavail
cmd_ :: String -> [String] -> IO ()
1
0
Hello community,
here is the log from the commit of package ghc-aeson-compat for openSUSE:Factory checked in at 2016-03-31 13:02:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-aeson-compat (Old)
and /work/SRC/openSUSE:Factory/.ghc-aeson-compat.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-aeson-compat"
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-aeson-compat/ghc-aeson-compat.changes 2016-02-17 12:11:35.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-aeson-compat.new/ghc-aeson-compat.changes 2016-03-31 13:02:28.000000000 +0200
@@ -1,0 +2,10 @@
+Tue Mar 29 06:48:01 UTC 2016 - mimi.vx(a)gmail.com
+
+- update to 0.3.2.0
+
+-------------------------------------------------------------------
+Fri Mar 25 08:20:45 UTC 2016 - mimi.vx(a)gmail.com
+
+- allow aeson-0.11.1
+
+-------------------------------------------------------------------
Old:
----
aeson-compat-0.3.1.0.tar.gz
New:
----
aeson-compat-0.3.2.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-aeson-compat.spec ++++++
--- /var/tmp/diff_new_pack.99nhtK/_old 2016-03-31 13:02:29.000000000 +0200
+++ /var/tmp/diff_new_pack.99nhtK/_new 2016-03-31 13:02:29.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-aeson-compat
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,7 +20,7 @@
%bcond_with tests
Name: ghc-aeson-compat
-Version: 0.3.1.0
+Version: 0.3.2.0
Release: 0
Summary: Compatibility layer for aeson
Group: System/Libraries
@@ -37,17 +37,22 @@
# Begin cabal-rpm deps:
BuildRequires: ghc-aeson-devel
BuildRequires: ghc-attoparsec-devel
+BuildRequires: ghc-base-compat-devel
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-containers-devel
BuildRequires: ghc-exceptions-devel
BuildRequires: ghc-hashable-devel
BuildRequires: ghc-scientific-devel
+BuildRequires: ghc-semigroups-devel
+BuildRequires: ghc-tagged-devel
BuildRequires: ghc-text-devel
BuildRequires: ghc-time-devel
BuildRequires: ghc-time-locale-compat-devel
BuildRequires: ghc-unordered-containers-devel
BuildRequires: ghc-vector-devel
%if %{with tests}
+BuildRequires: ghc-QuickCheck-devel
+BuildRequires: ghc-base-orphans-devel
BuildRequires: ghc-quickcheck-instances-devel
BuildRequires: ghc-tasty-devel
BuildRequires: ghc-tasty-hunit-devel
++++++ aeson-compat-0.3.1.0.tar.gz -> aeson-compat-0.3.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aeson-compat-0.3.1.0/CHANGELOG.md new/aeson-compat-0.3.2.0/CHANGELOG.md
--- old/aeson-compat-0.3.1.0/CHANGELOG.md 2016-02-09 14:03:41.000000000 +0100
+++ new/aeson-compat-0.3.2.0/CHANGELOG.md 2016-03-27 17:28:25.000000000 +0200
@@ -1,3 +1,8 @@
+# 0.3.2.0
+
+- Introduce instances from `aeson-0.11.1.0`: `Const`, `Tagged`, `Proxy` and `NonEmpty`
+- Fix bug with `Natural` instance, `aeson-0.11.1.0` and `base <=4.7`
+
# 0.3.1.0
- `aeson-0.11` support
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aeson-compat-0.3.1.0/aeson-compat.cabal new/aeson-compat-0.3.2.0/aeson-compat.cabal
--- old/aeson-compat-0.3.1.0/aeson-compat.cabal 2016-02-09 14:03:41.000000000 +0100
+++ new/aeson-compat-0.3.2.0/aeson-compat.cabal 2016-03-27 17:28:25.000000000 +0200
@@ -1,9 +1,9 @@
--- This file has been generated from package.yaml by hpack version 0.8.0.
+-- This file has been generated from package.yaml by hpack version 0.11.2.
--
-- see: https://github.com/sol/hpack
name: aeson-compat
-version: 0.3.1.0
+version: 0.3.2.0
synopsis: Compatibility layer for aeson
description: Compatibility layer for @aeson@
category: Web
@@ -31,7 +31,8 @@
ghc-options: -Wall
build-depends:
base >=4.6 && <4.10
- , aeson >=0.7.0.6 && <0.11.1
+ , base-compat >=0.6.0 && <0.10
+ , aeson >=0.7.0.6 && <0.11.2
, attoparsec >=0.12 && <0.14
, bytestring >=0.10 && <0.11
, containers >=0.5 && <0.6
@@ -44,6 +45,8 @@
, time-locale-compat >=0.1.0.1 && <0.2
, unordered-containers >=0.2 && <0.3
, vector >=0.10 && <0.12
+ , semigroups >=0.16.2.2 && <0.19
+ , tagged >=0.7.3 && <0.9
exposed-modules:
Data.Aeson.Compat
other-modules:
@@ -58,7 +61,8 @@
ghc-options: -Wall
build-depends:
base >=4.6 && <4.10
- , aeson >=0.7.0.6 && <0.11.1
+ , base-compat >=0.6.0 && <0.10
+ , aeson >=0.7.0.6 && <0.11.2
, attoparsec >=0.12 && <0.14
, bytestring >=0.10 && <0.11
, containers >=0.5 && <0.6
@@ -71,7 +75,10 @@
, time-locale-compat >=0.1.0.1 && <0.2
, unordered-containers >=0.2 && <0.3
, vector >=0.10 && <0.12
+ , semigroups >=0.16.2.2 && <0.19
+ , tagged >=0.7.3 && <0.9
, aeson-compat
+ , base-orphans >=0.4.5 && <0.6
, tasty >=0.10 && <0.12
, tasty-hunit >=0.9 && <0.10
, tasty-quickcheck >=0.8 && <0.9
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aeson-compat-0.3.1.0/src/Data/Aeson/Compat.hs new/aeson-compat-0.3.2.0/src/Data/Aeson/Compat.hs
--- old/aeson-compat-0.3.1.0/src/Data/Aeson/Compat.hs 2016-02-09 14:03:41.000000000 +0100
+++ new/aeson-compat-0.3.2.0/src/Data/Aeson/Compat.hs 2016-03-27 17:28:25.000000000 +0200
@@ -33,13 +33,8 @@
module Data.Aeson,
) where
-#if !MIN_VERSION_base(4,8,0)
-import Control.Applicative
-#endif
-
-#if MIN_VERSION_aeson(0,10,0)
-import Data.Monoid
-#endif
+import Prelude ()
+import Prelude.Compat
import Data.Aeson hiding
((.:?), decode, decode', decodeStrict, decodeStrict'
@@ -79,6 +74,16 @@
import Text.ParserCombinators.ReadP (readP_to_S)
#endif
+#if !MIN_VERSION_aeson(0,11,1)
+import Control.Applicative (Const (..))
+import Data.List.NonEmpty (NonEmpty (..))
+import Data.Proxy (Proxy (..))
+import Data.Tagged (Tagged (..))
+
+import qualified Data.List.NonEmpty as NonEmpty
+import qualified Data.Vector as V
+#endif
+
-- | Exception thrown by 'decode' - family of functions in this module.
newtype AesonException = AesonException String
deriving (Show, Typeable)
@@ -123,7 +128,7 @@
#if MIN_VERSION_aeson(0,10,0)
modifyFailure addKeyName $ parseJSON v -- <?> Key key
where
- addKeyName = (("failed to parse field " <> T.unpack key <> ": ") <>)
+ addKeyName = mappend $ mconcat ["failed to parse field ", T.unpack key, ": "]
#else
parseJSON v
#endif
@@ -139,7 +144,7 @@
#if MIN_VERSION_aeson(0,10,0)
modifyFailure addKeyName $ Just <$> parseJSON v -- <?> Key key
where
- addKeyName = (("failed to parse field " <> T.unpack key <> ": ") <>)
+ addKeyName = mappend $ mconcat ["failed to parse field ", T.unpack key, ": "]
#else
Just <$> parseJSON v
#endif
@@ -221,6 +226,7 @@
-- Instances in aeson-0.11
-----------------------------------------------------------------------
+#if !(MIN_VERSION_aeson(0,11,1))
#if !(MIN_VERSION_aeson(0,11,0) && MIN_VERSION_base(4,8,0))
instance ToJSON Natural where
toJSON = toJSON . toInteger
@@ -237,6 +243,7 @@
then fail $ "Expected a Natural number but got the negative number: " ++ show s
else pure $ truncate s
#endif
+#endif
#if !MIN_VERSION_aeson(0,11,0)
instance ToJSON Version where
@@ -276,3 +283,58 @@
"GT" -> return GT
_ -> fail "Parsing Ordering value failed: expected \"LT\", \"EQ\", or \"GT\""
#endif
+
+#if !MIN_VERSION_aeson(0,11,1)
+instance ToJSON (Proxy a) where
+ toJSON _ = Null
+ {-# INLINE toJSON #-}
+
+ -- No 'toEncoding', default is good enough
+
+instance FromJSON (Proxy a) where
+ {-# INLINE parseJSON #-}
+ parseJSON Null = pure Proxy
+ parseJSON v = typeMismatch "Proxy" v
+
+instance ToJSON b => ToJSON (Tagged a b) where
+ toJSON (Tagged x) = toJSON x
+ {-# INLINE toJSON #-}
+
+#if MIN_VERSION_aeson(0,10,0)
+ toEncoding (Tagged x) = toEncoding x
+ {-# INLINE toEncoding #-}
+#endif
+
+instance FromJSON b => FromJSON (Tagged a b) where
+ {-# INLINE parseJSON #-}
+ parseJSON = fmap Tagged . parseJSON
+
+instance ToJSON a => ToJSON (Const a b) where
+ toJSON (Const x) = toJSON x
+ {-# INLINE toJSON #-}
+
+#if MIN_VERSION_aeson(0,10,0)
+ toEncoding (Const x) = toEncoding x
+ {-# INLINE toEncoding #-}
+#endif
+
+instance FromJSON a => FromJSON (Const a b) where
+ {-# INLINE parseJSON #-}
+ parseJSON = fmap Const . parseJSON
+
+instance (ToJSON a) => ToJSON (NonEmpty a) where
+ toJSON = toJSON . NonEmpty.toList
+ {-# INLINE toJSON #-}
+
+#if MIN_VERSION_aeson(0,10,0)
+ toEncoding = toEncoding . NonEmpty.toList
+ {-# INLINE toEncoding #-}
+#endif
+
+instance (FromJSON a) => FromJSON (NonEmpty a) where
+ parseJSON = withArray "NonEmpty a" $
+ (>>= ne) . traverse parseJSON . V.toList
+ where
+ ne [] = fail "Expected a NonEmpty but got an empty list"
+ ne (x:xs) = pure (x :| xs)
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aeson-compat-0.3.1.0/test/Orphans.hs new/aeson-compat-0.3.2.0/test/Orphans.hs
--- old/aeson-compat-0.3.1.0/test/Orphans.hs 2016-02-09 14:03:41.000000000 +0100
+++ new/aeson-compat-0.3.2.0/test/Orphans.hs 2016-03-27 17:28:25.000000000 +0200
@@ -2,21 +2,35 @@
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Orphans where
-#if !MIN_VERSION_base(4,8,0)
-import Control.Applicative
-#endif
+import Prelude ()
+import Prelude.Compat
-import Data.Vector as V
-import Data.Version (Version(..))
+import Data.Version (Version (..))
import Test.Tasty.QuickCheck
+import Data.Orphans ()
+import Test.QuickCheck.Instances ()
+
+#if !MIN_VERSION_quickcheck_instances(0,3,12)
+import Data.Vector as V
+#endif
+
+#if !MIN_VERSION_QuickCheck(2,8,3)
+import Control.Applicative (Const (..))
+import Data.List.NonEmpty (NonEmpty (..))
+import Data.Proxy (Proxy (..))
+import Data.Tagged (Tagged (..))
+#endif
+
#if !(MIN_VERSION_QuickCheck(2,8,0) && MIN_VERSION_base(4,8,0))
-import Numeric.Natural (Natural)
+import Numeric.Natural (Natural)
#endif
+#if !MIN_VERSION_quickcheck_instances(0,3,12)
instance Arbitrary a => Arbitrary (Vector a) where
arbitrary = V.fromList <$> arbitrary
shrink = fmap V.fromList . shrink . V.toList
+#endif
#if !(MIN_VERSION_QuickCheck(2,8,0) && MIN_VERSION_base(4,8,0))
instance Arbitrary Natural where
@@ -28,3 +42,20 @@
x <- fmap abs arbitrary
xs <- (fmap . fmap) abs arbitrary
return $ Version (x : xs) []
+
+#if !MIN_VERSION_QuickCheck(2,8,3)
+instance Arbitrary a => Arbitrary (NonEmpty a) where
+ arbitrary = do
+ x <- arbitrary
+ xs <- arbitrary
+ return (x :| xs)
+
+instance Arbitrary a => Arbitrary (Tagged t a) where
+ arbitrary = fmap Tagged arbitrary
+
+instance Arbitrary a => Arbitrary (Const a b) where
+ arbitrary = fmap Const arbitrary
+
+instance Arbitrary (Proxy a) where
+ arbitrary = return Proxy
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aeson-compat-0.3.1.0/test/Tests.hs new/aeson-compat-0.3.2.0/test/Tests.hs
--- old/aeson-compat-0.3.1.0/test/Tests.hs 2016-02-09 14:03:41.000000000 +0100
+++ new/aeson-compat-0.3.2.0/test/Tests.hs 2016-03-27 17:28:25.000000000 +0200
@@ -1,19 +1,28 @@
-{-# LANGUAGE CPP #-}
+{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
-import Data.Time (Day, LocalTime)
-import Data.Version (Version)
-import Numeric.Natural (Natural)
-
-import Test.QuickCheck.Instances ()
-import Test.Tasty
-import Test.Tasty.QuickCheck
-import Test.Tasty.HUnit
+import Prelude ()
+import Prelude.Compat
-import Data.Aeson.Compat
+import Control.Applicative (Const)
+import Data.List.NonEmpty (NonEmpty)
+import Data.Proxy (Proxy)
+import Data.Tagged (Tagged)
+import Data.Time (Day, LocalTime)
+import Data.Version (Version)
+import Numeric.Natural (Natural)
+
+import Data.Orphans ()
+
+import Test.QuickCheck.Instances ()
+import Test.Tasty
+import Test.Tasty.HUnit
+import Test.Tasty.QuickCheck
-import Orphans ()
+import Data.Aeson.Compat
+
+import Orphans ()
main :: IO ()
main = defaultMain $ testGroup "Tests"
@@ -24,6 +33,10 @@
, testProperty "Version" $ roundtrip (undefined :: Version)
, testProperty "Ordering" $ roundtrip (undefined :: Ordering)
, testProperty "Natural" $ roundtrip (undefined :: Natural)
+ , testProperty "Const" $ roundtrip (undefined :: Const Int Int)
+ , testProperty "Proxy" $ roundtrip (undefined :: Proxy Int)
+ , testProperty "Tagged" $ roundtrip (undefined :: Tagged Int Int)
+ , testProperty "NonEmpty" $ roundtrip (undefined :: NonEmpty Int)
]
]
@@ -65,7 +78,7 @@
#if MIN_VERSION_aeson(0,10,0) && !MIN_VERSION_aeson(0,11,0)
roundtripBroken10 _ x = property $ case eitherDecode . encode $ x of
Right y -> False && x == y -- x and y of the same type!
- Left _ -> True
+ Left _ -> True
#else
roundtripBroken10 = roundtrip
#endif
1
0
Hello community,
here is the log from the commit of package python3-dateutil for openSUSE:Factory checked in at 2016-03-31 13:02:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-dateutil (Old)
and /work/SRC/openSUSE:Factory/.python3-dateutil.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-dateutil"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-dateutil/python3-dateutil.changes 2016-03-21 12:45:16.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python3-dateutil.new/python3-dateutil.changes 2016-03-31 13:02:26.000000000 +0200
@@ -1,0 +2,9 @@
+Tue Mar 29 02:11:42 UTC 2016 - arun(a)gmx.de
+
+- update to version 2.5.2:
+ * Updated zoneinfo to 2016c
+ * Fixed parser bug where yearfirst and dayfirst parameters were not
+ being respected when no separator was present. (gh issue #81 and
+ #217, pr #229)
+
+-------------------------------------------------------------------
Old:
----
python-dateutil-2.5.1.tar.gz
New:
----
python-dateutil-2.5.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-dateutil.spec ++++++
--- /var/tmp/diff_new_pack.z526qZ/_old 2016-03-31 13:02:27.000000000 +0200
+++ /var/tmp/diff_new_pack.z526qZ/_new 2016-03-31 13:02:27.000000000 +0200
@@ -20,7 +20,7 @@
Summary: A Python Datetime Library
License: BSD-3-Clause
Group: Development/Libraries/Python
-Version: 2.5.1
+Version: 2.5.2
Release: 0
Source0: http://pypi.python.org/packages/source/p/python-dateutil/python-dateutil-%{…
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ python-dateutil-2.5.1.tar.gz -> python-dateutil-2.5.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-dateutil-2.5.1/NEWS new/python-dateutil-2.5.2/NEWS
--- old/python-dateutil-2.5.1/NEWS 2016-03-17 16:08:44.000000000 +0100
+++ new/python-dateutil-2.5.2/NEWS 2016-03-27 17:39:30.000000000 +0200
@@ -1,3 +1,9 @@
+Version 2.5.2
+-------------
+- Updated zoneinfo to 2016c
+- Fixed parser bug where yearfirst and dayfirst parameters were not being
+ respected when no separator was present. (gh issue #81 and #217, pr #229)
+
Version 2.5.1
-------------
- Updated zoneinfo to 2016b
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-dateutil-2.5.1/PKG-INFO new/python-dateutil-2.5.2/PKG-INFO
--- old/python-dateutil-2.5.1/PKG-INFO 2016-03-17 16:09:42.000000000 +0100
+++ new/python-dateutil-2.5.2/PKG-INFO 2016-03-27 17:40:33.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: python-dateutil
-Version: 2.5.1
+Version: 2.5.2
Summary: Extensions to the standard Python datetime module
Home-page: https://dateutil.readthedocs.org
Author: Paul Ganssle, Yaron de Leeuw
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-dateutil-2.5.1/dateutil/__init__.py new/python-dateutil-2.5.2/dateutil/__init__.py
--- old/python-dateutil-2.5.1/dateutil/__init__.py 2016-03-17 15:45:31.000000000 +0100
+++ new/python-dateutil-2.5.2/dateutil/__init__.py 2016-03-27 17:36:37.000000000 +0200
@@ -1,2 +1,2 @@
# -*- coding: utf-8 -*-
-__version__ = "2.5.1"
+__version__ = "2.5.2"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-dateutil-2.5.1/dateutil/parser.py new/python-dateutil-2.5.2/dateutil/parser.py
--- old/python-dateutil-2.5.1/dateutil/parser.py 2016-03-14 23:35:25.000000000 +0100
+++ new/python-dateutil-2.5.2/dateutil/parser.py 2016-03-27 17:33:17.000000000 +0200
@@ -464,7 +464,10 @@
self.find_probable_year_index(_timelex.split(self.tzstr)) == 0 or \
(yearfirst and self[1] <= 12 and self[2] <= 31):
# 99-01-01
- year, month, day = self
+ if dayfirst:
+ year, day, month = self
+ else:
+ year, month, day = self
elif self[0] > 12 or (dayfirst and self[1] <= 12):
# 13-01-01
day, month, year = self
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-dateutil-2.5.1/dateutil/test/test_parser.py new/python-dateutil-2.5.2/dateutil/test/test_parser.py
--- old/python-dateutil-2.5.1/dateutil/test/test_parser.py 2016-03-15 18:30:35.000000000 +0100
+++ new/python-dateutil-2.5.2/dateutil/test/test_parser.py 2016-03-27 17:33:17.000000000 +0200
@@ -777,3 +777,40 @@
self.assertEqual(parse(pstring),
datetime(1924, 8, 29))
+ def testNoYearFirstNoDayFirst(self):
+ dtstr = '090107'
+
+ # Should be MMDDYY
+ self.assertEqual(parse(dtstr),
+ datetime(2007, 9, 1))
+
+ self.assertEqual(parse(dtstr, yearfirst=False, dayfirst=False),
+ datetime(2007, 9, 1))
+
+ def testYearFirst(self):
+ dtstr = '090107'
+
+ # Should be MMDDYY
+ self.assertEqual(parse(dtstr, yearfirst=True),
+ datetime(2009, 1, 7))
+
+ self.assertEqual(parse(dtstr, yearfirst=True, dayfirst=False),
+ datetime(2009, 1, 7))
+
+ def testDayFirst(self):
+ dtstr = '090107'
+
+ # Should be DDMMYY
+ self.assertEqual(parse(dtstr, dayfirst=True),
+ datetime(2007, 1, 9))
+
+ self.assertEqual(parse(dtstr, yearfirst=False, dayfirst=True),
+ datetime(2007, 1, 9))
+
+ def testDayFirstYearFirst(self):
+ dtstr = '090107'
+ # Should be YYDDMM
+ self.assertEqual(parse(dtstr, yearfirst=True, dayfirst=True),
+ datetime(2009, 7, 1))
+
+
Files old/python-dateutil-2.5.1/dateutil/zoneinfo/dateutil-zoneinfo.tar.gz and new/python-dateutil-2.5.2/dateutil/zoneinfo/dateutil-zoneinfo.tar.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-dateutil-2.5.1/python_dateutil.egg-info/PKG-INFO new/python-dateutil-2.5.2/python_dateutil.egg-info/PKG-INFO
--- old/python-dateutil-2.5.1/python_dateutil.egg-info/PKG-INFO 2016-03-17 16:09:41.000000000 +0100
+++ new/python-dateutil-2.5.2/python_dateutil.egg-info/PKG-INFO 2016-03-27 17:40:31.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: python-dateutil
-Version: 2.5.1
+Version: 2.5.2
Summary: Extensions to the standard Python datetime module
Home-page: https://dateutil.readthedocs.org
Author: Paul Ganssle, Yaron de Leeuw
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-dateutil-2.5.1/setup.cfg new/python-dateutil-2.5.2/setup.cfg
--- old/python-dateutil-2.5.1/setup.cfg 2016-03-17 16:09:42.000000000 +0100
+++ new/python-dateutil-2.5.2/setup.cfg 2016-03-27 17:40:33.000000000 +0200
@@ -2,7 +2,7 @@
universal = 1
[egg_info]
-tag_date = 0
tag_build =
+tag_date = 0
tag_svn_revision = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/python-dateutil-2.5.1/zonefile_metadata.json new/python-dateutil-2.5.2/zonefile_metadata.json
--- old/python-dateutil-2.5.1/zonefile_metadata.json 2016-03-15 18:30:35.000000000 +0100
+++ new/python-dateutil-2.5.2/zonefile_metadata.json 2016-03-27 17:33:17.000000000 +0200
@@ -4,9 +4,9 @@
"https://dateutil.github.io/tzdata/tzdata/",
"ftp://ftp.iana.org/tz/releases/"
],
- "tzdata_file": "tzdata2016b.tar.gz",
- "tzdata_file_sha512": "6d30215ba3289a5b85a632d635b76a54c3c08d97e426d6bd89f83c4efd252e43959593b21cca9d2b185f3845358908946cc308365accbee94f126ad3057cf838",
- "tzversion": "2016b",
+ "tzdata_file": "tzdata2016c.tar.gz",
+ "tzdata_file_sha512": "03eab77c8b3176da1dd17d1d9062b151036b01d224f1e4b60f34a2db6899150431f34f4d9f39652648aae3a55326fd6f85d6deefe3f27b36eaed9ef39ed3f53c",
+ "tzversion": "2016c",
"zonegroups": [
"africa",
"antarctica",
1
0
Hello community,
here is the log from the commit of package QMPlay2 for openSUSE:Factory checked in at 2016-03-31 13:02:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/QMPlay2 (Old)
and /work/SRC/openSUSE:Factory/.QMPlay2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "QMPlay2"
Changes:
--------
--- /work/SRC/openSUSE:Factory/QMPlay2/QMPlay2.changes 2016-03-17 16:48:11.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.QMPlay2.new/QMPlay2.changes 2016-03-31 13:02:25.000000000 +0200
@@ -1,0 +2,7 @@
+Mon Mar 28 17:23:37 UTC 2016 - dap.darkness(a)gmail.com
+
+- Update to 16.03.24:
+ * XVideo SHM and OpenGL2(Qt >= 5.6) bugfix,
+ * Bob deint bugfix for odd video height/2.
+
+-------------------------------------------------------------------
@@ -4 +11 @@
-- Update to 16.03.08:
+- Update to 16.03.11:
Old:
----
QMPlay2-src-16.03.11.tar.xz
New:
----
QMPlay2-src-16.03.24.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ QMPlay2.spec ++++++
--- /var/tmp/diff_new_pack.TFyFJo/_old 2016-03-31 13:02:26.000000000 +0200
+++ /var/tmp/diff_new_pack.TFyFJo/_new 2016-03-31 13:02:26.000000000 +0200
@@ -17,7 +17,7 @@
Name: QMPlay2
-Version: 16.03.11
+Version: 16.03.24
Release: 0
Summary: A Qt based media player, streamer and downloader
License: LGPL-3.0+
++++++ QMPlay2-src-16.03.11.tar.xz -> QMPlay2-src-16.03.24.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QMPlay2-src-16.03.11/ChangeLog new/QMPlay2-src-16.03.24/ChangeLog
--- old/QMPlay2-src-16.03.11/ChangeLog 2016-03-11 22:15:34.000000000 +0100
+++ new/QMPlay2-src-16.03.24/ChangeLog 2016-03-24 21:03:34.000000000 +0100
@@ -1,3 +1,7 @@
+Changes in QMPlay2 build 16.03.24:
+ - XVideo SHM and OpenGL2(Qt >= 5.6) bugfix,
+ - Bob deint bugfix for odd video height/2,
+
Changes in QMPlay2 build 16.03.11:
- update Russian translation (victorr2007),
- update ProstoPleer address,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QMPlay2-src-16.03.11/TODO new/QMPlay2-src-16.03.24/TODO
--- old/QMPlay2-src-16.03.11/TODO 2016-03-06 01:44:49.000000000 +0100
+++ new/QMPlay2-src-16.03.24/TODO 2016-03-24 21:03:34.000000000 +0100
@@ -7,6 +7,7 @@
Better radio stations
YouTube playlists
Accurate seeking
+Video cropping
Filters:
Video filters - YADIF
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QMPlay2-src-16.03.11/src/modules/OpenGL2/OpenGL2Common.cpp new/QMPlay2-src-16.03.24/src/modules/OpenGL2/OpenGL2Common.cpp
--- old/QMPlay2-src-16.03.11/src/modules/OpenGL2/OpenGL2Common.cpp 2016-03-06 01:25:34.000000000 +0100
+++ new/QMPlay2-src-16.03.24/src/modules/OpenGL2/OpenGL2Common.cpp 2016-03-24 21:03:34.000000000 +0100
@@ -219,7 +219,7 @@
void OpenGL2Common::resetClearCounter()
{
- doClear = 4;
+ doClear = 6;
}
void OpenGL2Common::initializeGL()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QMPlay2-src-16.03.11/src/modules/OpenGL2/OpenGL2Writer.cpp new/QMPlay2-src-16.03.24/src/modules/OpenGL2/OpenGL2Writer.cpp
--- old/QMPlay2-src-16.03.11/src/modules/OpenGL2/OpenGL2Writer.cpp 2016-03-06 01:29:33.000000000 +0100
+++ new/QMPlay2-src-16.03.24/src/modules/OpenGL2/OpenGL2Writer.cpp 2016-03-24 21:03:34.000000000 +0100
@@ -144,10 +144,9 @@
useRtt = forceRtt;
if (useRtt)
{
- const QWidget *videoDock = QMPlay2Core.getVideoDock();
//Don't use rtt when videoDock has native window
- if (videoDock->objectName() == "videoDock")
- useRtt = !videoDock->internalWinId() || (videoDock == videoDock->window());
+ const QWidget *videoDock = QMPlay2Core.getVideoDock();
+ useRtt = !videoDock->internalWinId() || (videoDock == videoDock->window());
}
if (useRtt)
drawable = new OpenGL2Widget;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QMPlay2-src-16.03.11/src/modules/VideoFilters/BobDeint.cpp new/QMPlay2-src-16.03.24/src/modules/VideoFilters/BobDeint.cpp
--- old/QMPlay2-src-16.03.11/src/modules/VideoFilters/BobDeint.cpp 2016-02-29 19:17:30.000000000 +0100
+++ new/QMPlay2-src-16.03.24/src/modules/VideoFilters/BobDeint.cpp 2016-03-24 21:03:34.000000000 +0100
@@ -50,7 +50,7 @@
src += linesize << 1;
}
- if (h & 1) //Duplicate last line for odd height
+ if ((p ? (h >> 1) : h) & 1) //Duplicate last line for odd height
memcpy(dst2, dst2 - linesize, linesize);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QMPlay2-src-16.03.11/src/modules/XVideo/XVideo.cpp new/QMPlay2-src-16.03.24/src/modules/XVideo/XVideo.cpp
--- old/QMPlay2-src-16.03.11/src/modules/XVideo/XVideo.cpp 2016-02-29 19:17:30.000000000 +0100
+++ new/QMPlay2-src-16.03.24/src/modules/XVideo/XVideo.cpp 2016-03-24 21:03:34.000000000 +0100
@@ -7,7 +7,7 @@
moduleImg = QImage(":/Xorg");
init("Enabled", true);
- init("UseSHM", false);
+ init("UseSHM", true);
}
QList< XVideo::Info > XVideo::getModulesInfo(const bool showDisabled) const
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QMPlay2-src-16.03.11/src/modules/XVideo/xv.cpp new/QMPlay2-src-16.03.24/src/modules/XVideo/xv.cpp
--- old/QMPlay2-src-16.03.11/src/modules/XVideo/xv.cpp 2016-03-03 18:07:57.000000000 +0100
+++ new/QMPlay2-src-16.03.24/src/modules/XVideo/xv.cpp 2016-03-24 21:03:34.000000000 +0100
@@ -41,6 +41,7 @@
_flip = 0;
ai = NULL;
clrVars();
+ invalidateShm();
_isOK = false;
disp = QX11Info::display();
if (!disp || XvQueryAdaptors(disp, DefaultRootWindow(disp), &adaptors, &ai) != Success)
@@ -57,7 +58,7 @@
delete priv;
}
-bool XVIDEO::open(int W, int H, unsigned long _handle, const QString &adaptorName, bool _useSHM)
+bool XVIDEO::open(int W, int H, unsigned long _handle, const QString &adaptorName, bool useSHM)
{
if (isOpen())
close();
@@ -65,7 +66,6 @@
width = W;
height = H;
handle = _handle;
- useSHM = _useSHM;
for (uint i = 0; i < adaptors; i++)
{
@@ -121,35 +121,51 @@
return false;
}
- if (!useSHM)
- {
- image = XvCreateImage(disp, port, format_id, NULL, width, height);
- image->data = new char[image->data_size];
- }
- else
+ if (useSHM)
{
- image = XvShmCreateImage(disp, port, format_id, NULL, width, height, &shmInfo);
- shmInfo.shmid = shmget(IPC_PRIVATE, image->data_size, IPC_CREAT | 0777);
- if (shmInfo.shmid >= 0)
- {
- shmInfo.shmaddr = (char *)shmat(shmInfo.shmid, 0, 0);
- image->data = shmInfo.shmaddr;
- shmInfo.readOnly = false;
- if (!XShmAttach(disp, &shmInfo))
- {
- close();
- return false;
- }
- XSync(disp, false);
- shmctl(shmInfo.shmid, IPC_RMID, 0);
- }
+ if (!XShmQueryExtension(disp))
+ useSHM = false;
else
{
- close();
- return false;
+ image = XvShmCreateImage(disp, port, format_id, NULL, width, height, &shmInfo);
+ if (!image)
+ useSHM = false;
+ else
+ {
+ shmInfo.shmid = shmget(IPC_PRIVATE, image->data_size, IPC_CREAT | 0600);
+ if (shmInfo.shmid < 0)
+ useSHM = false;
+ else
+ {
+ shmInfo.shmaddr = (char *)shmat(shmInfo.shmid, 0, 0);
+ if (shmInfo.shmaddr == (char *)-1)
+ {
+ shmInfo.shmaddr = NULL;
+ useSHM = false;
+ }
+ else
+ {
+ const bool attached = XShmAttach(disp, &shmInfo);
+ XSync(disp, false);
+ if (!attached)
+ useSHM = false;
+ else
+ image->data = shmInfo.shmaddr;
+ }
+ }
+ if (!useSHM)
+ freeImage();
+ }
}
}
+ if (!useSHM)
+ {
+ image = XvCreateImage(disp, port, format_id, NULL, width, height);
+ if (image)
+ image->data = new char[image->data_size];
+ }
+
if (!image)
{
close();
@@ -162,20 +178,32 @@
_isOpen = true;
return isOpen();
}
-void XVIDEO::close()
+
+void XVIDEO::freeImage()
{
- if (image)
+ if (shmInfo.shmid < 0)
+ delete[] image->data;
+ else
{
- if (useSHM && shmInfo.shmaddr)
- {
- XShmDetach(disp, &shmInfo);
- shmctl(shmInfo.shmid, IPC_RMID, 0);
+ XShmDetach(disp, &shmInfo);
+ shmctl(shmInfo.shmid, IPC_RMID, 0);
+ if (shmInfo.shmaddr)
shmdt(shmInfo.shmaddr);
- }
- else if (!useSHM)
- delete[] image->data;
- XFree(image);
+ invalidateShm();
}
+ XFree(image);
+}
+void XVIDEO::invalidateShm()
+{
+ shmInfo.shmseg = 0;
+ shmInfo.shmid = -1;
+ shmInfo.shmaddr = NULL;
+ shmInfo.readOnly = false;
+}
+void XVIDEO::close()
+{
+ if (image)
+ freeImage();
if (gc)
XFreeGC(disp, gc);
if (port)
@@ -269,10 +297,11 @@
void XVIDEO::putImage(const QRect &srcRect, const QRect &dstRect)
{
- if (!useSHM)
- XvPutImage(disp, port, handle, gc, image, srcRect.x(), srcRect.y(), srcRect.width(), srcRect.height(), dstRect.x(), dstRect.y(), dstRect.width(), dstRect.height());
- else
+ if (shmInfo.shmaddr)
XvShmPutImage(disp, port, handle, gc, image, srcRect.x(), srcRect.y(), srcRect.width(), srcRect.height(), dstRect.x(), dstRect.y(), dstRect.width(), dstRect.height(), false);
+ else
+ XvPutImage(disp, port, handle, gc, image, srcRect.x(), srcRect.y(), srcRect.width(), srcRect.height(), dstRect.x(), dstRect.y(), dstRect.width(), dstRect.height());
+ XSync(disp, false);
}
void XVIDEO::XvSetPortAttributeIfExists(void *attributes, int attrib_count, const char *k, int v)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QMPlay2-src-16.03.11/src/modules/XVideo/xv.hpp new/QMPlay2-src-16.03.24/src/modules/XVideo/xv.hpp
--- old/QMPlay2-src-16.03.11/src/modules/XVideo/xv.hpp 2016-02-29 19:17:30.000000000 +0100
+++ new/QMPlay2-src-16.03.24/src/modules/XVideo/xv.hpp 2016-03-24 21:03:34.000000000 +0100
@@ -23,6 +23,9 @@
}
bool open(int, int, unsigned long, const QString &adaptorName, bool);
+
+ void freeImage();
+ void invalidateShm();
void close();
void draw(const VideoFrame &, const QRect &, const QRect &, int, int, const QList< const QMPlay2_OSD * > &, QMutex &);
@@ -42,7 +45,7 @@
void XvSetPortAttributeIfExists(void *attributes, int attrib_count, const char *k, int v);
void clrVars();
- bool _isOK, _isOpen, hasImage, useSHM;
+ bool _isOK, _isOpen, hasImage;
int _flip;
unsigned long handle;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QMPlay2-src-16.03.11/src/qmplay2/headers/QMPlay2Core.hpp new/QMPlay2-src-16.03.24/src/qmplay2/headers/QMPlay2Core.hpp
--- old/QMPlay2-src-16.03.11/src/qmplay2/headers/QMPlay2Core.hpp 2016-03-11 22:16:06.000000000 +0100
+++ new/QMPlay2-src-16.03.24/src/qmplay2/headers/QMPlay2Core.hpp 2016-03-24 21:03:34.000000000 +0100
@@ -1,7 +1,7 @@
#ifndef QMPLAY2CORE_HPP
#define QMPLAY2CORE_HPP
-#define QMPlay2Version "16.03.11"
+#define QMPlay2Version "16.03.24"
#if defined(__i386) || defined(__i386__) || defined(_M_IX86) || (__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64)
#define QMPLAY2_CPU_X86
1
0
Hello community,
here is the log from the commit of package gcc5 for openSUSE:Factory checked in at 2016-03-31 13:02:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gcc5 (Old)
and /work/SRC/openSUSE:Factory/.gcc5.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gcc5"
Changes:
--------
--- /work/SRC/openSUSE:Factory/gcc5/cross-aarch64-gcc5.changes 2016-02-08 09:47:03.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.gcc5.new/cross-aarch64-gcc5.changes 2016-03-31 13:02:14.000000000 +0200
@@ -1,0 +2,17 @@
+Tue Mar 15 13:13:53 UTC 2016 - rguenther(a)suse.com
+
+- Honor %disable_32bit forcing multilib disable.
+
+-------------------------------------------------------------------
+Mon Mar 7 13:41:36 UTC 2016 - rguenther(a)suse.com
+
+- Add gcc5-aarch64-libffi.patch to revert accidential libffi ABI
+ breakage on AARCH64. [bnc#968771]
+
+-------------------------------------------------------------------
+Tue Mar 1 11:00:11 UTC 2016 - rguenther(a)suse.com
+
+- Update to gcc-5-branch head (r233831).
+ * Includes fixes for [bnc#966220], [bnc#962765] and [bnc#964468].
+
+-------------------------------------------------------------------
cross-armv6hl-gcc5.changes: same change
cross-armv7hl-gcc5.changes: same change
cross-avr-gcc5.changes: same change
cross-i386-gcc5.changes: same change
cross-m68k-gcc5.changes: same change
cross-ppc64-gcc5.changes: same change
cross-ppc64le-gcc5.changes: same change
cross-s390-gcc5.changes: same change
cross-s390x-gcc5.changes: same change
cross-sparc-gcc5.changes: same change
cross-sparc64-gcc5.changes: same change
cross-x86_64-gcc5.changes: same change
gcc5-testresults.changes: same change
gcc5.changes: same change
libffi-gcc5.changes: same change
libgcj-gcc5.changes: same change
Old:
----
gcc-5.3.1-r231346.tar.bz2
New:
----
gcc-5.3.1-r233831.tar.bz2
gcc5-aarch64-libffi.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cross-aarch64-gcc5.spec ++++++
--- /var/tmp/diff_new_pack.0nWXYf/_old 2016-03-31 13:02:24.000000000 +0200
+++ /var/tmp/diff_new_pack.0nWXYf/_new 2016-03-31 13:02:24.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package cross-aarch64-gcc5
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -114,7 +114,7 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
-Version: 5.3.1+r231346
+Version: 5.3.1+r233831
Release: 0
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1)
@@ -142,6 +142,7 @@
Patch8: gcc5-libsanitize-aarch64-va42.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch10: gcc5-no-return-gcc43-workaround.patch
+Patch11: gcc5-aarch64-libffi.patch
# A set of patches from the RH srpm
Patch50: gcc41-java-slow_pthread_self.patch
Patch51: gcc41-ppc32-retaddr.patch
@@ -178,7 +179,11 @@
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
+%if 0%{?disable_32bit:1}
+%define biarch 0
+%else
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+%endif
%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
@@ -215,6 +220,9 @@
%patch9
%endif
%patch10
+%if %{suse_version} <= 1320
+%patch11
+%endif
%patch50
%patch51
%patch60
@@ -399,6 +407,9 @@
%endif
--enable-linux-futex \
--program-suffix=%{binsuffix} \
+%if 0%{?disable_32bit:1}
+ --disable-multilib \
+%endif
%if 0%{!?gcc_target_arch:1}
%ifarch ia64
--with-system-libunwind \
cross-armv6hl-gcc5.spec: same change
cross-armv7hl-gcc5.spec: same change
cross-avr-gcc5.spec: same change
cross-i386-gcc5.spec: same change
cross-m68k-gcc5.spec: same change
cross-ppc64-gcc5.spec: same change
cross-ppc64le-gcc5.spec: same change
cross-s390-gcc5.spec: same change
cross-s390x-gcc5.spec: same change
cross-sparc-gcc5.spec: same change
cross-sparc64-gcc5.spec: same change
cross-x86_64-gcc5.spec: same change
++++++ gcc5-testresults.spec ++++++
--- /var/tmp/diff_new_pack.0nWXYf/_old 2016-03-31 13:02:25.000000000 +0200
+++ /var/tmp/diff_new_pack.0nWXYf/_new 2016-03-31 13:02:25.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package gcc5-testresults
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -220,6 +220,7 @@
%define separate_bi32 0
%define separate_bi64 0
+%if 0%{!?disable_32bit:1}
%ifarch ppc sparcv9
# Beware, this does _not_ separate libgcj, as for that one multilibing
# is inactive for the time being
@@ -228,6 +229,7 @@
%ifarch x86_64 s390x ppc64 sparc64
%define separate_bi32 1
%endif
+%endif
# Define two macros to trigger -32bit or -64bit package variants
%define separate_biarch 0
@@ -252,7 +254,7 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
-Version: 5.3.1+r231346
+Version: 5.3.1+r233831
Release: 0
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1)
@@ -318,6 +320,7 @@
Patch8: gcc5-libsanitize-aarch64-va42.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch10: gcc5-no-return-gcc43-workaround.patch
+Patch11: gcc5-aarch64-libffi.patch
# A set of patches from the RH srpm
Patch50: gcc41-java-slow_pthread_self.patch
Patch51: gcc41-ppc32-retaddr.patch
@@ -349,7 +352,11 @@
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
+%if 0%{?disable_32bit:1}
+%define biarch 0
+%else
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+%endif
%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
@@ -442,6 +449,9 @@
%patch9
%endif
%patch10
+%if %{suse_version} <= 1320
+%patch11
+%endif
%patch50
%patch51
%patch60
@@ -626,6 +636,9 @@
%endif
--enable-linux-futex \
--program-suffix=%{binsuffix} \
+%if 0%{?disable_32bit:1}
+ --disable-multilib \
+%endif
%if 0%{!?gcc_target_arch:1}
%ifarch ia64
--with-system-libunwind \
++++++ gcc5.spec ++++++
--- /var/tmp/diff_new_pack.0nWXYf/_old 2016-03-31 13:02:25.000000000 +0200
+++ /var/tmp/diff_new_pack.0nWXYf/_new 2016-03-31 13:02:25.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package gcc5
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -202,6 +202,7 @@
%define separate_bi32 0
%define separate_bi64 0
+%if 0%{!?disable_32bit:1}
%ifarch ppc sparcv9
# Beware, this does _not_ separate libgcj, as for that one multilibing
# is inactive for the time being
@@ -210,6 +211,7 @@
%ifarch x86_64 s390x ppc64 sparc64
%define separate_bi32 1
%endif
+%endif
# Define two macros to trigger -32bit or -64bit package variants
%define separate_biarch 0
@@ -234,7 +236,7 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
-Version: 5.3.1+r231346
+Version: 5.3.1+r233831
Release: 0
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1)
@@ -300,6 +302,7 @@
Patch8: gcc5-libsanitize-aarch64-va42.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch10: gcc5-no-return-gcc43-workaround.patch
+Patch11: gcc5-aarch64-libffi.patch
# A set of patches from the RH srpm
Patch50: gcc41-java-slow_pthread_self.patch
Patch51: gcc41-ppc32-retaddr.patch
@@ -1838,7 +1841,11 @@
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
+%if 0%{?disable_32bit:1}
+%define biarch 0
+%else
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+%endif
%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
@@ -1931,6 +1938,9 @@
%patch9
%endif
%patch10
+%if %{suse_version} <= 1320
+%patch11
+%endif
%patch50
%patch51
%patch60
@@ -2115,6 +2125,9 @@
%endif
--enable-linux-futex \
--program-suffix=%{binsuffix} \
+%if 0%{?disable_32bit:1}
+ --disable-multilib \
+%endif
%if 0%{!?gcc_target_arch:1}
%ifarch ia64
--with-system-libunwind \
++++++ libffi-gcc5.spec ++++++
--- /var/tmp/diff_new_pack.0nWXYf/_old 2016-03-31 13:02:25.000000000 +0200
+++ /var/tmp/diff_new_pack.0nWXYf/_new 2016-03-31 13:02:25.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package libffi-gcc5
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -219,6 +219,7 @@
%define separate_bi32 0
%define separate_bi64 0
+%if 0%{!?disable_32bit:1}
%ifarch ppc sparcv9
# Beware, this does _not_ separate libgcj, as for that one multilibing
# is inactive for the time being
@@ -227,6 +228,7 @@
%ifarch x86_64 s390x ppc64 sparc64
%define separate_bi32 1
%endif
+%endif
# Define two macros to trigger -32bit or -64bit package variants
%define separate_biarch 0
@@ -251,7 +253,7 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
-Version: 5.3.1+r231346
+Version: 5.3.1+r233831
Release: 0
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1)
@@ -317,6 +319,7 @@
Patch8: gcc5-libsanitize-aarch64-va42.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch10: gcc5-no-return-gcc43-workaround.patch
+Patch11: gcc5-aarch64-libffi.patch
# A set of patches from the RH srpm
Patch50: gcc41-java-slow_pthread_self.patch
Patch51: gcc41-ppc32-retaddr.patch
@@ -520,7 +523,11 @@
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
+%if 0%{?disable_32bit:1}
+%define biarch 0
+%else
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+%endif
%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
@@ -613,6 +620,9 @@
%patch9
%endif
%patch10
+%if %{suse_version} <= 1320
+%patch11
+%endif
%patch50
%patch51
%patch60
@@ -797,6 +807,9 @@
%endif
--enable-linux-futex \
--program-suffix=%{binsuffix} \
+%if 0%{?disable_32bit:1}
+ --disable-multilib \
+%endif
%if 0%{!?gcc_target_arch:1}
%ifarch ia64
--with-system-libunwind \
libgcj-gcc5.spec: same change
++++++ gcc-5.3.1-r231346.tar.bz2 -> gcc-5.3.1-r233831.tar.bz2 ++++++
/work/SRC/openSUSE:Factory/gcc5/gcc-5.3.1-r231346.tar.bz2 /work/SRC/openSUSE:Factory/.gcc5.new/gcc-5.3.1-r233831.tar.bz2 differ: char 11, line 1
++++++ gcc.spec.in ++++++
--- /var/tmp/diff_new_pack.0nWXYf/_old 2016-03-31 13:02:25.000000000 +0200
+++ /var/tmp/diff_new_pack.0nWXYf/_new 2016-03-31 13:02:25.000000000 +0200
@@ -207,6 +207,7 @@
%define separate_bi32 0
%define separate_bi64 0
+%if 0%{!?disable_32bit:1}
%ifarch ppc sparcv9
# Beware, this does _not_ separate libgcj, as for that one multilibing
# is inactive for the time being
@@ -215,6 +216,7 @@
%ifarch x86_64 s390x ppc64 sparc64
%define separate_bi32 1
%endif
+%endif
# Define two macros to trigger -32bit or -64bit package variants
%define separate_biarch 0
@@ -240,7 +242,7 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: http://gcc.gnu.org/
-Version: 5.3.1+r231346
+Version: 5.3.1+r233831
Release: 1
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1)
@@ -308,6 +310,7 @@
Patch8: gcc5-libsanitize-aarch64-va42.patch
Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch
Patch10: gcc5-no-return-gcc43-workaround.patch
+Patch11: gcc5-aarch64-libffi.patch
# A set of patches from the RH srpm
Patch50: gcc41-java-slow_pthread_self.patch
Patch51: gcc41-ppc32-retaddr.patch
@@ -1097,7 +1100,11 @@
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
+%if 0%{?disable_32bit:1}
+%define biarch 0
+%else
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
+%endif
%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
@@ -1196,6 +1203,9 @@
%patch9
%endif
%patch10
+%if %{suse_version} <= 1320
+%patch11
+%endif
%patch50
%patch51
%patch60
@@ -1380,6 +1390,9 @@
%endif
--enable-linux-futex \
--program-suffix=%{binsuffix} \
+%if 0%{?disable_32bit:1}
+ --disable-multilib \
+%endif
%if 0%{!?gcc_target_arch:1}
%ifarch ia64
--with-system-libunwind \
++++++ gcc5-aarch64-libffi.patch ++++++
Index: libffi/src/aarch64/ffitarget.h
===================================================================
--- libffi/src/aarch64/ffitarget.h (revision 233963)
+++ libffi/src/aarch64/ffitarget.h (working copy)
@@ -52,8 +52,8 @@ typedef enum ffi_abi
#define FFI_TRAMPOLINE_SIZE 20
#define FFI_TRAMPOLINE_CLOSURE_OFFSET 16
#else
-#define FFI_TRAMPOLINE_SIZE 24
-#define FFI_TRAMPOLINE_CLOSURE_OFFSET FFI_TRAMPOLINE_SIZE
+#define FFI_TRAMPOLINE_SIZE 36
+#define FFI_TRAMPOLINE_CLOSURE_OFFSET 40
#endif
#define FFI_NATIVE_RAW_API 0
1
0