]>
Commit | Line | Data |
---|---|---|
ad45c647 | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # don't rebuild documentation | |
4 | ||
396dd56d | 5 | Summary: C compiler for Intel 8051 and Zilog Z80 |
6e9646c0 | 6 | Summary(pl.UTF-8): Kompilator C dla Intel 8051 i Zilog Z80 |
2766fe68 | 7 | Name: sdcc |
edea8164 WF |
8 | Version: 3.3.0 |
9 | Release: 1 | |
2766fe68 | 10 | License: GPL |
79712cbc | 11 | Group: Development/Languages |
edea8164 WF |
12 | Source0: http://downloads.sourceforge.net/sdcc/%{name}-src-%{version}.tar.bz2 |
13 | # Source0-md5: c7c6aa75415580795ecc4fd31948e5ba | |
30c720f8 | 14 | Patch0: %{name}-mcs51-pcall.patch |
15 | Patch1: %{name}-mcs51-stack-probe.patch | |
16 | Patch2: %{name}-gstabs.patch | |
2766fe68 | 17 | URL: http://sdcc.sourceforge.net/ |
26f3710c | 18 | BuildRequires: autoconf |
79712cbc | 19 | BuildRequires: bison |
100f1d12 | 20 | BuildRequires: boost-devel |
79712cbc | 21 | BuildRequires: flex |
2804323a | 22 | BuildRequires: gc-devel |
21a15d8c | 23 | BuildRequires: gputils |
79712cbc | 24 | BuildRequires: libstdc++-devel |
ad45c647 | 25 | %if %{with doc} |
26 | BuildRequires: latex2html | |
64937913 | 27 | BuildRequires: lyx >= 1.4.4 |
ecf69603 | 28 | BuildRequires: texlive-fonts-cmsuper |
29 | BuildRequires: texlive-fonts-type1-urw | |
30 | BuildRequires: texlive-format-pdflatex | |
31 | BuildRequires: texlive-latex-ams | |
32 | BuildRequires: texlive-makeindex | |
33 | BuildRequires: texlive-tex-babel | |
100f1d12 | 34 | BuildRequires: texlive-xetex |
ad45c647 | 35 | %endif |
80a5a011 | 36 | Obsoletes: ucsim |
d62c156f | 37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
2766fe68 | 38 | |
100f1d12 | 39 | %define _noautostrip .*%{_datadir}/%{name}/.* |
21a15d8c | 40 | |
2766fe68 | 41 | %description |
79712cbc | 42 | SDCC is retargettable, optimizing ANSI - C compiler. The current |
25ff8dc3 JK |
43 | version targets the Intel 8051 and recently the Zilog Z80 based MCUs. |
44 | SDCC can be retargeted for other 8 bit MCUs or PICs and some day soon | |
45 | will be. Supported data types are short (8 bits, 1 byte), char (8 | |
46 | bits, 1 byte) , int (16 bits, 2 bytes ), long (32 bit, 4 bytes) and | |
79712cbc AM |
47 | float (4 byte IEEE). SDCC also comes with the source level debugger |
48 | SDCDB. | |
49 | ||
2d52e5b2 | 50 | %description -l pl.UTF-8 |
25ff8dc3 | 51 | SDCC jest kompilatorem ANSI C. Aktualna wersja wspiera procesory Intel |
2d52e5b2 JR |
52 | 8051 oraz Zilog Z80. SDCC może być łatwo zmodyfikowany by wspierać |
53 | inne 8 bitowe jednostki. Wspierane typy danych to short (8 bitów, 1 | |
54 | bajt), char (8 bitów, 1 bajt), int (16 bitów, 2 bajty), long (32 bity, | |
55 | 4 bajty) oraz float (4 bajty IEEE). SDCC dostarcza również debugger | |
50d48a2f | 56 | oparty na emulatorze ucsim. |
2766fe68 MP |
57 | |
58 | %prep | |
edea8164 | 59 | %setup -q |
100f1d12 | 60 | #%%patch0 -p1 |
61 | #%%patch1 -p1 | |
62 | #%%patch2 -p1 | |
2766fe68 MP |
63 | |
64 | %build | |
100f1d12 | 65 | #find -type f -name 'configure.??' | while read FILE; do |
66 | # cd $(dirname "$FILE") | |
67 | # %{__autoconf} | |
68 | # cd - | |
69 | #done | |
9bd8989f | 70 | |
71 | %configure \ | |
76352eee | 72 | PDFOPT=/bin/cp \ |
ad45c647 | 73 | %{__enable_disable doc} \ |
2804323a | 74 | --enable-libgc \ |
75 | --enable-ucsim \ | |
76 | --enable-xa \ | |
77 | --enable-serio \ | |
78 | --enable-statistic | |
9bd8989f | 79 | |
ecf69603 | 80 | %{__make} -j1 |
2766fe68 | 81 | |
386e1cdb | 82 | cd device/lib |
20adaccf | 83 | %{__make} -j1 model-mcs51-stack-auto |
84 | %{__make} -j1 model-mcs51-xstack-auto | |
386e1cdb | 85 | cd - |
86 | ||
2766fe68 MP |
87 | %install |
88 | rm -rf $RPM_BUILD_ROOT | |
26f3710c | 89 | install -d $RPM_BUILD_ROOT%{_libdir}/emacs/site-lisp |
80a5a011 | 90 | |
91 | %{__make} install \ | |
92 | "DESTDIR=$RPM_BUILD_ROOT" \ | |
93 | "docdir=%{_docdir}/%{name}-%{version}" \ | |
94 | "STRIP=/bin/true" | |
2766fe68 | 95 | |
25ff8dc3 | 96 | # some cleanups in mess generated by make install |
eb778fab MP |
97 | #find $RPM_BUILD_ROOT -name "CVS" -type d | xargs rm -r |
98 | #mv $RPM_BUILD_ROOT%{_bindir}/*.el $RPM_BUILD_ROOT%{_libdir}/emacs/site-lisp | |
25ff8dc3 | 99 | |
2766fe68 MP |
100 | %clean |
101 | rm -rf $RPM_BUILD_ROOT | |
102 | ||
103 | %files | |
79712cbc | 104 | %defattr(644,root,root,755) |
25ff8dc3 JK |
105 | %doc %{_docdir}/%{name}-%{version} |
106 | %attr(755,root,root) %{_bindir}/* | |
107 | %{_datadir}/%{name} | |
eb778fab | 108 | #%{_libdir}/emacs/site-lisp/*.el |