aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew J. Hesford <ajh@sideband.org>2024-03-06 13:46:43 +0000
committerAndrew J. Hesford <ajh@sideband.org>2024-03-13 10:46:09 +0000
commita4294cdf8c6b2484116e9b900343a1810b34ebb9 (patch)
treeb81cd2126a16b64a1202238e655c2d9226fae0b1
parent0dbfe6386d09753311460138686e3355437888b8 (diff)
downloadvoid-packages-a4294cdf8c6b2484116e9b900343a1810b34ebb9.tar
void-packages-a4294cdf8c6b2484116e9b900343a1810b34ebb9.tar.gz
void-packages-a4294cdf8c6b2484116e9b900343a1810b34ebb9.tar.bz2
void-packages-a4294cdf8c6b2484116e9b900343a1810b34ebb9.tar.lz
void-packages-a4294cdf8c6b2484116e9b900343a1810b34ebb9.tar.xz
void-packages-a4294cdf8c6b2484116e9b900343a1810b34ebb9.tar.zst
void-packages-a4294cdf8c6b2484116e9b900343a1810b34ebb9.zip
glibc: clean up install, add C.UTF-8 locale by default
-rw-r--r--srcpkgs/glibc/template33
1 files changed, 25 insertions, 8 deletions
diff --git a/srcpkgs/glibc/template b/srcpkgs/glibc/template
index abd2ad846c9..6faee3db813 100644
--- a/srcpkgs/glibc/template
+++ b/srcpkgs/glibc/template
@@ -1,7 +1,7 @@
# Template file for 'glibc'
pkgname=glibc
version=2.38
-revision=5
+revision=6
bootstrap=yes
short_desc="GNU C library"
maintainer="Enno Boland <gottox@voidlinux.org>"
@@ -123,23 +123,38 @@ do_build() {
env LDFLAGS.so="-Wl,--hash-style=both" LDFLAGS-rtld="-Wl,--hash-style=both" \
make ${makejobs}
}
+
do_install() {
vlicense LICENSES
# Create DESTDIR/etc/ld.so.conf
mkdir -p ${DESTDIR}/etc
echo "include /etc/ld.so.conf.d/*.conf" > ${DESTDIR}/etc/ld.so.conf
- cd build
- make install_root=${DESTDIR} install
+ ( cd build && make install_root=${DESTDIR} install )
+
+ # The C.UTF-8 locale should always be available
+ if [ -z "${CROSS_BUILD}" ]; then
+ make -C localedata DESTDIR="${DESTDIR}" \
+ objdir="../build" install-files-C.UTF-8/UTF-8
+ else
+ local endian=
+ case "$XBPS_TARGET_ENDIAN" in
+ be) endian="--big-endian" ;;
+ le) endian="--little-endian" ;;
+ esac
+
+ vmkdir usr/lib/locale
+ I18NPATH=./localedata localedef --prefix="${DESTDIR}" ${endian} \
+ -i C -f UTF-8 --no-archive "${DESTDIR}/usr/lib/locale/C.utf8"
+ fi
# create /etc/default/libc-locales
vinstall ${FILESDIR}/libc-locales 644 etc/default
- cp ${wrksrc}/localedata/SUPPORTED ${wrksrc}/build
- sed -i -e "s|/| |g" \
+ sed -e "s|/| |g" \
-e 's|\\| |g' \
-e "s|SUPPORTED-LOCALES=||" \
- -e "s|^|#|g" ${wrksrc}/build/SUPPORTED
- cat ${wrksrc}/build/SUPPORTED >> ${DESTDIR}/etc/default/libc-locales
+ -e "s|^|#|g" localedata/SUPPORTED \
+ >> "${DESTDIR}/etc/default/libc-locales"
# ldd is a bash script, so make it run as such.
replace_interpreter bash ${DESTDIR}/usr/bin/ldd
@@ -162,7 +177,7 @@ do_install() {
armv?l) ln -sfr ${DESTDIR}/usr/lib/ld-linux-armhf.so.3 ${DESTDIR}/usr/lib/ld-linux.so.3;;
esac
- vinstall ${wrksrc}/posix/gai.conf 644 etc
+ vinstall posix/gai.conf 644 etc
rm -rf ${DESTDIR}/var/db
# Remove tzselect and z{dump,ic}, provided by tzutils.
rm -f ${DESTDIR}/usr/bin/tzselect
@@ -185,6 +200,7 @@ glibc-devel_package() {
fi
}
}
+
glibc-locales_package() {
conf_files="/etc/default/libc-locales"
short_desc+=" - locale data files"
@@ -194,6 +210,7 @@ glibc-locales_package() {
vmove usr/share/locale
}
}
+
nscd_package() {
conf_files="/etc/nscd.conf"
short_desc+=" - Name Service Cache Daemon"