wok-next annotate binutils/receipt @ rev 9439
Removed more .la files from packages that use full path for libdir.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Thu Mar 31 18:04:17 2011 +0000 (2011-03-31) |
parents | c636437d360a |
children | 349042ce2a5d |
rev | line source |
---|---|
pankso@9 | 1 # SliTaz package receipt. |
pankso@9 | 2 |
pankso@9 | 3 PACKAGE="binutils" |
gokhlayeh@8172 | 4 VERSION="2.21" |
pankso@204 | 5 CATEGORY="development" |
pankso@9 | 6 SHORT_DESC="GNU assembler, linker and binary utilities." |
pankso@9 | 7 MAINTAINER="pankso@slitaz.org" |
pankso@534 | 8 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
gokhlayeh@8172 | 9 DEPENDS="glibc zlib" |
gokhlayeh@8172 | 10 BUILD_DEPENDS="glibc zlib" |
pankso@9 | 11 WEB_SITE="http://www.gnu.org/software/binutils/" |
pankso@2699 | 12 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL" |
erjo@4780 | 13 PROVIDE="libbfd" |
jozee@4932 | 14 TAGS="assembler linker" |
pankso@9 | 15 |
gokhlayeh@8172 | 16 # Rules to compile & install the temporary toolchain. |
gokhlayeh@8172 | 17 precook_tmp_toolchain() |
gokhlayeh@8172 | 18 { |
gokhlayeh@8172 | 19 mkdir -p binutils-build && cd binutils-build |
gokhlayeh@8172 | 20 { $src/configure \ |
gokhlayeh@8172 | 21 --target=$BUILD_HOST --disable-nls \ |
gokhlayeh@8172 | 22 --disable-werror && |
gokhlayeh@8172 | 23 make |
gokhlayeh@8172 | 24 } || return 1 |
gokhlayeh@8172 | 25 |
gokhlayeh@8172 | 26 #If building on x86_64, create a symlink to ensure the sanity of the toolchain. |
gokhlayeh@8172 | 27 [ "$ARCH" = x86_64 ] && mkdir /tools/lib && ln -s lib /tools/lib64 |
gokhlayeh@8172 | 28 |
gokhlayeh@8172 | 29 make install |
gokhlayeh@8172 | 30 } |
gokhlayeh@8172 | 31 |
gokhlayeh@8172 | 32 cook_tmp_toolchain() |
gokhlayeh@8172 | 33 { |
gokhlayeh@8172 | 34 mkdir -p binutils-build && cd binutils-build |
gokhlayeh@8172 | 35 { CC="$BUILD_HOST-gcc -B/tools/lib/" \ |
gokhlayeh@8172 | 36 AR=$BUILD_HOST-ar RANLIB=$BUILD_HOST-ranlib \ |
gokhlayeh@8172 | 37 $src/configure \ |
gokhlayeh@8172 | 38 --disable-nls --with-lib-path=/tools/lib && |
gokhlayeh@8172 | 39 make && |
gokhlayeh@8172 | 40 make install && |
gokhlayeh@8172 | 41 make -C ld clean && |
gokhlayeh@8172 | 42 make -C ld LIB_PATH=/usr/lib:/lib |
gokhlayeh@8172 | 43 } || return 1 |
gokhlayeh@8172 | 44 cp ld/ld-new /tools/bin |
gokhlayeh@8172 | 45 } |
gokhlayeh@8172 | 46 |
pankso@9 | 47 # Rules to configure and make the package. |
pankso@9 | 48 compile_rules() |
pankso@9 | 49 { |
pankso@5244 | 50 mkdir -p binutils-build && cd binutils-build |
gokhlayeh@8172 | 51 $src/configure \ |
rcx@3930 | 52 --program-prefix=$TOOLPREFIX \ |
gokhlayeh@8172 | 53 --enable-shared && |
gokhlayeh@8172 | 54 make tooldir=/usr && |
pankso@9 | 55 # Install in binutils-build/ and then move the files to |
pankso@9 | 56 # to the source tree. Can't install directly... This is done |
pankso@9 | 57 # to keep the $src and $_pkg working for genpkg. |
gokhlayeh@8172 | 58 make tooldir=/usr install && |
rcx@3930 | 59 # This is the default binutils, so create symlinks |
rcx@3930 | 60 # to the target platform binutil binaries. |
rcx@3930 | 61 # Delete duplicate binaries to save space. |
gokhlayeh@8172 | 62 for binutil in $(ls -1 $DESTDIR/usr/bin/ | grep "${TOOLPREFIX}") ; do |
gokhlayeh@8172 | 63 genericBinutilPath="$DESTDIR/usr/bin/$(echo "$binutil" | sed "s:$TOOLPREFIX::g")" |
rcx@3930 | 64 if [ -e $genericBinutilPath ] ; then |
rcx@3930 | 65 rm -f $genericBinutilPath |
rcx@3930 | 66 fi |
rcx@3930 | 67 ln -s $binutil $genericBinutilPath |
rcx@3930 | 68 done |
pankso@9 | 69 } |
pankso@9 | 70 |
pankso@9 | 71 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@9 | 72 genpkg_rules() |
pankso@9 | 73 { |
slaxemulator@9439 | 74 mkdir -p $fs/usr/lib |
pankso@9 | 75 cp -a $_pkg/usr/bin $fs/usr |
slaxemulator@9439 | 76 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib |
slaxemulator@9439 | 77 cp -a $_pkg/usr/lib/*.a $fs/usr/lib |
pankso@9 | 78 cp -a $_pkg/usr/include $fs/usr |
pankso@534 | 79 |
pankso@9 | 80 # libiberty.h |
pankso@9 | 81 cp -a $src/include/libiberty.h $fs/usr/include |
pankso@534 | 82 |
pankso@3188 | 83 # Remove 'strings' (Busybox). |
pankso@3188 | 84 #rm $fs/usr/lib/libiberty.a |
rcx@3930 | 85 rm $fs/usr/bin/strings $fs/usr/bin/*-strings |
gokhlayeh@8172 | 86 |
gokhlayeh@8172 | 87 # Remove build directory. |
gokhlayeh@8172 | 88 rm -r $WOK/$PACKAGE/$PACKAGE-build |
pankso@9 | 89 } |