# Maintainer: Mike Staszel # toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc # NOTE: valgrind requires rebuilt with each new glibc version pkgname=glibc pkgver=2.11 pkgrel=9 pkgdesc="GNU C Library" arch=('arm') url="http://www.gnu.org/software/libc" license=('GPL' 'LGPL') groups=('base') depends=('kernel26-headers>=2.6.36' 'tzdata') makedepends=('gcc>=4.4') replaces=('glibc-xen') backup=(etc/locale.gen etc/nscd.conf) install=glibc.install source=(http://ftp.gnu.org/gnu/glibc/$pkgname-$pkgver.tar.gz http://ftp.gnu.org/gnu/glibc/$pkgname-ports-$pkgver.tar.gz glibc-2.10-dont-build-timezone.patch nscd locale.gen.txt locale-gen) md5sums=('55d50abb2d7c366bde6fb5e35e681f9b' '7100d8ba81c52e90e7fb4795d2f736c9' '4dadb9203b69a3210d53514bb46f41c3' 'b587ee3a70c9b3713099295609afde49' '1dfde0f12c99c7ec4d4054caf8ee5373' '476e9113489f93b348b21e144b6a8fcf') build() { ln -s $srcdir/glibc-2.11 $srcdir/glibc cd ${srcdir}/glibc ln -s $srcdir/glibc-ports-2.11 $srcdir/glibc # From here on out, it's the same PKGBUILD as vanilla # With the ./configure armv5te exception # timezone data is in separate package (tzdata) patch -Np1 -i ${srcdir}/glibc-2.10-dont-build-timezone.patch || return 1 install -dm755 ${pkgdir}/etc touch ${pkgdir}/etc/ld.so.conf mkdir glibc-build cd glibc-build echo "slibdir=/lib" >> configparms ../configure --prefix=/usr \ --host=arm-unknown-linux-gnueabi \ --build=arm-unknown-linux-gnueabi \ --enable-add-ons \ --enable-kernel=2.6.22 \ --enable-bind-now \ --disable-profile \ --disable-debug \ --disable-gd \ --libexecdir=/usr/lib \ --libdir=/usr/lib \ --with-tls \ --with-__thread \ --with-headers=/usr/include \ --without-cvs \ --without-gd \ --without-fp \ --without-selinux make || return 1 } package() { cd ${srcdir}/glibc/glibc-build make install_root=${pkgdir} install || return 1 # provided by linux-api-headers rm ${pkgdir}/usr/include/scsi/scsi.h rm ${pkgdir}/etc/ld.so.cache ${pkgdir}/etc/ld.so.conf install -dm755 ${pkgdir}/etc/rc.d install -dm755 ${pkgdir}/usr/sbin install -dm755 ${pkgdir}/usr/lib/locale install -m644 ${srcdir}/glibc/nscd/nscd.conf ${pkgdir}/etc/nscd.conf install -m755 ${srcdir}/nscd ${pkgdir}/etc/rc.d/nscd install -m755 ${srcdir}/locale-gen ${pkgdir}/usr/sbin sed -i -e 's/^\tserver-user/#\tserver-user/' ${pkgdir}/etc/nscd.conf || return 1 # create /etc/locale.gen install -m644 ${srcdir}/locale.gen.txt ${pkgdir}/etc/locale.gen sed -i "s|/| |g" ${srcdir}/glibc/localedata/SUPPORTED sed -i 's|\\| |g' ${srcdir}/glibc/localedata/SUPPORTED sed -i "s|SUPPORTED-LOCALES=||" ${srcdir}/glibc/localedata/SUPPORTED cat ${srcdir}/glibc/localedata/SUPPORTED >> ${pkgdir}/etc/locale.gen sed -i "s|^|#|g" ${pkgdir}/etc/locale.gen }