#!/bin/bash

WHERE=http://www.riverbankcomputing.com/static/Downloads/QScintilla2
PKG=QScintilla-gpl-2.3.3-snapshot-20090305
JOBS=$(getconf _NPROCESSORS_ONLN)

pushd ../SOURCES
if [ ! -f $PKG.tar.gz ]; then
    wget $WHERE/$PKG.tar.gz
fi
popd

pushd ../BUILD
rm -rf $PKG
tar xfz ../SOURCES/$PKG.tar.gz
pushd $PKG/Qt4
qmake
make -j $JOBS
make install
popd # $PKG/Qt4
pushd $PKG/designer-Qt4
qmake
make
make install
popd # $PKG/designer-Qt4
pushd $PKG/Python
python configure.py -j $JOBS
make -j $JOBS
make install
popd # $PKG/Python
popd # ../BUILD

# EOF