wok view binutils/receipt @ rev 14097
udisks:fix deps
author | ernia <monghitri@aruba.it> |
---|---|
date | Sat Feb 23 09:34:55 2013 +0000 (2013-02-23) |
parents | 8cb2ce74ff6b |
children | a7b54d88ae54 |
line source
1 # SliTaz package receipt.
3 PACKAGE="binutils"
4 VERSION="2.23.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 WEB_SITE="http://www.gnu.org/software/binutils/"
10 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
11 #WGET_URL="http://www.kernel.org/pub/linux/devel/binutils/$TARBALL"
12 PROVIDE="libbfd"
13 TAGS="assembler linker"
15 DEPENDS="glibc zlib"
16 BUILD_DEPENDS="glibc-dev zlib-dev"
18 # Rules to compile & install the temporary toolchain.
19 precook_tmp_toolchain()
20 {
21 mkdir -p binutils-build && cd binutils-build
22 { $src/configure \
23 --target=$HOST_SYSTEM --disable-nls \
24 --disable-werror &&
25 make
26 } || return 1
28 #If building on x86_64, create a symlink to ensure the sanity of the toolchain.
29 [ "$ARCH" = x86_64 ] && mkdir /tools/lib && ln -s lib /tools/lib64
31 make install
32 }
34 cook_tmp_toolchain()
35 {
36 mkdir -p binutils-build && cd binutils-build
37 { CC="$HOST_SYSTEM-gcc -B/tools/lib/" \
38 AR=$HOST_SYSTEM-ar RANLIB=$HOST_SYSTEM-ranlib \
39 $src/configure $CONFIGURE_ARGS \
40 --disable-nls --with-lib-path=/tools/lib &&
41 make &&
42 make install &&
43 make -C ld clean &&
44 make -C ld LIB_PATH=/usr/lib:/lib
45 } || return 1
46 cp ld/ld-new /tools/bin
47 }
49 # Rules to configure and make the package.
50 compile_rules()
51 {
52 cd $src
54 # Handle ARCH type
55 case $ARCH in
56 i?86)
57 EXTRA_ARGS="--disable-werror" ;;
58 esac
60 mkdir -p ../binutils-build && cd ../binutils-build
61 $src/configure \
62 --program-prefix=$TOOLPREFIX \
63 --enable-shared \
64 --disable-initfini-array \
65 --with-bugurl="http://bugs.slitaz.org/" \
66 $CONFIGURE_ARGS $EXTRA_ARGS &&
67 make tooldir=/usr &&
68 make tooldir=/usr install &&
69 # This is the default binutils, so create symlinks to the target platform
70 # binutil binaries. Delete duplicate binaries to save space.
71 for binutil in $(ls -1 $DESTDIR/usr/bin | grep "${TOOLPREFIX}") ; do
72 path="$DESTDIR/usr/bin/$(echo "$binutil" | sed "s:$TOOLPREFIX::g")"
73 if [ -e $path ] ; then
74 rm -f $path
75 fi
76 ln -s $binutil $path
77 done
78 }
80 # Rules to gen a SliTaz package suitable for Tazpkg.
81 genpkg_rules()
82 {
83 mkdir -p $fs/usr/lib
84 cp -a $install/usr/bin $fs/usr
85 cp -a $install/usr/lib/*.so* $fs/usr/lib
86 cp -a $install/usr/lib/*.a $fs/usr/lib
87 cp -a $install/usr/include $fs/usr
89 # libiberty.h
90 cp -a $src/include/libiberty.h $fs/usr/include
92 # Remove 'strings' (Busybox).
93 #rm $fs/usr/lib/libiberty.a
94 rm $fs/usr/bin/strings $fs/usr/bin/*-strings
96 # Remove build directory (cookutils and tazwok path).
97 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
98 rm -rf $WOK/$PACKAGE/$PACKAGE-build
99 }