70e2823
Name:           sdcc
783164d
Version:        4.0.0
ab85373
Release:        4%{?dist}
70e2823
Summary:        Small Device C Compiler
3d74d92
License:        GPLv2+
eebd19f
URL:            http://sdcc.sourceforge.net/
b662307
Source0:        http://downloads.sourceforge.net/sdcc/sdcc-src-%{version}.tar.bz2
70e2823
Source1:        README.fedora
783164d
Source2:        sdcc-%{version}-lyx-preferences
783164d
Patch1:         sdcc-%{version}-doc.patch
783164d
Patch2:         sdcc-%{version}-python3.patch
c74bc14
Patch3:         sdcc-%{version}-pic16.patch
adf09e7
Patch4:         sdcc-%{version}-bufover.patch
70e2823
f5aa729
BuildRequires:  bison, gcc-c++, automake, libtool
c910f96
BuildRequires:  boost-devel zlib-devel
f261839
BuildRequires:  flex
0d13b07
Buildrequires:  gputils
783164d
BuildRequires:  lyx inkscape ghostscript
70e2823
BuildRequires:  latex2html
783164d
BuildRequires:  tex(ulem.sty) tex-preview
783164d
BuildRequires:  texinfo texlive-xetex texlive-footnotehyper texlive-epstopdf
e720b05
# Work around to lyx-common missing R: /usr/bin/python
783164d
BuildRequires:  /usr/bin/python3 gdb-headless
aea0b30
Provides:       bundled(libiberty)
aea0b30
Requires:       emacs-filesystem
93cb42f
Obsoletes:      emacs-sdcc <= 3.6.0
70e2823
70e2823
70e2823
%description
70e2823
SDCC is a C compiler for 8051 class and similar microcontrollers.
70e2823
The package includes the compiler, assemblers and linkers, a device
70e2823
simulator and a core library. The processors supported (to a varying
70e2823
degree) include the 8051, ds390, z80, hc08, and PIC.
70e2823
70e2823
70e2823
%package libc-sources
70e2823
Summary:        Small Device C Compiler
3810a36
License:        GPLv2+
70e2823
Requires:       sdcc = %{version}-%{release}
70e2823
70e2823
%description libc-sources
70e2823
SDCC is a C compiler for 8051 class and similar microcontrollers.
25e5454
This package includes the sources for the C library, and is only necessary
70e2823
if you want to modify the C library or as reference of how it works.
70e2823
70e2823
%prep
c910f96
%setup -q -n sdcc-%{version}
c910f96
#%setup -q -n sdcc
6f0de73
find -name '*.{c,h,cc}' -a -perm -a=x -exec chmod -a=x '{}' \;
c910f96
%patch1 -p1
c910f96
%patch2 -p1
c74bc14
%patch3 -p1
adf09e7
%patch4 -p1
d4d89a9
# Disable brp-strip-static-archive for now because it errors trying to
d4d89a9
# strip foreign binaries.
6f0de73
echo '%{__os_install_post}'
6f0de73
%global __os_install_post %(echo '%{__os_install_post}' | 
c74bc14
        sed -e 's#/usr/lib/rpm.*/brp-strip-static-archive .*##g' |
c74bc14
        sed -e 's#/usr/lib/rpm.*/brp-strip-lto .*##g')
6e90ff8
70e2823
70e2823
%build
e720b05
# Preset PDFOPT to /bin/cp
e720b05
OPTS='PDFOPT="/bin/cp"'
Jaromir Capik c44322e
c910f96
%configure --enable-doc --disable-non-free  STRIP=: ${OPTS} PYTHON=python3
783164d
mkdir -p ~/.lyx
783164d
cp %SOURCE2  ~/.lyx/preferences
e720b05
%{__make} Q= QUIET=
70e2823
70e2823
70e2823
%install
70e2823
make install DESTDIR=$RPM_BUILD_ROOT Q=
eebd19f
mv $RPM_BUILD_ROOT%{_datadir}/doc installed-docs
70e2823
install -m 644 %SOURCE1 installed-docs
aea0b30
mkdir -p $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/%{name}
aea0b30
mv $RPM_BUILD_ROOT%{_bindir}/*.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/%{name}
70e2823
find $RPM_BUILD_ROOT -type f -name \*.c -exec chmod a-x '{}' \;
eebd19f
mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/sdcc
eebd19f
mv $RPM_BUILD_ROOT%{_bindir}/* $RPM_BUILD_ROOT%{_libexecdir}/sdcc
cd49686
a7fa497
1d1bf29
# Create launch scripts in _bindir
eebd19f
pushd $RPM_BUILD_ROOT%{_bindir}
191c52a
for x in ../libexec/sdcc/*; do
783164d
echo "#!/usr/bin/sh
a7fa497
PATH=/usr/libexec/sdcc:\$PATH
a7fa497
/usr/libexec/%{name}/$(basename $x) \"\$@\"" > %{name}-$(basename $x)
74a0db9
chmod 755 %{name}-$(basename $x)
a7fa497
done
70e2823
popd
70e2823
d7e257f
pushd $RPM_BUILD_ROOT%{_datadir}/%{name}/lib/src/pic16
d7e257f
find . -type f -name '*.a' -exec chmod 664 '{}' \;
d7e257f
popd
d7e257f
70e2823
70e2823
%files
70e2823
%doc installed-docs/*
70e2823
%{_bindir}/*
70e2823
%{_libexecdir}/%{name}
70e2823
%{_datadir}/%{name}
aea0b30
%{_datadir}/emacs/site-lisp/%{name}/*.el
70e2823
%exclude %{_datadir}/%{name}/lib/src
Roy Rankin 717ca05
# Don't include support files as already in binutils-devel
Roy Rankin 717ca05
%exclude %{_includedir}/
Roy Rankin 717ca05
%exclude %{_libdir}/
e2c9c52
%exclude %{_infodir}/
Roy Rankin 717ca05
70e2823
70e2823
70e2823
%files libc-sources
70e2823
%{_datadir}/%{name}/lib/src
70e2823
3810a36
70e2823
%changelog
ab85373
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.0-4
ab85373
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
ab85373
adf09e7
* Mon May 25 2020 Roy Rankin <rrankin@ihug.com.au> - 4.0.0-3
adf09e7
- Patch buffer overflow
adf09e7
c74bc14
* Mon May 04 2020 Roy Rankin <rrankin@ihug.com.au> - 4.0.0-2
c74bc14
- patch for pic16 libs
c74bc14
783164d
* Mon Apr 27 2020 Roy Rankin <rrankin@ihug.com.au> - 4.0.0-1
783164d
- Upstream release, patch doc build and inkscape 1 changes
783164d
8810eb7
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.8.0-4
8810eb7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
8810eb7
9d786a6
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.8.0-3
9d786a6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
9d786a6
74a0db9
* Sun Feb 10 2019 Roy Rankin <rrankin@ihug.com.au> - 3.8.0-2
74a0db9
- Fix file permission regression in 3.8.0-1
74a0db9
c910f96
* Mon Feb 04 2019 Roy Rankin <rrankin@ihug.com.au> - 3.8.0-1
c910f96
- Upstream release, patch to use python3, patch for undefined _aligned_alloc
c910f96
bcf9941
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.0-2
bcf9941
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
bcf9941
f5aa729
* Sat Jul 21 2018 Roy Rankin <rrankin@ihug.com.au> - 3.7.0-1
f5aa729
- Upstream release
f5aa729
9106eed
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.0-8
9106eed
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
9106eed
78cb320
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.0-7
78cb320
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
78cb320
90ec240
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.0-6
90ec240
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
90ec240
99c7923
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.0-5
99c7923
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
99c7923
d40318b
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.0-4
d40318b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
d40318b
bd5f600
* Sat Jan 28 2017 Jonathan Wakely <jwakely@redhat.com> - 3.6.0-3
bd5f600
- Rebuilt for Boost 1.63
bd5f600
aea0b30
* Thu Jul 07 2016 Roy Rankin <rrankin@ihug.com.au> - 3.6.0-2
aea0b30
- Incorporate emacs files into main package and obsolete emacs-sdcc package
aea0b30
e2c9c52
* Sun Jun 26 2016 Roy Rankin <rrankin@ihug.com.au> - 3.6.0-1
e2c9c52
- Upstream update, add texinfo build depend
e2c9c52
e7d6d57
* Sun Feb 07 2016 Roy Rankin <rrankin@ihug.com.au> - 3.5.0-6
e7d6d57
- Patch for boost-1.60 bug
e7d6d57
9b4e327
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.0-5
9b4e327
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
9b4e327
95b24cb
* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 3.5.0-4
95b24cb
- Rebuilt for Boost 1.59
95b24cb
9abf623
* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5.0-3
9abf623
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159
9abf623
6e58513
* Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 3.5.0-2
6e58513
- rebuild for Boost 1.58
6e58513
658d3a0
* Sat Jul 04 2015 Roy Rankin <rrankin@ihug.com.au> - 3.5.0-1
658d3a0
- Update to upstream release 3.5.0
658d3a0
- Use new --disable-non-free flag in configure
658d3a0
Jaromir Capik a4e3870
* Mon Jun 29 2015 Jaromir Capik <jcapik@redhat.com> - 3.4.0-7
Jaromir Capik a4e3870
- Adapting the brp-strip-static-archive hack to work on epel7 too
Jaromir Capik a4e3870
Jaromir Capik c44322e
* Mon Jun 29 2015 Jaromir Capik <jcapik@redhat.com> - 3.4.0-6
Jaromir Capik c44322e
- Applying the PDFOPT hack unconditionally
Jaromir Capik c44322e
- Cleaning the spec
Jaromir Capik c44322e
9471f7d
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.0-5
9471f7d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
9471f7d
Petr Machata 455f441
* Tue Jan 27 2015 Petr Machata <pmachata@redhat.com> - 3.4.0-4
Petr Machata 455f441
- Rebuild for boost 1.57.0
Petr Machata 455f441
Petr Machata 020f192
* Tue Jan 27 2015 Petr Machata <pmachata@redhat.com> - 3.4.0-3
Petr Machata 020f192
- Rebuild for boost 1.57.0
Petr Machata 020f192
f30d29a
* Fri Oct 24 2014 Roy Rankin <rrankin@ihug.com.au> - 3.4.0-2
f30d29a
- Fix brp-strip-static-archive for path change
f30d29a
a642c85
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.0-1
a642c85
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
a642c85
89aa38d
* Mon Jul 14 2014 Roy Rankin <rrankin@ihug.com.au> - 3.4.0-0
89aa38d
- Security patch for libiberty
89aa38d
- Upstream update 3.4.0
89aa38d
540e0ef
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.0-3
540e0ef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
540e0ef
0d13b07
* Tue May 27 2014 Dan Horák <dan[at]danny.cz> - 3.3.0-2
0d13b07
- fix FTBFS in bfd caused by GCC 4.9
0d13b07
Petr Machata 0151930
* Thu May 22 2014 Petr Machata <pmachata@redhat.com> - 3.3.0-1
Petr Machata 0151930
- Rebuild for boost 1.55.0
Petr Machata 0151930
cd49686
* Mon Sep 02 2013 Roy Rankin <rrankin@ihug.com.au> - 3.3.0-0
cd49686
- Remove non-free directory tree which is not GPL compatible
cd49686
- Upstream update 3.3.0
cd49686
f76b97f
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.0-5
f76b97f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
f76b97f
Petr Machata 59d98c0
* Tue Jul 30 2013 Petr Machata <pmachata@redhat.com> - 3.2.0-4
Petr Machata 59d98c0
- Rebuild for boost 1.54.0
Petr Machata 59d98c0
e720b05
* Fri May 17 2013 Ralf Corsépius <corsepiu@fedoraproject.org> - 3.2.0-3
e720b05
- Modernize spec.
e720b05
- Reflect ghostscript in Fedora >= 18 having dropped pdfopt.
e720b05
  Resort to PDFOPT=/bin/cp.
e720b05
- Apply patches to allow building against boost > 1.50.0 (Add sdcc-3.2.0.diff).
e720b05
- BR: /usr/bin/python to work around lyx packaging bug.
e720b05
- Fix up broken %%changelog entries.
e720b05
ea84f26
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.0-2
ea84f26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
ea84f26
c599cd9
* Mon Oct 15 2012 Jon Ciesla <limburgher@gmail.com> - 3.2.0-1
c599cd9
- Provides: bundled(libiberty)
c599cd9
Roy Rankin 717ca05
* Fri Jul 27 2012 Roy Rankin <rrankin@ihug.com.au> - 3.2.0-0
Roy Rankin 717ca05
- Upstream release 3.2.0
Roy Rankin 717ca05
30ccd09
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-3
30ccd09
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
30ccd09
Conrad Meyer acbeabe
* Sun Feb 26 2012 Conrad Meyer <konrad@tylerc.org> - 3.1.0-1
Conrad Meyer acbeabe
- Bump to latest upstream (#797496)
Conrad Meyer acbeabe
- Drop upstreamed patch (workaround for gcc 4.6 bug)
Conrad Meyer acbeabe
27e2ffb
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.0-2
27e2ffb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
27e2ffb
faf3103
* Wed Apr 13 2011 Roy Rankin <rrankin@ihug.com.au> - 3.0.0-1
faf3103
- Patch for infinite loop in gcc during build
faf3103
1d1bf29
* Sun Mar 20 2011 Roy Rankin <rrankin@ihug.com.au> - 3.0.0-0
1d1bf29
- Upstrem release 3.0.0, do not use gc
9b50b90
d4d89a9
* Sun Dec 6 2009 Conrad Meyer <konrad@tylerc.org> - 2.9.0-7
d4d89a9
- Only disable brp-strip-static.
d4d89a9
d7e257f
* Sun Dec 6 2009 Conrad Meyer <konrad@tylerc.org> - 2.9.0-6
d7e257f
- Work around rpmbuild failure by disabling brp-strip.
d7e257f
1c3eb12
* Fri Sep 11 2009 Conrad Meyer <konrad@tylerc.org> - 2.9.0-5
1c3eb12
- Fix a bug with single-bit types, logical NOT, and casting to char
1c3eb12
  (I'm fuzzy on the details) that was reported by a Fedora user with the
1c3eb12
  r5508 patch from upstream.
1c3eb12
4b92a53
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.0-4
4b92a53
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
4b92a53
b825c9c
* Mon Jul 20 2009 Conrad Meyer <konrad@tylerc.org> - 2.9.0-3
b825c9c
- Fix double-free (rhbz# 509278) with patch from upstream.
b825c9c
6e90ff8
* Wed Jul 1 2009 Conrad Meyer <konrad@tylerc.org> - 2.9.0-2
6e90ff8
- Fix #454205 by BR'ing gputils and re-adding install_post hack.
6e90ff8
b662307
* Thu Apr 30 2009 Conrad Meyer <konrad@tylerc.org> - 2.9.0-1
b662307
- Bump to 2.9.0.
b662307
f3dbe06
* Thu Feb 26 2009 Conrad Meyer <konrad@tylerc.org> - 2.8.0-5
f3dbe06
- Make subpackages noarch.
f3dbe06
4672896
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.0-4
4672896
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
4672896
3810a36
* Thu Nov 13 2008 Conrad Meyer <konrad@tylerc.org> - 2.8.0-3
3810a36
- Separate out emacs-sdcc subpackage.
3810a36
191c52a
* Thu Oct 16 2008 José Matos <jamatos@fc.up.pt> - 2.8.0-2
191c52a
- use lyx to generate the pdf documentation and ignore its warnings (for now)
191c52a
eebd19f
* Tue Sep 9 2008 Conrad Meyer <konrad@tylerc.org> - 2.8.0-1
eebd19f
- Bump to 2.8.0.
eebd19f
- Patch configure to not mess up CFLAGS.
eebd19f
- Patch debugger Makefile to not break canonicalized paths.
eebd19f
3d74d92
* Thu Sep  4 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.6.0-13
3d74d92
- fix license tag
3d74d92
434816b
* Sun Mar 2  2008 Marek Mahut <mmahut@fedoraproject.org> - 2.6.0-12
434816b
- Fixing build problems under GCC 4.3
434816b
0866ea8
* Wed Feb 20 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.6.0-11
0866ea8
- Autorebuild for GCC 4.3
0866ea8
59d394e
* Sat Apr 07 2007 Trond Danielsen <trond.danielsen@gmail.com> - 2.6.0-10
59d394e
- Added patch to fix a problem with sdccman.lyx that caused lyx to fail.
59d394e
a7fa497
* Fri Mar 23 2007 Trond Danielsen <trond.danielsen@gmail.com> - 2.6.0-9
a7fa497
- Removed symlinks, added scripts (solves bug #233385).
a7fa497
e720b05
* Thu Mar 01 2007 Trond Danielsen <trond.danielsen@gmail.com> - 2.6.0-8
70e2823
- Added Fedora specific README file.
70e2823
- Corrected permissions on files in debuginfo package.
70e2823
70e2823
* Wed Feb 28 2007 Trond Danielsen <trond.danielsen@gmail.com> - 2.6.0-7
70e2823
- Updated requirement for libc-source to include version and release number.
70e2823
70e2823
* Wed Feb 28 2007 Trond Danielsen <trond.danielsen@gmail.com> - 2.6.0-6
70e2823
- Renamed source code package to libc-sources.
70e2823
- Change BuildRequire from byacc to bison.
70e2823
- Added "Require: sdcc" to libc-sources package.
e720b05
- Empty %%doc entry removed.
70e2823
- Updated description of libc-sources package.
70e2823
70e2823
* Tue Feb 27 2007 Trond Danielsen <trond.danielsen@gmail.com> - 2.6.0-5
70e2823
- Source URL updated.
70e2823
- Separate src package created.
70e2823
- Disabling stripping of binaries to get proper debuginfo package.
70e2823
70e2823
* Mon Feb 26 2007 Ralf Corsépius <rc040203@freenet.de> - 2.6.0-4
70e2823
- Add sdcc-2.6.0-configure.diff.
70e2823
- Pass Q= to make to make building verbose.
191c52a
- Add __os_install_post post-hacks to prevent brp-strip from processing
70e2823
  foreign binaries.
70e2823
70e2823
* Mon Feb 26 2007 Trond Danielsen <trond.danielsen@gmail.com> - 2.6.0-3
70e2823
- Broken symlinks fixed.
70e2823
70e2823
* Mon Feb 5 2007 Trond Danielsen <trond.danielsen@gmail.com> - 2.6.0-2
70e2823
- Emacs scripts moved to the correct folder.
70e2823
- Moved binaries to /urs/libexec/sdcc, added symlinks with sdcc- prefix in /usr/bin.
191c52a
- Various rpmlint errors fixed.
70e2823
70e2823
* Thu Feb 1 2007 Trond Danielsen <trond.danielsen@gmail.com> - 2.6.0-1
70e2823
- Initial version.