Merge pull request #5361 from vpeter4/utf8

glibc: include C.UTF-8 locale in image
This commit is contained in:
CvH 2021-08-11 13:23:09 +02:00 committed by GitHub
commit 82e29f9e54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 11 deletions

View File

@ -102,11 +102,6 @@ post_makeinstall_target() {
cp -a ${INSTALL}/usr/share/i18n/locales ${INSTALL}/.noinstall cp -a ${INSTALL}/usr/share/i18n/locales ${INSTALL}/.noinstall
mv ${INSTALL}/usr/share/i18n/charmaps ${INSTALL}/.noinstall mv ${INSTALL}/usr/share/i18n/charmaps ${INSTALL}/.noinstall
# Generic "installer" needs localedef to define drawing chars
if [ "${PROJECT}" != "Generic" ]; then
rm ${INSTALL}/usr/bin/localedef
fi
# we are linking against ld.so, so symlink # we are linking against ld.so, so symlink
ln -sf $(basename ${INSTALL}/usr/lib/ld-*.so) ${INSTALL}/usr/lib/ld.so ln -sf $(basename ${INSTALL}/usr/lib/ld-*.so) ${INSTALL}/usr/lib/ld.so
@ -123,12 +118,9 @@ post_makeinstall_target() {
safe_remove ${INSTALL}/usr/lib/*.map safe_remove ${INSTALL}/usr/lib/*.map
safe_remove ${INSTALL}/var safe_remove ${INSTALL}/var
# add UTF-8 charmap for Generic (charmap is needed for installer) # add UTF-8 charmap
if [ "${PROJECT}" = "Generic" ]; then mkdir -p ${INSTALL}/usr/share/i18n/charmaps
mkdir -p ${INSTALL}/usr/share/i18n/charmaps cp -PR ${INSTALL}/.noinstall/charmaps/UTF-8.gz ${INSTALL}/usr/share/i18n/charmaps
cp -PR ${PKG_BUILD}/localedata/charmaps/UTF-8 ${INSTALL}/usr/share/i18n/charmaps
pigz --best --force ${INSTALL}/usr/share/i18n/charmaps/UTF-8
fi
if [ ! "${GLIBC_LOCALES}" = yes ]; then if [ ! "${GLIBC_LOCALES}" = yes ]; then
safe_remove ${INSTALL}/usr/share/i18n/locales safe_remove ${INSTALL}/usr/share/i18n/locales

View File

@ -197,6 +197,7 @@ post_install() {
enable_service shell.service enable_service shell.service
enable_service show-version.service enable_service show-version.service
enable_service var.mount enable_service var.mount
enable_service locale.service
listcontains "${FIRMWARE}" "rpi-eeprom" && enable_service rpi-flash-firmware.service listcontains "${FIRMWARE}" "rpi-eeprom" && enable_service rpi-flash-firmware.service
# cron support # cron support

View File

@ -0,0 +1,5 @@
# don't overwrite value set by Locale Kodi addon
if [ -z "${LOCPATH}" ]; then
export LANG="C.UTF-8"
export LOCPATH="/storage/.cache/locpath"
fi

View File

@ -0,0 +1,17 @@
[Unit]
Description=Compile locale definition files
ConditionPathExists=!/storage/.cache/locpath
ConditionPathExists=!/storage/.kodi/addons/service.locale/locpath
Before=kodi.service
[Service]
Type=oneshot
Environment=HOME=/storage
Environment=I18NPATH=/usr/share/i18n
ExecStartPre=/bin/mkdir /storage/.cache/locpath
ExecStart=/usr/bin/localedef --quiet -i POSIX -f UTF-8 /storage/.cache/locpath/C.UTF-8
SuccessExitStatus=0 1
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target