commit b8cbc78cb0ef83c754865f20d38c4da619a59314fe3166c33416097eeed0cc9d Author: OBS User unknown Date: Mon Dec 18 23:15:58 2006 +0000 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/flex?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/README.SUSE b/README.SUSE new file mode 100644 index 0000000..2ec168d --- /dev/null +++ b/README.SUSE @@ -0,0 +1,8 @@ +README.SUSE file for package flex +--------------------------------- + +This version of the flex program (developed at http://lex.sourceforge.net/) is +a major upgrade of the original flex maintained at +http://www.gnu.org/software/flex/ and has some incompatible changes in the +generated scanners. For that reason, we temporarily ship the package flex-old, +which contains the original version. diff --git a/flex-2.5.33-doc-fix.diff b/flex-2.5.33-doc-fix.diff new file mode 100644 index 0000000..baaab4c --- /dev/null +++ b/flex-2.5.33-doc-fix.diff @@ -0,0 +1,91 @@ +The documentation has the td_hilen and td_lolen fields in the wrong +order (comapre with tables_shared.h). + +Andreas Gruenbacher + +--- doc/flex.info-4 ++++ doc/flex.info-4 +@@ -267,8 +267,8 @@ + +-------------------------------+ + Table 1 | uint16 td_id; | + | uint16 td_flags; | +- | uint32 td_lolen; | + | uint32 td_hilen; | ++ | uint32 td_lolen; | + | void td_data[]; | + | uint8 td_pad64[]; | + +-------------------------------+ +@@ -399,12 +399,6 @@ + elements or between structs. The type of each member is + determined by the `YYTD_DATA*' bits. + +-`td_lolen' +- Specifies the number of elements in the lowest dimension array. If +- this is a one-dimensional array, then it is simply the number of +- elements in this array. The element size is determined by the +- `td_flags' field. +- + `td_hilen' + If `td_hilen' is non-zero, then the data is a two-dimensional + array. Otherwise, the data is a one-dimensional array. `td_hilen' +@@ -420,11 +414,17 @@ + simply skipped. Flex does not currently generate tables of zero + length. + ++`td_lolen' ++ Specifies the number of elements in the lowest dimension array. If ++ this is a one-dimensional array, then it is simply the number of ++ elements in this array. The element size is determined by the ++ `td_flags' field. ++ + `td_data[]' + The table data. This array may be a one- or two-dimensional array, + of type `int8', `int16', `int32', `struct yy_trans_info', or + `struct yy_trans_info*', depending upon the values in the +- `td_flags', `td_lolen', and `td_hilen' fields. ++ `td_flags', `td_hilen', and `td_lolen' fields. + + `td_pad64[]' + Zero or more NULL bytes, padding the entire table to the next +--- doc/flex.texi ++++ doc/flex.texi +@@ -4984,8 +4984,8 @@ + +-------------------------------+ + Table 1 | uint16 td_id; | + | uint16 td_flags; | +- | uint32 td_lolen; | + | uint32 td_hilen; | ++ | uint32 td_lolen; | + | void td_data[]; | + | uint8 td_pad64[]; | + +-------------------------------+ +@@ -5104,11 +5104,6 @@ + The type of each member is determined by the @code{YYTD_DATA*} bits. + @end table + +-@item td_lolen +-Specifies the number of elements in the lowest dimension array. If this is +-a one-dimensional array, then it is simply the number of elements in this array. +-The element size is determined by the @code{td_flags} field. +- + @item td_hilen + If @code{td_hilen} is non-zero, then the data is a two-dimensional array. + Otherwise, the data is a one-dimensional array. @code{td_hilen} contains the +@@ -5122,11 +5117,16 @@ + array, and no data is loaded, i.e., this table is simply skipped. Flex does not + currently generate tables of zero length. + ++@item td_lolen ++Specifies the number of elements in the lowest dimension array. If this is ++a one-dimensional array, then it is simply the number of elements in this array. ++The element size is determined by the @code{td_flags} field. ++ + @item td_data[] + The table data. This array may be a one- or two-dimensional array, of type + @code{int8}, @code{int16}, @code{int32}, @code{struct yy_trans_info}, or + @code{struct yy_trans_info*}, depending upon the values in the +-@code{td_flags}, @code{td_lolen}, and @code{td_hilen} fields. ++@code{td_flags}, @code{td_hilen}, and @code{td_lolen} fields. + + @item td_pad64[] + Zero or more NULL bytes, padding the entire table to the next 64-bit boundary as diff --git a/flex-2.5.33-fPIC.patch b/flex-2.5.33-fPIC.patch new file mode 100644 index 0000000..141e287 --- /dev/null +++ b/flex-2.5.33-fPIC.patch @@ -0,0 +1,12 @@ +Needed to link libfl.a into shared libraries +--- Makefile.am ++++ Makefile.am +@@ -73,6 +73,8 @@ + libmain.c \ + libyywrap.c + ++libfl_a_CFLAGS = -fPIC ++ + noinst_HEADERS = \ + flexdef.h \ + flexint.h \ diff --git a/flex-2.5.33-yylineno.patch b/flex-2.5.33-yylineno.patch new file mode 100644 index 0000000..e35f27c --- /dev/null +++ b/flex-2.5.33-yylineno.patch @@ -0,0 +1,36 @@ +--- main.c ++++ main.c +@@ -1633,9 +1633,11 @@ + + if (!C_plus_plus && !reentrant) { + outn ("extern int yylineno;"); +- OUT_BEGIN_CODE (); +- outn ("int yylineno = 1;"); +- OUT_END_CODE (); ++ if (do_yylineno) { ++ OUT_BEGIN_CODE (); ++ outn ("int yylineno = 1;"); ++ OUT_END_CODE (); ++ } + } + + if (C_plus_plus) { +--- flex.skl ++++ flex.skl +@@ -80,6 +80,16 @@ + m4preproc_define(`M4_GEN_PREFIX', + ``m4_define(yy[[$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'') + ++%# don't use yylineno in non-reentrant scanners when %option yylineno not given ++m4_ifdef( [[M4_YY_REENTRANT]],, ++ [[m4_ifdef( [[M4_YY_USE_LINENO]],, ++ [[ ++ m4_define( [[M4_YY_NO_GET_LINENO]], [[]]) ++ m4_define( [[M4_YY_NO_SET_LINENO]], [[]]) ++ ]]) ++ ]] ++) ++ + %if-c++-only + /* The c++ scanner is a mess. The FlexLexer.h header file relies on the + * following macro. This is required in order to pass the c++-multiple-scanners diff --git a/flex-2.5.33.tar.bz2 b/flex-2.5.33.tar.bz2 new file mode 100644 index 0000000..424a7bc --- /dev/null +++ b/flex-2.5.33.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:53b56a62ea9409b99b7a0ac4a5204fac16ca7eaf39b9374164c346d6badc6914 +size 695464 diff --git a/flex.changes b/flex.changes new file mode 100644 index 0000000..15edbd4 --- /dev/null +++ b/flex.changes @@ -0,0 +1,164 @@ +------------------------------------------------------------------- +Wed May 17 15:59:20 CEST 2006 - mmarek@suse.cz + +- update to 2.5.33 + * bugfix release + * obsoleted patches: + - YY_DECL.patch + - array-yymore.patch + - double-free.patch + - keep-macros.patch + - overflow.patch + * kept fPIC.patch, yylineno.patch and doc-fix.diff + +------------------------------------------------------------------- +Tue May 16 10:20:19 CEST 2006 - agruen@suse.de + +- A minor fix in the documentation. + +------------------------------------------------------------------- +Thu Mar 9 18:19:09 CET 2006 - mmarek@suse.cz + +- keep YY_* macros in the generated C file (backport from 2.5.33) + [#141964#c6] (keep-yytext_ptr.patch -> keep-macros.patch) + +------------------------------------------------------------------- +Wed Mar 8 12:37:52 CET 2006 - mmarek@suse.cz + +- removed unneeded part of last fix (C++ scanners weren't affected) + [#151087] (overflow.patch) + +------------------------------------------------------------------- +Fri Feb 17 13:49:57 CET 2006 - mmarek@suse.cz + +- fix buffer overflow in some generated scanners + [#151087] (overflow.patch) + +------------------------------------------------------------------- +Wed Jan 25 21:30:12 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Tue Dec 20 11:27:08 CET 2005 - mmj@suse.de + +- don't package /usr/share/info/dir + +------------------------------------------------------------------- +Thu Dec 15 17:13:44 CET 2005 - mmarek@suse.cz + +- added README.SUSE, packaged some %%doc files + +------------------------------------------------------------------- +Mon Dec 5 13:23:11 CET 2005 - mmarek@suse.cz + +- don't declare int yylineno in non-reentrant scanners without + %option yylineno -- programs declaring their own yylineno should + build now + (yylineno.patch) + +------------------------------------------------------------------- +Mon Nov 28 11:01:11 CET 2005 - mmarek@suse.cz + +- test-noansi-r didn't pass on 64bit, fix from CVS + (YY_DECL.patch) + +------------------------------------------------------------------- +Tue Nov 22 14:20:26 CET 2005 - mmarek@suse.cz + +- update to version 2.5.31 once again... + +------------------------------------------------------------------- +Mon Nov 7 09:48:54 CET 2005 - mmarek@suse.cz + +- compile libfl.a with -fPIC + +------------------------------------------------------------------- +Sun Jan 11 11:41:29 CET 2004 - adrian@suse.de + +- add %defattr + +------------------------------------------------------------------- +Mon Sep 15 13:35:36 CEST 2003 - tcrhak@suse.cz + +- Use and std namespace in flex.skl [bug #30427] + +------------------------------------------------------------------- +Fri Aug 1 15:39:14 CEST 2003 - coolo@suse.de + +- don't strip explicitly + +------------------------------------------------------------------- +Thu Apr 24 12:20:23 CEST 2003 - ro@suse.de + +- fix install_info --delete call and move from preun to postun + +------------------------------------------------------------------- +Fri Feb 7 01:22:11 CET 2003 - ro@suse.de + +- added install_info macros + +------------------------------------------------------------------- +Tue Sep 17 17:34:28 CEST 2002 - ro@suse.de + +- removed bogus self-provides + +------------------------------------------------------------------- +Sat Jul 27 22:05:42 CEST 2002 - kukuk@suse.de + +- remove yacc from neededforbuild, bison is used + +------------------------------------------------------------------- +Wed Jun 26 17:46:54 CEST 2002 - tcrhak@suse.cz + +- update to 2.5.4a (slight change in license only) +- bzipped sources + +------------------------------------------------------------------- +Tue Jan 8 22:28:39 CET 2002 - schwab@suse.de + +- Use and std namespace in FlexLexer.h. + +------------------------------------------------------------------- +Tue Jul 31 15:01:50 CEST 2001 - nadvornik@suse.cz + +- installed info pages [bug #9566] +- added buildroot + +------------------------------------------------------------------- +Wed Apr 11 14:20:06 CEST 2001 - nadvornik@suse.cz + +- declaration of isatty replaced with include + +------------------------------------------------------------------- +Mon Apr 2 18:06:36 CEST 2001 - schwab@suse.de + +- Don't try to forward declare class istream, just include . + +------------------------------------------------------------------- +Tue Nov 21 17:27:02 CET 2000 - kukuk@suse.de + +- Use macros to support multilib plattforms + +------------------------------------------------------------------- +Tue Apr 4 17:59:29 CEST 2000 - bk@suse.de + +- flex needs yacc for building on s390 + +------------------------------------------------------------------- +Fri Feb 25 16:21:14 CET 2000 - schwab@suse.de + +- Specfile cleanup, get rid of Makefile.Linux +- /usr/man -> /usr/share/man +- Add group tag +- Fix lex script + +------------------------------------------------------------------- +Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de + +- ran old prepare_spec on spec file to switch to new prepare_spec. + +---------------------------------------------------------------------------- +Thu Feb 6 11:56:09 CET 1997 - rj@suse.de + + - new version 2.5.4 diff --git a/flex.spec b/flex.spec new file mode 100644 index 0000000..725efd1 --- /dev/null +++ b/flex.spec @@ -0,0 +1,164 @@ +# +# spec file for package flex (Version 2.5.33) +# +# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + +Name: flex +BuildRequires: gcc-c++ help2man +URL: http://flex.sourceforge.net/ +License: BSD, Other License(s), see package +Group: Development/Languages/C and C++ +Requires: m4 +PreReq: %install_info_prereq +Autoreqprov: on +Version: 2.5.33 +Release: 2 +Summary: Fast Lexical Analyzer Generator +Source: %{name}-%{version}.tar.bz2 +Source1: lex-wrapper.sh +Source2: README.SUSE +Patch1: %{name}-%{version}-fPIC.patch +Patch6: %{name}-%{version}-yylineno.patch +Patch8: %{name}-%{version}-doc-fix.diff +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +FLEX is a tool for generating scanners: programs that recognize lexical +patterns in text. + + + +Authors: +-------- + Vern Paxson + Will Estes + John Millaway + +%prep +%setup -q +%patch1 +%patch6 +%patch8 +cp %{S:2} . + +%build +autoreconf -fi +%configure +make %{?jobs:-j%jobs} +make check + +%install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=$RPM_BUILD_ROOT +install %{S:1} $RPM_BUILD_ROOT/%{_bindir}/lex +ln -s flex $RPM_BUILD_ROOT/%{_bindir}/flex++ +ln -s flex.1.gz $RPM_BUILD_ROOT/%{_mandir}/man1/lex.1.gz +%find_lang %{name} + +%clean +rm -rf $RPM_BUILD_ROOT + +%files -f %{name}.lang +%defattr(-,root,root) +/usr/bin/flex +/usr/bin/flex++ +/usr/bin/lex +/usr/include/FlexLexer.h +%{_libdir}/libfl.a +%{_mandir}/man1/flex.1.gz +%{_mandir}/man1/lex.1.gz +%{_infodir}/flex* +%doc README README.SUSE AUTHORS COPYING NEWS + +%post +%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz + +%postun +%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz + +%changelog -n flex +* Wed May 17 2006 - mmarek@suse.cz +- update to 2.5.33 + * bugfix release + * obsoleted patches: +- YY_DECL.patch +- array-yymore.patch +- double-free.patch +- keep-macros.patch +- overflow.patch + * kept fPIC.patch, yylineno.patch and doc-fix.diff +* Tue May 16 2006 - agruen@suse.de +- A minor fix in the documentation. +* Thu Mar 09 2006 - mmarek@suse.cz +- keep YY_* macros in the generated C file (backport from 2.5.33) + [#141964#c6] (keep-yytext_ptr.patch -> keep-macros.patch) +* Wed Mar 08 2006 - mmarek@suse.cz +- removed unneeded part of last fix (C++ scanners weren't affected) + [#151087] (overflow.patch) +* Fri Feb 17 2006 - mmarek@suse.cz +- fix buffer overflow in some generated scanners + [#151087] (overflow.patch) +* Wed Jan 25 2006 - mls@suse.de +- converted neededforbuild to BuildRequires +* Tue Dec 20 2005 - mmj@suse.de +- don't package /usr/share/info/dir +* Thu Dec 15 2005 - mmarek@suse.cz +- added README.SUSE, packaged some %%doc files +* Mon Dec 05 2005 - mmarek@suse.cz +- don't declare int yylineno in non-reentrant scanners without + %%option yylineno -- programs declaring their own yylineno should + build now + (yylineno.patch) +* Mon Nov 28 2005 - mmarek@suse.cz +- test-noansi-r didn't pass on 64bit, fix from CVS + (YY_DECL.patch) +* Tue Nov 22 2005 - mmarek@suse.cz +- update to version 2.5.31 once again... +* Mon Nov 07 2005 - mmarek@suse.cz +- compile libfl.a with -fPIC +* Sun Jan 11 2004 - adrian@suse.de +- add %%defattr +* Mon Sep 15 2003 - tcrhak@suse.cz +- Use and std namespace in flex.skl [bug #30427] +* Fri Aug 01 2003 - coolo@suse.de +- don't strip explicitly +* Thu Apr 24 2003 - ro@suse.de +- fix install_info --delete call and move from preun to postun +* Fri Feb 07 2003 - ro@suse.de +- added install_info macros +* Tue Sep 17 2002 - ro@suse.de +- removed bogus self-provides +* Sat Jul 27 2002 - kukuk@suse.de +- remove yacc from neededforbuild, bison is used +* Wed Jun 26 2002 - tcrhak@suse.cz +- update to 2.5.4a (slight change in license only) +- bzipped sources +* Tue Jan 08 2002 - schwab@suse.de +- Use and std namespace in FlexLexer.h. +* Tue Jul 31 2001 - nadvornik@suse.cz +- installed info pages [bug #9566] +- added buildroot +* Wed Apr 11 2001 - nadvornik@suse.cz +- declaration of isatty replaced with include +* Mon Apr 02 2001 - schwab@suse.de +- Don't try to forward declare class istream, just include . +* Tue Nov 21 2000 - kukuk@suse.de +- Use macros to support multilib plattforms +* Tue Apr 04 2000 - bk@suse.de +- flex needs yacc for building on s390 +* Fri Feb 25 2000 - schwab@suse.de +- Specfile cleanup, get rid of Makefile.Linux +- /usr/man -> /usr/share/man +- Add group tag +- Fix lex script +* Mon Sep 13 1999 - bs@suse.de +- ran old prepare_spec on spec file to switch to new prepare_spec. +* Thu Feb 06 1997 - rj@suse.de +- new version 2.5.4 diff --git a/lex-wrapper.sh b/lex-wrapper.sh new file mode 100644 index 0000000..cca7eb6 --- /dev/null +++ b/lex-wrapper.sh @@ -0,0 +1,2 @@ +#!/bin/sh +exec /usr/bin/flex -l "$@" diff --git a/ready b/ready new file mode 100644 index 0000000..473a0f4