Skip to content

Commit

Permalink
glibc: added locale.gen and locale-gen (as well as fixed build issues)
Browse files Browse the repository at this point in the history
  • Loading branch information
rachelambda committed Jul 12, 2020
1 parent 43c43d9 commit 8720d01
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 5 deletions.
13 changes: 11 additions & 2 deletions core/glibc/build
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
#!/bin/sh -e

# glibc wont build without optimization for some reason
CFLAGS="${CFLAGS:--Os}"
# glibc fails becuase of handling warnings as errors, to prevent this some warnings are disabled.
export CFLAGS="$CFLAGS -Wno-zero-length-bounds -Wno-array-bounds"

# locale script for generating locales as well as default en_US.UTF8 locale
install -Dm755 ./locale-gen "$1/usr/bin/locale-gen"
install -Dm644 ./locale.gen "$1/etc/locale.gen"

# glibc wont build in main directory
mkdir build
cd build

../configure \
--prefix=/usr \
--with-pthread
--prefix=/usr

make
make DESTDIR="$1" install

rm "$1/var/db/Makefile"

2 changes: 2 additions & 0 deletions core/glibc/checksums
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
e2c4114e569afbe7edbc29131a43be833850ab9a459d81beb2588016d2bbb8af glibc-2.30.tar.xz
845e725da4121f838481669fe0590e59367076a25b234d239ec66e67aa89b1ea locale-gen
2db453cc421b0753f4939c26765717cba6e5df1712b1c6b97b92bee6565ad7a1 locale.gen
2 changes: 0 additions & 2 deletions core/glibc/depends.bak

This file was deleted.

22 changes: 22 additions & 0 deletions core/glibc/files/locale-gen
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/sh

[ "$(whoami)" = root ] || {
echo "Please run as root"
exit 1
}

[ -r /etc/locale.gen ] || {
echo "Cannot open /etc/locale.gen for reading"
exit 1
}

while read -r line; do
INPUTFILE="${line%% *}"
INPUTFILE="${INPUTFILE%%.*}"
CHARMAPFILE="${line##* }"
echo "Generating locale $INPUTFILE.$CHARMAPFILE"
localedef -i "$INPUTFILE" -f "$CHARMAPFILE" "$INPUTFILE.$CHARMAPFILE" || {
echo "Generating locale $INPUTFILE.$CHARMAPFILE failed"
exit 1
}
done < /etc/locale.gen
1 change: 1 addition & 0 deletions core/glibc/files/locale.gen
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
en_US.UTF8 UTF-8
2 changes: 2 additions & 0 deletions core/glibc/post-install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
/usr/bin/locale-gen
2 changes: 2 additions & 0 deletions core/glibc/sources
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
https://ftp.gnu.org/gnu/libc/glibc-2.30.tar.xz
files/locale-gen
files/locale.gen
2 changes: 1 addition & 1 deletion core/glibc/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.31 1
2.31 2

0 comments on commit 8720d01

Please sign in to comment.