wok-next view binutils/receipt @ rev 10293
fontconfig: use --with-arch=ARCH to cross compile
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun May 22 00:39:42 2011 +0200 (2011-05-22) |
parents | 3ab75c9a703d |
children | 54b7fcf80cbb |
line source
1 # SliTaz package receipt.
3 PACKAGE="binutils"
4 VERSION="2.21"
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="glibc zlib"
10 BUILD_DEPENDS="glibc zlib"
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 compile & install the temporary toolchain.
17 precook_tmp_toolchain()
18 {
19 mkdir -p binutils-build && cd binutils-build
20 { $src/configure \
21 --target=$BUILD_HOST --disable-nls \
22 --disable-werror &&
23 make
24 } || return 1
26 #If building on x86_64, create a symlink to ensure the sanity of the toolchain.
27 [ "$ARCH" = x86_64 ] && mkdir /tools/lib && ln -s lib /tools/lib64
29 make install
30 }
32 cook_tmp_toolchain()
33 {
34 mkdir -p binutils-build && cd binutils-build
35 { CC="$BUILD_HOST-gcc -B/tools/lib/" \
36 AR=$BUILD_HOST-ar RANLIB=$BUILD_HOST-ranlib \
37 $src/configure \
38 --disable-nls --with-lib-path=/tools/lib &&
39 make &&
40 make install &&
41 make -C ld clean &&
42 make -C ld LIB_PATH=/usr/lib:/lib
43 } || return 1
44 cp ld/ld-new /tools/bin
45 }
47 # Rules to configure and make the package.
48 compile_rules()
49 {
50 cd $src
51 mkdir -p ../binutils-build && cd ../binutils-build
52 $src/configure \
53 --program-prefix=$TOOLPREFIX \
54 --enable-shared \
55 $CONFIGURE_ARGS &&
56 make tooldir=/usr &&
57 make tooldir=/usr install &&
58 # This is the default binutils, so create symlinks to the target platform
59 # binutil binaries. Delete duplicate binaries to save space.
60 for binutil in $(ls -1 $DESTDIR/usr/bin | grep "${TOOLPREFIX}") ; do
61 path="$DESTDIR/usr/bin/$(echo "$binutil" | sed "s:$TOOLPREFIX::g")"
62 if [ -e $path ] ; then
63 rm -f $path
64 fi
65 ln -s $binutil $path
66 done
67 }
69 # Rules to gen a SliTaz package suitable for Tazpkg.
70 genpkg_rules()
71 {
72 mkdir -p $fs/usr/lib
73 cp -a $_pkg/usr/bin $fs/usr
74 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
75 cp -a $_pkg/usr/lib/*.a $fs/usr/lib
76 cp -a $_pkg/usr/include $fs/usr
78 # libiberty.h
79 cp -a $src/include/libiberty.h $fs/usr/include
81 # Remove 'strings' (Busybox).
82 #rm $fs/usr/lib/libiberty.a
83 rm $fs/usr/bin/strings $fs/usr/bin/*-strings
85 # Remove build directory (cookutils and tazwok path).
86 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
87 rm -rf $WOK/$PACKAGE/$PACKAGE-build
88 }