core/glibc/Pkgfile

78 lines
2.3 KiB
Plaintext
Raw Normal View History

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-08-28 10:53:30 +02:00
version=2.36
2022-11-06 16:32:06 +01:00
release=3
2022-08-28 10:53:30 +02:00
_kernel_version=5.15.55
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
2022-11-06 16:32:06 +01:00
glibc-$version-3.patch
glibc-2.35-make-4.4-MAKEFLAGS.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
2022-11-06 16:32:06 +01:00
patch -p1 -d $SRC/$name-${version:0:4} -i $SRC/$name-$version-3.patch
patch -p1 -d $SRC/$name-${version:0:4} -i $SRC/glibc-2.35-make-4.4-MAKEFLAGS.patch
mkdir $SRC/build
2014-02-15 18:02:52 +01:00
cd $SRC/build
export libc_cv_slibdir=/lib
2022-02-13 21:54:18 +01:00
$SRC/$name-$version/configure \
2021-03-22 16:38:00 +01:00
--prefix=/usr \
--libdir=/usr/lib \
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 \
--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 \
--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
2021-12-11 19:32:36 +01:00
install -m 0644 $SRC/$name-${version:0:4}/nscd/nscd.conf $PKG/etc
install -d $PKG/var/db/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
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
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
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 \
--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
}