wok-6.x annotate binutils/receipt @ rev 24956

updated nano and nano-doc (4.8 -> 6.2)
author Hans-G?nter Theisgen
date Sat Apr 23 16:35:24 2022 +0100 (2022-04-23)
parents 71360a13cd94
children
rev   line source
pankso@9 1 # SliTaz package receipt.
pankso@9 2
pankso@9 3 PACKAGE="binutils"
Hans-G?nter@24369 4 VERSION="2.37"
pankso@204 5 CATEGORY="development"
Hans-G?nter@22538 6 TAGS="assembler linker"
pankso@9 7 SHORT_DESC="GNU assembler, linker and binary utilities."
pankso@9 8 MAINTAINER="pankso@slitaz.org"
pascal@15000 9 LICENSE="GPL2"
Hans-G?nter@22538 10 WEB_SITE="https://www.gnu.org/software/binutils/"
Hans-G?nter@22538 11
pankso@534 12 TARBALL="$PACKAGE-$VERSION.tar.bz2"
pankso@2699 13 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
pascal@20421 14 #WGET_URL="https://www.kernel.org/pub/linux/devel/binutils/$TARBALL"
Hans-G?nter@22538 15 WGET_URL="http://ftp.gnu.org/gnu/$PACKAGE/$TARBALL"
Hans-G?nter@22538 16
erjo@4780 17 PROVIDE="libbfd"
Hans-G?nter@22538 18 DEPENDS="flex glibc zlib"
Hans-G?nter@22538 19 BUILD_DEPENDS="glibc-dev texinfo zlib-dev"
Hans-G?nter@22538 20
pankso@15979 21 HOST_ARCH="i486 arm"
pankso@9 22
pankso@15979 23 # Handle cross compilation.
pankso@15979 24 case "$ARCH" in
pankso@15979 25 arm) BUILD_DEPENDS="" ;;
pankso@15979 26 esac
gokhlayeh@8172 27
Hans-G?nter@23013 28 # @maintainer: Please update also: libbfd
Hans-G?nter@23013 29
pascal@24336 30 # What is the latest version available today?
pascal@24336 31 current_version()
pascal@24336 32 {
pascal@24336 33 wget -O - ${WGET_URL%/*} 2>/dev/null | \
pascal@24336 34 sed "/latest/d;/$PACKAGE-/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
pascal@24336 35 }
pascal@24336 36
pankso@9 37 # Rules to configure and make the package.
pankso@9 38 compile_rules()
pankso@9 39 {
pankso@15979 40 case "$ARCH" in
pascal@23852 41 i?86) ARCH_ARGS="--disable-werror --enable-64-bit-bfd" ;;
pankso@12299 42 esac
Hans-G?nter@22538 43
Hans-G?nter@24369 44 mkdir ../binutils-build &&
Hans-G?nter@24369 45 cd ../binutils-build &&
Hans-G?nter@22538 46 $src/configure \
Hans-G?nter@22538 47 --program-prefix=$TOOLPREFIX \
Hans-G?nter@24369 48 --enable-shared \
Hans-G?nter@22538 49 --disable-initfini-array \
Hans-G?nter@22538 50 --with-bugurl="http://bugs.slitaz.org/" \
Hans-G?nter@22538 51 $CONFIGURE_ARGS \
Hans-G?nter@22538 52 $ARCH_ARGS &&
gokhlayeh@8172 53 make tooldir=/usr &&
Hans-G?nter@24369 54 make install tooldir=/usr &&
pankso@10029 55 # This is the default binutils, so create symlinks to the target platform
pankso@10029 56 # binutil binaries. Delete duplicate binaries to save space.
Hans-G?nter@22538 57 for binutil in $(ls -1 $DESTDIR/usr/bin | grep "${TOOLPREFIX}")
Hans-G?nter@22538 58 do
pankso@10029 59 path="$DESTDIR/usr/bin/$(echo "$binutil" | sed "s:$TOOLPREFIX::g")"
Hans-G?nter@22538 60 if [ -e $path ]
Hans-G?nter@22538 61 then
pankso@10029 62 rm -f $path
rcx@3930 63 fi
pankso@10029 64 ln -s $binutil $path
Hans-G?nter@22538 65 done
pankso@9 66 }
pankso@9 67
pankso@9 68 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@9 69 genpkg_rules()
pankso@9 70 {
Hans-G?nter@24369 71 cook_copy_folders bin
Hans-G?nter@24369 72 cook_copy_folders include
Hans-G?nter@24369 73 cook_copy_files *.a
Hans-G?nter@24369 74 cook_copy_files *.so*
pankso@12543 75
pankso@9 76 # libiberty.h
Hans-G?nter@22538 77 cp -a $src/include/libiberty.h $fs/usr/include
pankso@12543 78
pankso@3188 79 # Remove 'strings' (Busybox).
pankso@3188 80 #rm $fs/usr/lib/libiberty.a
Hans-G?nter@24369 81 rm $fs/usr/bin/strings
Hans-G?nter@24369 82 rm $fs/usr/bin/*-strings
pankso@12543 83
pankso@9702 84 # Remove build directory (cookutils and tazwok path).
pankso@9702 85 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
pankso@9702 86 rm -rf $WOK/$PACKAGE/$PACKAGE-build
al@14789 87
Hans-G?nter@24369 88 chown -R root:root $fs/usr/include/libiberty.h
Hans-G?nter@24369 89 chmod 644 $fs/usr/include/libiberty.h
pankso@9 90 }