wok-next annotate binutils/receipt @ rev 15052
UNDO ibus-dev: no /usr/include ?
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Aug 12 19:07:07 2013 +0000 (2013-08-12) |
parents | a5f6371c3254 |
children | 7e8a95a52792 |
rev | line source |
---|---|
pankso@9 | 1 # SliTaz package receipt. |
pankso@9 | 2 |
pankso@9 | 3 PACKAGE="binutils" |
devl547@13923 | 4 VERSION="2.23.1" |
pankso@204 | 5 CATEGORY="development" |
pankso@9 | 6 SHORT_DESC="GNU assembler, linker and binary utilities." |
pankso@9 | 7 MAINTAINER="pankso@slitaz.org" |
pascal@15000 | 8 LICENSE="GPL2" |
pankso@534 | 9 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
pankso@9 | 10 WEB_SITE="http://www.gnu.org/software/binutils/" |
pankso@2699 | 11 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL" |
pankso@12543 | 12 #WGET_URL="http://www.kernel.org/pub/linux/devel/binutils/$TARBALL" |
erjo@4780 | 13 PROVIDE="libbfd" |
jozee@4932 | 14 TAGS="assembler linker" |
pankso@9 | 15 |
slaxemulator@10485 | 16 DEPENDS="glibc zlib" |
slaxemulator@10485 | 17 BUILD_DEPENDS="glibc-dev zlib-dev" |
slaxemulator@10485 | 18 |
gokhlayeh@8172 | 19 # Rules to compile & install the temporary toolchain. |
gokhlayeh@8172 | 20 precook_tmp_toolchain() |
gokhlayeh@8172 | 21 { |
gokhlayeh@8172 | 22 mkdir -p binutils-build && cd binutils-build |
gokhlayeh@8172 | 23 { $src/configure \ |
slaxemulator@10419 | 24 --target=$HOST_SYSTEM --disable-nls \ |
gokhlayeh@8172 | 25 --disable-werror && |
gokhlayeh@8172 | 26 make |
gokhlayeh@8172 | 27 } || return 1 |
gokhlayeh@8172 | 28 |
gokhlayeh@8172 | 29 #If building on x86_64, create a symlink to ensure the sanity of the toolchain. |
gokhlayeh@8172 | 30 [ "$ARCH" = x86_64 ] && mkdir /tools/lib && ln -s lib /tools/lib64 |
gokhlayeh@8172 | 31 |
gokhlayeh@8172 | 32 make install |
gokhlayeh@8172 | 33 } |
gokhlayeh@8172 | 34 |
gokhlayeh@8172 | 35 cook_tmp_toolchain() |
gokhlayeh@8172 | 36 { |
gokhlayeh@8172 | 37 mkdir -p binutils-build && cd binutils-build |
slaxemulator@10419 | 38 { CC="$HOST_SYSTEM-gcc -B/tools/lib/" \ |
slaxemulator@10419 | 39 AR=$HOST_SYSTEM-ar RANLIB=$HOST_SYSTEM-ranlib \ |
slaxemulator@10419 | 40 $src/configure $CONFIGURE_ARGS \ |
gokhlayeh@8172 | 41 --disable-nls --with-lib-path=/tools/lib && |
gokhlayeh@8172 | 42 make && |
gokhlayeh@8172 | 43 make install && |
gokhlayeh@8172 | 44 make -C ld clean && |
pankso@12543 | 45 make -C ld LIB_PATH=/usr/lib:/lib |
gokhlayeh@8172 | 46 } || return 1 |
gokhlayeh@8172 | 47 cp ld/ld-new /tools/bin |
gokhlayeh@8172 | 48 } |
gokhlayeh@8172 | 49 |
pankso@9 | 50 # Rules to configure and make the package. |
pankso@9 | 51 compile_rules() |
pankso@9 | 52 { |
slaxemulator@9745 | 53 cd $src |
pankso@12543 | 54 |
pankso@12299 | 55 # Handle ARCH type |
pankso@12299 | 56 case $ARCH in |
pankso@12299 | 57 i?86) |
pankso@12299 | 58 EXTRA_ARGS="--disable-werror" ;; |
pankso@12299 | 59 esac |
pankso@12543 | 60 |
pankso@9702 | 61 mkdir -p ../binutils-build && cd ../binutils-build |
gokhlayeh@8172 | 62 $src/configure \ |
rcx@3930 | 63 --program-prefix=$TOOLPREFIX \ |
pankso@10013 | 64 --enable-shared \ |
pankso@12299 | 65 --disable-initfini-array \ |
pankso@12543 | 66 --with-bugurl="http://bugs.slitaz.org/" \ |
pankso@12299 | 67 $CONFIGURE_ARGS $EXTRA_ARGS && |
gokhlayeh@8172 | 68 make tooldir=/usr && |
gokhlayeh@8172 | 69 make tooldir=/usr install && |
pankso@10029 | 70 # This is the default binutils, so create symlinks to the target platform |
pankso@10029 | 71 # binutil binaries. Delete duplicate binaries to save space. |
pankso@10029 | 72 for binutil in $(ls -1 $DESTDIR/usr/bin | grep "${TOOLPREFIX}") ; do |
pankso@10029 | 73 path="$DESTDIR/usr/bin/$(echo "$binutil" | sed "s:$TOOLPREFIX::g")" |
pankso@10029 | 74 if [ -e $path ] ; then |
pankso@10029 | 75 rm -f $path |
rcx@3930 | 76 fi |
pankso@10029 | 77 ln -s $binutil $path |
rcx@3930 | 78 done |
pankso@9 | 79 } |
pankso@9 | 80 |
pankso@9 | 81 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@9 | 82 genpkg_rules() |
pankso@9 | 83 { |
slaxemulator@9439 | 84 mkdir -p $fs/usr/lib |
pankso@12266 | 85 cp -a $install/usr/bin $fs/usr |
pankso@12266 | 86 cp -a $install/usr/lib/*.so* $fs/usr/lib |
pankso@12266 | 87 cp -a $install/usr/lib/*.a $fs/usr/lib |
pankso@12266 | 88 cp -a $install/usr/include $fs/usr |
pankso@12543 | 89 |
pankso@9 | 90 # libiberty.h |
pankso@9 | 91 cp -a $src/include/libiberty.h $fs/usr/include |
pankso@12543 | 92 |
pankso@3188 | 93 # Remove 'strings' (Busybox). |
pankso@3188 | 94 #rm $fs/usr/lib/libiberty.a |
rcx@3930 | 95 rm $fs/usr/bin/strings $fs/usr/bin/*-strings |
pankso@12543 | 96 |
pankso@9702 | 97 # Remove build directory (cookutils and tazwok path). |
pankso@9702 | 98 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build |
pankso@9702 | 99 rm -rf $WOK/$PACKAGE/$PACKAGE-build |
al@14789 | 100 |
al@14789 | 101 chown -R root:root $fs/usr/include/libiberty.h |
al@14792 | 102 chmod 644 $fs/usr/include/libiberty.h |
pankso@9 | 103 } |