79c115
Summary: A tool for creating scanners (text pattern recognizers)
79c115
Name: flex
79c115
Version: 2.5.37
79c115
Release: 6%{?dist}
79c115
# parse.c and parse.h are under GPLv3+ with exception which allows
79c115
#	relicensing.  Since flex is shipped under BDS-style license,
79c115
#	let's  assume that the relicensing was done.
79c115
# gettext.h (copied from gnulib) is under LGPLv2+
79c115
License: BSD and LGPLv2+
79c115
Group: Development/Tools
79c115
URL: http://flex.sourceforge.net/
79c115
Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
79c115
79c115
# https://sourceforge.net/tracker/?func=detail&aid=3546447&group_id=97492&atid=618177
79c115
Patch0: flex-2.5.36-bison-2.6.1.patch
79c115
Patch1: flex-rh1439367.patch
79c115
Patch2: flex-rh1210022.patch
79c115
79c115
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
79c115
Requires: m4
79c115
BuildRequires: gettext bison m4 gcc-c++
79c115
Requires(post): /sbin/install-info
79c115
Requires(preun): /sbin/install-info
79c115
79c115
%description
79c115
The flex program generates scanners.  Scanners are programs which can
79c115
recognize lexical patterns in text.  Flex takes pairs of regular
79c115
expressions and C code as input and generates a C source file as
79c115
output.  The output file is compiled and linked with a library to
79c115
produce an executable.  The executable searches through its input for
79c115
occurrences of the regular expressions.  When a match is found, it
79c115
executes the corresponding C code.  Flex was designed to work with
79c115
both Yacc and Bison, and is used by many programs as part of their
79c115
build process.
79c115
79c115
You should install flex if you are going to use your system for
79c115
application development.
79c115
79c115
# We keep the libraries in separate sub-package to allow for multilib
79c115
# installations of flex.
79c115
%package devel
79c115
Summary: Libraries for flex scanner generator
79c115
Group: Development/Tools
79c115
Obsoletes: flex-static < 2.5.35-15
79c115
Provides: flex-static
79c115
79c115
%description devel
79c115
79c115
This package contains the library with default implementations of
79c115
`main' and `yywrap' functions that the client binary can choose to use
79c115
instead of implementing their own.
79c115
79c115
%package doc
79c115
Summary: Documentation for flex scanner generator
79c115
Group: Documentation
79c115
79c115
%description doc
79c115
79c115
This package contains documentation for flex scanner generator in
79c115
plain text and PDF formats.
79c115
79c115
%prep
79c115
%setup -q
79c115
%patch0 -p1
79c115
%patch1 -p1
79c115
%patch2 -p1
79c115
79c115
%global flexdocdir %{_datadir}/doc/flex-doc-%{version}
79c115
79c115
%build
79c115
%configure --disable-dependency-tracking CFLAGS="-fPIC $RPM_OPT_FLAGS"
79c115
make %{?_smp_mflags}
79c115
79c115
%install
79c115
rm -rf $RPM_BUILD_ROOT
79c115
make DESTDIR=$RPM_BUILD_ROOT docdir=%{flexdocdir} install
79c115
rm -f $RPM_BUILD_ROOT/%{_infodir}/dir
79c115
rm -f $RPM_BUILD_ROOT/%{flexdocdir}/{README.cvs,TODO}
79c115
79c115
( cd ${RPM_BUILD_ROOT}
79c115
  ln -sf flex .%{_bindir}/lex
79c115
  ln -sf flex .%{_bindir}/flex++
79c115
  ln -s flex.1 .%{_mandir}/man1/lex.1
79c115
  ln -s flex.1 .%{_mandir}/man1/flex++.1
79c115
  ln -s libfl.a .%{_libdir}/libl.a
79c115
)
79c115
79c115
%find_lang flex
79c115
79c115
%post
79c115
if [ -f %{_infodir}/flex.info.gz ]; then # for --excludedocs
79c115
   /sbin/install-info %{_infodir}/flex.info.gz --dir-file=%{_infodir}/dir ||:
79c115
fi
79c115
79c115
%preun
79c115
if [ $1 = 0 ]; then
79c115
    if [ -f %{_infodir}/flex.info.gz ]; then # for --excludedocs
79c115
	/sbin/install-info --delete %{_infodir}/%{name}.info.gz %{_infodir}/dir ||:
79c115
    fi
79c115
fi
79c115
79c115
%check
79c115
echo ============TESTING===============
79c115
make check
79c115
echo ============END TESTING===========
79c115
79c115
%clean
79c115
rm -rf ${RPM_BUILD_ROOT}
79c115
79c115
%files -f flex.lang
79c115
%defattr(-,root,root)
79c115
%doc COPYING NEWS README
79c115
%{_bindir}/*
79c115
%{_mandir}/man1/*
79c115
%{_includedir}/FlexLexer.h
79c115
%{_infodir}/flex.info*
79c115
79c115
%files devel
79c115
%defattr(-,root,root)
79c115
%{_libdir}/*.a
79c115
79c115
%files doc
79c115
%defattr(-,root,root)
79c115
%{_datadir}/doc/flex-doc-%{version}
79c115
79c115
%changelog
79c115
* Thu Jul 12 2018 Patsy Franklin <pfrankli@redhat.com> - 2.5.37-6
79c115
- Build requires gcc-c++ for building from source. (#1600429)
79c115
79c115
* Wed May 23 2018 Arjun Shankar <arjun@redhat.com> - 2.5.37-5
79c115
- Remove g++ signed/unsigned comparison warning in generated scanner (#1210022)
79c115
79c115
* Mon May 21 2018 Arjun Shankar <arjun@redhat.com> - 2.5.37-4
79c115
- Fix testsuite build issues (#1439367)
79c115
79c115
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 2.5.37-3
79c115
- Mass rebuild 2014-01-24
79c115
79c115
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 2.5.37-2
79c115
- Mass rebuild 2013-12-27
79c115
79c115
* Wed Mar 20 2013 Petr Machata <pmachata@redhat.com> - 2.5.37-1
79c115
- Rebase to 2.5.37
79c115
79c115
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.36-3
79c115
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
79c115
79c115
* Fri Oct 26 2012 Petr Machata <pmachata@redhat.com> - 2.5.36-2
79c115
- Bump for rebuild
79c115
79c115
* Tue Jul 31 2012 Petr Machata <pmachata@redhat.com> - 2.5.36-1
79c115
- Rebase to 2.5.36
79c115
  - Drop flex-2.5.35-sign.patch, flex-2.5.35-hardening.patch,
79c115
    flex-2.5.35-gcc44.patch, flex-2.5.35-missing-prototypes.patch
79c115
  - Add flex-2.5.36-bison-2.6.1.patch
79c115
  - Add a subpackage doc
79c115
- Resolves #842073
79c115
79c115
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.35-16
79c115
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
79c115
79c115
* Mon Mar 12 2012 Petr Machata <pmachata@redhat.com> - 2.5.35-15
79c115
- Rename flex-static to flex-devel so that it gets to repositories of
79c115
  minor multi-lib arch (i386 on x86_64 etc.)
79c115
- Resolves: #674301
79c115
79c115
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.35-14
79c115
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
79c115
79c115
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.35-13
79c115
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
79c115
79c115
* Tue Aug 17 2010 Petr Machata <pmachata@redhat.com> - 2.5.35-12
79c115
- Drop the dependency of core package on flex-static.
79c115
- Resolves: #624549
79c115
79c115
* Wed Jul 14 2010 Petr Machata <pmachata@redhat.com> - 2.5.35-11
79c115
- Forgot that the changes in flex.skl won't propagate to skel.c
79c115
- Resolves: #612465
79c115
79c115
* Tue Jul 13 2010 Petr Machata <pmachata@redhat.com> - 2.5.35-10
79c115
- Declare yyget_column and yyset_column in reentrant mode.
79c115
- Resolves: #612465
79c115
79c115
* Wed Jan 20 2010 Petr Machata <pmachata@redhat.com> - 2.5.35-9
79c115
- Move libraries into a sub-package of their own.
79c115
79c115
* Tue Jan 12 2010 Petr Machata <pmachata@redhat.com> - 2.5.35-8
79c115
- Add source URL
79c115
79c115
* Mon Aug 24 2009 Petr Machata <pmachata@redhat.com> - 2.5.35-7
79c115
- Fix installation with --excludedocs
79c115
- Resolves: #515928
79c115
79c115
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.35-6
79c115
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
79c115
79c115
* Mon Apr 20 2009 Debarshi Ray <rishi@fedoraproject.org> - 2.5.35-5
79c115
- Resolves: #496548.
79c115
79c115
* Mon Apr 20 2009 Petr Machata <pmachata@redhat.com> - 2.5.35-4
79c115
- Get rid of warning caused by ignoring return value of fwrite() in
79c115
  ECHO macro.  Debian patch.
79c115
- Resolves: #484961
79c115
79c115
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.35-3
79c115
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
79c115
79c115
* Mon May 12 2008 Petr Machata <pmachata@redhat.com> - 2.5.35-2
79c115
- Resolves: #445950
79c115
79c115
* Wed Feb 27 2008 Petr Machata <pmachata@redhat.com> - 2.5.35-1
79c115
- Rebase to 2.5.35. Drop two patches.
79c115
- Resolves: #434961
79c115
- Resolves: #435047
79c115
79c115
* Mon Feb 25 2008 Petr Machata <pmachata@redhat.com> - 2.5.34-1
79c115
- Rebase to 2.5.34. Drop five patches.
79c115
- Resolves: #434676
79c115
79c115
* Mon Feb 11 2008 Petr Machata <pmachata@redhat.com> - 2.5.33-17
79c115
- Generate prototypes for accessor functions.  Upstream patch.
79c115
- Related: #432203
79c115
79c115
* Mon Feb  4 2008 Petr Machata <pmachata@redhat.com> - 2.5.33-16
79c115
- Fix comparison between signed and unsigned in generated scanner.
79c115
  Patch by Roland McGrath.
79c115
- Resolves: #431151
79c115
79c115
* Tue Jan 15 2008 Stepan Kasal <skasal@redhat.com> - 2.5.33-15
79c115
- Do not run autogen.sh, it undoes the effect of includedir patch.
79c115
- Adapt test-linedir-r.patch so that it fixes Makefile.in and works
79c115
  even though autogen.sh is not run.
79c115
79c115
* Thu Jan 10 2008 Stepan Kasal <skasal@redhat.com> - 2.5.33-14
79c115
- Insert the "-fPIC" on configure command-line.
79c115
- Drop the -fPIC patch.
79c115
79c115
* Tue Jan  8 2008 Petr Machata <pmachata@redhat.com> - 2.5.33-13
79c115
- Patch with -fPIC only after the autogen.sh is run.
79c115
79c115
* Thu Jan  3 2008 Petr Machata <pmachata@redhat.com> - 2.5.33-12
79c115
- Run autogen.sh before the rest of the build.
79c115
- Add BR autoconf automake gettext-devel.
79c115
79c115
* Thu Aug 30 2007 Petr Machata <pmachata@redhat.com> - 2.5.33-11
79c115
- Add BR gawk
79c115
- Fix use of awk in one of the tests
79c115
79c115
* Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 2.5.33-10
79c115
- Rebuild for selinux ppc32 issue.
79c115
79c115
* Fri Jun 22 2007 Petr Machata <pmachata@redhat.com> - 2.5.33-9
79c115
- Remove wrong use of @includedir@ in Makefile.in.
79c115
- Spec cleanups.
79c115
- Related: #225758
79c115
79c115
* Fri Jun 22 2007 Petr Machata <pmachata@redhat.com> - 2.5.33-8
79c115
- Don't emit yy-prefixed variables in C++ mode.  Thanks Srinivas Aji.
79c115
- Related: #242742
79c115
- Related: #244259
79c115
79c115
* Fri May 11 2007 Petr Machata <pmachata@redhat.com> - 2.5.33-7
79c115
- Allow joining short options into one commandline argument.
79c115
- Resolves: #239695
79c115
79c115
* Fri Mar 30 2007 Petr Machata <pmachata@redhat.com> - 2.5.33-5
79c115
- Make yy-prefixed variables available to scanner even with -P.
79c115
79c115
* Fri Feb  2 2007 Petr Machata <pmachata@redhat.com> - 2.5.33-4
79c115
- Use %%find_lang to package locale files.
79c115
79c115
* Wed Jan 31 2007 Petr Machata <pmachata@redhat.com> - 2.5.33-3
79c115
- Compile with -fPIC.
79c115
79c115
* Tue Jan 30 2007 Petr Machata <pmachata@redaht.com> - 2.5.33-2
79c115
- Add Requires:m4.
79c115
79c115
* Fri Jan 19 2007 Petr Machata <pmachata@redhat.com> - 2.5.33-1
79c115
- Rebase to 2.5.33
79c115
79c115
* Tue Jul 18 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-41
79c115
- Reverting posix patch.  Imposing posix because of warning is too
79c115
  much of a restriction.
79c115
79c115
* Sun Jul 16 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-40
79c115
- using dist tag
79c115
79c115
* Fri Jul 14 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-39
79c115
- fileno is defined in posix standard, so adding #define _POSIX_SOURCE
79c115
  to compile without warnings (#195687)
79c115
- dropping 183098 test, since the original bug was already resolved
79c115
79c115
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-38.1
79c115
- rebuild
79c115
79c115
* Fri Mar 10 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-38
79c115
- Caught the real cause of #183098.  It failed because the parser
79c115
  built with `flex -f' *sometimes* made it into the final package, and
79c115
  -f assumes seven-bit tables.  Solution has two steps.  Move `make
79c115
  bigcheck' to `%%check' part, where it belongs anyway, so that flexes
79c115
  built during `make bigcheck' don't overwrite original build.  And
79c115
  change makefile so that `make bigcheck' will *always* execute *all*
79c115
  check commands.
79c115
79c115
* Wed Mar  8 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.4
79c115
- adding test for #183098 into build process
79c115
79c115
* Fri Mar  3 2006 Petr Machata <pmachata@redhat.com> - 2.5.4a-37.3
79c115
- rebuilt, no changes inside. In hunt for #183098
79c115
79c115
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.2
79c115
- bump again for double-long bug on ppc(64)
79c115
79c115
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.5.4a-37.1
79c115
- rebuilt for new gcc4.1 snapshot and glibc changes
79c115
79c115
* Thu Feb 02 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-37
79c115
- adding `make bigcheck' into build process.  Refreshing initscan.c to
79c115
  make this possible.
79c115
79c115
* Wed Jan 18 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-36
79c115
- Applying Jonathan S. Shapiro's bugfix-fixing patch. More std:: fixes
79c115
  and better way to silent warnings under gcc.
79c115
79c115
* Fri Jan 13 2006 Petr Machata <pmachata@redhat.com> 2.5.4a-35
79c115
- Adding `std::' prefixes, got rid of `using namespace std'. (#115354)
79c115
- Dummy use of `yy_flex_realloc' to silent warnings. (#30943)
79c115
- Adding URL of flex home page to spec (#142675)
79c115
79c115
* Sun Dec 18 2005 Jason Vas Dias<jvdias@redhat.com>
79c115
- rebuild with 'flex-pic.patch' to enable -pie links
79c115
  on x86_64 (patch from Jesse Keating) .
79c115
79c115
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
79c115
- rebuilt
79c115
79c115
* Sun Apr 10 2005 Jakub Jelinek <jakub@redhat.com> 2.5.4a-34
79c115
- rebuilt with GCC 4
79c115
- add %%check script
79c115
79c115
* Tue Aug 24 2004 Warren Togami <wtogami@redhat.com> 2.5.4a-33
79c115
- #116407 BR byacc
79c115
79c115
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
79c115
- rebuilt
79c115
79c115
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
79c115
- rebuilt
79c115
79c115
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
79c115
- rebuilt
79c115
79c115
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
79c115
- rebuilt
79c115
79c115
* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
79c115
- rebuilt
79c115
79c115
* Tue Jan  7 2003 Jeff Johnson <jbj@redhat.com> 2.5.4a-28
79c115
- don't include -debuginfo files in package.
79c115
79c115
* Mon Nov  4 2002 Than Ngo <than@redhat.com> 2.5.4a-27
79c115
- YY_NO_INPUT patch from Jean Marie
79c115
79c115
* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
79c115
- automated rebuild
79c115
79c115
* Tue Jun 18 2002 Than Ngo <than@redhat.com> 2.5.4a-25
79c115
- don't forcibly strip binaries
79c115
79c115
* Thu May 23 2002 Tim Powers <timp@redhat.com>
79c115
- automated rebuild
79c115
79c115
* Tue Apr  2 2002 Than Ngo <than@redhat.com> 2.5.4a-23
79c115
- More ISO C++ 98 fixes (#59670)
79c115
79c115
* Tue Feb 26 2002 Than Ngo <than@redhat.com> 2.5.4a-22
79c115
- rebuild in new enviroment
79c115
79c115
* Wed Feb 20 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-21
79c115
- More ISO C++ 98 fixes (#59670)
79c115
79c115
* Tue Feb 19 2002 Bernhard Rosenkraenzer <bero@redhat.com> 2.5.4a-20
79c115
- Fix ISO C++ 98 compliance (#59670)
79c115
79c115
* Wed Jan 23 2002 Than Ngo <than@redhat.com> 2.5.4a-19
79c115
- fixed #58643
79c115
79c115
* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
79c115
- automated rebuild
79c115
79c115
* Tue Nov  6 2001 Than Ngo <than@redhat.com> 2.5.4a-17
79c115
- fixed for working with gcc 3 (bug #55778)
79c115
79c115
* Sat Oct 13 2001 Than Ngo <than@redhat.com> 2.5.4a-16
79c115
- fix wrong License (bug #54574)
79c115
79c115
* Sun Jun 24 2001 Elliot Lee <sopwith@redhat.com>
79c115
- Bump release + rebuild.
79c115
79c115
* Sat Sep 30 2000 Bernhard Rosenkraenzer <bero@redhat.com>
79c115
- Fix generation of broken code (conflicting isatty() prototype w/ glibc 2.2)
79c115
  This broke, among other things, the kdelibs 2.0 build
79c115
- Fix source URL
79c115
79c115
* Thu Sep  7 2000 Jeff Johnson <jbj@redhat.com>
79c115
- FHS packaging (64bit systems need to use libdir).
79c115
79c115
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
79c115
- automatic rebuild
79c115
79c115
* Tue Jun  6 2000 Bill Nottingham <notting@redhat.com>
79c115
- rebuild, FHS stuff.
79c115
79c115
* Thu Feb  3 2000 Bill Nottingham <notting@redhat.com>
79c115
- handle compressed man pages
79c115
79c115
* Fri Jan 28 2000 Bill Nottingham <notting@redhat.com>
79c115
- add a libl.a link to libfl.a
79c115
79c115
* Wed Aug 25 1999 Jeff Johnson <jbj@redhat.com>
79c115
- avoid uninitialized variable warning (Erez Zadok).
79c115
79c115
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
79c115
- auto rebuild in the new build environment (release 6)
79c115
79c115
* Fri Dec 18 1998 Bill Nottingham <notting@redhat.com>
79c115
- build for 6.0 tree
79c115
79c115
* Mon Aug 10 1998 Jeff Johnson <jbj@redhat.com>
79c115
- build root
79c115
79c115
* Mon Apr 27 1998 Prospector System <bugs@redhat.com>
79c115
- translations modified for de, fr, tr
79c115
79c115
* Thu Oct 23 1997 Donnie Barnes <djb@redhat.com>
79c115
- updated from 2.5.4 to 2.5.4a
79c115
79c115
* Mon Jun 02 1997 Erik Troan <ewt@redhat.com>
79c115
- built against glibc
79c115
79c115
* Thu Mar 20 1997 Michael Fulbright <msf@redhat.com>
79c115
- Updated to v. 2.5.4