build_gqview2(){ HERE=`pwd` 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:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$PKGPATH/lib:/apps/gtk2/lib" if [ ! -f gqview-2.0.4.tar.gz ]; then wget http://sourceforge.net/projects/gqview/files/gqview/2.0.4/gqview-2.0.4.tar.gz || exit 1 fi tar xvf gqview-2.0.4.tar.gz cd gqview-2.0.4 ./configure --prefix="$PKGPATH" make make install mv "$PKGPATH"/bin/gqview "$PKGPATH"/bin/gqview-bin echo "#!/bin/sh" > "$PKGPATH"/bin/gqview echo " " >> "$PKGPATH"/bin/gqview echo "export LD_LIBRARY_PATH="$PKGPATH/lib:$LD_LIBRARY_PATH"" >> "$PKGPATH"/bin/gqview echo "export PATH="$PKGPATH/bin:$PATH"" >> "$PKGPATH"/bin/gqview echo " " >> "$PKGPATH"/bin/gqview echo "$PKGPATH/bin/gqview-bin \"\$@\"" >> "$PKGPATH"/bin/gqview echo " " >> "$PKGPATH"/bin/gqview chmod +x "$PKGPATH"/bin/gqview touch "$TMPDIR"/gqview2 }