CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Imported core-cross ports from 2.5
[crossrootfs.git] / glibc / Pkgfile
CommitLineData
6dca1d21
JB
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, crux-arm at mikeux dot dyndns dot org
5# Depends on:
6
7name=glibc
8version=2.9
9release=1
10source=(ftp://ftp.gnu.org/gnu/$name/$name-$version.tar.bz2 \
11 ftp://ftp.gnu.org/gnu/$name/$name-ports-$version.tar.bz2 \
12 $name-$version-libgcc_eh-1.patch \
13 $name-$version-localedef_segfault-1.patch \
14 $name-$version-cross_hacks-2.patch \
15 $name-$version-nptl_lowlevellock-1.patch \
16 $name-$version-arm_setjmp_fix-1.patch \
17 ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.28.8.tar.bz2 \
18 hosts resolv.conf nsswitch.conf host.conf ld.so.conf)
19
20build() {
21 # install build kernel headers
22 cd linux-2.6.28.8
23 make mrproper
24 make ARCH=arm headers_check
25 make ARCH=arm INSTALL_HDR_PATH=$PKG/usr headers_install
26 cd $SRC
27
28 mv $name-ports-$version $name-$version/ports
29
30 pushd $name-$version
31 patch -p1 -i $SRC/$name-$version-libgcc_eh-1.patch
32 patch -p1 -i $SRC/$name-$version-localedef_segfault-1.patch
33 patch -p1 -i $SRC/$name-$version-cross_hacks-2.patch
34 patch -p1 -i $SRC/$name-$version-nptl_lowlevellock-1.patch
35 patch -p1 -i $SRC/$name-$version-arm_setjmp_fix-1.patch
36 popd
37
38 mkdir build
39 cd build
40
41 cat > config.cache << EOF
42libc_cv_forced_unwind=yes
43libc_cv_c_cleanup=yes
44libc_cv_gnu89_inline=yes
45ac_cv_sizeof_long_double=0
46EOF
47
48 ../$name-$version/configure --build=$CHOST \
49 --host=$CTARGET \
50 --prefix=/usr \
51 --libexecdir=/usr/lib \
52 --with-headers=$PKG/usr/include \
53 --with-tls \
54 --enable-kernel=2.6.0 \
55 --enable-add-ons \
56 --disable-profile \
57 --without-gd \
58 --cache-file=config.cache
59
60 make CC="$CC" CFLAGS="$CFLAGS"
61 make install_root=$PKG install
62 cp $SRC/{hosts,resolv.conf,nsswitch.conf,host.conf,ld.so.conf} $PKG/etc
63 ln -sf ../usr/share/zoneinfo/UTC $PKG/etc/localtime
64 mkdir -p $PKG/etc/ld.so.conf.d $PKG/usr/lib/locale
65
66 # conflicts with quota
67 rm $PKG/usr/include/rpcsvc/{rquota.h,rquota.x}
68 rm -rf $PKG/usr/share/{info,locale}
69}