core/glibc to 2.19-2

This commit is contained in:
Kevin Mihelich 2014-02-14 13:38:54 +00:00
parent 9d701ef1ad
commit 11a1b25fe9
3 changed files with 26 additions and 40 deletions

View file

@ -16,7 +16,7 @@ noautobuild=1
pkgname=glibc
pkgver=2.19
pkgrel=1
pkgrel=2
pkgdesc="GNU C Library"
arch=('i686' 'x86_64')
url="http://www.gnu.org/software/libc"
@ -39,7 +39,7 @@ md5sums=('e26b8cc666b162f999404b03970f14e4'
'7ca96c68a37f2a4ab91792bfa0160a24'
'905370139382428ef2b97b247c0970bf'
'07ac979b6ab5eeb778d55f041529d623'
'6ecb35c118201e150fede92dd75747b5')
'476e9113489f93b348b21e144b6a8fcf')
prepare() {
cd ${srcdir}/${pkgname}-${pkgver}

View file

@ -4,7 +4,7 @@ filelist=(libc.info{,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11})
post_upgrade() {
ldconfig -r .
if [[ $(vercmp 2.19 $2) = 1 ]]; then
if [[ $(vercmp 2.19-2 $2) = 1 ]]; then
locale-gen
fi

View file

@ -4,53 +4,39 @@ set -e
LOCALEGEN=/etc/locale.gen
LOCALES=/usr/share/i18n/locales
unset POSIXLY_CORRECT
if [ -n "$POSIXLY_CORRECT" ]; then
unset POSIXLY_CORRECT
fi
[ -s "$LOCALEGEN" ] || exit 0
[ -f $LOCALEGEN -a -s $LOCALEGEN ] || exit 0;
# Remove all old locale dir and locale-archive before generating new
# locale data.
rm -rf /usr/lib/locale/*
rm -rf /usr/lib/locale/* || true
umask 022
gen() {
local locale=$1
local charset=$2
local input=
if [ -z "$locale" ] || [ -z "$charset" ]; then
echo "error: Bad entry '$locale $charset'"
return
fi
printf ' %s.%s\n' "$(echo "$locale" | sed 's/\([^.\@]*\).*/\1/')" "$charset"
if [ -f "$LOCALES/$locale" ]; then
input=$locale
else
input=$(echo $locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/')
fi
localedef -i "$input" -c -f "$charset" -A /usr/share/locale/locale.alias "$locale"
is_entry_ok() {
if [ -n "$locale" -a -n "$charset" ] ; then
true
else
echo "error: Bad entry '$locale $charset'"
false
fi
}
maxjobs=$(grep -ci processor /proc/cpuinfo 2>/dev/null || echo 1)
echo "Generating locales..."
while read locale charset; do \
case $locale in
\#*|'')
continue
;;
esac
gen "$locale" "$charset" &
# keep no more than $maxjobs jobs in flight
while [ $(jobs | wc -l) -ge $maxjobs ]; do
sleep 0.25
jobs >/dev/null
done
case $locale in \#*) continue;; "") continue;; esac; \
is_entry_ok || continue
echo -n " `echo $locale | sed 's/\([^.\@]*\).*/\1/'`"; \
echo -n ".$charset"; \
echo -n `echo $locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`; \
echo -n '...'; \
if [ -f $LOCALES/$locale ]; then input=$locale; else \
input=`echo $locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; fi; \
localedef -i $input -c -f $charset -A /usr/share/locale/locale.alias $locale; \
echo ' done'; \
done < $LOCALEGEN
wait
echo "Generation complete."