build_gentoo(){ HERE=`pwd` BUILDDEPS="compiletc.tcz intltool.tcz gettext.tcz" for I in `echo "$BUILDDEPS"`; do su tc -c "tce-load -i "$I"" || su tc -c "tce-load -iw "$I"" done PKGPATH=$1 export LDFLAGS="-L$PKGPATH/lib -L/apps/gtk2/lib" export CPPFLAGS="-I$PKGPATH/include -I/apps/gtk2/include" export PATH="$PKGPATH/bin:/apps/gtk2/bin:$PATH" export PKG_CONFIG_PATH="$PKGPATH/lib/pkgconfig:/apps/gtk2/lib/pkgconfig" tar xvf gentoo-0.19.12.tar.gz || exit 1 cd gentoo-0.19.12 || exit 1 chmod +x install-sh || exit 1 sed -i "s|icons:/usr/share|$PKGPATH/share/gentoo/icons:/usr/share|" gentoorc.in ./configure --prefix="$PKGPATH" --bindir="$PKGPATH"/localbin || exit 1 make || exit 1 make install || exit 1 cd "$HERE" touch "$TMPDIR"/gentoo }