70e282
Name:           sdcc
c910f9
Version:        3.8.0
74a0db
Release:        2%{?dist}
70e282
Summary:        Small Device C Compiler
3d74d9
License:        GPLv2+
eebd19
URL:            http://sdcc.sourceforge.net/
b66230
Source0:        http://downloads.sourceforge.net/sdcc/sdcc-src-%{version}.tar.bz2
70e282
Source1:        README.fedora
0d91b0
Patch1:		sdcc-%{version}-python3.patch
c910f9
Patch2:		sdcc-%{version}-aligned_alloc.patch
70e282
f5aa72
BuildRequires:  bison, gcc-c++, automake, libtool
c910f9
BuildRequires:  boost-devel zlib-devel
f26183
BuildRequires:  flex
0d13b0
Buildrequires:  gputils
70e282
BuildRequires:  lyx
70e282
BuildRequires:  latex2html
e720b0
BuildRequires:  tex(ulem.sty)
c910f9
BuildRequires:  texinfo texlive-xetex texlive-footnotehyper
e720b0
# Work around to lyx-common missing R: /usr/bin/python
c910f9
BuildRequires:  /usr/bin/python2
aea0b3
Provides:       bundled(libiberty)
aea0b3
Requires:       emacs-filesystem
93cb42
Obsoletes:      emacs-sdcc <= 3.6.0
70e282
70e282
70e282
%description
70e282
SDCC is a C compiler for 8051 class and similar microcontrollers.
70e282
The package includes the compiler, assemblers and linkers, a device
70e282
simulator and a core library. The processors supported (to a varying
70e282
degree) include the 8051, ds390, z80, hc08, and PIC.
70e282
70e282
70e282
%package libc-sources
70e282
Summary:        Small Device C Compiler
3810a3
License:        GPLv2+
70e282
Requires:       sdcc = %{version}-%{release}
70e282
70e282
%description libc-sources
70e282
SDCC is a C compiler for 8051 class and similar microcontrollers.
25e545
This package includes the sources for the C library, and is only necessary
70e282
if you want to modify the C library or as reference of how it works.
70e282
70e282
%prep
c910f9
%setup -q -n sdcc-%{version}
c910f9
#%setup -q -n sdcc
e720b0
find -name '*.{c,h,cc}' -exec chmod -x '{}' \;
c910f9
%patch1 -p1
c910f9
%patch2 -p1
d4d89a
# Disable brp-strip-static-archive for now because it errors trying to
d4d89a
# strip foreign binaries.
Jaromir Capik a4e387
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's#/usr/lib/rpm.*/brp-strip-static-archive .*##g')
6e90ff
70e282
70e282
%build
e720b0
# Preset PDFOPT to /bin/cp
e720b0
OPTS='PDFOPT="/bin/cp"'
Jaromir Capik c44322
c910f9
%configure --enable-doc --disable-non-free  STRIP=: ${OPTS} PYTHON=python3
e720b0
%{__make} Q= QUIET=
70e282
70e282
f5aa72
70e282
%install
70e282
make install DESTDIR=$RPM_BUILD_ROOT Q=
eebd19
mv $RPM_BUILD_ROOT%{_datadir}/doc installed-docs
70e282
install -m 644 %SOURCE1 installed-docs
aea0b3
mkdir -p $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/%{name}
aea0b3
mv $RPM_BUILD_ROOT%{_bindir}/*.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/%{name}
70e282
find $RPM_BUILD_ROOT -type f -name \*.c -exec chmod a-x '{}' \;
eebd19
mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/sdcc
eebd19
mv $RPM_BUILD_ROOT%{_bindir}/* $RPM_BUILD_ROOT%{_libexecdir}/sdcc
cd4968
a7fa49
1d1bf2
# Create launch scripts in _bindir
eebd19
pushd $RPM_BUILD_ROOT%{_bindir}
191c52
for x in ../libexec/sdcc/*; do
a7fa49
echo "#!/bin/sh
a7fa49
PATH=/usr/libexec/sdcc:\$PATH
a7fa49
/usr/libexec/%{name}/$(basename $x) \"\$@\"" > %{name}-$(basename $x)
74a0db
chmod 755 %{name}-$(basename $x)
a7fa49
done
70e282
popd
70e282
d7e257
pushd $RPM_BUILD_ROOT%{_datadir}/%{name}/lib/src/pic16
d7e257
find . -type f -name '*.a' -exec chmod 664 '{}' \;
d7e257
popd
d7e257
70e282
70e282
%files
70e282
%doc installed-docs/*
70e282
%{_bindir}/*
70e282
%{_libexecdir}/%{name}
70e282
%{_datadir}/%{name}
aea0b3
%{_datadir}/emacs/site-lisp/%{name}/*.el
70e282
%exclude %{_datadir}/%{name}/lib/src
Roy Rankin 717ca0
# Don't include support files as already in binutils-devel
Roy Rankin 717ca0
%exclude %{_includedir}/
Roy Rankin 717ca0
%exclude %{_libdir}/
e2c9c5
%exclude %{_infodir}/
Roy Rankin 717ca0
70e282
70e282
70e282
%files libc-sources
70e282
%{_datadir}/%{name}/lib/src
70e282
3810a3
70e282
%changelog
74a0db
* Sun Feb 10 2019 Roy Rankin <rrankin@ihug.com.au> - 3.8.0-2
74a0db
- Fix file permission regression in 3.8.0-1
74a0db
c910f9
* Mon Feb 04 2019 Roy Rankin <rrankin@ihug.com.au> - 3.8.0-1
c910f9
- Upstream release, patch to use python3, patch for undefined _aligned_alloc
c910f9
bcf994
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.0-2
bcf994
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
bcf994
f5aa72
* Sat Jul 21 2018 Roy Rankin <rrankin@ihug.com.au> - 3.7.0-1
f5aa72
- Upstream release
f5aa72
9106ee
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.0-8
9106ee
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
9106ee
78cb32
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.0-7
78cb32
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
78cb32
90ec24
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.0-6
90ec24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
90ec24
99c792
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.0-5
99c792
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
99c792
d40318
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.0-4
d40318
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
d40318
bd5f60
* Sat Jan 28 2017 Jonathan Wakely <jwakely@redhat.com> - 3.6.0-3
bd5f60
- Rebuilt for Boost 1.63
bd5f60
aea0b3
* Thu Jul 07 2016 Roy Rankin <rrankin@ihug.com.au> - 3.6.0-2
aea0b3
- Incorporate emacs files into main package and obsolete emacs-sdcc package
aea0b3
e2c9c5
* Sun Jun 26 2016 Roy Rankin <rrankin@ihug.com.au> - 3.6.0-1
e2c9c5
- Upstream update, add texinfo build depend
e2c9c5
e7d6d5
* Sun Feb 07 2016 Roy Rankin <rrankin@ihug.com.au> - 3.5.0-6
e7d6d5
- Patch for boost-1.60 bug
e7d6d5
9b4e32
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.0-5
9b4e32
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
9b4e32
95b24c
* Thu Aug 27 2015 Jonathan Wakely <jwakely@redhat.com> - 3.5.0-4
95b24c
- Rebuilt for Boost 1.59
95b24c
9abf62
* Wed Jul 29 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5.0-3
9abf62
- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159
9abf62
6e5851
* Wed Jul 22 2015 David Tardon <dtardon@redhat.com> - 3.5.0-2
6e5851
- rebuild for Boost 1.58
6e5851
658d3a
* Sat Jul 04 2015 Roy Rankin <rrankin@ihug.com.au> - 3.5.0-1
658d3a
- Update to upstream release 3.5.0
658d3a
- Use new --disable-non-free flag in configure
658d3a
Jaromir Capik a4e387
* Mon Jun 29 2015 Jaromir Capik <jcapik@redhat.com> - 3.4.0-7
Jaromir Capik a4e387
- Adapting the brp-strip-static-archive hack to work on epel7 too
Jaromir Capik a4e387
Jaromir Capik c44322
* Mon Jun 29 2015 Jaromir Capik <jcapik@redhat.com> - 3.4.0-6
Jaromir Capik c44322
- Applying the PDFOPT hack unconditionally
Jaromir Capik c44322
- Cleaning the spec
Jaromir Capik c44322
9471f7
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.0-5
9471f7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
9471f7
Petr Machata 455f44
* Tue Jan 27 2015 Petr Machata <pmachata@redhat.com> - 3.4.0-4
Petr Machata 455f44
- Rebuild for boost 1.57.0
Petr Machata 455f44
Petr Machata 020f19
* Tue Jan 27 2015 Petr Machata <pmachata@redhat.com> - 3.4.0-3
Petr Machata 020f19
- Rebuild for boost 1.57.0
Petr Machata 020f19
f30d29
* Fri Oct 24 2014 Roy Rankin <rrankin@ihug.com.au> - 3.4.0-2
f30d29
- Fix brp-strip-static-archive for path change
f30d29
a642c8
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.4.0-1
a642c8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
a642c8
89aa38
* Mon Jul 14 2014 Roy Rankin <rrankin@ihug.com.au> - 3.4.0-0
89aa38
- Security patch for libiberty
89aa38
- Upstream update 3.4.0
89aa38
540e0e
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.0-3
540e0e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
540e0e
0d13b0
* Tue May 27 2014 Dan Horák <dan[at]danny.cz> - 3.3.0-2
0d13b0
- fix FTBFS in bfd caused by GCC 4.9
0d13b0
Petr Machata 015193
* Thu May 22 2014 Petr Machata <pmachata@redhat.com> - 3.3.0-1
Petr Machata 015193
- Rebuild for boost 1.55.0
Petr Machata 015193
cd4968
* Mon Sep 02 2013 Roy Rankin <rrankin@ihug.com.au> - 3.3.0-0
cd4968
- Remove non-free directory tree which is not GPL compatible
cd4968
- Upstream update 3.3.0
cd4968
f76b97
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.0-5
f76b97
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
f76b97
Petr Machata 59d98c
* Tue Jul 30 2013 Petr Machata <pmachata@redhat.com> - 3.2.0-4
Petr Machata 59d98c
- Rebuild for boost 1.54.0
Petr Machata 59d98c
e720b0
* Fri May 17 2013 Ralf Corsépius <corsepiu@fedoraproject.org> - 3.2.0-3
e720b0
- Modernize spec.
e720b0
- Reflect ghostscript in Fedora >= 18 having dropped pdfopt.
e720b0
  Resort to PDFOPT=/bin/cp.
e720b0
- Apply patches to allow building against boost > 1.50.0 (Add sdcc-3.2.0.diff).
e720b0
- BR: /usr/bin/python to work around lyx packaging bug.
e720b0
- Fix up broken %%changelog entries.
e720b0
ea84f2
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.0-2
ea84f2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
ea84f2
c599cd
* Mon Oct 15 2012 Jon Ciesla <limburgher@gmail.com> - 3.2.0-1
c599cd
- Provides: bundled(libiberty)
c599cd
Roy Rankin 717ca0
* Fri Jul 27 2012 Roy Rankin <rrankin@ihug.com.au> - 3.2.0-0
Roy Rankin 717ca0
- Upstream release 3.2.0
Roy Rankin 717ca0
30ccd0
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.0-3
30ccd0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
30ccd0
Conrad Meyer acbeab
* Sun Feb 26 2012 Conrad Meyer <konrad@tylerc.org> - 3.1.0-1
Conrad Meyer acbeab
- Bump to latest upstream (#797496)
Conrad Meyer acbeab
- Drop upstreamed patch (workaround for gcc 4.6 bug)
Conrad Meyer acbeab
27e2ff
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.0-2
27e2ff
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
27e2ff
faf310
* Wed Apr 13 2011 Roy Rankin <rrankin@ihug.com.au> - 3.0.0-1
faf310
- Patch for infinite loop in gcc during build
faf310
1d1bf2
* Sun Mar 20 2011 Roy Rankin <rrankin@ihug.com.au> - 3.0.0-0
1d1bf2
- Upstrem release 3.0.0, do not use gc
9b50b9
d4d89a
* Sun Dec 6 2009 Conrad Meyer <konrad@tylerc.org> - 2.9.0-7
d4d89a
- Only disable brp-strip-static.
d4d89a
d7e257
* Sun Dec 6 2009 Conrad Meyer <konrad@tylerc.org> - 2.9.0-6
d7e257
- Work around rpmbuild failure by disabling brp-strip.
d7e257
1c3eb1
* Fri Sep 11 2009 Conrad Meyer <konrad@tylerc.org> - 2.9.0-5
1c3eb1
- Fix a bug with single-bit types, logical NOT, and casting to char
1c3eb1
  (I'm fuzzy on the details) that was reported by a Fedora user with the
1c3eb1
  r5508 patch from upstream.
1c3eb1
4b92a5
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.0-4
4b92a5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
4b92a5
b825c9
* Mon Jul 20 2009 Conrad Meyer <konrad@tylerc.org> - 2.9.0-3
b825c9
- Fix double-free (rhbz# 509278) with patch from upstream.
b825c9
6e90ff
* Wed Jul 1 2009 Conrad Meyer <konrad@tylerc.org> - 2.9.0-2
6e90ff
- Fix #454205 by BR'ing gputils and re-adding install_post hack.
6e90ff
b66230
* Thu Apr 30 2009 Conrad Meyer <konrad@tylerc.org> - 2.9.0-1
b66230
- Bump to 2.9.0.
b66230
f3dbe0
* Thu Feb 26 2009 Conrad Meyer <konrad@tylerc.org> - 2.8.0-5
f3dbe0
- Make subpackages noarch.
f3dbe0
467289
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.0-4
467289
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
467289
3810a3
* Thu Nov 13 2008 Conrad Meyer <konrad@tylerc.org> - 2.8.0-3
3810a3
- Separate out emacs-sdcc subpackage.
3810a3
191c52
* Thu Oct 16 2008 José Matos <jamatos@fc.up.pt> - 2.8.0-2
191c52
- use lyx to generate the pdf documentation and ignore its warnings (for now)
191c52
eebd19
* Tue Sep 9 2008 Conrad Meyer <konrad@tylerc.org> - 2.8.0-1
eebd19
- Bump to 2.8.0.
eebd19
- Patch configure to not mess up CFLAGS.
eebd19
- Patch debugger Makefile to not break canonicalized paths.
eebd19
3d74d9
* Thu Sep  4 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.6.0-13
3d74d9
- fix license tag
3d74d9
434816
* Sun Mar 2  2008 Marek Mahut <mmahut@fedoraproject.org> - 2.6.0-12
434816
- Fixing build problems under GCC 4.3
434816
0866ea
* Wed Feb 20 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.6.0-11
0866ea
- Autorebuild for GCC 4.3
0866ea
59d394
* Sat Apr 07 2007 Trond Danielsen <trond.danielsen@gmail.com> - 2.6.0-10
59d394
- Added patch to fix a problem with sdccman.lyx that caused lyx to fail.
59d394
a7fa49
* Fri Mar 23 2007 Trond Danielsen <trond.danielsen@gmail.com> - 2.6.0-9
a7fa49
- Removed symlinks, added scripts (solves bug #233385).
a7fa49
e720b0
* Thu Mar 01 2007 Trond Danielsen <trond.danielsen@gmail.com> - 2.6.0-8
70e282
- Added Fedora specific README file.
70e282
- Corrected permissions on files in debuginfo package.
70e282
70e282
* Wed Feb 28 2007 Trond Danielsen <trond.danielsen@gmail.com> - 2.6.0-7
70e282
- Updated requirement for libc-source to include version and release number.
70e282
70e282
* Wed Feb 28 2007 Trond Danielsen <trond.danielsen@gmail.com> - 2.6.0-6
70e282
- Renamed source code package to libc-sources.
70e282
- Change BuildRequire from byacc to bison.
70e282
- Added "Require: sdcc" to libc-sources package.
e720b0
- Empty %%doc entry removed.
70e282
- Updated description of libc-sources package.
70e282
70e282
* Tue Feb 27 2007 Trond Danielsen <trond.danielsen@gmail.com> - 2.6.0-5
70e282
- Source URL updated.
70e282
- Separate src package created.
70e282
- Disabling stripping of binaries to get proper debuginfo package.
70e282
70e282
* Mon Feb 26 2007 Ralf Corsépius <rc040203@freenet.de> - 2.6.0-4
70e282
- Add sdcc-2.6.0-configure.diff.
70e282
- Pass Q= to make to make building verbose.
191c52
- Add __os_install_post post-hacks to prevent brp-strip from processing
70e282
  foreign binaries.
70e282
70e282
* Mon Feb 26 2007 Trond Danielsen <trond.danielsen@gmail.com> - 2.6.0-3
70e282
- Broken symlinks fixed.
70e282
70e282
* Mon Feb 5 2007 Trond Danielsen <trond.danielsen@gmail.com> - 2.6.0-2
70e282
- Emacs scripts moved to the correct folder.
70e282
- Moved binaries to /urs/libexec/sdcc, added symlinks with sdcc- prefix in /usr/bin.
191c52
- Various rpmlint errors fixed.
70e282
70e282
* Thu Feb 1 2007 Trond Danielsen <trond.danielsen@gmail.com> - 2.6.0-1
70e282
- Initial version.