cookutils diff cross @ rev 658

cook: add libhack
author Christophe Lincoln <pankso@slitaz.org>
date Wed Mar 05 23:30:13 2014 +0100 (2014-03-05)
parents 922206e55cdf
children d17c28b4d83f
line diff
     1.1 --- a/cross	Wed Mar 05 01:19:09 2014 +0100
     1.2 +++ b/cross	Wed Mar 05 23:30:13 2014 +0100
     1.3 @@ -487,6 +487,18 @@
     1.4  		echo "" ;;
     1.5  	libtool)
     1.6  		cross_libtool 2>&1 | tee $logdir/libtool.log ;;
     1.7 +	libhack)
     1.8 +		# Some libxx.la files have libdir='/usr/lib' and make packages 
     1.9 +		# cross compilation fail. Some receipt may got hack to force
    1.10 +		# use of libs in sysroot but 'cross libhack' should be prefered.
    1.11 +		echo "Libdir: $sysroot/usr/lib" 
    1.12 +		for la in $(fgrep -l libdir= $sysroot/usr/lib/*.la)
    1.13 +		do
    1.14 +			if fgrep -q "libdir='/usr/lib'" ${la}; then
    1.15 +				echo "Cross fixing: $(basename $la)"
    1.16 +				sed -i s"#libdir=.*#libdir='/cross/$ARCH/sysroot/usr/lib'#" ${la}
    1.17 +			fi
    1.18 +		done ;;
    1.19  	clean)
    1.20  		echo -n "Removing all source files..."
    1.21  		rm -rf $WORK/source && status