glibc: restore buildability in musl masterdirs

It's generally unsupported, but glibc builds fine in a musl masterdir,
so we might as well check if localedef is available when building the
C.UTF-8 locale and proceed with a warning if not.
This commit is contained in:
Andrew J. Hesford 2024-03-13 07:12:56 -04:00
parent de0e1f9846
commit 4ed2d58104

View file

@ -136,7 +136,7 @@ do_install() {
if [ -z "${CROSS_BUILD}" ]; then
make -C localedata DESTDIR="${DESTDIR}" \
objdir="../build" install-files-C.UTF-8/UTF-8
else
elif command -v localedef >/dev/null 2>&1; then
local endian=
case "$XBPS_TARGET_ENDIAN" in
be) endian="--big-endian" ;;
@ -146,6 +146,8 @@ do_install() {
vmkdir usr/lib/locale
I18NPATH=./localedata localedef --prefix="${DESTDIR}" ${endian} \
-i C -f UTF-8 --no-archive "${DESTDIR}/usr/lib/locale/C.utf8"
else
msg_warn "localedef not available; skipping generation of C.UTF-8 locale\n"
fi
# create /etc/default/libc-locales