description="The GNU Binutils are a collection of binary tools." packager="CRUX System Team " maintainer="Lukc " url="http://sources.redhat.com/binutils/" depends=(zlib) name=binutils version=2.20.1 release=1 source=(ftp://ftp.gnu.org/gnu/$name/$name-$version.tar.bz2) build () { sed -i '/^SUBDIRS/s/doc//' $name-$version/bfd/Makefile.in; sed -i '/^# RELEASE=y/s/#//' $name-$version/bfd/Makefile.in; mkdir build; cd build; if [[ $CROSS_ARCH ]]; then info "Building $name for $CROSS_ARCH." fi ../$name-$version/configure \ ${CHOST:+--build=${CHOST}} \ ${CTARGET:+--host=${CTARGET}} \ ${CROSS_ARCH:+--target=${CROSS_ARCH}} \ --prefix=$prefix \ --mandir=$mandir \ --enable-shared \ $(use_enable nls); make tooldir=$prefix; make check; make tooldir=$prefix DESTDIR=$PKG install; cp ../$name-$version/include/libiberty.h $PKG$prefix/include; # FIXME if [[ -e $PKG$prefix/lib/libfd.la ]]; then sed -i "s|-L$SRC[^ ]* ||g" $PKG$prefix/lib/libbfd.la fi }