wok view binutils/receipt @ rev 12474
libcanberra: try a fix
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon Apr 23 13:29:57 2012 +0200 (2012-04-23) |
parents | 733f7b1b5b2a |
children | 8cb2ce74ff6b |
line source
1 # SliTaz package receipt.
3 PACKAGE="binutils"
4 VERSION="2.22"
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
53 # Handle ARCH type
54 case $ARCH in
55 i?86)
56 EXTRA_ARGS="--disable-werror" ;;
57 esac
59 mkdir -p ../binutils-build && cd ../binutils-build
60 $src/configure \
61 --program-prefix=$TOOLPREFIX \
62 --enable-shared \
63 --disable-initfini-array \
64 $CONFIGURE_ARGS $EXTRA_ARGS &&
65 make tooldir=/usr &&
66 make tooldir=/usr install &&
67 # This is the default binutils, so create symlinks to the target platform
68 # binutil binaries. Delete duplicate binaries to save space.
69 for binutil in $(ls -1 $DESTDIR/usr/bin | grep "${TOOLPREFIX}") ; do
70 path="$DESTDIR/usr/bin/$(echo "$binutil" | sed "s:$TOOLPREFIX::g")"
71 if [ -e $path ] ; then
72 rm -f $path
73 fi
74 ln -s $binutil $path
75 done
76 }
78 # Rules to gen a SliTaz package suitable for Tazpkg.
79 genpkg_rules()
80 {
81 mkdir -p $fs/usr/lib
82 cp -a $install/usr/bin $fs/usr
83 cp -a $install/usr/lib/*.so* $fs/usr/lib
84 cp -a $install/usr/lib/*.a $fs/usr/lib
85 cp -a $install/usr/include $fs/usr
87 # libiberty.h
88 cp -a $src/include/libiberty.h $fs/usr/include
90 # Remove 'strings' (Busybox).
91 #rm $fs/usr/lib/libiberty.a
92 rm $fs/usr/bin/strings $fs/usr/bin/*-strings
94 # Remove build directory (cookutils and tazwok path).
95 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
96 rm -rf $WOK/$PACKAGE/$PACKAGE-build
97 }