Summary: Tool for generating C-based recognizers from regular expressions Name: re2c Version: 0.13.5 Release: 1 License: Public Domain Group: Development/Tools URL: http://re2c.org/ Source: http://downloads.sf.net/re2c/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %description re2c is a tool for writing very fast and very flexible scanners. Unlike any other such tool, re2c focuses on generating high efficient code for regular expression matching. As a result this allows a much broader range of use than any traditional lexer offers. And Last but not least re2c generates warning free code that is equal to hand-written code in terms of size, speed and quality. %prep %setup -q # Fix all those executable files, set executable only the ones that need to be find . -type f -exec chmod -x {} \; %{__chmod} +x configure depcomp install-sh missing %build export CC=gcc export CFLAGS="-DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include" export CXX=g++ export CXXFLAGS=$CFLAGS export LD=ld export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} # Build re2c, then our own scanner.cc, then rebuild the final re2c with it make %{?_smp_mflags} re2c %{__rm} -f scanner.cc ./re2c -b -o scanner.cc scanner.re %{__rm} -f re2c scanner.o make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make install DESTDIR=${RPM_BUILD_ROOT} /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -sf ../..%{_bindir}/* . %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc CHANGELOG README examples/ doc/* lessons/ %{_bindir}/%{name} %{_mandir}/man1/%{name}.1 /usr/bin/%{name} %changelog * Thu Dec 02 2010 Michael Perzl - 0.13.5-1 - first version for AIX V5.1 and higher