CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
pkgutils: fixed CFLAGS used
[crossrootfs.git] / glibc / Pkgfile
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 # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
5 # Depends on:
6
7 name=glibc
8 version=2.16.0
9 release=4
10 source=(http://ftp.gnu.org/gnu/glibc/glibc-$version.tar.xz \
11 ftp://ftp.gnu.org/gnu/$name/$name-ports-$version.tar.bz2 \
12 ftp://ftp.kernel.org/pub/linux/kernel/v3.0/linux-3.4.11.tar.xz \
13 $name-resolv_assert.patch
14 $name-strtod_integer_overflow.patch
15 $name-regexp_buffer_overrun.patch
16 hosts resolv.conf nsswitch.conf host.conf ld.so.conf)
17
18 build() {
19 # install build kernel headers
20 cd linux-3.4.11
21 make mrproper
22 make ARCH=arm headers_check
23 make ARCH=arm INSTALL_HDR_PATH=$PKG/usr headers_install
24
25 cd $SRC
26 mv $name-ports-$version $name-$version/ports
27
28 pushd $name-$version
29 patch -p1 -i $SRC/$name-resolv_assert.patch
30 patch -p1 -i $SRC/$name-strtod_integer_overflow.patch
31 patch -p1 -i $SRC/$name-regexp_buffer_overrun.patch
32 popd
33
34 mkdir build
35 cd build
36
37 cat > config.cache << EOF
38 libc_cv_forced_unwind=yes
39 libc_cv_ctors_header=yes
40 libc_cv_c_cleanup=yes
41 EOF
42
43 ../$name-$version/configure --build=$CHOST \
44 --host=$CTARGET \
45 --prefix=/usr \
46 --libexecdir=/usr/lib \
47 --with-headers=$PKG/usr/include \
48 --with-tls \
49 --enable-kernel=2.6.25 \
50 --enable-add-ons \
51 --disable-profile \
52 --without-gd \
53 --with-__thread \
54 --enable-obsolete-rpc
55
56 make CC="$CC" CFLAGS="$CFLAGS"
57 make install_root=$PKG install
58
59 cp $SRC/{hosts,resolv.conf,nsswitch.conf,host.conf,ld.so.conf} $PKG/etc
60 ln -sf ../usr/share/zoneinfo/UTC $PKG/etc/localtime
61 mkdir -p $PKG/etc/ld.so.conf.d $PKG/usr/lib/locale
62
63 rm -rf $PKG/usr/share/{info,locale} \
64 $PKG/usr/bin/tzselect \
65 $PKG/usr/sbin/z{dump,ic}
66 }