# Description: The C library used in the GNU system # URL: http://www.gnu.org/software/libc/ # Maintainer: CRUX System Team, core-ports at crux dot nu name=glibc-32 version=2.19 release=2 source=(http://ftp.gnu.org/gnu/glibc/glibc-$version.tar.xz \ http://crux.nu/files/distfiles/kernel-headers-3.12.tar.bz2 \ $name-$version-multilib-dirs.patch CVE-2014-0475.patch \ hosts resolv.conf nsswitch.conf host.conf ld.so.conf \ lib32.conf) build() { # install kernel headers mkdir $PKG/usr/ cp -r kernel-headers-3.12/include $PKG/usr chown root:root $PKG/usr patch -p1 -d glibc-$version -i $SRC/$name-$version-multilib-dirs.patch patch -p1 -d glibc-$version -i $SRC/CVE-2014-0475.patch mkdir build cd build CC="${CC:-gcc} -m32" ../glibc-$version/configure --prefix=/usr \ --libdir=/usr/lib32 \ --libexecdir=/usr/lib32 \ --with-headers=$PKG/usr/include \ --enable-kernel=3.10 \ --enable-add-ons \ --disable-profile \ --without-gd \ --enable-obsolete-rpc \ --enable-multi-arch i686-pc-linux-gnu make #make check make install_root=$PKG install cp $SRC/{hosts,resolv.conf,nsswitch.conf,host.conf,ld.so.conf} $PKG/etc ln -sf ../usr/share/zoneinfo/UTC $PKG/etc/localtime mkdir -p $PKG/etc/ld.so.conf.d $PKG/usr/lib/locale touch $PKG/etc/ld.so.cache rm -rf $PKG/usr/{bin,sbin,share} $PKG/{etc,sbin} $PKG/var (mv $PKG/usr/include/gnu/stubs-32.h $SRC; rm -rf $PKG/usr/include; install -D $SRC/stubs-32.h $PKG/usr/include/gnu/stubs-32.h) install -D $SRC/lib32.conf $PKG/etc/ld.so.conf.d/lib32.conf mkdir $PKG/lib && ln -s /lib32/ld-linux.so.2 $PKG/lib/ld-linux.so.2 }