wok-4.x view binutils/receipt @ rev 12322

get-wfica: update (thanks Carl)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Aug 22 18:22:54 2012 +0200 (2012-08-22)
parents 09aa2ebe8973
children 654ef6aa1962
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 WEB_SITE="http://www.gnu.org/software/binutils/"
10 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
11 PROVIDE="libbfd"
12 TAGS="assembler linker"
14 DEPENDS="glibc zlib"
15 BUILD_DEPENDS="glibc-dev zlib-dev"
17 # Rules to compile & install the temporary toolchain.
18 precook_tmp_toolchain()
19 {
20 mkdir -p binutils-build && cd binutils-build
21 { $src/configure \
22 --target=$HOST_SYSTEM --disable-nls \
23 --disable-werror &&
24 make
25 } || return 1
27 #If building on x86_64, create a symlink to ensure the sanity of the toolchain.
28 [ "$ARCH" = x86_64 ] && mkdir /tools/lib && ln -s lib /tools/lib64
30 make install
31 }
33 cook_tmp_toolchain()
34 {
35 mkdir -p binutils-build && cd binutils-build
36 { CC="$HOST_SYSTEM-gcc -B/tools/lib/" \
37 AR=$HOST_SYSTEM-ar RANLIB=$HOST_SYSTEM-ranlib \
38 $src/configure $CONFIGURE_ARGS \
39 --disable-nls --with-lib-path=/tools/lib &&
40 make &&
41 make install &&
42 make -C ld clean &&
43 make -C ld LIB_PATH=/usr/lib:/lib
44 } || return 1
45 cp ld/ld-new /tools/bin
46 }
48 # Rules to configure and make the package.
49 compile_rules()
50 {
51 cd $src
52 mkdir -p ../binutils-build && cd ../binutils-build
53 $src/configure \
54 --program-prefix=$TOOLPREFIX \
55 --enable-shared \
56 $CONFIGURE_ARGS &&
57 make tooldir=/usr &&
58 make tooldir=/usr install &&
59 # This is the default binutils, so create symlinks to the target platform
60 # binutil binaries. Delete duplicate binaries to save space.
61 for binutil in $(ls -1 $DESTDIR/usr/bin | grep "${TOOLPREFIX}") ; do
62 path="$DESTDIR/usr/bin/$(echo "$binutil" | sed "s:$TOOLPREFIX::g")"
63 if [ -e $path ] ; then
64 rm -f $path
65 fi
66 ln -s $binutil $path
67 done
68 }
70 # Rules to gen a SliTaz package suitable for Tazpkg.
71 genpkg_rules()
72 {
73 mkdir -p $fs/usr/lib
74 cp -a $_pkg/usr/bin $fs/usr
75 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
76 cp -a $_pkg/usr/lib/*.a $fs/usr/lib
77 cp -a $_pkg/usr/include $fs/usr
79 # libiberty.h
80 cp -a $src/include/libiberty.h $fs/usr/include
82 # Remove 'strings' (Busybox).
83 #rm $fs/usr/lib/libiberty.a
84 rm $fs/usr/bin/strings $fs/usr/bin/*-strings
86 # Remove build directory (cookutils and tazwok path).
87 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
88 rm -rf $WOK/$PACKAGE/$PACKAGE-build
89 }