diff options
author | Tim Biermann <tbier@posteo.de> | 2022-02-13 21:54:18 +0100 |
---|---|---|
committer | Tim Biermann <tbier@posteo.de> | 2022-02-13 21:54:18 +0100 |
commit | a8a1b7dd6f33efc3712d0634cb870230d7c367d9 (patch) | |
tree | 7d511b5a140dee676cd03fbb1a731d5c545942ca /glibc | |
parent | c776c651ffcaed27dcff47818b02f5a29442eac2 (diff) | |
download | core-a8a1b7dd6f33efc3712d0634cb870230d7c367d9.tar.gz core-a8a1b7dd6f33efc3712d0634cb870230d7c367d9.tar.xz |
glibc: added locale-gen
Diffstat (limited to 'glibc')
-rw-r--r-- | glibc/.footprint | 4 | ||||
-rw-r--r-- | glibc/.signature | 9 | ||||
-rw-r--r-- | glibc/C.UTF-8.tar.xz | bin | 26852 -> 0 bytes | |||
-rw-r--r-- | glibc/Pkgfile | 27 | ||||
-rwxr-xr-x | glibc/locale-gen | 50 | ||||
-rw-r--r-- | glibc/locale.gen.in | 23 | ||||
-rw-r--r-- | glibc/post-install | 1 |
7 files changed, 98 insertions, 16 deletions
diff --git a/glibc/.footprint b/glibc/.footprint index c341c7c5..2ab4e3c1 100644 --- a/glibc/.footprint +++ b/glibc/.footprint @@ -4,6 +4,7 @@ drwxr-xr-x root/root etc/ -rw-r--r-- root/root etc/ld.so.cache -rw-r--r-- root/root etc/ld.so.conf drwxr-xr-x root/root etc/ld.so.conf.d/ +-rw-r--r-- root/root etc/locale.gen lrwxrwxrwx root/root etc/localtime -> ../usr/share/zoneinfo/UTC -rw-r--r-- root/root etc/nscd.conf -rw-r--r-- root/root etc/nsswitch.conf @@ -1859,6 +1860,7 @@ drwxr-xr-x root/root usr/lib/locale/C.UTF-8/LC_MESSAGES/ -rw-r--r-- root/root usr/lib/rcrt1.o drwxr-xr-x root/root usr/sbin/ -rwxr-xr-x root/root usr/sbin/iconvconfig +-rwxr-xr-x root/root usr/sbin/locale-gen -rwxr-xr-x root/root usr/sbin/nscd drwxr-xr-x root/root usr/share/ drwxr-xr-x root/root usr/share/i18n/ @@ -2454,6 +2456,8 @@ drwxr-xr-x root/root usr/share/i18n/locales/ -rw-r--r-- root/root usr/share/i18n/locales/zh_SG -rw-r--r-- root/root usr/share/i18n/locales/zh_TW -rw-r--r-- root/root usr/share/i18n/locales/zu_ZA +drwxr-xr-x root/root usr/share/locale/ +-rw-r--r-- root/root usr/share/locale/locale.alias drwxr-xr-x root/root var/ drwxr-xr-x root/root var/db/ -rw-r--r-- root/root var/db/Makefile diff --git a/glibc/.signature b/glibc/.signature index f6307195..562fefbb 100644 --- a/glibc/.signature +++ b/glibc/.signature @@ -1,13 +1,14 @@ untrusted comment: verify with /etc/ports/core.pub -RWRJc1FUaeVeqjWPPxeevGovQrup+VoVzcLxZu8gpON1iTlcSLSk3dNu81k2202jhGoVP+nim0/ZHFD9bES0b1nefzemKa/Jxgw= -SHA256 (Pkgfile) = 06da1bd76b96c3f3bda5c14d14d73dbe804c247f4a405de3fb949f4a2d7b8374 -SHA256 (.footprint) = 54fefcfc674ddf4d99e1bb529dbd0fa860e73945976fad18b9482ba454daa173 +RWRJc1FUaeVeqmNr+q4edjlASjzn77bAGynex2pdWLDzrghEQu/e4h+RxvyRDx4bizz0cd6+hP3ScpoQKUsBJCoocRa+X+KtZAM= +SHA256 (Pkgfile) = 64f6796c8468cd5cadbccd231d5eee13ca9080b9cd9d7d6f41c26c7ba116dee6 +SHA256 (.footprint) = 18acf8b44f896a471a6aa3dbae84067f21e7cd650f5489ca26fa6026441d9aa2 SHA256 (glibc-2.35.tar.xz) = 5123732f6b67ccd319305efd399971d58592122bcc2a6518a1bd2510dd0cf52e SHA256 (linux-5.15.21.tar.xz) = 294eeb6cd7dc9b144c3c3c8b8c7b3fca9c6b072b6ed9bf9d6c922f9deb70fbd1 SHA256 (glibc-2.35-1.patch) = f9041b36bd2194753d43da1053320d58d75acc76cfdcc2bd13e502b247d90b4e -SHA256 (C.UTF-8.tar.xz) = b5d44bd1d704b273914ec1281b612778d10bc9b5e779e886e50371a525df5753 SHA256 (hosts) = 5c02b256c105f1d4a12fb738d71c1bab9eb126533074d7a0c8a14b92670c9431 SHA256 (resolv.conf) = 72ccb58768a72a771ec37142bc361a18478a07ec9de6e925a20760794389bf51 SHA256 (nsswitch.conf) = 859b8984e5e90aff3cce8f9779996ae4033b280d2122840e9411e2f44a1c2e61 SHA256 (host.conf) = 1bffc6575eb6204458758c34656cd44d87e7d89f545055f8857dd8906b7fb277 SHA256 (ld.so.conf) = 441a37924864b5b063208922ea04a926cd9654e74ed3f160b9d455b56d23387f +SHA256 (locale-gen) = 463c4137bd9c1ac7c15d3e5460e67e3826a4fbaeaf4cc53728d443d01f629936 +SHA256 (locale.gen.in) = 30bf19ffeab9e5e0661636eb42cadc27335711c9a95148f55a30be0039c4d74a diff --git a/glibc/C.UTF-8.tar.xz b/glibc/C.UTF-8.tar.xz Binary files differdeleted file mode 100644 index dbf227df..00000000 --- a/glibc/C.UTF-8.tar.xz +++ /dev/null diff --git a/glibc/Pkgfile b/glibc/Pkgfile index 13dce748..cc894f9a 100644 --- a/glibc/Pkgfile +++ b/glibc/Pkgfile @@ -4,14 +4,14 @@ name=glibc version=2.35 -release=1 +release=2 _kernel_version=5.15.21 source=(https://ftp.gnu.org/gnu/glibc/glibc-$version.tar.xz https://www.kernel.org/pub/linux/kernel/v5.x/linux-$_kernel_version.tar.xz glibc-$version-1.patch - C.UTF-8.tar.xz - hosts resolv.conf nsswitch.conf host.conf ld.so.conf) + hosts resolv.conf nsswitch.conf host.conf ld.so.conf + locale-gen locale.gen.in) build() { # install kernel headers @@ -24,7 +24,7 @@ build() { mkdir $SRC/build cd $SRC/build - $SRC/$name-${version}/configure \ + $SRC/$name-$version/configure \ --prefix=/usr \ --libexecdir=/usr/lib \ --with-headers=$PKG/usr/include \ @@ -50,19 +50,22 @@ build() { install -d $PKG/etc/ld.so.conf.d $PKG/usr/lib/locale touch $PKG/etc/ld.so.cache - # this doesn't work for some reason the generated locale is broken - # for now we supply the locale with the port - #$PKG/usr/bin/localedef \ - # --force --quiet \ - # --inputfile=$PKG/usr/share/i18n/locales/C \ - # --charmap=$PKG/usr/share/charmaps/UTF-8 \ - # $PKG/usr/lib/locale/C.UTF-8 + install -Dm755 $SRC/locale-gen $PKG/usr/sbin/locale-gen + install -Dm644 $SRC/locale.gen.in $PKG/etc/locale.gen - cp -r $SRC/C.UTF-8 $PKG/usr/lib/locale + $PKG/usr/bin/localedef \ + --force --quiet \ + --inputfile POSIX \ + --charmap UTF-8 \ + $PKG/usr/lib/locale/C.UTF-8 || true rm -r $PKG/usr/share/locale \ $PKG/usr/bin/{tzselect,zdump} \ $PKG/usr/sbin/zic + + install -Dm644 $SRC/$name-$version/intl/locale.alias \ + $PKG/usr/share/locale/locale.alias + find $PKG -name "*install.cmd" -delete find $PKG -name ".\install" -delete } diff --git a/glibc/locale-gen b/glibc/locale-gen new file mode 100755 index 00000000..115b27db --- /dev/null +++ b/glibc/locale-gen @@ -0,0 +1,50 @@ +#!/bin/sh + +set -e + +LOCALEGEN=/etc/locale.gen +LOCALES=/usr/share/i18n/locales + +[ -f "$LOCALEGEN" ] && [ -s "$LOCALEGEN" ] || exit 0; + +# remove old locale-archive +[ -f /usr/lib/locale/locale-archive ] && rm -f /usr/lib/locale/locale-archive + +umask 022 + +is_entry_ok() { + if [ -n "$locale" ] && [ -n "$charset" ] ; then + true + else + printf '%s' "error: Bad entry '$locale $charset'" + false + fi +} + +printf '%s\n' "Generating locales..." + +while read -r locale charset; do \ + case "$locale" in + \#*|"") continue;; + esac; \ + + is_entry_ok || continue + + printf '%s' "$(echo "$locale" | sed 's/\([^.\@]*\).*/\1/')" + printf '%s' ".$charset" + printf '%s' "$(echo "$locale" | sed 's/\([^\@]*\)\(\@.*\)*/\2/')" + printf '%s' "..." + + 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" + + printf '%s\n' "done" +done < $LOCALEGEN + +printf '%s\n' "Generation complete." diff --git a/glibc/locale.gen.in b/glibc/locale.gen.in new file mode 100644 index 00000000..27d30e4c --- /dev/null +++ b/glibc/locale.gen.in @@ -0,0 +1,23 @@ +# list of locales that are to be generated by the locale-gen command. +# +# Each line is of the form: +# +# <locale> <charset> +# +# where <locale> is one of the locales given in /usr/share/i18n/locales +# and <charset> is one of the character sets listed in /usr/share/i18n/charmaps +# +# Examples: +# en_US ISO-8859-1 +# en_US.UTF-8 UTF-8 +# de_DE ISO-8859-1 +# de_DE@euro ISO-8859-15 +# +# The locale-gen command will generate all the locales, +# placing them in /usr/lib/locale. +# +# A list of supported locales is included in this file. +# Remove the comment marker "#" off the start of the line +# for the ones you need. + + diff --git a/glibc/post-install b/glibc/post-install index df44bb6c..fce944a2 100644 --- a/glibc/post-install +++ b/glibc/post-install @@ -1,3 +1,4 @@ #!/bin/sh /sbin/telinit U +/usr/sbin/locale-gen |