blob: e7cdafe4bc90d513d8cdae3e58705f0f8a2875e8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# $Id: PKGBUILD 58711 2011-11-17 21:06:00Z jelle $
# Maintainer: Brad Fanella <bradfanella@archlinux.us>
# Contributor: Corrado Primier <bardo@aur.archlinux.org>
# Contributor: danst0 <danst0@west.de>
pkgname=binutils-avr
pkgver=2.21.1
pkgrel=2
pkgdesc="A set of programs to assemble and manipulate binary and object files for the avr architecture"
arch=('i686' 'x86_64' 'mips64el')
url="http://www.gnu.org/software/binutils/"
license=('GPL')
depends=('glibc>=2.12-5' 'zlib')
options=('!libtool' '!distcc' '!ccache')
source=(http://ftp.gnu.org/gnu/${pkgname/-avr}/${pkgname/-avr}-${pkgver}.tar.bz2)
md5sums=('bde820eac53fa3a8d8696667418557ad')
build() {
cd ${srcdir}/${pkgname/-avr}-${pkgver}
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
make tooldir=/usr
}
package() {
cd ${srcdir}/${pkgname/-avr}-${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
}
|