commit ff5a39c963b85a4d0b6248a6bca6ae7e4091adb8
Author: Witold Filipczyk <wite...@poczta.onet.pl>
Date:   Mon Oct 30 11:03:15 2017 +0100

    - updated to 0.7.0
    - added patch

 ...move-extra-braces-to-fix-build-with-gcc-7.patch | 69 ++++++++++++++++++++++
 libCSS.spec                                        |  8 ++-
 2 files changed, 74 insertions(+), 3 deletions(-)
---
diff --git a/libCSS.spec b/libCSS.spec
index e5a07b7..cbbbb81 100644
--- a/libCSS.spec
+++ b/libCSS.spec
@@ -5,16 +5,17 @@
 Summary:       CSS parser and selection engine
 Summary(pl.UTF-8):     Silnik analizujący i wybierający CSS
 Name:          libCSS
-Version:       0.6.1
+Version:       0.7.0
 Release:       1
 License:       MIT
 Group:         Libraries
 Source0:       
http://download.netsurf-browser.org/libs/releases/libcss-%{version}-src.tar.gz
-# Source0-md5: f2fa03f055fa41a014fb70a39a57bb69
+# Source0-md5: 5a26cc9ff9921cc29ee137b1061c5689
+Patch0:                0001-Remove-extra-braces-to-fix-build-with-gcc-7.patch
 URL:           http://www.netsurf-browser.org/projects/libcss/
 BuildRequires: libparserutils-devel >= 0.2.3
 BuildRequires: libwapcaplet-devel >= 0.4.0
-BuildRequires: netsurf-buildsystem >= 1.5
+BuildRequires: netsurf-buildsystem >= 1.6
 Requires:      libparserutils >= 0.2.3
 Requires:      libwapcaplet >= 0.4.0
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -75,6 +76,7 @@ Statyczna biblioteka libCSS.
 
 %prep
 %setup -q -n libcss-%{version}
+%patch0 -p1
 
 # create "gen" target just to execute PRE_TARGETS
 printf '\ngen: $(PRE_TARGETS)\n' >> Makefile
diff --git a/0001-Remove-extra-braces-to-fix-build-with-gcc-7.patch 
b/0001-Remove-extra-braces-to-fix-build-with-gcc-7.patch
new file mode 100644
index 0000000..36db5f9
--- /dev/null
+++ b/0001-Remove-extra-braces-to-fix-build-with-gcc-7.patch
@@ -0,0 +1,69 @@
+From f80a0e7bc0095a4f87c59422c13904fb6f3ab14a Mon Sep 17 00:00:00 2001
+From: Alastair Hughes <hobbitalast...@gmail.com>
+Date: Mon, 8 May 2017 07:49:17 +1200
+Subject: [PATCH] Remove extra braces to fix build with gcc 7
+
+GCC 7.1 warns on "implicit fallthrough" in case statements.
+To avoid false positives it will attempt to match comments directly
+before the fall through in question, and if any match some form of "fall
+through" the fall through is ignored.
+For this particular instance extra braces prevent the comment being
+recognized, as the following line is not a label or a new case; remove
+the excess braces to let GCC recognize the comments.
+
+Signed-off-by: Alastair Hughes <hobbitalast...@gmail.com>
+---
+ src/parse/parse.c | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/src/parse/parse.c b/src/parse/parse.c
+index b65b0f5..7084a9e 100644
+--- a/src/parse/parse.c
++++ b/src/parse/parse.c
+@@ -2091,7 +2091,6 @@ css_error parseMalformedDeclaration(css_parser *parser)
+ 
+       switch (state->substate) {
+       case Initial:
+-      {
+               /* Clear stack of open items */
+               while (parserutils_stack_pop(parser->open_items, NULL) == 
+                               PARSERUTILS_OK)
+@@ -2099,7 +2098,6 @@ css_error parseMalformedDeclaration(css_parser *parser)
+ 
+               state->substate = Go;
+               /* Fall through */
+-      }
+       case Go:
+               while (1) {
+                       char want;
+@@ -2289,7 +2287,6 @@ css_error parseMalformedAtRule(css_parser *parser)
+ 
+       switch (state->substate) {
+       case Initial:
+-      {
+               /* Clear stack of open items */
+               while (parserutils_stack_pop(parser->open_items, NULL) == 
+                               PARSERUTILS_OK)
+@@ -2297,7 +2294,6 @@ css_error parseMalformedAtRule(css_parser *parser)
+ 
+               state->substate = Go;
+               /* Fall through */
+-      }
+       case Go:
+               while (1) {
+                       char want;
+-- 
+2.12.2
+
+--- libcss-0.7.0/src/select/arena_hash.h.orig  2017-10-12 18:27:41.000000000 
+0200
++++ libcss-0.7.0/src/select/arena_hash.h       2017-10-30 11:01:15.043076691 
+0100
+@@ -50,7 +50,9 @@ static inline uint32_t css__arena_hash(c
+       /* Hash any left over bytes */
+       switch (len) {
+       case 3: h ^= data[2] << 16;
++              /* Fall through */
+       case 2: h ^= data[1] << 8;
++              /* Fall through */
+       case 1: h ^= data[0];
+               h *= m;
+       }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libCSS.git/commitdiff/ff5a39c963b85a4d0b6248a6bca6ae7e4091adb8

_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to