2006-02-23 16:26:10 +01:00
|
|
|
# Description: The C library used in the GNU system
|
2021-12-28 14:17:09 +01:00
|
|
|
# URL: http://www.gnu.org/software/libc/
|
|
|
|
# Maintainer: CRUX System Team, core-ports at crux dot nu
|
2006-02-23 16:26:10 +01:00
|
|
|
|
|
|
|
name=glibc
|
2022-02-10 19:24:45 +01:00
|
|
|
version=2.35
|
2022-02-13 21:54:18 +01:00
|
|
|
release=2
|
2022-02-10 19:24:45 +01:00
|
|
|
_kernel_version=5.15.21
|
2022-01-07 18:37:13 +01:00
|
|
|
|
2021-12-11 19:32:36 +01:00
|
|
|
source=(https://ftp.gnu.org/gnu/glibc/glibc-$version.tar.xz
|
2022-01-07 18:37:13 +01:00
|
|
|
https://www.kernel.org/pub/linux/kernel/v5.x/linux-$_kernel_version.tar.xz
|
|
|
|
glibc-$version-1.patch
|
2022-02-13 21:54:18 +01:00
|
|
|
hosts resolv.conf nsswitch.conf host.conf ld.so.conf
|
|
|
|
locale-gen locale.gen.in)
|
2006-02-23 16:26:10 +01:00
|
|
|
|
|
|
|
build() {
|
2012-08-08 10:08:54 +02:00
|
|
|
# install kernel headers
|
2022-01-07 18:37:13 +01:00
|
|
|
make -C $SRC/linux-$_kernel_version mrproper
|
|
|
|
make -C $SRC/linux-$_kernel_version headers_check
|
|
|
|
make -C $SRC/linux-$_kernel_version INSTALL_HDR_PATH=$PKG/usr headers_install
|
2012-08-08 10:08:54 +02:00
|
|
|
chown root:root $PKG/usr
|
2006-03-16 18:56:22 +01:00
|
|
|
|
2021-12-28 14:17:09 +01:00
|
|
|
patch -p1 -d $SRC/$name-${version:0:4} -i $SRC/$name-$version-1.patch
|
2009-05-19 08:38:09 +02:00
|
|
|
|
2015-07-27 17:28:06 +02:00
|
|
|
mkdir $SRC/build
|
2014-02-15 18:02:52 +01:00
|
|
|
cd $SRC/build
|
2022-02-13 21:54:18 +01:00
|
|
|
$SRC/$name-$version/configure \
|
2021-03-22 16:38:00 +01:00
|
|
|
--prefix=/usr \
|
2012-08-08 10:08:54 +02:00
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--with-headers=$PKG/usr/include \
|
2018-10-23 17:53:10 +02:00
|
|
|
--enable-kernel=4.9 \
|
2018-01-05 23:19:25 +01:00
|
|
|
--enable-stack-protector=strong \
|
2022-01-07 18:37:13 +01:00
|
|
|
--enable-bind-now \
|
2021-12-11 19:32:36 +01:00
|
|
|
--enable-multi-arch \
|
2012-08-08 10:08:54 +02:00
|
|
|
--disable-profile \
|
2015-06-24 16:11:25 +02:00
|
|
|
--disable-werror \
|
2022-01-07 18:37:13 +01:00
|
|
|
--without-gd
|
2021-12-11 19:32:36 +01:00
|
|
|
make
|
2012-08-08 10:08:54 +02:00
|
|
|
#make check
|
|
|
|
make install_root=$PKG install
|
2009-05-19 08:38:09 +02:00
|
|
|
|
2021-12-11 19:32:36 +01:00
|
|
|
install -m 0644 $SRC/$name-${version:0:4}/nscd/nscd.conf $PKG/etc
|
2022-02-28 16:07:20 +01:00
|
|
|
install -d $PKG/var/db/nscd
|
2015-06-24 16:11:25 +02:00
|
|
|
|
|
|
|
install -m 0644 $SRC/{hosts,resolv.conf,nsswitch.conf,host.conf,ld.so.conf} $PKG/etc
|
|
|
|
|
2012-08-08 10:08:54 +02:00
|
|
|
ln -sf ../usr/share/zoneinfo/UTC $PKG/etc/localtime
|
2015-07-26 21:54:44 +02:00
|
|
|
install -d $PKG/etc/ld.so.conf.d $PKG/usr/lib/locale
|
2012-08-08 10:08:54 +02:00
|
|
|
touch $PKG/etc/ld.so.cache
|
2007-10-09 21:41:32 +02:00
|
|
|
|
2022-02-13 21:54:18 +01:00
|
|
|
install -Dm755 $SRC/locale-gen $PKG/usr/sbin/locale-gen
|
|
|
|
install -Dm644 $SRC/locale.gen.in $PKG/etc/locale.gen
|
2022-02-16 12:50:41 +01:00
|
|
|
sed -e '1,3d' -e 's|/| |g' -e 's|\\| |g' -e 's|^|#|g' \
|
|
|
|
$SRC/$name-$version/localedata/SUPPORTED >> $PKG/etc/locale.gen
|
2022-02-10 19:24:45 +01:00
|
|
|
|
2022-02-14 15:32:46 +01:00
|
|
|
LC_ALL=C ./elf/ld.so --library-path . $PKG/usr/bin/localedef \
|
2022-02-13 21:54:18 +01:00
|
|
|
--force --quiet \
|
2022-02-14 17:57:13 +01:00
|
|
|
--inputfile=$SRC/$name-$version/localedata/locales/C \
|
|
|
|
--charmap=$SRC/$name-$version/localedata/charmaps/UTF-8 \
|
2022-02-13 21:54:18 +01:00
|
|
|
$PKG/usr/lib/locale/C.UTF-8 || true
|
2021-12-28 14:17:09 +01:00
|
|
|
|
|
|
|
rm -r $PKG/usr/share/locale \
|
|
|
|
$PKG/usr/bin/{tzselect,zdump} \
|
|
|
|
$PKG/usr/sbin/zic
|
2022-02-13 21:54:18 +01:00
|
|
|
|
|
|
|
install -Dm644 $SRC/$name-$version/intl/locale.alias \
|
|
|
|
$PKG/usr/share/locale/locale.alias
|
|
|
|
|
2018-07-17 19:06:13 +02:00
|
|
|
find $PKG -name "*install.cmd" -delete
|
|
|
|
find $PKG -name ".\install" -delete
|
2006-02-23 16:26:10 +01:00
|
|
|
}
|