# $Id: PKGBUILD 82 2009-07-17 19:56:55Z aaron $ # Maintainer: Corrado Primier # Contributor: danst0 pkgname=binutils-avr pkgver=2.19.1 pkgrel=1 _date=20090419 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.10.1' 'zlib') options=('!libtool' '!distcc' '!ccache') install=binutils-avr.install source=(ftp://ftp.archlinux.org/other/${pkgname/-avr}/${pkgname/-avr}-${pkgver}_${_date}.tar.bz2 binutils-2.19-as-needed.patch) md5sums=('18db08329c4a1a22ec57ea4c0d7440a6' 'f6fd22284040a0b05e74ed2ff504a6d9') build() { cd ${srcdir} patch -Np1 -i ${srcdir}/binutils-2.19-as-needed.patch || return 1 mkdir build cd build CC="gcc -L$(pwd)/bfd/.libs/" if [ "${CARCH}" = "x86_64" ]; then ../configure --build=$(../config.guess) \ --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-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 || return 1 make tooldir=/usr || return 1 make DESTDIR=${pkgdir} tooldir=/usr install || return 1 rm -f ${pkgdir}/usr/lib/libiberty.a rm -f ${pkgdir}/usr/man/man1/{dlltool,nlmconv,windres}* rm -f ${pkgdir}/usr/share/info/dir || return 1 rm -rf ${pkgdir}/usr/share/lib || return 1 rm -rf ${pkgdir}/usr/share/locale || return 1 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 } # vim:set ts=2 sw=2 et: