]>
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 |
5e95bf6d | 8 | Version: 3.9.0 |
5bde6eb4 | 9 | Release: 2 |
ea490d2d | 10 | License: GPL v2+ (tools), GPL v2+ with linking exception (runtime) |
79712cbc | 11 | Group: Development/Languages |
edea8164 | 12 | Source0: http://downloads.sourceforge.net/sdcc/%{name}-src-%{version}.tar.bz2 |
5e95bf6d | 13 | # Source0-md5: e50fc62cd9cdfa977af536dfd2d99351 |
4448e4a1 JB |
14 | # texlive 2008 is too old to create this file on the fly... |
15 | # (and too old to cope with PDF 1.5, which current gs creates by default) | |
16 | # so create it manually from (generated) doc/MCS51_named.eps, forcing PDF 1.3 by: | |
17 | # epstopdf sdcc-3.6.0/doc/MCS51_named.eps --nogs | /usr/bin/gs -q -sDEVICE=pdfwrite -dAutoRotatePages=/None -sOutputFile=MCS51_named.pdf -dCompatibilityLevel=1.3 - -c quit | |
18 | Source1: MCS51_named.pdf | |
19 | # Source1-md5: 3212cd96c0ab1ac1def470a511dd4a06 | |
2766fe68 | 20 | URL: http://sdcc.sourceforge.net/ |
79712cbc | 21 | BuildRequires: bison |
100f1d12 | 22 | BuildRequires: boost-devel |
79712cbc | 23 | BuildRequires: flex |
5e95bf6d | 24 | BuildRequires: freetdi-gala-devel |
2804323a | 25 | BuildRequires: gc-devel |
4448e4a1 | 26 | BuildRequires: gputils >= 1.4.2 |
79712cbc | 27 | BuildRequires: libstdc++-devel |
5e95bf6d JB |
28 | # or 3.6+ |
29 | BuildRequires: python >= 1:2.7 | |
ea490d2d | 30 | BuildRequires: sed >= 4.0 |
5e95bf6d | 31 | BuildRequires: treedec-devel |
ad45c647 | 32 | %if %{with doc} |
33 | BuildRequires: latex2html | |
64937913 | 34 | BuildRequires: lyx >= 1.4.4 |
ecf69603 | 35 | BuildRequires: texlive-fonts-cmsuper |
36 | BuildRequires: texlive-fonts-type1-urw | |
37 | BuildRequires: texlive-format-pdflatex | |
38 | BuildRequires: texlive-latex-ams | |
39 | BuildRequires: texlive-makeindex | |
4448e4a1 JB |
40 | # rungs (for eps to pdf conversion in texlive) |
41 | BuildRequires: texlive-other-utils | |
ecf69603 | 42 | BuildRequires: texlive-tex-babel |
491b2b3c | 43 | BuildRequires: texlive-tex-xkeyval |
100f1d12 | 44 | BuildRequires: texlive-xetex |
ad45c647 | 45 | %endif |
80a5a011 | 46 | Obsoletes: ucsim |
d62c156f | 47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
2766fe68 | 48 | |
100f1d12 | 49 | %define _noautostrip .*%{_datadir}/%{name}/.* |
21a15d8c | 50 | |
2766fe68 | 51 | %description |
ea490d2d JB |
52 | SDCC is retargettable, optimizing ANSI-C compiler. The current version |
53 | targets the Intel 8051 and recently the Zilog Z80 based MCUs. SDCC can | |
54 | be retargeted for other 8 bit MCUs or PICs and some day soon will be. | |
55 | Supported data types are short (8 bits, 1 byte), char (8 bits, 1 | |
56 | byte), int (16 bits, 2 bytes), long (32 bit, 4 bytes) and float (4 | |
57 | byte IEEE). SDCC also comes with the source level debugger SDCDB. | |
79712cbc | 58 | |
2d52e5b2 | 59 | %description -l pl.UTF-8 |
ea490d2d JB |
60 | SDCC jest optymalizującym kompilatorem ANSI C dla wielu platform. |
61 | Aktualna wersja obsługuje procesory Intel 8051 oraz Zilog Z80. SDCC | |
62 | może być łatwo zmodyfikowany by obsługiwać inne 8-bitowe jednostki. | |
63 | Obsługiwane typy danych to short (8 bitów, 1 bajt), char (8 bitów, 1 | |
64 | bajt), int (16 bitów, 2 bajty), long (32 bity, 4 bajty) oraz float (4 | |
65 | bajty IEEE). SDCC dostarcza również debugger oparty na emulatorze | |
66 | ucsim. | |
67 | ||
68 | %package -n emacs-sdcdb | |
69 | Summary: SDCDB debugger support for Emacs | |
70 | Summary(pl.UTF-8): Obsługa debuggera SDCDB dla Emacsa | |
71 | Group: Development/Tools | |
72 | Requires: %{name} = %{version}-%{release} | |
73 | Requires: emacs | |
74 | ||
75 | %description -n emacs-sdcdb | |
76 | SDCDB debugger support for Emacs. | |
77 | ||
78 | %description -n emacs-sdcdb -l pl.UTF-8 | |
79 | Obsługa debuggera SDCDB dla Emacsa. | |
2766fe68 MP |
80 | |
81 | %prep | |
edea8164 | 82 | %setup -q |
2766fe68 | 83 | |
ea490d2d | 84 | %{__sed} -i -e '1s,/usr/bin/env python,/usr/bin/python,' support/scripts/as2gbmap.py |
9bd8989f | 85 | |
4448e4a1 JB |
86 | cp -p %{SOURCE1} doc/MCS51_named.pdf |
87 | ||
ea490d2d | 88 | %build |
9bd8989f | 89 | %configure \ |
76352eee | 90 | PDFOPT=/bin/cp \ |
ad45c647 | 91 | %{__enable_disable doc} \ |
2804323a | 92 | --enable-libgc \ |
93 | --enable-ucsim \ | |
94 | --enable-xa \ | |
95 | --enable-serio \ | |
96 | --enable-statistic | |
9bd8989f | 97 | |
5e95bf6d JB |
98 | %{__make} -j1 \ |
99 | OPT_ENABLE_DOC=0 | |
100 | ||
101 | # hack for too old texlive (missing footnotehyper package): | |
102 | # make sdccman.tex first and disable missing features before making all in doc | |
103 | %{__make} -C doc sdccman.tex | |
104 | %{__sed} -i -e '/footnotehyper\|makesavenoteenv/d' doc/sdccman.tex | |
105 | %{__make} -C doc | |
2766fe68 | 106 | |
ea490d2d | 107 | %{__make} -C device/lib -j1 model-mcs51-stack-auto model-mcs51-xstack-auto |
386e1cdb | 108 | |
2766fe68 MP |
109 | %install |
110 | rm -rf $RPM_BUILD_ROOT | |
f81fe682 | 111 | install -d $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp |
80a5a011 | 112 | |
113 | %{__make} install \ | |
114 | "DESTDIR=$RPM_BUILD_ROOT" \ | |
115 | "docdir=%{_docdir}/%{name}-%{version}" \ | |
116 | "STRIP=/bin/true" | |
2766fe68 | 117 | |
f81fe682 | 118 | %{__mv} $RPM_BUILD_ROOT%{_bindir}/*.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp |
25ff8dc3 | 119 | |
2766fe68 MP |
120 | %clean |
121 | rm -rf $RPM_BUILD_ROOT | |
122 | ||
123 | %files | |
79712cbc | 124 | %defattr(644,root,root,755) |
25ff8dc3 | 125 | %doc %{_docdir}/%{name}-%{version} |
ea490d2d JB |
126 | %attr(755,root,root) %{_bindir}/as2gbmap |
127 | %attr(755,root,root) %{_bindir}/makebin | |
128 | %attr(755,root,root) %{_bindir}/packihx | |
129 | %attr(755,root,root) %{_bindir}/s51 | |
ea490d2d JB |
130 | %attr(755,root,root) %{_bindir}/sdar |
131 | %attr(755,root,root) %{_bindir}/sdas* | |
132 | %attr(755,root,root) %{_bindir}/sdcc | |
ea490d2d JB |
133 | %attr(755,root,root) %{_bindir}/sdcdb |
134 | %attr(755,root,root) %{_bindir}/sdcpp | |
135 | %attr(755,root,root) %{_bindir}/sdld* | |
136 | %attr(755,root,root) %{_bindir}/sdnm | |
137 | %attr(755,root,root) %{_bindir}/sdobjcopy | |
138 | %attr(755,root,root) %{_bindir}/sdranlib | |
139 | %attr(755,root,root) %{_bindir}/shc08 | |
5e95bf6d | 140 | %attr(755,root,root) %{_bindir}/spdk |
ea490d2d | 141 | %attr(755,root,root) %{_bindir}/sstm8 |
5e95bf6d | 142 | %attr(755,root,root) %{_bindir}/stlcs |
ea490d2d | 143 | %attr(755,root,root) %{_bindir}/sz80 |
25ff8dc3 | 144 | %{_datadir}/%{name} |
ea490d2d JB |
145 | |
146 | %files -n emacs-sdcdb | |
147 | %defattr(644,root,root,755) | |
f81fe682 JR |
148 | %{_datadir}/emacs/site-lisp/sdcdb.el |
149 | %{_datadir}/emacs/site-lisp/sdcdbsrc.el |