summaryrefslogtreecommitdiffstats
path: root/binutils/Pkgfile
diff options
context:
space:
mode:
Diffstat (limited to 'binutils/Pkgfile')
-rw-r--r--binutils/Pkgfile42
1 files changed, 27 insertions, 15 deletions
diff --git a/binutils/Pkgfile b/binutils/Pkgfile
index ec9e903..533e6d2 100644
--- a/binutils/Pkgfile
+++ b/binutils/Pkgfile
@@ -1,24 +1,36 @@
-description="The GNU Binutils are a collection of binary tools"
-packager=""
-maintainer="CRUX System Team, core-ports at crux dot nu"
+description="The GNU Binutils are a collection of binary tools."
+packager="CRUX System Team <core-ports AT crux DOT nu>"
+maintainer="Lukc <lukc AT upyum DOT com>"
url="http://sources.redhat.com/binutils/"
depends=(zlib)
name=binutils
version=2.20.1
release=1
-source=(ftp://ftp.gnu.org/gnu/binutils/binutils-2.20.1.tar.bz2)
+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;
- ../$name-$version/configure --prefix=/usr --mandir=/usr/man --enable-shared --disable-nls;
- make tooldir=/usr;
- make check;
- make tooldir=/usr DESTDIR=$PKG install;
- cp ../$name-$version/include/libiberty.h $PKG/usr/include;
- rm -r $PKG/usr/share;
- sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib/libbfd.la
+ 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
}