1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
# Description: La librairie C utilisée dans le système GNU
# URL: http://www.gnu.org/software/libc/
# Maintainer: Primarily Roland McGrath, roland at gnu dot org and many contributors, glibc-sc at gnu dot org
# Packager:thierryn1 at hispeed dot ch
name=glibc
version=2.16.0
release=2
kernelversion=3.4.7
kernelbaseversion=$(expr $kernelversion : '\([0-9]\.[0-9]\)')
source=(http://ftp.gnu.org/gnu/glibc/$name-$version.tar.xz
http://www.kernel.org/pub/linux/kernel/v3.0/linux-$kernelbaseversion.tar.xz
http://www.linuxfromscratch.org/patches/lfs/development/glibc-2.15-fixes-1.patch
http://www.linuxfromscratch.org/patches/lfs/development/glibc-2.15-gcc_fix-1.patch
http://nutyx.meticul.eu/files/patchs/$name/glibc-2.14-reexport-rpc-interface.patch
http://nutyx.meticul.eu/files/patchs/$name/glibc-2.14-reinstall-nis-rpc-headers.patch
http://nutyx.meticul.eu/files/patchs/$name/{nsswitch.conf,SUPPORTED}
ld.so.conf)
if [ "${kernelversion}" != "${kernelbaseversion}.0" ]; then
source[${#source[*]}]="http://www.kernel.org/pub/linux/kernel/v3.0/patch-$kernelversion.xz"
fi
build() {
# install build kernel headers
mkdir $PKG/usr/
cd linux-$kernelbaseversion
if [ -f $SRC/patch-$kernelversion.xz ]; then
xzcat $SRC/patch-$kernelversion.xz | patch -Np1
fi
make mrproper
make headers_check
make INSTALL_HDR_PATH=$PKG/usr headers_install
cd ..
# install glibc
cd $name-$version
sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in
# patch -Np1 -i ../glibc-2.15-fixes-1.patch
# patch -Np1 -i ../glibc-2.15-gcc_fix-1.patch
# libtirpc need it
# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=acee4873 (fedora branch)
# patch -p1 -i ../glibc-2.14-reexport-rpc-interface.patch
# rpcbind need it
# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdd816a3 (fedora branch)
# patch -p1 -i ../glibc-2.14-reinstall-nis-rpc-headers.patch
# sed -i '195,213 s/PRIVATE_FUTEX/FUTEX_CLOCK_REALTIME/' nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timed{rd,wr}lock.S
sed -i 's#<rpc/types.h>#"rpc/types.h"#' sunrpc/rpc_clntout.c
mv ../SUPPORTED localedata/
mkdir -v ../glibc-build
cd ../glibc-build
case `uname -m` in
i?86) echo "CFLAGS += -march=i686 -mtune=native -O3 -pipe" > configparms ;;
esac
../$name-$version/configure --prefix=/usr \
--with-headers=$PKG/usr/include \
--disable-profile \
--enable-add-ons \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--enable-kernel=3.4.0 \
--libexecdir=/usr/lib/glibc \
--enable-obsolete-rpc
make
make install_root=$PKG install
make install_root=$PKG localedata/install-locales
cp ../{nsswitch.conf,ld.so.conf} $PKG/etc
if [ -f $PKG/usr/share/info/dir ]; then
rm $PKG/usr/share/info/dir
fi
rm $PKG/usr/include/drm/{drm.h,drm_sarea.h,i915_drm.h,mga_drm.h,r128_drm.h,radeon_drm.h,savage_drm.h,sis_drm.h,via_drm.h,drm_mode.h,nouveau_drm.h}
rm $PKG/usr/{bin/tzselect,sbin/zdump,sbin/zic} # Dans tzdata
}
|