pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/flex



Module Name:    pkgsrc
Committed By:   wiedi
Date:           Tue Dec 13 17:07:23 UTC 2016

Modified Files:
        pkgsrc/devel/flex: Makefile distinfo
Added Files:
        pkgsrc/devel/flex/patches: patch-src_flex.skl patch-src_scan.l

Log Message:
Pull in three commits from upstream
mainly related to https://github.com/westes/flex/issues/113
"v2.6.2 introduces behavior change that is incompatible with previous versions"

This fixes at least doxygen


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 pkgsrc/devel/flex/Makefile
cvs rdiff -u -r1.27 -r1.28 pkgsrc/devel/flex/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/flex/patches/patch-src_flex.skl \
    pkgsrc/devel/flex/patches/patch-src_scan.l

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/flex/Makefile
diff -u pkgsrc/devel/flex/Makefile:1.53 pkgsrc/devel/flex/Makefile:1.54
--- pkgsrc/devel/flex/Makefile:1.53     Fri Nov 11 08:14:54 2016
+++ pkgsrc/devel/flex/Makefile  Tue Dec 13 17:07:22 2016
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.53 2016/11/11 08:14:54 wiz Exp $
+# $NetBSD: Makefile,v 1.54 2016/12/13 17:07:22 wiedi Exp $
 
 DISTNAME=      flex-2.6.2
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    devel lang
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=westes/}
 GITHUB_RELEASE=        v${PKGVERSION_NOREV}

Index: pkgsrc/devel/flex/distinfo
diff -u pkgsrc/devel/flex/distinfo:1.27 pkgsrc/devel/flex/distinfo:1.28
--- pkgsrc/devel/flex/distinfo:1.27     Fri Nov 11 08:14:54 2016
+++ pkgsrc/devel/flex/distinfo  Tue Dec 13 17:07:22 2016
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.27 2016/11/11 08:14:54 wiz Exp $
+$NetBSD: distinfo,v 1.28 2016/12/13 17:07:22 wiedi Exp $
 
 SHA1 (flex-2.6.2.tar.gz) = 9eab5eddb6efb34d420b3162fd619a01940b9438
 RMD160 (flex-2.6.2.tar.gz) = f58dca039f2b77b9477e45ac92a57804a6458f13
@@ -6,5 +6,7 @@ SHA512 (flex-2.6.2.tar.gz) = 481fe3f1c37
 Size (flex-2.6.2.tar.gz) = 1402237 bytes
 SHA1 (patch-configure) = dfd8bf7682d99991911b355af5015961f1333195
 SHA1 (patch-src_FlexLexer.h) = 9a585219bc8f24c862070969045739d6a303b0bf
+SHA1 (patch-src_flex.skl) = be761bc5c5a1bc2c78f744575c28dec32e76ce51
+SHA1 (patch-src_scan.l) = 0311a0f679fb90b5e190460ec355a5112867a347
 SHA1 (patch-tests_Makefile.am) = f30524f9b8c22a37cb04b4406ec142ea1ecb8e59
 SHA1 (patch-tests_Makefile.in) = 709d5f117418bbcbcc54926f582bc808daf12f3b

Added files:

Index: pkgsrc/devel/flex/patches/patch-src_flex.skl
diff -u /dev/null pkgsrc/devel/flex/patches/patch-src_flex.skl:1.1
--- /dev/null   Tue Dec 13 17:07:23 2016
+++ pkgsrc/devel/flex/patches/patch-src_flex.skl        Tue Dec 13 17:07:23 2016
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_flex.skl,v 1.1 2016/12/13 17:07:23 wiedi Exp $
+
+Pull in upstream commit:
+ - https://github.com/westes/flex/commit/347652c32b4614995acd4ee0d686499da2070d9e
+       fix backwards incompatible changes in 2.6.2.
+
+--- src/flex.skl.orig  2016-12-13 16:10:52.192258388 +0000
++++ src/flex.skl
+@@ -106,7 +106,8 @@ m4_ifdef( [[M4_YY_REENTRANT]],  [[m4_def
+ m4_ifdef( [[M4_YY_PREFIX]],, [[m4_define([[M4_YY_PREFIX]], [[yy]])]])
+ 
+ m4preproc_define(`M4_GEN_PREFIX',
+-    ``m4_define(yy[[$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'')
++    ``[[#define yy$1 ]]M4_YY_PREFIX[[$1]]
++m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'')
+ 
+ %if-c++-only
+     /* The c++ scanner is a mess. The FlexLexer.h header file relies on the
Index: pkgsrc/devel/flex/patches/patch-src_scan.l
diff -u /dev/null pkgsrc/devel/flex/patches/patch-src_scan.l:1.1
--- /dev/null   Tue Dec 13 17:07:23 2016
+++ pkgsrc/devel/flex/patches/patch-src_scan.l  Tue Dec 13 17:07:23 2016
@@ -0,0 +1,204 @@
+$NetBSD: patch-src_scan.l,v 1.1 2016/12/13 17:07:23 wiedi Exp $
+
+Pull in two upstream commits:
+ - https://github.com/westes/flex/commit/e1038db19a6fda98a19a1df4d5f62c74c63b57d5
+       "Fix another escaping bug"
+ - https://github.com/westes/flex/commit/c8ad3d682fb0ea39e30a70449c7f88b8cd8da6b4
+       "Fixes a major bug in Flex's own lexing of literals"
+
+--- src/scan.l.orig    2016-10-23 18:04:57.000000000 +0000
++++ src/scan.l
+@@ -102,20 +102,22 @@ extern const char *escaped_qstart, *esca
+               posix_compat = true;
+ 
+ #define START_CODEBLOCK(x) do { \
+-     /* Emit the needed line directive... */\
+-     if (indented_code == false) { \
+-         linenum++; \
+-         line_directive_out(NULL, 1); \
+-     } \
+-     add_action(M4QSTART); \
+-     yy_push_state(CODEBLOCK); \
+-     if ((indented_code = x)) ACTION_ECHO; \
+-     } while(0)
++    /* Emit the needed line directive... */\
++    if (indented_code == false) { \
++        linenum++; \
++        line_directive_out(NULL, 1); \
++    } \
++    add_action(M4QSTART); \
++    yy_push_state(CODEBLOCK); \
++    if ((indented_code = x)) ACTION_ECHO; \
++} while(0)
++
+ #define END_CODEBLOCK do { \
+-     yy_pop_state();\
++    yy_pop_state();\
+     add_action(M4QEND); \
+-     if (!indented_code) line_directive_out(NULL, 0);\
+-      } while (0)
++    if (!indented_code) line_directive_out(NULL, 0);\
++} while (0)
++
+ %}
+ 
+ %option caseless nodefault noreject stack noyy_top_state
+@@ -486,17 +488,18 @@ COMMENT,CODE_COMMENT>{
+ 
+       ^{WS} START_CODEBLOCK(true); /* indented code in prolog */
+ 
+-      ^{NOT_WS}.*     {       /* non-indented code */
+-                      if ( bracelevel <= 0 )
+-                              { /* not in %{ ... %} */
+-                              yyless( 0 );    /* put it all back */
+-                              yy_set_bol( 1 );
+-                              mark_prolog();
+-                              BEGIN(SECT2);
+-                              }
+-                      else
+-                              ACTION_ECHO;
+-                      }
++      ^{NOT_WS}.*     {
++        /* non-indented code */
++              if ( bracelevel <= 0 ) {
++            /* not in %{ ... %} */
++            yyless( 0 );      /* put it all back */
++            yy_set_bol( 1 );
++            mark_prolog();
++            BEGIN(SECT2);
++        } else {
++            START_CODEBLOCK(true);
++        }
++    }
+ 
+       .               ACTION_ECHO;
+       {NL}    ++linenum; ACTION_ECHO;
+@@ -903,30 +906,28 @@ nmstr[yyleng - 2 - end_is_ws] = '\0';  /
+       <ACTION>"/*"            ACTION_ECHO; yy_push_state( CODE_COMMENT );
+ 
+       <CODEBLOCK,ACTION>{
+-              "reject"        {
+-                      ACTION_ECHO;
+-                      CHECK_REJECT(yytext);
+-                      }
+-              "yymore"        {
+-                      ACTION_ECHO;
+-                      CHECK_YYMORE(yytext);
+-                      }
++              "reject" {
++            ACTION_ECHO;
++            CHECK_REJECT(yytext);
++        }
++              "yymore" {
++            ACTION_ECHO;
++            CHECK_YYMORE(yytext);
++        }
+       }
+ 
+-    .           ACTION_ECHO;
+-      {NL}            {
+-                      ++linenum;
+-                      ACTION_ECHO;
+-                      if ( bracelevel == 0 ||
+-                           (doing_codeblock && indented_code) )
+-                              {
+-                              if ( doing_rule_action )
+-                                      add_action( "\tYY_BREAK]""]\n" );
+-
+-                              doing_rule_action = doing_codeblock = false;
+-                              BEGIN(SECT2);
+-                              }
+-                      }
++    .       ACTION_ECHO;
++      {NL}    {
++              ++linenum;
++              ACTION_ECHO;
++              if (bracelevel == 0 || (doing_codeblock && indented_code)) {
++            if ( doing_rule_action )
++                add_action( "\tYY_BREAK]""]\n" );
++
++            doing_rule_action = doing_codeblock = false;
++            BEGIN(SECT2);
++        }
++    }
+ }
+ 
+ 
+@@ -935,38 +936,37 @@ nmstr[yyleng - 2 - end_is_ws] = '\0';  /
+       "{"             ACTION_ECHO; ++bracelevel;
+       "}"             ACTION_ECHO; --bracelevel;
+       [^[:alpha:]_{}\"'/\n\[\]]+      ACTION_ECHO;
+-    [\[\]]      ACTION_ECHO;
+-      {NAME}          ACTION_ECHO;
++        {NAME}                ACTION_ECHO;
+         "'"([^\'\\\n]|\\.)"'" ACTION_ECHO; /* character constant */
+-        "'"             ACTION_ECHO; yy_push_state(CHARACTER_CONSTANT);
++        "'"             ACTION_ECHO; BEGIN(CHARACTER_CONSTANT);
+       \"              ACTION_ECHO; BEGIN(ACTION_STRING);
+-      {NL}            {
++      {NL} {
+                       ++linenum;
+                       ACTION_ECHO;
+-                      if ( bracelevel == 0 )
+-                              {
++                      if (bracelevel == 0) {
+                               if ( doing_rule_action )
+-                                      add_action( "\tYY_BREAK]""]\n" );
++                    add_action( "\tYY_BREAK]""]\n" );
+ 
+-                              doing_rule_action = false;
+-                              BEGIN(SECT2);
+-                              }
+-                      }
+-      .               ACTION_ECHO;
++                doing_rule_action = false;
++                BEGIN(SECT2);
++            }
++        }
++        .      ACTION_ECHO;
+ }
+ 
+ <ACTION_STRING>{
+-      [^\]\"\\\n\[MmY]+       ACTION_ECHO;
++      [^\[\]\"\\\n]+  ACTION_ECHO;
+       \"              ACTION_ECHO; BEGIN(ACTION);
+ }
+ <CHARACTER_CONSTANT>{
+-      [^\[\]\'\\\nMmY]+       ACTION_ECHO;
+-        \'              ACTION_ECHO; yy_pop_state();
++      [^\[\]\'\\\n]+  ACTION_ECHO;
++        \'              ACTION_ECHO; BEGIN(ACTION);
+ }
+ <ACTION_STRING,CHARACTER_CONSTANT>{
+-      \\.             ACTION_ECHO;
+-      {NL}            ++linenum; ACTION_ECHO;
+-      .               ACTION_ECHO;
++        (\\\n)*         ACTION_ECHO;
++      \\(\\\n)*.      ACTION_ECHO;
++      {NL}    ++linenum; ACTION_ECHO; BEGIN(ACTION);
++        .     ACTION_ECHO;
+ }
+ 
+ <COMMENT,CODE_COMMENT,COMMENT_DISCARD,ACTION,ACTION_STRING,CHARACTER_CONSTANT><<EOF>> {
+@@ -991,8 +991,8 @@ nmstr[yyleng - 2 - end_is_ws] = '\0';  /
+ <SECT3>{
+     {M4QSTART}   fputs(escaped_qstart, yyout);
+     {M4QEND}     fputs(escaped_qend, yyout);
+-    [^\[\]\n]*(\n?) ECHO;
+-    .|\n         ECHO;
++    [^\[\]]*     ECHO;
++    [][]         ECHO;
+     <<EOF>>      {
+         sectnum = 0;
+         yyterminate();
+@@ -1001,8 +1001,8 @@ nmstr[yyleng - 2 - end_is_ws] = '\0';  /
+ <SECT3_NOESCAPE>{
+     {M4QSTART}  fprintf(yyout, "[""[%s]""]", escaped_qstart);
+     {M4QEND}    fprintf(yyout, "[""[%s]""]", escaped_qend);
+-    [^\[\]\n]*(\n?) ECHO;
+-    (.|\n)      ECHO;
++    [^][]*      ECHO;
++    [][]        ECHO;
+     <<EOF>>           {
+        sectnum = 0;
+        yyterminate();



Home | Main Index | Thread Index | Old Index