blob: 6510c0a614112b38240cbbf39b28349ca79a111f (
plain)
1 # Description: The C library used in the GNU system
2 # URL: http://www.gnu.org/software/libc/
3 # Maintainer: CRUX System Team, core-ports at crux dot nu
4
5 name=glibc
6 version=2.16.0
7 release=2
8 source=(http://ftp.gnu.org/gnu/glibc/glibc-$version.tar.xz \
9 http://crux.nu/files/distfiles/kernel-headers-3.4.11.tar.xz \
10 hosts resolv.conf nsswitch.conf host.conf ld.so.conf \
11 $name-resolv_assert.patch \
12 $name-segfault_in_strncasecmp.patch \
13 $name-strtod_integer_overflow.patch)
14
15 build() {
16 # install kernel headers
17 mkdir $PKG/usr/
18 cp -r kernel-headers-3.4.11/include $PKG/usr
19 chown root:root $PKG/usr
20
21 patch -p1 -d $name-$version -i $SRC/$name-resolv_assert.patch
22 patch -p1 -d $name-$version -i $SRC/$name-segfault_in_strncasecmp.patch
23 patch -p1 -d $name-$version -i $SRC/$name-strtod_integer_overflow.patch
24
25 mkdir build
26 cd build
27 ../$name-$version/configure --prefix=/usr \
28 --libexecdir=/usr/lib \
29 --with-headers=$PKG/usr/include \
30 --with-tls \
31 --enable-kernel=2.6.39 \
32 --enable-add-ons \
33 --disable-profile \
34 --without-gd \
35 --enable-obsolete-rpc
36 make
37 #make check
38 make install_root=$PKG install
39
40 cp $SRC/{hosts,resolv.conf,nsswitch.conf,host.conf,ld.so.conf} $PKG/etc
41 ln -sf ../usr/share/zoneinfo/UTC $PKG/etc/localtime
42 mkdir -p $PKG/etc/ld.so.conf.d $PKG/usr/lib/locale
43 touch $PKG/etc/ld.so.cache
44
45 rm -rf $PKG/usr/share/{info,locale} \
46 $PKG/usr/bin/tzselect \
47 $PKG/usr/sbin/z{dump,ic}
48 }
|