wok-current view binutils/receipt @ rev 6745

binutils: add gold support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Oct 17 15:57:15 2010 +0200 (2010-10-17)
parents fdcef0b5e0c7
children 136bc077dd05
line source
1 # SliTaz package receipt.
3 PACKAGE="binutils"
4 VERSION="2.20.1"
5 CATEGORY="development"
6 SHORT_DESC="GNU assembler, linker and binary utilities."
7 MAINTAINER="pankso@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.bz2"
9 DEPENDS="zlib"
10 BUILD_DEPENDS="zlib-dev texinfo"
11 WEB_SITE="http://www.gnu.org/software/binutils/"
12 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
13 PROVIDE="libbfd"
14 TAGS="assembler linker"
16 # Rules to configure and make the package.
17 #
18 compile_rules()
19 {
20 mkdir -p binutils-build && cd binutils-build
21 ../$PACKAGE-$VERSION/configure \
22 --program-prefix=$TOOLPREFIX \
23 --prefix=/usr \
24 --infodir=/usr/share/info \
25 --mandir=/usr/share/man \
26 --enable-shared \
27 --enable-gold \
28 $CONFIGURE_ARGS &&
29 make -j 4 tooldir=/usr &&
30 # Install in binutils-build/ and then move the files to
31 # to the source tree. Can't install directly... This is done
32 # to keep the $src and $_pkg working for genpkg.
33 make tooldir=/usr DESTDIR=$PWD/_pkg install &&
34 mv _pkg ../$PACKAGE-$VERSION/ &&
35 # This is the default binutils, so create symlinks
36 # to the target platform binutil binaries.
37 # Delete duplicate binaries to save space.
38 for binutil in $(ls -1 $src/_pkg/usr/bin/ | grep "${TOOLPREFIX}") ; do
39 genericBinutilPath="$src/_pkg/usr/bin/$(echo "$binutil" | sed "s:$TOOLPREFIX::g")"
40 if [ -e $genericBinutilPath ] ; then
41 rm -f $genericBinutilPath
42 fi
43 ln -s $binutil $genericBinutilPath
44 done
45 }
47 # Rules to gen a SliTaz package suitable for Tazpkg.
48 genpkg_rules()
49 {
50 mkdir -p $fs/usr
51 cp -a $_pkg/usr/bin $fs/usr
52 cp -a $_pkg/usr/lib $fs/usr
53 cp -a $_pkg/usr/include $fs/usr
55 # libiberty.h
56 cp -a $src/include/libiberty.h $fs/usr/include
58 # Remove 'strings' (Busybox).
59 #rm $fs/usr/lib/libiberty.a
60 rm $fs/usr/bin/strings $fs/usr/bin/*-strings
61 }