[arch-commits] Commit in gobject-introspection/trunk (2 files)

Jan de Groot jgc at archlinux.org
Thu Oct 20 12:26:15 UTC 2016


    Date: Thursday, October 20, 2016 @ 12:26:14
  Author: jgc
Revision: 279041

upgpkg: gobject-introspection 1.50.0+1+gb8d92b0-2

Add patch to fix EOF check with flex 2.6.1. Fixes infinite loop when building Cinnamon (FS#51396)

Added:
  gobject-introspection/trunk/0001-giscanner-fix-EOF-check-with-flex-2.6.1.patch
Modified:
  gobject-introspection/trunk/PKGBUILD

----------------------------------------------------+
 0001-giscanner-fix-EOF-check-with-flex-2.6.1.patch |   87 +++++++++++++++++++
 PKGBUILD                                           |    9 +
 2 files changed, 93 insertions(+), 3 deletions(-)

Added: 0001-giscanner-fix-EOF-check-with-flex-2.6.1.patch
===================================================================
--- 0001-giscanner-fix-EOF-check-with-flex-2.6.1.patch	                        (rev 0)
+++ 0001-giscanner-fix-EOF-check-with-flex-2.6.1.patch	2016-10-20 12:26:14 UTC (rev 279041)
@@ -0,0 +1,87 @@
+From 740f5325360e5219b5129401fda90dd34d6cf47c Mon Sep 17 00:00:00 2001
+From: Jan de Groot <jgc at archlinux.org>
+Date: Thu, 20 Oct 2016 12:14:19 +0000
+Subject: [PATCH] giscanner: fix EOF check with flex >= 2.6.1
+
+It looks like flex 2.6.1 changed [1] the return code for EOF in
+yyinput.  Therefore, use the right value depending on the version of
+flex which generates the lexer.
+
+[1] https://github.com/westes/flex/commit/f863c9490e6912ffcaeb12965fb3a567a10745ff
+---
+ giscanner/scannerlexer.l | 21 +++++++++++++++------
+ 1 file changed, 15 insertions(+), 6 deletions(-)
+
+diff --git a/giscanner/scannerlexer.l b/giscanner/scannerlexer.l
+index 21ef570..bd546d5 100644
+--- a/giscanner/scannerlexer.l
++++ b/giscanner/scannerlexer.l
+@@ -59,6 +59,15 @@ static void process_linemarks (GISourceScanner *scanner, gboolean has_line);
+ static int check_identifier (GISourceScanner *scanner, const char *);
+ static int parse_ignored_macro (void);
+ static void print_error (GISourceScanner *scanner);
++
++#if (YY_FLEX_MAJOR_VERSION > 2) \
++  || ((YY_FLEX_MAJOR_VERSION == 2) && (YY_FLEX_MINOR_VERSION > 6)) \
++  || ((YY_FLEX_MAJOR_VERSION == 2) && (YY_FLEX_MINOR_VERSION == 6) && (YY_FLEX_SUBMINOR_VERSION >= 1))
++#define IS_EOF 0
++#else
++#define IS_EOF EOF
++#endif
++
+ %}
+ 
+ %option nounput
+@@ -270,7 +279,7 @@ parse_comment (GISourceScanner *scanner)
+   c1 = input();
+   c2 = input();
+ 
+-  if (c2 != EOF && (c1 == '*' && c2 != '*' && c2 != '/')) {
++  if (c2 != IS_EOF && (c1 == '*' && c2 != '*' && c2 != '/')) {
+     /*
+      * Store GTK-Doc comment blocks,
+      * starts with one '/' followed by exactly two '*' and not followed by a '/'
+@@ -283,7 +292,7 @@ parse_comment (GISourceScanner *scanner)
+ 
+     comment_lineno = lineno;
+ 
+-    while (c2 != EOF && !(c1 == '*' && c2 == '/'))
++    while (c2 != IS_EOF && !(c1 == '*' && c2 == '/'))
+       {
+         if (!skip)
+           g_string_append_c (string, c1);
+@@ -311,7 +320,7 @@ parse_comment (GISourceScanner *scanner)
+     /*
+      * Ignore all other comment blocks
+      */
+-    while (c2 != EOF && !(c1 == '*' && c2 == '/'))
++    while (c2 != IS_EOF && !(c1 == '*' && c2 == '/'))
+       {
+         if (c1 == '\n')
+           lineno++;
+@@ -436,19 +445,19 @@ parse_ignored_macro (void)
+ 	int c;
+ 	int nest;
+ 
+-	while ((c = input ()) != EOF && isspace (c))
++	while ((c = input ()) != IS_EOF && isspace (c))
+ 		;
+ 	if (c != '(')
+ 		return FALSE;
+ 
+ 	nest = 0;
+-	while ((c = input ()) != EOF && (nest > 0 || c != ')')) {
++	while ((c = input ()) != IS_EOF && (nest > 0 || c != ')')) {
+ 		if (c == '(')
+ 			nest++;
+ 		else if (c == ')')
+ 			nest--;
+ 		else if (c == '"') {
+-			while ((c = input ()) != EOF && c != '"') {
++			while ((c = input ()) != IS_EOF && c != '"') {
+ 				if (c == '\\')
+ 					c = input ();
+ 			}
+-- 
+2.10.0
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-10-20 10:02:19 UTC (rev 279040)
+++ PKGBUILD	2016-10-20 12:26:14 UTC (rev 279041)
@@ -5,7 +5,7 @@
 pkgname=('gobject-introspection' 'gobject-introspection-runtime')
 pkgdesc="Introspection system for GObject-based libraries"
 pkgver=1.50.0+1+gb8d92b0
-pkgrel=1
+pkgrel=2
 url="https://live.gnome.org/GObjectIntrospection"
 arch=('x86_64' 'i686')
 license=('LGPL' 'GPL')
@@ -13,8 +13,10 @@
 makedepends=('cairo' 'git' 'gtk-doc')
 options=('!emptydirs')
 _commit=b8d92b0b36b3907ef066e068e33e9309eb0f8ec5  # master
-source=("git://git.gnome.org/gobject-introspection#commit=$_commit")
-sha256sums=('SKIP')
+source=("git://git.gnome.org/gobject-introspection#commit=$_commit"
+        0001-giscanner-fix-EOF-check-with-flex-2.6.1.patch)
+sha256sums=('SKIP'
+            'e1333f2eddf23e4d750aa1c39e5fea8264d0586d1916f11188dbd07d4449d81f')
 
 pkgver() {
   cd $pkgbase
@@ -23,6 +25,7 @@
 
 prepare() {
   cd $pkgbase
+  patch -Np1 -i ../0001-giscanner-fix-EOF-check-with-flex-2.6.1.patch
   NOCONFIGURE=1 ./autogen.sh
 }
   



More information about the arch-commits mailing list