CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
glibc: initial import (verified compilation, glibc-ports support
[ports/core-arm.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
5 name=glibc
6 version=2.12.2
7 release=2
8 source=(http://ftp.gnu.org/gnu/$name/$name-$version.tar.xz \
9 http://ftp.gnu.org/gnu/$name/$name-ports-2.12.1.tar.bz2 \
10 http://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.35.tar.gz \
11 glibc-ignore_origin.patch \
12 Optimize-__getpagesize-a-bit.patch \
13 hosts resolv.conf nsswitch.conf host.conf ld.so.conf)
14
15 build() {
16 # install kernel headers
17 cd linux-2.6.35
18 make mrproper
19 make ARCH=arm headers_check
20 make ARCH=arm INSTALL_HDR_PATH=$PKG/usr headers_install
21
22 mv $SRC/$name-ports-2.12.1 $SRC/$name-$version/ports
23
24 patch -d $SRC/$name-$version -R -p1 -i $SRC/Optimize-__getpagesize-a-bit.patch
25 patch -d $SRC/$name-$version -p1 -i $SRC/$name-ignore_origin.patch
26
27 mkdir $SRC/build
28 cd $SRC/build
29
30 ../$name-$version/configure --prefix=/usr \
31 --build=arm-crux-linux-gnueabi \
32 --libexecdir=/usr/lib \
33 --with-headers=$PKG/usr/include \
34 --with-tls \
35 --enable-kernel=2.6.0 \
36 --enable-add-ons \
37 --disable-profile \
38 --without-gd
39
40 make CFLAGS="$CFLAGS -msoft-float"
41 make install_root=$PKG install
42
43 cp $SRC/{hosts,resolv.conf,nsswitch.conf,host.conf,ld.so.conf} $PKG/etc
44 ln -sf ../usr/share/zoneinfo/UTC $PKG/etc/localtime
45 mkdir -p $PKG/etc/ld.so.conf.d $PKG/usr/lib/locale
46 touch $PKG/etc/ld.so.cache
47
48 rm -rf $PKG/usr/share/{info,locale}
49 }