wok diff glibc-base/receipt @ rev 12881

glibc: include locale files in ARM, more lib and improve receipt
author Christophe Lincoln <pankso@slitaz.org>
date Fri May 25 23:24:13 2012 +0200 (2012-05-25)
parents b61c615f20eb
children cb4299f34f9d
line diff
     1.1 --- a/glibc-base/receipt	Tue May 22 18:12:44 2012 +0200
     1.2 +++ b/glibc-base/receipt	Fri May 25 23:24:13 2012 +0200
     1.3 @@ -23,56 +23,62 @@
     1.4  # informations). You can use the precompiled package available on
     1.5  # SliTaz mirror to build a distro without recompiling glibc.
     1.6  #
     1.7 +
     1.8 +# i18n
     1.9 +get_locales()
    1.10 +{
    1.11 +	local path=$1
    1.12 +    for i in $DEFAULT_LOCALE
    1.13 +	do
    1.14 +		cp $install/$path/i18n/locales/$i $fs/usr/share/i18n/locales
    1.15 +	done
    1.16 +}
    1.17 +
    1.18  genpkg_rules()
    1.19  {
    1.20 +	# Mkdir's.
    1.21 +	for dir in $(cat $stuff/mkdir.list)
    1.22 +	do
    1.23 +		mkdir -p ${fs}$dir
    1.24 +	done
    1.25 +
    1.26  	case "$ARCH" in
    1.27  		arm|x86_64)
    1.28  			# EXPERIMENTAL: Glibc is cross compiled by cross to have a
    1.29  			# toolchain so we can use these files instead of recooking it.
    1.30  			echo "Using cross compiled Glibc..."
    1.31  			install=/usr/cross/$ARCH
    1.32 -			mkdir -p $fs/lib $fs/etc $fs/usr/bin \
    1.33 -				$fs/usr/lib/gconv $fs/usr/share/i18n/charmaps
    1.34 -			# /usr/bin
    1.35 -			for bin in locale localedef
    1.36 -			do
    1.37 -				cp $install/bin/$bin $fs/usr/bin
    1.38 -			done
    1.39 +
    1.40 +			# /usr/{bin,share} /usr/lib/gconv
    1.41 +			for file in $(cat $stuff/arm-files.list)
    1.42 +		    do
    1.43 +		    	cp -a ${install}$file ${fs}/usr/$file
    1.44 +		    done
    1.45 +
    1.46  			# /lib
    1.47 -			for lib in libcrypt libm libc libresolv librt libutil libpthread
    1.48 +			for lib in libcrypt libm libc libresolv librt libutil libpthread \
    1.49 +				libnss_* libnsl libanl libdl
    1.50  			do
    1.51  				cp -a $install/lib/${lib}-*.so $fs/lib
    1.52  				cp -a $install/lib/${lib}.so* $fs/lib
    1.53  			done
    1.54  			cp -a $install/lib/ld-*.so* $fs/lib
    1.55 -			cp -a $install/lib/libnss_*.so* $fs/lib
    1.56  			cp -a $install/lib/libc_nonshared.a $fs/lib
    1.57 +			cp -a $install/lib/libpthread_nonshared.a $fs/lib
    1.58  			cp $install/etc/rpc $fs/etc
    1.59  			touch $fs/etc/ld.so.conf
    1.60 -			# i18n
    1.61 -			cp $install/lib/gconv/UNICODE.so $fs/usr/lib/gconv
    1.62 -			#cp -a $install/share/i18n/charmaps/UTF-8.gz \
    1.63 -				#$fs/usr/share/i18n/charmaps
    1.64 +			get_locales "share"
    1.65  			# Fix libraries search path
    1.66 -			sed -i s"|/usr/cross/$ARCH||"g $fs/lib/libc.so ;;
    1.67 +			sed -i s"|/usr/cross/$ARCH||"g $fs/lib/libc.so
    1.68 +			sed -i s"|/usr/cross/$ARCH||"g $fs/lib/libpthread.so ;;
    1.69  		*)
    1.70 -			# Mkdir's.
    1.71 -			for dir in $(cat $stuff/mkdir.list)
    1.72 -			do
    1.73 -				mkdir -p ${fs}$dir
    1.74 -			done
    1.75  		    # Copy all files specified in stuff/files.list. We get the files
    1.76  		    # from glibc package.
    1.77  		    for file in $(cat $stuff/wanted-files.list)
    1.78  		    do
    1.79 -		    	cp -a ${_pkg}$file ${fs}$file
    1.80 +		    	cp -a ${install}$file ${fs}$file
    1.81  		    done
    1.82 -		    # i18n
    1.83 -		    for i in $DEFAULT_LOCALE
    1.84 -			do
    1.85 -				cp $install/usr/share/i18n/locales/$i \
    1.86 -					$fs/usr/share/i18n/locales
    1.87 -			done
    1.88 +		    get_locales "usr/share"
    1.89  	esac
    1.90  }
    1.91  
    1.92 @@ -101,5 +107,9 @@
    1.93  OUTPUT_FORMAT(elf32-littlearm)
    1.94  GROUP ( $root/lib/libc.so.6 $root/lib/libc_nonshared.a AS_NEEDED ( $root/lib/ld-linux.so.3 ) )
    1.95  EOT
    1.96 +		cat > $root/lib/libpthread.so << EOT
    1.97 +OUTPUT_FORMAT(elf32-littlearm)
    1.98 +GROUP ( $root/lib/libpthread.so.0 $root/lib/libpthread_nonshared.a )
    1.99 +EOT
   1.100  	fi
   1.101  }