build_ncurses() { HERE=`pwd` NAME=ncurses VER=5.9 PKGPATH=$1 export LDFLAGS="-L$PKGPATH/lib" export CPPFLAGS="-I$PKGPATH/include" export PATH="$PKGPATH/bin:$PATH" export PKG_CONFIG_PATH="$PKGPATH/lib/pkgconfig:/usr/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" tar xvf ncurses-5.9.tar.gz|| exit 1 cd ncurses-5.9 || exit 1 ./configure --prefix="$PKGPATH" --bindir="$PKGPATH"/localbin --with-shared --with-ncurses-headers="$PKGPATH"/include --with-normal --without-debug --without-ada --without-tests || exit 1 make || exit 1 make install || exit 1 cd "$HERE" touch "$TMPDIR"/ncurses }