Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37865751
en ru br
ALT Linux repos
S:2.6.4.0.88.9801-alt2
5.0: 2.5.33-alt3
4.1: 2.5.33-alt3
4.0: 2.5.33-alt3
3.0: 2.5.4a-ipl16mdk

Group :: Development/Other
RPM: flex

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Name: flex
Version: 2.5.33
Release: alt3

Summary: A fast lexical analyzer generator
License: BSD-style
Group: Development/Other
Url: http://flex.sourceforge.net/
Packager: Dmitry V. Levin <ldv at altlinux.org>

# http://prdownloads.sourceforge.net/flex/flex-%version.tar.bz2?download

Source0: flex-%version.tar
Source1: flex-NEWS.ALT
Patch0: flex-2.5.33-alt-YY_STATE_BUF_SIZE.patch
Patch1: flex-2.5.33-deb-11.patch
Patch2: flex-2.5.31-alt-texinfo.patch

Requires(post): %install_info
Requires(preun): %uninstall_info
Requires: m4 >= 0:1.4
Conflicts: flex-old

BuildRequires: cvs, flex, help2man

%description
flex is a tool for generating scanners: programs which recognized lexical
patterns in text.  flex reads the given input files for a description of a
scanner to generate.  The description is in the form of pairs of regular
expressions and C code, called rules.  flex generates as output a C source
file, lex.yy.c, which defines a routine yylex().  This file is compiled
and linked with the -lfl library to produce an executable.  When the
executable is run, it analyzes its input for occurrences of the regular
expressions.  Whenever it finds one, it executes the corresponding C code.

The behaviour of Flex has undergone a major change since version
2.5.4a.  Flex scanners are now reentrant, you may have multiple
scanners in the same program with differing sets of defaults, and
they play nicer with modern C and C++ compilers.  The Flip side is
that Flex no longer conforms to the POSIX lex behaviour, and the
scanners require conforming implementations when flex is used in ANSI
C mode.  The package flex-old provides the older behaviour.

%prep
%setup -q
%patch0 -p0
%patch1 -p1
%patch2 -p1
install -pm644 %_sourcedir/flex-NEWS.ALT NEWS.ALT
bzip2 -9k NEWS

%build
rm parse.[hc]
autoreconf -fisv
%configure
%make_build CFLAGS='%optflags -D_REENTRANT'

%install
%makeinstall

ln -s flex %buildroot%_bindir/lex
ln -s flex %buildroot%_bindir/flex++
ln -s libfl.a %buildroot%_libdir/libl.a
ln -s flex.1 %buildroot%_man1dir/lex.1
ln -s flex.1 %buildroot%_man1dir/flex++.1

%find_lang %name

%post
%install_info flex.info

%preun
%uninstall_info flex.info

%files -f %name.lang
%doc AUTHORS COPYING NEWS.* README examples
%_bindir/*
%_libdir/*
%_includedir/*
%_mandir/man?/*
%_infodir/*.info*

%changelog

Full changelog you can see here

 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin