blob: be88edcdf7b0f85193a3384c71e2026586cd4521 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
#
# Please submit bugfixes or comments via http://bugs.meego.com/
#
Name: flex
Version: 2.5.35
Release: 2
License: BSD
Summary: A tool for creating scanners (text pattern recognizers)
Url: http://flex.sourceforge.net/
Group: Development/Tools
Source: http://prdownloads.sourceforge.net/flex/flex-%{version}.tar.bz2
Patch0: flex-2.5.35-sign.patch
# borrowed from fc12
Patch1: flex-2.5.35-hardening.patch
Patch2: flex-2.5.35-gcc44.patch
BuildRequires: bison
BuildRequires: m4
Requires: m4
%description
The flex program generates scanners. Scanners are programs which can
recognize lexical patterns in text. Flex takes pairs of regular
expressions and C code as input and generates a C source file as
output. The output file is compiled and linked with a library to
produce an executable. The executable searches through its input for
occurrences of the regular expressions. When a match is found, it
executes the corresponding C code. Flex was designed to work with
both Yacc and Bison, and is used by many programs as part of their
build process.
You should install flex if you are going to use your system for
application development.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
%configure --disable-dependency-tracking CFLAGS="-fPIC %{optflags}" --disable-nls
make %{?_smp_mflags}
%install
%make_install
rm -f %{buildroot}/%{_infodir}/*
( cd %{buildroot}
ln -sf flex .%{_bindir}/lex
ln -sf flex .%{_bindir}/flex++
ln -s flex.1 .%{_mandir}/man1/lex.1
ln -s flex.1 .%{_mandir}/man1/flex++.1
ln -s libfl.a .%{_libdir}/libl.a
)
%check
%if0
echo ============TESTING===============
make check
echo ============END TESTING===========
%endif
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc COPYING
%{_bindir}/*
%doc %{_mandir}/man1/*
%{_libdir}/*.a
%{_includedir}/FlexLexer.h
|