wok-6.x rev 12820

glibc-base: improve receipt for ARM and cross-compilation
author Christophe Lincoln <pankso@slitaz.org>
date Mon May 21 23:48:44 2012 +0200 (2012-05-21)
parents 3768ab6ce780
children 5c1c1e5a76c6
files glibc-base/receipt
line diff
     1.1 --- a/glibc-base/receipt	Mon May 21 23:25:00 2012 +0200
     1.2 +++ b/glibc-base/receipt	Mon May 21 23:48:44 2012 +0200
     1.3 @@ -6,17 +6,17 @@
     1.4  SHORT_DESC="GNU libc minimal libraries and UTF-8 support for SliTaz."
     1.5  WEB_SITE="http://www.gnu.org/software/libc/"
     1.6  MAINTAINER="pankso@slitaz.org"
     1.7 +WANTED="glibc"
     1.8  HOST_ARCH="i486 arm"
     1.9  
    1.10 +# Locales include by default, other locales are in: glibc-locale
    1.11 +DEFAULT_LOCALE="de_DE en_US en_GB es_ES fr_FR it_IT pt_BR pt_PT ru_RU"
    1.12 +
    1.13 +# Handle multiarch compilation.
    1.14  case "$ARCH" in
    1.15 -	arm)
    1.16 -		VERSION="2.13" ;;
    1.17 -	i?86)
    1.18 -		WANTED="glibc" ;;
    1.19 +	arm) VERSION="2.13" WANTED="" ;;
    1.20  esac
    1.21  
    1.22 -DEFAULT_LOCALE="de_DE en_US en_GB es_ES fr_FR it_IT pt_BR pt_PT ru_RU"
    1.23 -
    1.24  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.25  #
    1.26  # Full glibc is very long to compile (see package glibc for more
    1.27 @@ -31,7 +31,7 @@
    1.28  			# toolchain so we can use these files instead of recooking it.
    1.29  			# 20120514: Include just minal libs for Busybox so we can create
    1.30  			# bootable Qemu image for ARM.
    1.31 -			echo "Using cross compiled Glibc"
    1.32 +			echo "Using cross compiled Glibc..."
    1.33  			mkdir -p $fs/lib $fs/etc $fs/usr/bin
    1.34  			install=/usr/cross/$ARCH
    1.35  			for bin in locale localedef
    1.36 @@ -48,6 +48,13 @@
    1.37  			cp -a $install/lib/libc_nonshared.a $fs/lib
    1.38  			cp $install/etc/rpc $fs/etc
    1.39  			touch $fs/etc/ld.so.conf
    1.40 +			## i18n
    1.41 +			#mkdir -p $fs/usr/share/i18n/locales
    1.42 +		    #for i in $DEFAULT_LOCALE
    1.43 +			#do
    1.44 +				#cp $install/share/i18n/locales/$i \
    1.45 +					#$fs/usr/share/i18n/locales
    1.46 +			#done
    1.47  			# Fix libraries search path
    1.48  			sed -i s'|/usr/cross/arm||'g $fs/lib/libc.so ;;
    1.49  		*)
    1.50 @@ -74,5 +81,15 @@
    1.51  # Remove an eventual locale-archive since we use directories.
    1.52  pre_install()
    1.53  {
    1.54 -	rm -f $1/usr/lib/locale/locale-archive
    1.55 +	rm -f $root/usr/lib/locale/locale-archive
    1.56  }
    1.57 +
    1.58 +# Glibc-base is auto-updated in chroot but when cross-compiling we need
    1.59 +# to have /usr/cross/$ARCH search path in libc.so
    1.60 +post_install()
    1.61 +{
    1.62 +	if echo $root | grep -q /usr/cross; then
    1.63 +		echo "Fixing: $root/lib/libc.so"
    1.64 +		sed -i s"|/lib|$root/lib|"g $root/lib/libc.so
    1.65 +	fi
    1.66 +}