wok-4.x annotate binutils/receipt @ rev 12477

Up openssl 1.1.1n (bump packages curl, git, wget, python), up cherokee 1.2.104 and bdeps (automake, openldap, cyrus-sasl)
author Stanislas Leduc <shann@slitaz.org>
date Sun Apr 02 14:34:44 2023 +0000 (16 months ago)
parents dbcdd09a3e18
children
rev   line source
pankso@9 1 # SliTaz package receipt.
pankso@9 2
pankso@9 3 PACKAGE="binutils"
shann@12466 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"
pankso@534 8 TARBALL="$PACKAGE-$VERSION.tar.bz2"
pankso@9 9 WEB_SITE="http://www.gnu.org/software/binutils/"
pankso@2699 10 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
erjo@4780 11 PROVIDE="libbfd"
jozee@4932 12 TAGS="assembler linker"
pankso@9 13
slaxemulator@10485 14 DEPENDS="glibc zlib"
slaxemulator@10485 15 BUILD_DEPENDS="glibc-dev zlib-dev"
slaxemulator@10485 16
gokhlayeh@8172 17 # Rules to compile & install the temporary toolchain.
gokhlayeh@8172 18 precook_tmp_toolchain()
gokhlayeh@8172 19 {
gokhlayeh@8172 20 mkdir -p binutils-build && cd binutils-build
gokhlayeh@8172 21 { $src/configure \
slaxemulator@10419 22 --target=$HOST_SYSTEM --disable-nls \
gokhlayeh@8172 23 --disable-werror &&
gokhlayeh@8172 24 make
gokhlayeh@8172 25 } || return 1
gokhlayeh@8172 26
gokhlayeh@8172 27 #If building on x86_64, create a symlink to ensure the sanity of the toolchain.
gokhlayeh@8172 28 [ "$ARCH" = x86_64 ] && mkdir /tools/lib && ln -s lib /tools/lib64
gokhlayeh@8172 29
gokhlayeh@8172 30 make install
gokhlayeh@8172 31 }
gokhlayeh@8172 32
gokhlayeh@8172 33 cook_tmp_toolchain()
gokhlayeh@8172 34 {
gokhlayeh@8172 35 mkdir -p binutils-build && cd binutils-build
slaxemulator@10419 36 { CC="$HOST_SYSTEM-gcc -B/tools/lib/" \
slaxemulator@10419 37 AR=$HOST_SYSTEM-ar RANLIB=$HOST_SYSTEM-ranlib \
slaxemulator@10419 38 $src/configure $CONFIGURE_ARGS \
gokhlayeh@8172 39 --disable-nls --with-lib-path=/tools/lib &&
gokhlayeh@8172 40 make &&
gokhlayeh@8172 41 make install &&
gokhlayeh@8172 42 make -C ld clean &&
pankso@12321 43 make -C ld LIB_PATH=/usr/lib:/lib
gokhlayeh@8172 44 } || return 1
gokhlayeh@8172 45 cp ld/ld-new /tools/bin
gokhlayeh@8172 46 }
gokhlayeh@8172 47
pankso@9 48 # Rules to configure and make the package.
pankso@9 49 compile_rules()
pankso@9 50 {
slaxemulator@9745 51 cd $src
pankso@9702 52 mkdir -p ../binutils-build && cd ../binutils-build
gokhlayeh@8172 53 $src/configure \
rcx@3930 54 --program-prefix=$TOOLPREFIX \
pankso@10013 55 --enable-shared \
shann@12466 56 --disable-werror \
pankso@10029 57 $CONFIGURE_ARGS &&
gokhlayeh@8172 58 make tooldir=/usr &&
gokhlayeh@8172 59 make tooldir=/usr install &&
pankso@10029 60 # This is the default binutils, so create symlinks to the target platform
pankso@10029 61 # binutil binaries. Delete duplicate binaries to save space.
pankso@10029 62 for binutil in $(ls -1 $DESTDIR/usr/bin | grep "${TOOLPREFIX}") ; do
pankso@10029 63 path="$DESTDIR/usr/bin/$(echo "$binutil" | sed "s:$TOOLPREFIX::g")"
pankso@10029 64 if [ -e $path ] ; then
pankso@10029 65 rm -f $path
rcx@3930 66 fi
pankso@10029 67 ln -s $binutil $path
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@12321 79
pankso@9 80 # libiberty.h
pankso@9 81 cp -a $src/include/libiberty.h $fs/usr/include
pankso@12321 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
pankso@12321 86
pankso@9702 87 # Remove build directory (cookutils and tazwok path).
pankso@9702 88 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
pankso@9702 89 rm -rf $WOK/$PACKAGE/$PACKAGE-build
pankso@9 90 }