# $Id$ # Maintainer: Alex Forencich # Contributor: Brad Fanella # Contributor: Corrado Primier # Contributor: danst0 pkgname=avr-binutils-atmel pkgver=2.20.1 pkgrel=2 pkgdesc="A set of programs to assemble and manipulate binary and object files for the avr architecture" arch=('i686' 'x86_64') url="http://www.gnu.org/software/binutils/" license=('GPL') depends=('glibc>=2.12.1-5' 'zlib') conflicts=("avr-binutils" "binutils-avr") provides=("avr-binutils=$pkgver" "binutils-avr=$pkgver") options=('!libtool' '!distcc' '!ccache') source=(binutils-2.20.1.tar.bz2::http://ftp.gnu.org/gnu/binutils/binutils-${pkgver}a.tar.bz2 'http://distribute.atmel.no/tools/opensource/avr-gcc/binutils-2.20.1/30-binutils-2.20.1-avr-size.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/binutils-2.20.1/31-binutils-2.20.1-avr-coff.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/binutils-2.20.1/32-binutils-2.20.1-new-sections.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/binutils-2.20.1/34-binutils-2.20.1-as-dwarf.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/binutils-2.20.1/35-binutils-2.20.1-dwarf2-AVRStudio-workaround.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/binutils-2.20.1/36-binutils-2.20.1-assembler-options.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/binutils-2.20.1/50-binutils-2.20.1-xmega.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/binutils-2.20.1/51-binutils-2.20.1-new-devices.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/binutils-2.20.1/52-binutils-2.20.1-avrtiny10.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/binutils-2.20.1/53-binutils-2.20.1-xmega128a1u-64a1u.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/binutils-2.20.1/54-binutils-2.20.1-atxmega16x1-32x1.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/binutils-2.20.1/55-binutils-2.20.1-atxmega128b1.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/binutils-2.20.1/56-binutils-2.20.1-atxmega256a3bu.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/binutils-2.20.1/57-binutils-2.20.1-at90pwm161.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/binutils-2.20.1/58-binutils-2.20.1-atmega16hvb-32hvb.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/binutils-2.20.1/59-binutils-2.20.1-atmega32_5_50_90_pa.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/binutils-2.20.1/60-binutils-2.20.1-bug13789.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/binutils-2.20.1/62-binutils-2.20.1-attiny1634.patch' 'http://distribute.atmel.no/tools/opensource/avr-gcc/binutils-2.20.1/64-binutils-2.20.1-atmega48pa.patch') md5sums=('2b9dc8f2b7dbd5ec5992c6e29de0b764' '31d623f763493126c99b06428cb10f7f' '6e59900a95ae7f1bac61b0b37b69afc4' '8972a526fdd155df5c7bc37c49aa9656' '48565b6cdd01e93fd257db4549f35956' 'fce22a6654b1c9d7be27e6143ead90c7' '5326f825ccfb67f3a3e2e798cd6c944a' '89ab4c3faf3b0dfca32d780b75a0c5bc' '28333765b46de20a21f6377f36f0cf0c' 'caca37d6187d68733a791b8c21d6465a' 'cd795ac1fa65536d022a2a86cd90b49b' 'd1081fdf396741e05c4a552cd736b4e8' '8e1156295cccde8a7d23f9280942b0d3' '0388fc607af84aee12ca5a31eb3c046a' 'b06fe06ce72e0732bd4540c7374ce521' 'a0353a6b456b4482c7fff3101128d769' '61659b5a5fed3f7569aed6e8b50c450c' '99cabd213b4326b8a21b5c20187049aa' 'e99d4ce6615269558533b56dc9a27e3d' 'bc393bb72a97011025492d038bca3afb') build() { cd ${srcdir}/binutils-${pkgver} for file in ${srcdir}/*.patch; do echo "Patching with $file" patch -p0 < $file done mkdir build cd build CC="gcc -L$(pwd)/bfd/.libs/" if [ "${CARCH}" = "x86_64" ]; then ../configure --build=$(../config.guess) \ --disable-werror \ --disable-multilib \ --disable-nls \ --enable-64-bit-bfd \ --enable-install-libbfd \ --includedir=/usr/$(../config.guess)/include \ --infodir=/usr/share/info \ --libdir=/usr/lib \ --mandir=/usr/share/man \ --prefix=/usr \ --target=avr else ../configure --build=$(../config.guess) \ --disable-werror \ --disable-nls \ --enable-install-libbfd \ --includedir=/usr/$(../config.guess)/include \ --infodir=/usr/share/info \ --libdir=/usr/lib \ --mandir=/usr/share/man \ --prefix=/usr \ --target=avr fi # This checks the host environment and makes sure all the necessary tools are available to compile Binutils. make configure-host make tooldir=/usr } package() { cd ${srcdir}/binutils-${pkgver} cd build make DESTDIR=${pkgdir} tooldir=/usr install rm -f ${pkgdir}/usr/lib/libiberty.a for bin in addr2line ar as c++filt gprof ld nm objcopy objdump ranlib readelf size strings strip ; do rm -f ${pkgdir}/usr/bin/${bin} || return 1 done for info in as bfd binutils configure gprof ld standards; do mv ${pkgdir}/usr/share/info/${info}.info ${pkgdir}/usr/share/info/avr-${info}.info done }