%def_enable cross %define ccomp gcc Name: tcc Version: 0.9.23 Release: alt4 Summary: The smallest ANSI C compiler Group: Development/C License: LGPL URL: http://fabrice.bellard.free.fr/%name/ Source: %url/%name-%version.tar.bz2 Patch0: %name-0.9.23-linker-defined_twice.patch.gz Patch1: %name-0.9.23-linker-group_as_needed.patch.gz Patch2: %name-0.9.23-pointer-operators.patch.gz Patch3: %name-0.9.23-union-abstarct.patch.gz Patch4: %name-0.9.23-linker-error.patch.gz Patch5: %name-0.9.23-linker-lib_search_order.patch.gz ExclusiveArch: %ix86 %if %ccomp == tcc BuildRequires: tcc >= 0.9.23-alt3 %endif %description TCC (for Tiny C Compiler) is a small, fast, unlimited and safe ANSI C compiler. It generates optimized x86 code, and can compile, assemble, and link several times faster than 'gcc -O0'. Any C dynamic library can be used directly. It includes an optional memory and bounds checker, and bounds-checked code can be mixed freely with standard code. C script is also supported via the usual hash-bang mechanism. %prep %setup -q %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 subst 's/-m.*386 //g' Makefile* #subst -p 's/\<expect *(/tcc_expect(/g' *.[ch] subst -p 's,/usr/local/bin/,%_bindir/,g' %name{-doc.*,.1} examples/ex1.c %build %define _optlevel 4 subst 's/^\(CFLAGS=\).*$/\1%optflags/' Makefile %configure \ %{subst_enable cross} \ %{?ccomp:--cc=%ccomp} %make_build %install %makeinstall tccdir=%buildroot%_libdir/%name docdir=%buildroot%_docdir/%name-%version bzip2 --best --keep --force Changelog %files %doc Changelog.* README TODO %name-doc.html %_bindir/* %_man1dir/* %_libdir/lib%name.a %dir %_libdir/%name %_libdir/%name/* %_includedir/* %changelog * Thu Feb 22 2007 Led <led@altlinux.ru> 0.9.23-alt4 - added ExclusiveArch: %%ix86 - fixed %%files * Thu Oct 12 2006 Led <led@altlinux.ru> 0.9.23-alt3 - added %name-0.9.23-union-abstract.patch for parse unnamed unions - added %name-0.9.23-linker-error.patch - added %name-0.9.23-linker-lib_search_order.patch - updated %name-0.9.23-linker-group_as_needed.patch - added %%optflags for compile * Wed Oct 04 2006 Led <led@altlinux.ru> 0.9.23-alt2 - fixed linker: added %name-0.9.23-linker-defined_twice.patch - added %name-0.9.23-linker-group_as_needed.patch (fixed by Kim Lux) - added %name-0.9.23-pointer-operators.patch * Tue Oct 03 2006 Led <led@altlinux.ru> 0.9.23-alt1 - 0.9.23 - cleaned up spec * Wed Dec 29 2004 Alexey Tourbin <at@altlinux.ru> 0.9.22-alt1 - 0.9.20 -> 0.9.22 * Mon Nov 10 2003 Alexey Tourbin <at@altlinux.ru> 0.9.20-alt1 - initial revision