diff --git a/.gitignore b/.gitignore index af32fdd..5375c50 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /sdcc-src-3.6.0.tar.bz2 /sdcc-src-3.7.0.tar.bz2 /sdcc-src-3.8.0.tar.bz2 +/sdcc-src-4.0.0.tar.bz2 diff --git a/sdcc-3.8.0-aligned_alloc.patch b/sdcc-3.8.0-aligned_alloc.patch deleted file mode 100644 index f369fbf..0000000 --- a/sdcc-3.8.0-aligned_alloc.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff --git a/device/include/aligned_alloc.h b/device/include/aligned_alloc.h -new file mode 100644 -index 0000000..2cd5e3a ---- /dev/null -+++ b/device/include/aligned_alloc.h -@@ -0,0 +1,11 @@ -+#ifndef __SDCC_ALIGNED_ALLOC_H -+#define __SDCC_ALIGNED_ALLOC_H 1 -+ -+#if __STDC_VERSION__ >= 201112L -+inline void *aligned_alloc(size_t alignment, size_t size) -+{ -+ (void)alignment; -+ return malloc(size); -+} -+#endif -+#endif -diff --git a/device/include/stdlib.h b/device/include/stdlib.h -index 5abede0..cce0686 100644 ---- a/device/include/stdlib.h -+++ b/device/include/stdlib.h -@@ -82,6 +82,7 @@ void *calloc (size_t nmemb, size_t size); - void *malloc (size_t size); - void *realloc (void *ptr, size_t size); - #endif -+#ifdef RRR - #if __STDC_VERSION__ >= 201112L - inline void *aligned_alloc(size_t alignment, size_t size) - { -@@ -89,6 +90,7 @@ inline void *aligned_alloc(size_t alignment, size_t size) - return malloc(size); - } - #endif -+#endif - extern void free (void * ptr); - - /* Searching and sorting utilities (ISO C11 7.22.5) */ -diff --git a/device/lib/aligned_alloc.c b/device/lib/aligned_alloc.c -index 92f3259..552459b 100644 ---- a/device/lib/aligned_alloc.c -+++ b/device/lib/aligned_alloc.c -@@ -37,5 +37,5 @@ - - extern void *aligned_alloc(size_t alignment, size_t size); - --#include -+#include - diff --git a/sdcc-3.8.0-python3.patch b/sdcc-3.8.0-python3.patch deleted file mode 100644 index 9d7a3db..0000000 --- a/sdcc-3.8.0-python3.patch +++ /dev/null @@ -1,10 +0,0 @@ -diff --git a/support/scripts/as2gbmap.py b/support/scripts/as2gbmap.py -index 2ab5cde..193c878 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 - # diff --git a/sdcc-4.0.0-doc.patch b/sdcc-4.0.0-doc.patch new file mode 100644 index 0000000..a3620c8 --- /dev/null +++ b/sdcc-4.0.0-doc.patch @@ -0,0 +1,152 @@ +diff --git a/Makefile.common.in b/Makefile.common.in +index 412fd5a..04544fa 100644 +--- a/Makefile.common.in ++++ b/Makefile.common.in +@@ -10,7 +10,7 @@ VERSIONLO = @VERSIONLO@ + VERSIONP = @VERSIONP@ + + # Programs +-SHELL = /bin/sh ++SHELL = /usr/bin/sh + CC = @CCACHE@ @CC@ + CPP = @CCACHE@ @CPP@ + CXX = @CCACHE@ @CXX@ +diff --git a/doc/MCS51_named.svg b/doc/MCS51_named.svg +index f4d3a96..8de83a5 100644 +--- a/doc/MCS51_named.svg ++++ b/doc/MCS51_named.svg +@@ -114,7 +114,7 @@ + y="126.62963" /> + + __data + __xdata + __pdata + + 128B + 256B + 256B + 64KB + $(dir $@)$(notdir $<) +- cp $(MANUAL).aux $(dir $@) ++ cp $(MANUAL).aux sdcc_version.tex MCS51_named.eps $(dir $@) + -cd $(dir $@); $(LATEX2HTML) -split 5 -show_section_numbers -local_icons -info "" -nosubdir $(MANUAL) $(QUIET) + rm -f $(dir $@)WARNINGS $(dir $@)labels.pl $(dir $@)$(notdir $<) $(dir $@)$*.aux + +-%.html/index.html: %.tex %.aux +- mkdir -p $(dir $@) +- @# fixes $(LATEX2HTML) problems with two consecutive dashes for long-options: --stack-auto +- @# fixes $(LATEX2HTML) problems with \tabularnewline +- sed -e 's,-\\/-,-\\/-\\/-,g' \ +- -e 's,\\tabularnewline$$,\\\\,g' < $< > $(dir $@)$(notdir $<) +- cp $*.aux $(dir $@) +- -cd $(dir $@); $(LATEX2HTML) -split 0 -local_icons -info "" -nosubdir $* $(QUIET) +- rm -f $(dir $@)WARNINGS $(dir $@)labels.pl $(dir $@)$(notdir $<) $(dir $@)$*.aux +- + %.txt: %.lyx + @# $(LYX) will export the file in the directory of the $(LYX) file + @# if VPATH is used the $(LYX) file is copied first +diff --git a/doc/sdccman.lyx b/doc/sdccman.lyx +index d18a509..f724004 100644 +--- a/doc/sdccman.lyx ++++ b/doc/sdccman.lyx +@@ -19143,6 +19143,7 @@ SDCC supports the following MCS51-specific intrinsic address spaces: + \begin_layout Standard + \begin_inset Graphics + filename MCS51_named.svg ++ BoundingBox 0bp 0bp 337bp 120bp + + \end_inset + diff --git a/sdcc-4.0.0-lyx-preferences b/sdcc-4.0.0-lyx-preferences new file mode 100644 index 0000000..6858c6e --- /dev/null +++ b/sdcc-4.0.0-lyx-preferences @@ -0,0 +1,81 @@ +# LyX 2.3.4.2 generated this file. If you want to make your own +# modifications you should do them from inside LyX and save. + +Format 24 + + +# +# MISC SECTION ###################################### +# + + +# +# SCREEN & FONTS SECTION ############################ +# + + +# +# COLOR SECTION ################################### +# + + +# +# PRINTER SECTION ################################### +# + + +# +# TEX SECTION ####################################### +# + + +# +# FILE SECTION ###################################### +# + + +# +# PLAIN TEXT EXPORT SECTION ############################## +# + + +# +# SPELLCHECKER SECTION ############################## +# + + +# +# LANGUAGE SUPPORT SECTION ########################## +# + + +# +# 2nd MISC SUPPORT SECTION ########################## +# + + +# +# FORMATS SECTION ########################## +# + + +# +# CONVERTERS SECTION ########################## +# + +\converter svg pstex "inkscape $$i --export-area-drawing -export-latex -o $$o" "" +\converter svg pdftex "inkscape $$i --export-area-drawing -export-latex -o $$o" "" +\converter emf eps "inkscape $$i --export-area-drawing -o $$o" "" +\converter wmf pdf6 "inkscape $$i --export-area-drawing -o $$o" "" +\converter emf pdf6 "inkscape $$i --export-area-drawing -o $$o" "" +\converter svg pdf6 "inkscape $$i --export-area-drawing -o $$o" "" +\converter svgz pdf6 "inkscape $$i --export-area-drawing -o $$o" "" +\converter svg eps "inkscape $$i --export-area-drawing -o $$o" "" +\converter svgz eps "inkscape $$i --export-area-drawing -o $$o" "" +\converter svg png "inkscape $$i -o $$o" "" +\converter svgz png "inkscape $$i -o $$o" "" + +# +# COPIERS SECTION ########################## +# + diff --git a/sdcc-4.0.0-python3.patch b/sdcc-4.0.0-python3.patch new file mode 100644 index 0000000..9d7a3db --- /dev/null +++ b/sdcc-4.0.0-python3.patch @@ -0,0 +1,10 @@ +diff --git a/support/scripts/as2gbmap.py b/support/scripts/as2gbmap.py +index 2ab5cde..193c878 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 + # diff --git a/sdcc.spec b/sdcc.spec index c68b16f..0cee1eb 100644 --- a/sdcc.spec +++ b/sdcc.spec @@ -1,24 +1,25 @@ Name: sdcc -Version: 3.8.0 -Release: 4%{?dist} +Version: 4.0.0 +Release: 1%{?dist} Summary: Small Device C Compiler License: GPLv2+ URL: http://sdcc.sourceforge.net/ Source0: http://downloads.sourceforge.net/sdcc/sdcc-src-%{version}.tar.bz2 Source1: README.fedora -Patch1: sdcc-%{version}-python3.patch -Patch2: sdcc-%{version}-aligned_alloc.patch +Source2: sdcc-%{version}-lyx-preferences +Patch1: sdcc-%{version}-doc.patch +Patch2: sdcc-%{version}-python3.patch BuildRequires: bison, gcc-c++, automake, libtool BuildRequires: boost-devel zlib-devel BuildRequires: flex Buildrequires: gputils -BuildRequires: lyx +BuildRequires: lyx inkscape ghostscript BuildRequires: latex2html -BuildRequires: tex(ulem.sty) -BuildRequires: texinfo texlive-xetex texlive-footnotehyper +BuildRequires: tex(ulem.sty) tex-preview +BuildRequires: texinfo texlive-xetex texlive-footnotehyper texlive-epstopdf # Work around to lyx-common missing R: /usr/bin/python -BuildRequires: /usr/bin/python2 +BuildRequires: /usr/bin/python3 gdb-headless Provides: bundled(libiberty) Requires: emacs-filesystem Obsoletes: emacs-sdcc <= 3.6.0 @@ -57,10 +58,11 @@ find -name '*.{c,h,cc}' -exec chmod -x '{}' \; OPTS='PDFOPT="/bin/cp"' %configure --enable-doc --disable-non-free STRIP=: ${OPTS} PYTHON=python3 +mkdir -p ~/.lyx +cp %SOURCE2 ~/.lyx/preferences %{__make} Q= QUIET= - %install make install DESTDIR=$RPM_BUILD_ROOT Q= mv $RPM_BUILD_ROOT%{_datadir}/doc installed-docs @@ -75,7 +77,7 @@ mv $RPM_BUILD_ROOT%{_bindir}/* $RPM_BUILD_ROOT%{_libexecdir}/sdcc # Create launch scripts in _bindir pushd $RPM_BUILD_ROOT%{_bindir} for x in ../libexec/sdcc/*; do -echo "#!/bin/sh +echo "#!/usr/bin/sh PATH=/usr/libexec/sdcc:\$PATH /usr/libexec/%{name}/$(basename $x) \"\$@\"" > %{name}-$(basename $x) chmod 755 %{name}-$(basename $x) @@ -106,6 +108,9 @@ popd %changelog +* Mon Apr 27 2020 Roy Rankin - 4.0.0-1 +- Upstream release, patch doc build and inkscape 1 changes + * Thu Jan 30 2020 Fedora Release Engineering - 3.8.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/sources b/sources index c685eed..0bc13d4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (sdcc-src-3.8.0.tar.bz2) = 38145ea3e9560eb8894c54bd7213da67a20163739c944c3247fa8fa456dfedaaa469746169d3e114affcab48b73db4cd8c9a0a367e7368f2471de64761a3e04a +SHA512 (sdcc-src-4.0.0.tar.bz2) = 41a92711a9278261879caec1a01425104b7c75346b3c6ad9617cab025309c9b38f79eea2d04122f5ae6ce273fcd61fbde8a0d23756313a4593394230b51a1d4c