mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
Merge pull request #5361 from vpeter4/utf8
glibc: include C.UTF-8 locale in image
This commit is contained in:
commit
82e29f9e54
@ -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
|
||||||
|
@ -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
|
||||||
|
5
packages/sysutils/busybox/profile.d/10-locale.conf
Normal file
5
packages/sysutils/busybox/profile.d/10-locale.conf
Normal 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
|
17
packages/sysutils/busybox/system.d/locale.service
Normal file
17
packages/sysutils/busybox/system.d/locale.service
Normal 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
|
Loading…
x
Reference in New Issue
Block a user