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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
%define _snap_date 20081020
%define _snap_id 5252
Summary: C compiler for Intel 8051 and Zilog Z80
Summary(pl.UTF-8): Kompilator C dla Intel 8051 i Zilog Z80
Name: sdcc
Version: 2.8.4
Release: 0.%{_snap_date}.3
License: GPL
Group: Development/Languages
Source0: http://sdcc.sourceforge.net/snapshots/sdcc-src/%{name}-src-%{_snap_date}-%{_snap_id}.tar.bz2
# Source0-md5: 450dc55d67e60b7eda77503e34417b24
Patch0: %{name}-mcs51-stack-probe.patch
Patch1: %{name}-gstabs.patch
URL: http://sdcc.sourceforge.net/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bison
BuildRequires: flex
BuildRequires: gc-devel
BuildRequires: gputils
BuildRequires: latex2html
BuildRequires: libstdc++-devel
BuildRequires: lyx >= 1.4.4
BuildRequires: tetex-format-pdflatex
BuildRequires: tetex-latex-ams
BuildRequires: tetex-makeindex
BuildRequires: tetex-tex-babel
Obsoletes: ucsim
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _noautostrip .*sdcc.lib.*\\.\\(lib\\|a\\)
%description
SDCC is retargettable, optimizing ANSI - C compiler. The current
version targets the Intel 8051 and recently the Zilog Z80 based MCUs.
SDCC can be retargeted for other 8 bit MCUs or PICs and some day soon
will be. Supported data types are short (8 bits, 1 byte), char (8
bits, 1 byte) , int (16 bits, 2 bytes ), long (32 bit, 4 bytes) and
float (4 byte IEEE). SDCC also comes with the source level debugger
SDCDB.
%description -l pl.UTF-8
SDCC jest kompilatorem ANSI C. Aktualna wersja wspiera procesory Intel
8051 oraz Zilog Z80. SDCC może być łatwo zmodyfikowany by wspierać
inne 8 bitowe jednostki. Wspierane typy danych to short (8 bitów, 1
bajt), char (8 bitów, 1 bajt), int (16 bitów, 2 bajty), long (32 bity,
4 bajty) oraz float (4 bajty IEEE). SDCC dostarcza również debugger
oparty na emulatorze ucsim.
%prep
%setup -qn %{name}
%patch0 -p1
%patch1 -p1
%build
find -type f -name 'configure.??' | while read FILE; do
cd $(dirname "$FILE")
%{__autoconf}
cd -
done
%configure \
--enable-doc \
--enable-libgc \
--enable-ucsim \
--enable-xa \
--enable-serio \
--enable-statistic
%{__make}
cd device/lib
%{__make} model-mcs51-stack-auto
%{__make} model-mcs51-xstack-auto
cd -
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_libdir}/emacs/site-lisp
%{__make} install \
"DESTDIR=$RPM_BUILD_ROOT" \
"docdir=%{_docdir}/%{name}-%{version}" \
"STRIP=/bin/true"
# some cleanups in mess generated by make install
#find $RPM_BUILD_ROOT -name "CVS" -type d | xargs rm -r
#mv $RPM_BUILD_ROOT%{_bindir}/*.el $RPM_BUILD_ROOT%{_libdir}/emacs/site-lisp
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc %{_docdir}/%{name}-%{version}
%attr(755,root,root) %{_bindir}/*
%{_datadir}/%{name}
#%{_libdir}/emacs/site-lisp/*.el
|