PATCH_LIST="fix_segfault_mke2fs.patch uclibc_memalign.patch" FILE_LIST= SRC_FETCH_METHOD="http" SRC_FETCH_PATH="http://prdownloads.sourceforge.net/e2fsprogs/e2fsprogs-1.41.14.tar.gz" MAKEDEPENDS= function do_config_only { echo "config_only not possible. Use 'compile'." } function do_compile_only { echo "compile_only not possible. Use 'compile'." } function do_compile { # first pass : build e2fsck statically against uclibc # disable TLS ac_cv_tls=" " \ LD="uclibc $CC" \ AR="$AR" AS="$AS" RANLIB="$RANLIB" CC="uclibc $CC -Os" \ CROSS_COMPILE=$FLXCROSS \ CFLAGS="$GCC_OPT_SMALL $GCC_ARCH_SMALL $GCC_CPU_SMALL" \ ./configure --build=${FLXHOST} --host=${FLXTARG} \ --prefix=/usr --bindir=/bin \ --sbindir=/sbin --libdir=/usr/lib \ --disable-nls --enable-htree \ --with-diet-libc $FLXMAKE V=1 BUILD_CC="uclibc $CC" CC="uclibc $CC -Os" lib/ext2fs/ext2_types.h libs #echo "Make libs : ?=$?. Press a key"; read $FLXMAKE V=1 BUILD_CC="uclibc $CC" CC="uclibc $CC -Os" -C e2fsck # echo "Make e2fsck : ?=$?. Press a key"; read # # now keep it before the complete cleanup mv e2fsck/e2fsck e2fsck/e2fsck.uclibc ; $FLXMAKE distclean # # # second pass : build everything, then replace e2fsck with the previous one # disable TLS ac_cv_tls=" " \ LD="$CC" AR="$AR" AS="$AS" RANLIB="$RANLIB" CC="$CC" BUILD_CC="gcc" \ CFLAGS="$GCC_OPT_SMALL $GCC_ARCH_SMALL $GCC_CPU_SMALL -ggdb3" \ ./configure --build=${FLXHOST} --host=${FLXTARG} --prefix=/usr --bindir=/bin --sbindir=/sbin --libdir=/usr/lib --disable-nls --enable-htree $FLXMAKE V=1 ## #echo "Make : ?=$?. Press a key"; read cp e2fsck/e2fsck.uclibc e2fsck/e2fsck.static mv e2fsck/e2fsck.uclibc e2fsck/e2fsck touch e2fsck/e2fsck } function do_prepack { $FLXMAKE install install-libs DESTDIR=$ROOTDIR cp lib/uuid/uuid_types.h $ROOTDIR/usr/include/uuid/ cd $ROOTDIR/sbin rm -f mke2fs tune2fs fsck.ext4 fsck.ext4dev fsck.ext2 fsck.ext3 findfs mkfs.ext3 mkfs.ext4 mkfs.ext4dev ln -s mkfs.ext2 mke2fs ln -s mkfs.ext2 mkfs.ext3 ln -s e2label tune2fs ln -s e2label findfs ln -s e2fsck fsck.ext2 ln -s e2fsck fsck.ext3 set_default_perm $ROOTDIR } function pre_pack { $SSTRIP $ROOTDIR/sbin/e2fsck rm -rf $ROOTDIR/usr/share/man/ }