# # spec file for package flex # # Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # 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: 4.3 Summary: Fast Lexical Analyzer Generator License: BSD-3-Clause Group: Development/Languages/C and C++ URL: http://flex.sourceforge.net/ 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 autoreconf -fi %configure \ --docdir=%{_docdir}/%{name} %if 0%{?do_profiling} make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_generate}" V=1 # do not run profiling in parallel for reproducible builds (boo#1040589 boo#1102408) make CFLAGS="%{optflags} %{cflags_profile_generate}" check make %{?_smp_mflags} clean make %{?_smp_mflags} CFLAGS="%{optflags} %{cflags_profile_feedback}" V=1 %else make %{?_smp_mflags} CFLAGS="%{optflags}" %endif %check make %{?_smp_mflags} check %install %make_install find %{buildroot} -type f \( -name '*.a' -o -name '*.la' \) -delete -print install -D -p -m 0755 %{SOURCE1} %{buildroot}/%{_bindir}/lex install -D -p -m 0644 %{SOURCE2} %{buildroot}/%{_docdir}/flex/README.SUSE 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 %{_bindir}/flex %{_bindir}/flex++ %{_bindir}/lex %{_mandir}/man1/flex.1%{?ext_man} %{_mandir}/man1/lex.1%{?ext_man} %{_infodir}/flex* %{_docdir}/%{name} %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 * Wed Aug 14 2019 Martin Pluskal - Enable profile guided optimization during build * Mon Sep 11 2017 jengelh@inai.de - Fix RPM categories. * Mon Jul 31 2017 schwab@suse.de - use-extensions.patch: add AC_USE_SYSTEM_EXTENSIONS to get missing declaration * Mon Jul 3 2017 mpluskal@suse.com - Explicitly require m4 and library devel package - Do not ship static library * Sun Jun 25 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 2017 dimstar@opensuse.org - Fix de-registration of the info files. * Thu Jul 14 2016 mpluskal@suse.com - Small spec file cleanup * Tue Apr 26 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 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 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 2013 schwab@suse.de - config-guess-sub-update.patch: Update config.guess/sub for aarch64 * Tue Oct 16 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 2011 coolo@suse.com - add automake as buildrequire to avoid implicit dependency * Mon Oct 3 2011 dmueller@suse.de - fix compile failure outside ARM * Fri Sep 30 2011 max@suse.com - Skip the test suite when building in qemu userspace emulation to fix and speedup build on ARM. * Sun Sep 18 2011 jengelh@medozas.de - Apply packaging guidelines (remove redundant/obsolete tags/sections from specfile, etc.) * Sun Dec 13 2009 jengelh@medozas.de - add baselibs.conf as a source * Sat Jun 13 2009 coolo@novell.com - fix link line * Mon Jan 12 2009 rguenther@suse.de - Add patch to include in the C++ header section. Fixes the C++ parts of the testsuite with GCC 4.4. * Wed Dec 10 2008 olh@suse.de - use Obsoletes: -XXbit only for ppc64 to help solver during distupgrade (bnc#437293) * Thu Oct 30 2008 olh@suse.de - obsolete old -XXbit packages (bnc#437293) * Thu Apr 10 2008 ro@suse.de - added baselibs.conf file to build xxbit packages for multilib support * Fri Feb 29 2008 mmarek@suse.cz - updated to 2.5.35 * includes previous fixes * translation updates * Tue Feb 19 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 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 2007 rguenther@suse.de - Add bison BuildRequires. * 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 9 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 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 5 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 7 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 1 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 7 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 8 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 2 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 4 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 6 1997 rj@suse.de - new version 2.5.4