the Fink project is an effort to port
popular Unix programs to Mac OS X
Package: flex-devel
Version: 2.5.35
Revision: 2
BuildDepends: fink (>= 0.28.0-1), help2man
Source: mirror:sourceforge:flex/flex-%v.tar.bz2
Source-MD5: 10714e50cea54dc7a227e3eddcd44d57
PatchFile: %n.patch
PatchFile-MD5: 8f9cf336bd558b8b38616275f8164ec7
NoSetMAKEFLAGS: true
SetMAKEFLAGS: -j1
CompileScript: <<
#!/bin/sh -ex
export lt_cv_sys_max_cmd_len=65536
./configure --prefix=%p/lib/flex
make
<<
InstallScript: <<
make -j1 install DESTDIR=%d
rm -rf %i/lib/flex/man %i/lib/flex/share %i/lib/flex/info
<<
Description: Fast lexical analyser generator
DocFiles: AUTHORS COPYING ChangeLog INSTALL NEWS ONEWS README* THANKS TODO
DescDetail: <<
Flex is a tool for generating programs that require pattern-matching
on text. It is usually used together with yacc/bison to automatically
generate a parser for a language grammar, e.g. the syntax of a
configuration file.
This is a version of Flex that generates better C++ code than the
standard 2.5.4 Flex, but also has some compatibility problems with
the older flex as well, so it installs into %p/lib/flex and must
be explicitly linked by projects that want to use it.
<<
DescUsage: <<
You will need to explicitly add the paths to this version of flex
to your environment to use it (so that it doesn't get in the way of
the "regular" flex).
Generally you should be able to do it by doing something like:
export PATH="%p/lib/flex/bin:$PATH"
export CPPFLAGS="-I%p/lib/flex/include"
export LDFLAGS="-L%p/lib/flex/lib"
<<
License: BSD
Homepage: http://flex.sourceforge.net/
Maintainer: Benjamin Reed
diff -Nurd flex-2.5.35/doc/stamp-vti flex-2.5.35-new/doc/stamp-vti
--- flex-2.5.35/doc/stamp-vti 2008-02-26 16:34:27.000000000 -0500
+++ flex-2.5.35-new/doc/stamp-vti 2009-04-29 10:27:25.000000000 -0400
@@ -1,4 +1,4 @@
-@set UPDATED 10 September 2007
-@set UPDATED-MONTH September 2007
+@set UPDATED 1 June 2008
+@set UPDATED-MONTH June 2008
@set EDITION 2.5.35
@set VERSION 2.5.35
diff -Nurd flex-2.5.35/doc/version.texi flex-2.5.35-new/doc/version.texi
--- flex-2.5.35/doc/version.texi 2008-02-26 16:34:27.000000000 -0500
+++ flex-2.5.35-new/doc/version.texi 2009-04-29 10:27:25.000000000 -0400
@@ -1,4 +1,4 @@
-@set UPDATED 10 September 2007
-@set UPDATED-MONTH September 2007
+@set UPDATED 1 June 2008
+@set UPDATED-MONTH June 2008
@set EDITION 2.5.35
@set VERSION 2.5.35
diff -Nurd flex-2.5.35/flex.skl flex-2.5.35-new/flex.skl
--- flex-2.5.35/flex.skl 2008-02-09 13:54:56.000000000 -0500
+++ flex-2.5.35-new/flex.skl 2009-04-29 10:27:25.000000000 -0400
@@ -218,6 +218,7 @@
#include
#include
#include
+#include
#include
/* end standard C++ headers. */
%endif
@@ -443,7 +444,15 @@
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
@@ -1063,7 +1072,12 @@
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
@@ -1074,7 +1088,7 @@
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
%endif
%if-c++-only C++ definition
#define ECHO LexerOutput( yytext, yyleng )
@@ -2348,8 +2362,8 @@
%if-c-only
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
* M4_YY_DOC_PARAM
* @return the newly allocated buffer state object.
*/
diff -Nurd flex-2.5.35/flexint.h flex-2.5.35-new/flexint.h
--- flex-2.5.35/flexint.h 2006-03-20 21:17:56.000000000 -0500
+++ flex-2.5.35-new/flexint.h 2009-04-29 10:27:25.000000000 -0400
@@ -28,7 +28,6 @@
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -59,5 +58,6 @@
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
#endif /* ! FLEXINT_H */
diff -Nurd flex-2.5.35/gen.c flex-2.5.35-new/gen.c
--- flex-2.5.35/gen.c 2007-05-31 02:21:57.000000000 -0400
+++ flex-2.5.35-new/gen.c 2009-04-29 10:27:25.000000000 -0400
@@ -1890,7 +1890,7 @@
outn ("\tif ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \\");
outn ("\t\t{ \\");
outn ("\t\tint c = '*'; \\");
- outn ("\t\tint n; \\");
+ outn ("\t\tsize_t n; \\");
outn ("\t\tfor ( n = 0; n < max_size && \\");
outn ("\t\t\t (c = getc( yyin )) != EOF && c != '\\n'; ++n ) \\");
outn ("\t\t\tbuf[n] = (char) c; \\");
diff -Nurd flex-2.5.35/scan.c flex-2.5.35-new/scan.c
--- flex-2.5.35/scan.c 2008-02-26 16:34:23.000000000 -0500
+++ flex-2.5.35-new/scan.c 2009-04-29 10:27:25.000000000 -0400
@@ -1,5 +1,6 @@
+#line 2 "scan.c"
-#line 3 "scan.c"
+#line 4 "scan.c"
#define YY_INT_ALIGNED short int
@@ -53,7 +54,6 @@
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
@@ -84,6 +84,8 @@
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
@@ -140,7 +142,15 @@
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@@ -2085,7 +2095,12 @@
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@@ -2093,7 +2108,7 @@
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO fwrite( yytext, yyleng, 1, yyout )
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -2104,7 +2119,7 @@
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- int n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -4847,8 +4862,8 @@
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
diff -Nurd flex-2.5.35/skel.c flex-2.5.35-new/skel.c
--- flex-2.5.35/skel.c 2008-02-26 16:34:19.000000000 -0500
+++ flex-2.5.35-new/skel.c 2009-04-29 10:27:25.000000000 -0400
@@ -244,7 +244,6 @@
"typedef unsigned char flex_uint8_t; ",
"typedef unsigned short int flex_uint16_t;",
"typedef unsigned int flex_uint32_t;",
- "#endif /* ! C99 */",
"",
"/* Limits of integral types. */",
"#ifndef INT8_MIN",
@@ -275,6 +274,7 @@
"#define UINT32_MAX (4294967295U)",
"#endif",
"",
+ "#endif /* ! C99 */",
"",
"#endif /* ! FLEXINT_H */",
"",
@@ -285,6 +285,7 @@
"#include
"#include
"#include
+ "#include
"#include
"/* end standard C++ headers. */",
"%endif",
@@ -510,7 +511,15 @@
"",
"/* Size of default input buffer. */",
"#ifndef YY_BUF_SIZE",
+ "#ifdef __ia64__",
+ "/* On IA-64, the buffer size is 16k, not 8k.",
+ " * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.",
+ " * Ditto for the __ia64__ case accordingly.",
+ " */",
+ "#define YY_BUF_SIZE 32768",
+ "#else",
"#define YY_BUF_SIZE 16384",
+ "#endif /* __ia64__ */",
"#endif",
"",
"m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
@@ -1130,7 +1139,12 @@
"",
"/* Amount of stuff to slurp up with each read. */",
"#ifndef YY_READ_BUF_SIZE",
+ "#ifdef __ia64__",
+ "/* On IA-64, the buffer size is 16k, not 8k */",
+ "#define YY_READ_BUF_SIZE 16384",
+ "#else",
"#define YY_READ_BUF_SIZE 8192",
+ "#endif /* __ia64__ */",
"#endif",
"",
"m4_ifdef( [[M4_YY_NOT_IN_HEADER]],",
@@ -1141,7 +1155,7 @@
"/* This used to be an fputs(), but since the string might contain NUL's,",
" * we now use fwrite().",
" */",
- "#define ECHO fwrite( yytext, yyleng, 1, yyout )",
+ "#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)",
"%endif",
"%if-c++-only C++ definition",
"#define ECHO LexerOutput( yytext, yyleng )",
@@ -2559,8 +2573,8 @@
"%if-c-only",
"/** Setup the input buffer state to scan the given bytes. The next call to yylex() will",
" * scan from a @e copy of @a bytes.",
- " * @param bytes the byte buffer to scan",
- " * @param len the number of bytes in the buffer pointed to by @a bytes.",
+ " * @param yybytes the byte buffer to scan",
+ " * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.",
" * M4_YY_DOC_PARAM",
" * @return the newly allocated buffer state object.",
" */",
diff -Nurd flex-2.5.35/tests/test-bison-nr/Makefile.in flex-2.5.35-new/tests/test-bison-nr/Makefile.in
--- flex-2.5.35/tests/test-bison-nr/Makefile.in 2008-02-26 16:34:05.000000000 -0500
+++ flex-2.5.35-new/tests/test-bison-nr/Makefile.in 2009-04-29 10:31:03.000000000 -0400
@@ -343,7 +343,7 @@
uninstall-info-am
-scanner.c: $(srcdir)/scanner.l
+scanner.c scanner.h: $(srcdir)/scanner.l
$(FLEX) $<
parser.c: $(srcdir)/parser.y
@@ -359,7 +359,8 @@
$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
parser.h: parser.c
-scanner.c main.o: parser.h
+scanner.o: parser.h
+main.o: parser.h scanner.h
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff -Nurd flex-2.5.35/tests/test-bison-yylloc/Makefile.in flex-2.5.35-new/tests/test-bison-yylloc/Makefile.in
--- flex-2.5.35/tests/test-bison-yylloc/Makefile.in 2008-02-26 16:34:06.000000000 -0500
+++ flex-2.5.35-new/tests/test-bison-yylloc/Makefile.in 2009-04-29 10:31:41.000000000 -0400
@@ -343,7 +343,7 @@
uninstall-info-am
-scanner.c: $(srcdir)/scanner.l
+scanner.c scanner.h: $(srcdir)/scanner.l
$(FLEX) $<
parser.c: $(srcdir)/parser.y
@@ -359,7 +359,8 @@
$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
parser.h: parser.c
-scanner.c main.o: parser.h
+scanner.o: parser.h
+main.o: parser.h scanner.h
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff -Nurd flex-2.5.35/tests/test-bison-yylval/Makefile.in flex-2.5.35-new/tests/test-bison-yylval/Makefile.in
--- flex-2.5.35/tests/test-bison-yylval/Makefile.in 2008-02-26 16:34:06.000000000 -0500
+++ flex-2.5.35-new/tests/test-bison-yylval/Makefile.in 2009-04-29 10:32:00.000000000 -0400
@@ -343,7 +343,7 @@
uninstall-info-am
-scanner.c: $(srcdir)/scanner.l
+scanner.c scanner.h: $(srcdir)/scanner.l
$(FLEX) $<
parser.c: $(srcdir)/parser.y
@@ -359,7 +359,7 @@
$(CC) -c -o $@ $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS) $<
parser.h: parser.c
-main.o: parser.h
+main.o: parser.h scanner.h
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: