PKGBUILDs/core/binutils/PKGBUILD
2009-11-01 09:22:38 -06:00

44 lines
1.5 KiB
Bash

# Maintainer: Mike Staszel <mikestaszel@openpogo.com>
pkgname=binutils
pkgver=2.19.1
pkgrel=3
_date=20090205
pkgdesc="A set of programs to assemble and manipulate binary and object files"
arch=('arm')
url="http://www.gnu.org/software/binutils/"
license=('GPL')
groups=('base-devel')
options=('!libtool' '!distcc' '!ccache')
depends=('glibc>=2.9' 'texinfo>=4.13a-3')
source=(ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}_${_date}.tar.bz2)
md5sums=('8fd8a7082814124917289eba9f2b46f1')
build() {
mkdir -p $srcdir/binutils-build
cd $srcdir/binutils-build
CC="gcc -L`pwd`/bfd/.libs/"
../configure --prefix=/usr \
--mandir=/usr/share/man --infodir=/usr/share/info \
--enable-shared || return 1
# fix man files install path
sed -i -e "s:mandir \= \/usr\/share:mandir \= ${pkgdir}\/usr\/share:" ${srcdir}/binutils-build/Makefile || return 1
# fix info files install path
sed -i -e "s:infodir \= \/usr\/share:infodir \= ${pkgdir}\/usr\/share:" ${srcdir}/binutils-build/Makefile || return 1
# This checks the host environment and makes sure all the necessary tools are available to compile Binutils.
make configure-host || return 1
make tooldir=${startdir}/pkg/usr || return 1
make prefix=${startdir}/pkg/usr tooldir=${startdir}/pkg/usr install
install -m 644 ../include/libiberty.h ${startdir}/pkg/usr/include
# Remove these symlinks, with binutils prereleases they are not ABI stable.
# Programs should compile static to the .a file.
rm -f ${startdir}/pkg/usr/lib/lib{bfd,opcodes}.so
}