wok-next diff binutils/receipt @ rev 19561

Initial commit to wok-next (SliTaz v.6 now): update 61 packages (about) according to LFS 7.10
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Dec 16 01:16:56 2016 +0200 (2016-12-16)
parents ce5ca5c37e4e
children 364cb5b583b1
line diff
     1.1 --- a/binutils/receipt	Sat Feb 14 22:11:20 2015 +0000
     1.2 +++ b/binutils/receipt	Fri Dec 16 01:16:56 2016 +0200
     1.3 @@ -1,21 +1,21 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="binutils"
     1.7 -VERSION="2.25"
     1.8 +VERSION="2.27"
     1.9  CATEGORY="development"
    1.10  SHORT_DESC="GNU assembler, linker and binary utilities."
    1.11  MAINTAINER="pankso@slitaz.org"
    1.12 -LICENSE="GPL2"
    1.13 -TARBALL="$PACKAGE-$VERSION.tar.bz2"
    1.14 +LICENSE="GPL2 LGPL2 GPL3 LGPL3"
    1.15  WEB_SITE="http://www.gnu.org/software/binutils/"
    1.16 -WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
    1.17 -#WGET_URL="http://www.kernel.org/pub/linux/devel/binutils/$TARBALL"
    1.18 -PROVIDE="libbfd"
    1.19  TAGS="assembler linker"
    1.20  HOST_ARCH="i486 arm"
    1.21  
    1.22 -DEPENDS="glibc zlib"
    1.23 -BUILD_DEPENDS="glibc-dev zlib-dev texinfo"
    1.24 +TARBALL="$PACKAGE-$VERSION.tar.bz2"
    1.25 +WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
    1.26 +
    1.27 +PROVIDE="libbfd"
    1.28 +DEPENDS="glibc zlib flex"
    1.29 +BUILD_DEPENDS="glibc-dev zlib-dev texinfo bison flex gettext-tools"
    1.30  
    1.31  # Handle cross compilation.
    1.32  case "$ARCH" in
    1.33 @@ -28,46 +28,40 @@
    1.34  	case "$ARCH" in
    1.35  		i?86) ARCH_ARGS="--disable-werror" ;;
    1.36  	esac
    1.37 -	mkdir -p ../binutils-build && cd ../binutils-build
    1.38 +
    1.39 +	mkdir build; cd build
    1.40 +
    1.41  	$src/configure \
    1.42 -		--program-prefix=$TOOLPREFIX \
    1.43  		--enable-shared \
    1.44  		--disable-initfini-array \
    1.45  		--with-bugurl="http://bugs.slitaz.org/" \
    1.46  		$CONFIGURE_ARGS $ARCH_ARGS &&
    1.47  	make tooldir=/usr &&
    1.48 -	make tooldir=/usr install &&
    1.49 -	# This is the default binutils, so create symlinks to the target platform
    1.50 -	# binutil binaries. Delete duplicate binaries to save space.
    1.51 -	for binutil in $(ls -1 $DESTDIR/usr/bin | grep "${TOOLPREFIX}") ; do
    1.52 -		path="$DESTDIR/usr/bin/$(echo "$binutil" | sed "s:$TOOLPREFIX::g")"
    1.53 -		if [ -e $path ] ; then
    1.54 -			rm -f $path
    1.55 -		fi
    1.56 -		ln -s $binutil $path
    1.57 +	make tooldir=/usr install
    1.58 +
    1.59 +	# Create prefixed version of the tools.
    1.60 +	cd $install/usr/bin
    1.61 +	for i in $(ls); do
    1.62 +		mv $i $TOOLPREFIX$i
    1.63 +		[ $i == 'strings' ] && continue # skip: Busybox intercept
    1.64 +		ln -s $TOOLPREFIX$i $i
    1.65  	done
    1.66 +	rm ld.bfd ${TOOLPREFIX}ld.bfd
    1.67 +	ln -s ld ld.bfd
    1.68 +	ln -s ${TOOLPREFIX}ld ${TOOLPREFIX}ld.bfd
    1.69 +
    1.70 +	# Remove prefix from manpages name
    1.71 +	for i in $(find $install/usr/share/man/man1 -type f); do
    1.72 +		mv $i ${i/$TOOLPREFIX/}
    1.73 +	done
    1.74 +
    1.75 +#	# Install libiberty (-liberty flag): dependency described in *.la files
    1.76 +#	install -o root -g root -m 644 $src/include/libiberty.h $install/usr/include
    1.77  }
    1.78  
    1.79  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.80  genpkg_rules()
    1.81  {
    1.82 -	mkdir -p $fs/usr/lib
    1.83 -	cp -a $install/usr/bin $fs/usr
    1.84 -	cp -a $install/usr/lib/*.so* $fs/usr/lib
    1.85 -	cp -a $install/usr/lib/*.a $fs/usr/lib
    1.86 -	cp -a $install/usr/include $fs/usr
    1.87 -
    1.88 -	# libiberty.h
    1.89 -	cp -a $src/include/libiberty.h $fs/usr/include
    1.90 -
    1.91 -	# Remove 'strings' (Busybox).
    1.92 -	#rm $fs/usr/lib/libiberty.a
    1.93 -	rm $fs/usr/bin/strings $fs/usr/bin/*-strings
    1.94 -
    1.95 -	# Remove build directory (cookutils and tazwok path).
    1.96 -	rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
    1.97 -	rm -rf $WOK/$PACKAGE/$PACKAGE-build
    1.98 -
    1.99 -	chown -R root:root $fs/usr/include/libiberty.h
   1.100 -	chmod 644 $fs/usr/include/libiberty.h
   1.101 +	cook_copy_folders bin lib include
   1.102 +	find $fs -name '*.la' -delete
   1.103  }