2006-02-23 15:26:10 +00:00
|
|
|
# Description: The C library used in the GNU system
|
2021-12-11 19:32:36 +01:00
|
|
|
# URL: http://www.gnu.org/software/libc/
|
|
|
|
# Maintainer:
|
2006-02-23 15:26:10 +00:00
|
|
|
|
|
|
|
name=glibc
|
2021-12-11 19:32:36 +01:00
|
|
|
version=2.34
|
2021-12-11 22:53:16 +01:00
|
|
|
release=2
|
2021-12-11 19:32:36 +01:00
|
|
|
source=(https://ftp.gnu.org/gnu/glibc/glibc-$version.tar.xz
|
|
|
|
https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.10.tar.xz
|
2021-12-11 22:53:16 +01:00
|
|
|
glibc-python3.patch glibc-2.34-upstream-fixes.patch
|
2021-12-11 19:32:36 +01:00
|
|
|
glibc-c-utf8-locale-1.patch glibc-c-utf8-locale-2.patch
|
|
|
|
hosts resolv.conf nsswitch.conf host.conf ld.so.conf)
|
2006-02-23 15:26:10 +00:00
|
|
|
|
|
|
|
build() {
|
2012-08-08 10:08:54 +02:00
|
|
|
# install kernel headers
|
2021-12-11 19:32:36 +01:00
|
|
|
#cd linux-5.10
|
|
|
|
make -C $SRC/linux-5.10 mrproper
|
|
|
|
make -C $SRC/linux-5.10 headers_check
|
|
|
|
make -C $SRC/linux-5.10 INSTALL_HDR_PATH=$PKG/usr headers_install
|
2012-08-08 10:08:54 +02:00
|
|
|
chown root:root $PKG/usr
|
2006-03-16 17:56:22 +00:00
|
|
|
|
2021-12-11 22:53:16 +01:00
|
|
|
patch -p1 -d $SRC/glibc-${version:0:4} -i $SRC/glibc-2.34-upstream-fixes.patch
|
2021-12-11 19:32:36 +01:00
|
|
|
patch -p1 -d $SRC/glibc-${version:0:4} -i $SRC/glibc-python3.patch
|
|
|
|
patch -p1 -d $SRC/glibc-${version:0:4} -i $SRC/glibc-c-utf8-locale-1.patch
|
|
|
|
patch -p1 -d $SRC/glibc-${version:0:4} -i $SRC/glibc-c-utf8-locale-2.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
|
2021-12-11 19:32:36 +01:00
|
|
|
|
|
|
|
echo "slibdir=/lib" >> configparms
|
|
|
|
echo "rtlddir=/lib" >> configparms
|
|
|
|
echo "sbindir=/usr/sbin" >> configparms
|
|
|
|
echo "rootsbindir=/sbin" >> configparms
|
|
|
|
|
|
|
|
$SRC/$name-${version}/configure \
|
2021-03-22 16:38:00 +01:00
|
|
|
--prefix=/usr \
|
2021-12-11 19:32:36 +01:00
|
|
|
--libdir=/usr/lib \
|
2012-08-08 10:08:54 +02:00
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--with-headers=$PKG/usr/include \
|
2021-12-11 19:32:36 +01:00
|
|
|
--with-pkgversion="$version-$release" \
|
|
|
|
--with-bugurl='https://crux.nu/bugs' \
|
2018-10-23 17:53:10 +02:00
|
|
|
--enable-kernel=4.9 \
|
2012-08-08 10:08:54 +02:00
|
|
|
--enable-add-ons \
|
2021-12-11 19:32:36 +01:00
|
|
|
--enable-lock-elision \
|
|
|
|
--enable-bind-now \
|
|
|
|
--enable-static-pie \
|
2018-01-05 23:19:25 +01:00
|
|
|
--enable-stack-protector=strong \
|
2021-12-11 19:32:36 +01:00
|
|
|
--enable-stackguard-randomization \
|
|
|
|
--enable-multi-arch \
|
|
|
|
--without-gd \
|
2012-08-08 10:08:54 +02:00
|
|
|
--disable-profile \
|
2015-06-24 16:11:25 +02:00
|
|
|
--disable-werror \
|
2021-12-11 19:32:36 +01:00
|
|
|
libc_cv_slibdir=/lib
|
|
|
|
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
|
2015-06-24 16:11:25 +02:00
|
|
|
install -d $PKG/var/{db,run}/nscd
|
|
|
|
|
|
|
|
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
|
|
|
|
2021-12-11 19:32:36 +01:00
|
|
|
# to be used with pkgmk
|
|
|
|
$PKG/usr/bin/localedef --prefix "$PKG" -i C -f UTF-8 C.UTF-8
|
|
|
|
|
2015-06-20 22:42:25 +02:00
|
|
|
rm -rf $PKG/usr/share/{info,locale} \
|
|
|
|
$PKG/usr/bin/tzselect \
|
|
|
|
$PKG/usr/sbin/z{dump,ic}
|
2018-07-17 19:06:13 +02:00
|
|
|
find $PKG -name "*install.cmd" -delete
|
|
|
|
find $PKG -name ".\install" -delete
|
2021-12-11 19:32:36 +01:00
|
|
|
rm -r $PKG/usr/bin/zdump
|
2006-02-23 15:26:10 +00:00
|
|
|
}
|