[packages/sdcc] - updated to 4.4.0; added as2gbmap_python3 patch from Debian
qboosh
qboosh at pld-linux.org
Fri May 31 18:38:47 CEST 2024
commit dec6e4337bf185cd4dd875bdf036b44e3cf132b6
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri May 31 18:13:49 2024 +0200
- updated to 4.4.0; added as2gbmap_python3 patch from Debian
sdcc-as2gbmap_python3.patch | 61 +++++++++++++++++++++++++++++
sdcc.spec | 94 +++++++++++++++++++++++++++++++++++----------
2 files changed, 135 insertions(+), 20 deletions(-)
---
diff --git a/sdcc.spec b/sdcc.spec
index dddd70f..a6fa666 100644
--- a/sdcc.spec
+++ b/sdcc.spec
@@ -1,23 +1,35 @@
#
# Conditional build:
-%bcond_without doc # don't rebuild documentation
+%bcond_without doc # documentation rebuild
Summary: C compiler for Intel 8051 and Zilog Z80
Summary(pl.UTF-8): Kompilator C dla Intel 8051 i Zilog Z80
Name: sdcc
-Version: 3.9.0
-Release: 2
+Version: 4.4.0
+Release: 1
License: GPL v2+ (tools), GPL v2+ with linking exception (runtime)
Group: Development/Languages
-Source0: http://downloads.sourceforge.net/sdcc/%{name}-src-%{version}.tar.bz2
-# Source0-md5: e50fc62cd9cdfa977af536dfd2d99351
+Source0: https://downloads.sourceforge.net/sdcc/%{name}-src-%{version}.tar.bz2
+# Source0-md5: 93b1d04b526e4bb2c0a91640f5cd2413
# texlive 2008 is too old to create this file on the fly...
# (and too old to cope with PDF 1.5, which current gs creates by default)
# so create it manually from (generated) doc/MCS51_named.eps, forcing PDF 1.3 by:
# 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
Source1: MCS51_named.pdf
# Source1-md5: 3212cd96c0ab1ac1def470a511dd4a06
-URL: http://sdcc.sourceforge.net/
+# and similarly for further files
+Source2: r3ka-arguments.pdf
+# Source2-md5: 777534672ade2269c704026395552b83
+Source3: sm83-arguments.pdf
+# Source3-md5: 70ce6a38488461fe64ab145827713bd4
+Source4: stm8-arguments.pdf
+# Source4-md5: cf35021a89feca1773c96d281226757c
+Source5: z80-arguments.pdf
+# Source5-md5: d6f9374565b10ca14f9943b06454054c
+Source6: z80-stack-cleanup.pdf
+# Source6-md5: f514b396ccf9430d085395990b37a6f9
+Patch0: %{name}-as2gbmap_python3.patch
+URL: https://sdcc.sourceforge.net/
BuildRequires: bison
BuildRequires: boost-devel
BuildRequires: flex
@@ -25,10 +37,11 @@ BuildRequires: freetdi-gala-devel
BuildRequires: gc-devel
BuildRequires: gputils >= 1.4.2
BuildRequires: libstdc++-devel
-# or 3.6+
-BuildRequires: python >= 1:2.7
+BuildRequires: python3 >= 1:3.6
+BuildRequires: readline-devel
BuildRequires: sed >= 4.0
BuildRequires: treedec-devel
+BuildRequires: zlib-devel
%if %{with doc}
BuildRequires: latex2html
BuildRequires: lyx >= 1.4.4
@@ -43,7 +56,6 @@ BuildRequires: texlive-tex-babel
BuildRequires: texlive-tex-xkeyval
BuildRequires: texlive-xetex
%endif
-Obsoletes: ucsim
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _noautostrip .*%{_datadir}/%{name}/.*
@@ -65,6 +77,25 @@ 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.
+%package ucsim
+Summary: Microcontrollers simulator
+Summary(pl.UTF-8): Symulator mikrokontrolerów
+Group: Applications/Emulators
+# see sim/ucsim/.version
+Obsoletes: ucsim <= 0.8.2
+
+%description ucsim
+uCsim can be used to simulate microcontrollers. It supports Intel
+MCS51 family, 8080, 8085, XA, Z80, Rabbit, SM83, TLCS90, ST7, STM8,
+PDK, MC6800, M68HC08, MC6809, M68HC11, M68HC12, MOS6502, PicoBlaze,
+F8, p1516/p2223 and some AVR processors.
+
+%description ucsim -l pl.UTF-8
+uCsim służy do symulowania mikrokontrolerów. Obsługuje rodzinę
+procesorów Intel MCS51, 8080, 8085, XA, Z80, Rabbit, SM83, TLCS90,
+ST7, STM8, PDK, MC6800, M68HC08, MC6809, M68HC11, M68HC12, MOS6502,
+PicoBlaze, F8, p1516/p2223 i niektóre procesory AVR.
+
%package -n emacs-sdcdb
Summary: SDCDB debugger support for Emacs
Summary(pl.UTF-8): Obsługa debuggera SDCDB dla Emacsa
@@ -80,20 +111,23 @@ Obsługa debuggera SDCDB dla Emacsa.
%prep
%setup -q
+%patch0 -p1
-%{__sed} -i -e '1s,/usr/bin/env python,/usr/bin/python,' support/scripts/as2gbmap.py
+#%{__sed} -i -e '1s,/usr/bin/env python,/usr/bin/python,' support/scripts/as2gbmap.py
-cp -p %{SOURCE1} doc/MCS51_named.pdf
+cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} doc
%build
%configure \
PDFOPT=/bin/cp \
+ PYTHON=%{__python3} \
%{__enable_disable doc} \
--enable-libgc \
- --enable-ucsim \
- --enable-xa \
--enable-serio \
- --enable-statistic
+ --disable-silent-rules \
+ --enable-statistic \
+ --enable-ucsim \
+ --enable-xa
%{__make} -j1 \
OPT_ENABLE_DOC=0
@@ -104,7 +138,12 @@ cp -p %{SOURCE1} doc/MCS51_named.pdf
%{__sed} -i -e '/footnotehyper\|makesavenoteenv/d' doc/sdccman.tex
%{__make} -C doc
-%{__make} -C device/lib -j1 model-mcs51-stack-auto model-mcs51-xstack-auto
+%{__make} -C device/lib -j1 model-mcs51-stack-auto
+# model-mcs51-xstack-auto fails with:
+# /home/comp/rpm/BUILD/sdcc-4.4.0/bin/sdcc -I../../device/include -I../../device/include/mcs51 --model-huge --stack-auto --xstack --nostdinc --std-c23 -c _schar2fs.c -o huge-xstack-auto/_schar2fs.rel
+# _schar2fs.c:55: error 98: conflict with previous declaration of '__schar2fs' for attribute 'type' at ../../device/include/float.h:88
+# from type 'float function ( signed-char fixed) __reentrant fixed'
+# to type 'float function ( signed-char fixed) __reentrant __banked fixed'
%install
rm -rf $RPM_BUILD_ROOT
@@ -136,13 +175,28 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/sdnm
%attr(755,root,root) %{_bindir}/sdobjcopy
%attr(755,root,root) %{_bindir}/sdranlib
-%attr(755,root,root) %{_bindir}/shc08
-%attr(755,root,root) %{_bindir}/spdk
-%attr(755,root,root) %{_bindir}/sstm8
-%attr(755,root,root) %{_bindir}/stlcs
-%attr(755,root,root) %{_bindir}/sz80
+%dir %{_libdir}/sdcc
+%dir %{_libdir}/sdcc/*-pld-linux
+%dir %{_libdir}/sdcc/*-pld-linux/12.1.0
+%attr(755,root,root) %{_libdir}/sdcc/*-pld-linux/12.1.0/cc1
%{_datadir}/%{name}
+%files ucsim
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/serialview
+%attr(755,root,root) %{_bindir}/ucsim_51
+%attr(755,root,root) %{_bindir}/ucsim_f8
+%attr(755,root,root) %{_bindir}/ucsim_m68hc08
+%attr(755,root,root) %{_bindir}/ucsim_mos6502
+%attr(755,root,root) %{_bindir}/ucsim_pdk
+%attr(755,root,root) %{_bindir}/ucsim_rxk
+%attr(755,root,root) %{_bindir}/ucsim_stm8
+%attr(755,root,root) %{_bindir}/ucsim_tlcs
+%attr(755,root,root) %{_bindir}/ucsim_xa
+%attr(755,root,root) %{_bindir}/ucsim_z80
+%{_mandir}/man1/serialview.1*
+%{_mandir}/man1/ucsim.1*
+
%files -n emacs-sdcdb
%defattr(644,root,root,755)
%{_datadir}/emacs/site-lisp/sdcdb.el
diff --git a/sdcc-as2gbmap_python3.patch b/sdcc-as2gbmap_python3.patch
new file mode 100644
index 0000000..2f6b467
--- /dev/null
+++ b/sdcc-as2gbmap_python3.patch
@@ -0,0 +1,61 @@
+diff --git a/support/scripts/as2gbmap.py b/support/scripts/as2gbmap.py
+index 2ab5cde4..ea17f078 100644
+--- a/support/scripts/as2gbmap.py
++++ b/support/scripts/as2gbmap.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+
+ # as2gbmap - asxxxx to gb map file converter
+ #
+@@ -25,8 +25,6 @@
+ # Borut Razem
+ # borut.razem at siol.net
+
+-from __future__ import print_function
+-
+ import sys
+ import os
+ import re
+@@ -59,7 +57,7 @@ def main():
+ print("%s: can't create %s: %s" % (os.path.basename(sys.argv[1]), args[1], strerror), file=sys.stderr)
+ return 1
+ else:
+- fout = sys.stdout;
++ fout = sys.stdout
+
+ areas = []
+ modules = []
+@@ -69,7 +67,7 @@ def main():
+ radix = 'HEX'
+ state = None
+ area = None
+-
++
+ # process asxxxx map file
+ for line in fin:
+ if re.match(r"^Hexadecimal$", line):
+@@ -157,20 +155,20 @@ def main():
+ print('\tGLOBALS', file=fout)
+ for g in e['globals']:
+ print('\t\t%s\t%04X' % (g['global'], g['value']), file=fout)
+-
++
+ if modules:
+ print('MODULES', file=fout)
+ for m in modules:
+ print('\tFILE %s' % m['file'], file=fout)
+ if m['name']:
+ print('\t\tNAME %s' % m['name'], file=fout)
+-
++
+ if libraries:
+ print('LIBRARIES', file=fout)
+ for m in libraries:
+ print('\tLIBRARY %s' % m['library'], file=fout)
+ print('\t\tMODULE %s' % m['module'], file=fout)
+-
++
+ if ubads:
+ print('USERBASEDEF', file=fout)
+ for m in ubads:
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/sdcc.git/commitdiff/dec6e4337bf185cd4dd875bdf036b44e3cf132b6
More information about the pld-cvs-commit
mailing list