Sync from SUSE:SLFO:Main flex revision d04bbfb556ce0454b0cedeed0637f44e

This commit is contained in:
Adrian Schröter 2024-05-03 12:33:36 +02:00
commit f2c18a848c
8 changed files with 569 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -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

8
README.SUSE Normal file
View File

@ -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.

3
baselibs.conf Normal file
View File

@ -0,0 +1,3 @@
flex
libfl2
libfl-devel

BIN
flex-2.6.4.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

389
flex.changes Normal file
View File

@ -0,0 +1,389 @@
-------------------------------------------------------------------
Sat May 1 19:02:40 UTC 2021 - Dirk Müller <dmueller@suse.com>
- stop installing COPYING into docdir (already in licensedir)
-------------------------------------------------------------------
Mon Feb 15 10:12:39 UTC 2021 - Martin Pluskal <mpluskal@suse.com>
- Update project url
-------------------------------------------------------------------
Wed Aug 14 14:37:36 UTC 2019 - Martin Pluskal <mpluskal@suse.com>
- Enable profile guided optimization during build
-------------------------------------------------------------------
Mon Sep 11 19:12:56 UTC 2017 - jengelh@inai.de
- Fix RPM categories.
-------------------------------------------------------------------
Mon Jul 31 12:12:19 UTC 2017 - schwab@suse.de
- use-extensions.patch: add AC_USE_SYSTEM_EXTENSIONS to get missing
declaration
-------------------------------------------------------------------
Mon Jul 3 10:08:31 UTC 2017 - mpluskal@suse.com
- Explicitly require m4 and library devel package
- Do not ship static library
-------------------------------------------------------------------
Sun Jun 25 19:34:29 UTC 2017 - astieger@suse.com
- flex 2.6.4:
* Some minor performance enhancements
* honor user defined yy_* macros again
- includes changes from 2.6.3:
* several bug fixes resolved problems introduced in recent flex
versions regarding processing of comments, literals and various
quoting scenarios.
* fix buffer overflow through long path (bsc#1026047)
- includes changes from 2.6.2:
* a segfalt involving yyrestart(NULL) has been fixed
* flex should now handle quoting when mixed with m4 processing
correctly
* flex handles `[[' and `]]' correctly
* flex no longer generates non-ANSI code
* more compilation warnings were squashed in generated scanners
* prevented a buffer overflow that could occur when input buffers
were the exact wrong size
- drop flex-2.6.1-fPIC.patch
- build the shared library and split libfl
-------------------------------------------------------------------
Tue Feb 7 14:05:38 UTC 2017 - dimstar@opensuse.org
- Fix de-registration of the info files.
-------------------------------------------------------------------
Thu Jul 14 09:00:23 UTC 2016 - mpluskal@suse.com
- Small spec file cleanup
-------------------------------------------------------------------
Tue Apr 26 09:26:03 UTC 2016 - idonmez@suse.com
- Update to version 2.6.1
* A number of compiler warnings have been remedied.
* Line directives should now work as expected and be absent when
that is expected.
* Resolved github issues #53, #54, #55, #61.
* Resolved sf bugs #128, #129, #155, #160, #184, #187, #195.
- Refresh flex-2.5.34-fPIC.patch -> flex-2.6.1-fPIC.patch
- Drop upstream patches: config-guess-sub-update.patch,
flex-2.5.37-bison-2.6.1-1.patch, flex-compatible-with-bison3.patch,
flex-yyleng.patch
- Drop unneeded patch flex-2.5.37-notex.patch
-------------------------------------------------------------------
Sun Feb 15 17:45:41 UTC 2015 - schwab@linux-m68k.org
- flex-yyleng.patch: fix type of yyleng to be int as mandated by POSIX.
Fixes perl-SystemPerl, for example.
-------------------------------------------------------------------
Mon Jan 5 11:35:08 UTC 2015 - mlin@suse.com
- Add flex-compatible-with-bison3.patch
* fix tests with bison3, see http://sourceforge.net/p/flex/flex/ci/c376be574e99b5f64a7dad71cfc7c0b1f71b747b/
-------------------------------------------------------------------
Mon Feb 18 16:51:32 UTC 2013 - schwab@suse.de
- config-guess-sub-update.patch:
Update config.guess/sub for aarch64
-------------------------------------------------------------------
Tue Oct 16 08:33:54 UTC 2012 - coolo@suse.com
- update to 2.5.37
** Import flex into git. See
git://flex.git.sourceforge.net/gitroot/flex/flex.
** Fix make install target to not fail when the flex++ program is
already installed
** New translations from the translation project: de, fi, pl, vi
** various portability fixes that quiet compiler warnings on 64-bit
hosts
** various manual fixes, including correcting the name of a %option and
updating some simple examples to use ANSI C syntax
** various bug fixes that prevent certain error conditions from
persisting when they should not persist
** improvements to the test suite so it behaves better when linking
compiled files
** new translations from the translation project: ca, da, es, fi, fr,
ga, ko, pt_br, ro, ru, sv, tr, zh_cn
** the flex distribution is now built with automake 1.10.1 and automake
2.61
- add patch flex-2.5.37-notex.patch to compile without texlive
- remove patches no longer required:
flex-2.5.33-yylineno.patch
flex-2.5.34-doc-fix.diff
flex-2.5.34-g++44.diff
-------------------------------------------------------------------
Fri Dec 2 15:41:49 UTC 2011 - coolo@suse.com
- add automake as buildrequire to avoid implicit dependency
-------------------------------------------------------------------
Mon Oct 3 17:09:45 CEST 2011 - dmueller@suse.de
- fix compile failure outside ARM
-------------------------------------------------------------------
Fri Sep 30 11:13:00 UTC 2011 - max@suse.com
- Skip the test suite when building in qemu userspace emulation
to fix and speedup build on ARM.
-------------------------------------------------------------------
Sun Sep 18 17:17:12 UTC 2011 - jengelh@medozas.de
- Apply packaging guidelines (remove redundant/obsolete
tags/sections from specfile, etc.)
-------------------------------------------------------------------
Sun Dec 13 01:32:42 CET 2009 - jengelh@medozas.de
- add baselibs.conf as a source
-------------------------------------------------------------------
Sat Jun 13 08:38:26 CEST 2009 - coolo@novell.com
- fix link line
-------------------------------------------------------------------
Mon Jan 12 11:35:11 CET 2009 - rguenther@suse.de
- Add patch to include <cstdio> in the C++ header section. Fixes
the C++ parts of the testsuite with GCC 4.4.
-------------------------------------------------------------------
Wed Dec 10 12:34:56 CET 2008 - olh@suse.de
- use Obsoletes: -XXbit only for ppc64 to help solver during distupgrade
(bnc#437293)
-------------------------------------------------------------------
Thu Oct 30 12:34:56 CET 2008 - olh@suse.de
- obsolete old -XXbit packages (bnc#437293)
-------------------------------------------------------------------
Thu Apr 10 12:54:45 CEST 2008 - ro@suse.de
- added baselibs.conf file to build xxbit packages
for multilib support
-------------------------------------------------------------------
Fri Feb 29 15:44:21 CET 2008 - mmarek@suse.cz
- updated to 2.5.35
* includes previous fixes
* translation updates
-------------------------------------------------------------------
Tue Feb 19 11:19:58 CET 2008 - mmarek@suse.cz
- updated with fixes from flex CVS to fix following bugs in 2.5.34:
#1849809, #1849805, #1628314, #1849812 (details at
http://sourceforge.net/tracker/?group_id=97492&atid=618177 )
-------------------------------------------------------------------
Tue Jan 15 14:55:38 CET 2008 - mmarek@suse.cz
- updated to 2.5.34
* introduce yylex_init_extra; see the manual for details
* introduce %option extra-type="your_type *"
* The flex program now parses multiple short concatenated options
Thanks to Petr Machata of Red Hat on this issue.
* Expose YY_BUF_SIZE in the header file.
* pattern language expanded; see the manual for details on the
below highlights
* pattern options added to specify patterns as case-insensitive
or case-sensitive
* pattern options to specify whether the "." character should
match the newline character
* pattern options added to allow ignoring of whitespace in
patterns
* POSIX character classes may be negated in patterns
* patterns may now use set difference, union operators
* the manual now contains an appendix listing various common
patterns which may be useful when writing scanners
* c++ scanners can now use yywrap
* flex man page and flex manual in pdf now distributed in the
flex distribution
* bugfixes and translation updates
-------------------------------------------------------------------
Mon Mar 26 15:47:02 CEST 2007 - rguenther@suse.de
- Add bison BuildRequires.
-------------------------------------------------------------------
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 <iostream> 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 <iostream> 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<unistd.h>
-------------------------------------------------------------------
Mon Apr 2 18:06:36 CEST 2001 - schwab@suse.de
- Don't try to forward declare class istream, just include <iostream.h>.
-------------------------------------------------------------------
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

129
flex.spec Normal file
View File

@ -0,0 +1,129 @@
#
# spec file for package flex
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define somajor 2
Name: flex
Version: 2.6.4
Release: 0
Summary: Fast Lexical Analyzer Generator
License: BSD-3-Clause
Group: Development/Languages/C and C++
URL: https://github.com/westes/flex
Source: https://github.com/westes/flex/releases/download/v%{version}/flex-%{version}.tar.gz
Source1: lex-wrapper.sh
Source2: README.SUSE
Source3: baselibs.conf
Patch0: use-extensions.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: help2man
BuildRequires: libtool
BuildRequires: m4
Requires: libfl-devel = %{version}
Requires: m4
Requires(post): %{install_info_prereq}
Requires(pre): %{install_info_prereq}
%description
FLEX is a tool for generating scanners: programs that recognize lexical
patterns in text.
%package -n libfl-devel
Summary: Development files for flex
Group: Development/Languages/C and C++
Requires: libfl%{somajor} = %{version}
%description -n libfl-devel
FLEX is a tool for generating scanners: programs that recognize lexical
patterns in text.
This package contains files required to build programs with flex libraries.
%package -n libfl%{somajor}
Summary: Libraries for flex
Group: System/Libraries
%description -n libfl%{somajor}
FLEX is a tool for generating scanners: programs that recognize lexical
patterns in text.
This package contains libraries for using flex.
%prep
%setup -q
%patch0 -p1
%build
cp -a %{SOURCE2} .
autoreconf -fi
%configure \
--docdir=%{_docdir}/%{name}
%if 0%{?do_profiling}
%make_build CFLAGS="%{optflags} %{cflags_profile_generate}"
# do not run profiling in parallel for reproducible builds (boo#1040589 boo#1102408)
%make_build CFLAGS="%{optflags} %{cflags_profile_generate}" check
%make_build clean
%make_build CFLAGS="%{optflags} %{cflags_profile_feedback}"
%else
%make_build CFLAGS="%{optflags}"
%endif
%check
%make_build check
%install
%make_install
find %{buildroot} -type f \( -name '*.a' -o -name '*.la' \) -delete -print
install -D -p -m 0755 %{SOURCE1} %{buildroot}/%{_bindir}/lex
ln -s flex.1%{ext_man} %{buildroot}/%{_mandir}/man1/lex.1%{ext_man}
%find_lang %{name}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info%{ext_info}
%preun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info%{ext_info}
%post -n libfl%{somajor} -p /sbin/ldconfig
%postun -n libfl%{somajor} -p /sbin/ldconfig
%files -f %{name}.lang
%license COPYING
%doc AUTHORS ChangeLog NEWS ONEWS README.md THANKS README.SUSE
%exclude %_docdir/%{name}/COPYING
%{_bindir}/flex
%{_bindir}/flex++
%{_bindir}/lex
%{_mandir}/man1/flex.1%{?ext_man}
%{_mandir}/man1/lex.1%{?ext_man}
%{_infodir}/flex*
%files -n libfl-devel
%license COPYING
%doc AUTHORS ChangeLog NEWS ONEWS README.md THANKS
%{_includedir}/FlexLexer.h
%{_libdir}/libfl.so
%files -n libfl%{somajor}
%license COPYING
%doc AUTHORS ChangeLog NEWS ONEWS README.md THANKS
%{_libdir}/libfl.so.%{somajor}*
%changelog

2
lex-wrapper.sh Normal file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exec /usr/bin/flex -l "$@"

12
use-extensions.patch Normal file
View File

@ -0,0 +1,12 @@
Index: flex-2.6.4/configure.ac
===================================================================
--- flex-2.6.4.orig/configure.ac
+++ flex-2.6.4/configure.ac
@@ -27,6 +27,7 @@
AC_INIT([the fast lexical analyser generator],[2.6.4],[flex-help@lists.sourceforge.net],[flex])
AC_CONFIG_SRCDIR([src/scan.l])
AC_CONFIG_AUX_DIR([build-aux])
+AC_USE_SYSTEM_EXTENSIONS
LT_INIT
AM_INIT_AUTOMAKE([1.11.3 -Wno-portability foreign check-news std-options dist-lzip parallel-tests subdir-objects])
AC_CONFIG_HEADER([src/config.h])