CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
binutils: initial import (verified compilation)
[crossrootfs.git] / binutils / Pkgfile
CommitLineData
6dca1d21
JB
1# Description: The GNU Binutils are a collection of binary tools
2# URL: http://sources.redhat.com/binutils/
3# Maintainer: CRUX System Team, core-ports at crux dot nu
b751b192 4# Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
6dca1d21
JB
5# Depends on:
6
7name=binutils
396d340a 8version=2.21.1
6dca1d21 9release=1
396d340a
VM
10source=(ftp://ftp.gnu.org/gnu/$name/$name-$version.tar.bz2 \
11 binutils-$version-gnueabihf.patch)
6dca1d21
JB
12
13build() {
396d340a
VM
14 pushd $name-$version
15 patch -p1 -i $SRC/binutils-$version-gnueabihf.patch
16 popd
d3c4b411
VM
17 sed -i '/^SUBDIRS/s/doc//' $name-$version/bfd/Makefile.in
18 sed -i '/^# RELEASE=y/s/#//' $name-$version/bfd/Makefile.in
19 sed -i 's|really-check: check-cplus-dem check-pexecute check-expandargv|really-check:|g' -i $name-$version/libiberty/testsuite/Makefile.in
6dca1d21
JB
20 mkdir $SRC/build
21 cd $SRC/build
22
23 AR="ar" AS="as" \
24 $SRC/$name-$version/configure --build=$CHOST \
25 --host=$CTARGET \
26 --target=$CTARGET \
6dca1d21 27 --prefix=/usr \
d3c4b411
VM
28 --mandir=/usr/man \
29 --enable-shared \
6dca1d21
JB
30 --disable-nls
31
32 make configure-host
33 make tooldir=/usr
d3c4b411 34 make check
6dca1d21
JB
35 make tooldir=/usr DESTDIR=$PKG install
36
37 cp ../$name-$version/include/libiberty.h $PKG/usr/include
d3c4b411 38 rm -r $PKG/usr/share
6dca1d21
JB
39 sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib/libbfd.la
40}