# $Id$ # Maintainer: Brad Fanella # Contributor: Corrado Primier # Contributor: danst0 # Contributor: Alex Forencich pkgname=gcc-avr pkgver=4.5.3 pkgrel=1 pkgdesc="The GNU avr Compiler Collection" arch=('i686' 'x86_64') license=('GPL' 'LGPL' 'custom') url="http://gcc.gnu.org/" depends=('binutils-avr>=2.20' 'cloog' 'ppl' 'gcc-libs>=4.6.0' 'libmpc') options=('!ccache' '!distcc' '!emptydirs' '!libtool' '!strip') source=(http://ftp.gnu.org/gnu/gcc/${pkgname/-avr}-${pkgver}/gcc-{core,g++}-${pkgver}.tar.bz2 'http://distribute.atmel.no/tools/opensource/avr-gcc/gcc-4.5.1/20-gcc-4.5.1-libiberty-Makefile.in.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/gcc-4.5.1/30-gcc-4.5.1-fixedpoint-3-4-2010.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/gcc-4.5.1/31-gcc-4.5.1-xmega-v14.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/gcc-4.5.1/32-gcc-4.5.1-avrtiny10.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/gcc-4.5.1/33-gcc-4.5.1-osmain.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/gcc-4.5.1/34-gcc-4.5.1-builtins-v6.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/gcc-4.5.1/35-gcc-4.5.1-avrtiny10-non-fixedpoint.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/gcc-4.5.1/37-gcc-4.5.1-option-list-devices.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/gcc-4.5.1/38-gcc-4.5.1-bug13473.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/gcc-4.5.1/39-gcc-4.5.1-bug13579.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/gcc-4.5.1/40-gcc-4.5.1-bug-18145-v4.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/gcc-4.5.1/41-gcc-4.5.1-avrtiny10-bug-12510.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/gcc-4.5.1/42-gcc-4.5.1-bug12915.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/gcc-4.5.1/43-gcc-4.5.1-bug13932.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/gcc-4.5.1/44-gcc-4.5.1-bug13789.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/gcc-4.5.1/50-gcc-4.5.1-new-devices.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/gcc-4.5.1/51-gcc-4.5.1-atmega32_5_50_90_pa.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/gcc-4.5.1/54-gcc-4.5.1-attiny1634.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/gcc-4.5.1/56-gcc-4.5.1-atmega48pa.patch') md5sums=('98be5094b5b5a7b9087494291bc7f522' '2c78bf1d5f08a0b116f280de88d3ffe7' 'dff2ab65dc3af50b67de8e423067591c' '5dd4843c28eb4bce21f0dfc1168ec93e' '549564a9a0a4572b7b881408c6cb86b5' '2526c98b1d19e0aac828ff9ce40fdec4' '3319af45385dbde382d707f95f1a138a' 'f4e6078cb060aff5c45b579a6e40b0d3' '77ee82bffa8b9a379d3bf6206751907c' 'e269c787c5b16e0b09ea28442de753cc' 'a477a5e84b85fecb096bf549992d82f2' 'ece3ecaa21968ff36a578cd3f19e6ed6' 'a2e3a2dfe1c40175a1c0692f40f95f82' '8297e577a6c297a71ef2df0561eac327' 'b5e58f363893250515bdb647cef78d79' 'd4ce7a5109447a17e594794b5d12bc69' '2a70cc28b2f6417ab6c7b4a053713e94' '887085157e67fe73137ac7d26edee4fe' '1c55af35129c8b01f2f441b02b147f31' '74f7338cd965fe81792a57c1aa4c4812' 'fdcca54a2bba5e4ca7e6f09b694b21c6') build() { export CFLAGS="-O2 -pipe" export CXXFLAGS="-O2 -pipe" cd "${srcdir}/${pkgname/-avr}-${pkgver}" for file in ${srcdir}/*.patch; do echo "Patching with $file" patch -p0 < $file done mkdir build cd build ../configure --disable-libssp \ --disable-nls \ --enable-languages=c,c++ \ --infodir=/usr/share/info \ --libdir=/usr/lib \ --libexecdir=/usr/lib \ --mandir=/usr/share/man \ --prefix=/usr \ --target=avr \ --with-gnu-as \ --with-gnu-ld \ --with-as=/usr/bin/avr-as \ --with-ld=/usr/bin/avr-ld make } package() { cd "${srcdir}/${pkgname/-avr}-${pkgver}" cd build make -j1 DESTDIR=${pkgdir} install #install -Dm644 "${srcdir}/${pkgname/-avr}-${pkgver}/COPYING.RUNTIME" \ # "${pkgdir}/usr/share/licenses/${pkgname}/RUNTIME.LIBRARY.EXCEPTION" rm -f ${pkgdir}/usr/lib/libiberty.a rm -rf ${pkgdir}/usr/share/man/man7 rm -rf ${pkgdir}/usr/share/info }