# IMPORTANT ! # you must untar add-ons into the source directory before building # the package. This is mostly glibc-linuxthreads. PATCH_LIST="098-fix--new-binutils.patch 099-divdi3_glibc24.patch 300-fix-binutils-version-check.patch 260-csu-Makefile.patch 200-use_short_for_fnstsw.patch glibc-2.3.6-enable-vsyscall-i386.diff 097-glibc-2.3.6-libgcc_eh-1.patch glibc-2.4-zoneinfo-crosscompile.patch" FILE_LIST= SRC_FETCH_PATH="http://ftp.gnu.org/gnu/glibc/glibc-2.3.6.tar.bz2" SRC_FETCH_METHOD="http" LINUXTHREADS_PKGSRC="http://ftp.gnu.org/gnu/glibc/glibc-linuxthreads-2.3.6.tar.bz2" function do_config { wget -c $LINUXTHREADS_PKGSRC tar xvfj "${LINUXTHREADS_PKGSRC##*/}" mkdir -p build/ cd build/ opt="${GCC_OPT_SMALL//-malign-functions=0/}" \ CFLAGS="$GCC_CPU_COMMON $GCC_ARCH_COMMON $opt" \ LD_LIBRARY_PATH="" \ ../configure --prefix=/usr --build=$FLXHOST \ --host=$FLXTARG --without-cvs \ --disable-profile --disable-debug --without-gd \ --disable-sanity-checks --cache-file=config.cache \ --with-headers=$FLXROOTDIR/usr/include --with-__thread \ --without-tls --without-nptl --enable-shared --with-fp \ --enable-add-ons=linuxthreads --enable-kernel=2.6.27 cd .. } function do_compile_only { mkdir -p build/ cd build # $FLXPMAKE => ne termine pas. $FLXMAKE SHELL=/bin/bash cd .. } function do_clean { rm -fr build } function do_prepack { mkdir -p $ROOTDIR/etc && touch $ROOTDIR/etc/ld.so.conf cd build/ $FLXMAKE install install_root=$ROOTDIR prefix=/usr slibdir=/lib \ libdir=/usr/lib libexecdir=/usr/bin rm -f $ROOTDIR/etc/ld.so.cache $ROOTDIR/etc/ld.so.conf rm -f $ROOTDIR/etc/localtime ( cd $ROOTDIR/usr/share/zoneinfo find . -links "+1" -type "f" -exec '/bin/bash' '-c' 'cp --preserve {} {}.dereference.hard; rm -f {}; cp --preserve {}.dereference.hard {}; rm -f {}.dereference.hard' \; ) chmod -w $ROOTDIR/usr/bin/pt_chown set_default_perm $ROOTDIR cd .. } function pre_pack { chmod +w $ROOTDIR/sbin/{ldconfig,sln} ${SSTRIP} $ROOTDIR/sbin/{ldconfig,sln} || : chmod -w $ROOTDIR/sbin/{ldconfig,sln} }