# Description:	The GNU binary tools collection
# URL:		ftp://ftp.gnu.org/gnu/binutils/
# Maintainer:	John Eriksson

name=binutils
version=2.18
release=1
source=(ftp://ftp.gnu.org/gnu/binutils/$name-$version.tar.bz2)

build() {
    cd $name-$version
    mkdir build
    cd build
    ../configure \
	--prefix=/usr \
	--mandir=/usr/share/man \
	--infodir=/usr/share/info \
	--enable-shared \
	--disable-werror \
	--disable-nls
    make tooldir=/usr
    make check
    make tooldir=/usr DESTDIR=$PKG install
    cp ../include/libiberty.h $PKG/usr/include
    rm -f $PKG/usr/share/info/standards.info
    rm -f $PKG/usr/lib/libiberty.a # from gcc
    sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib/libbfd.la
}
