#!/bin/bash -x # # This scripts stores required packages locally prior to calling # CheckAllPossiblEnables.sh such that e.g. they don't are accessed over # the network. function checkdir { # $1 is the variable name # $2 is the variable to check if [ -z $2 ]; then echo "Please set a $1 environment variable." if [ -z $1 ]; then echo "Usage: $0 " exit 1 fi # TMPDIR is where we test checkdir TMPDIR $TMPDIR # PACKAGEDIR contains required packages checkdir PACKAGEDIR $PACKAGEDIR # MOLECUILDERDIR contains molecuilder repo to check checkdir MOLECUILDERDIR $MOLECUILDERDIR mkdir -p /tmp/ccache-$user # make dependencies local for depdir in boost-1.47 Qt-4.7.4 CodePatterns-1.2.3 JobMarket-1.1.1; do echo "Syncing local ${depdir} with remote ..." if [ ! -e $TMPDIR/dependencies/${depdir} ]; then echo "Creating dir ..." mkdir -p $TMPDIR/dependencies/${depdir} fi rsync -avz --delete-after $PACKAGEDIR/${depdir}/ $TMPDIR/dependencies/${depdir} done find $TMPDIR/dependencies/ -path '*/pkgconfig/*' -name '*.pc' -exec sed -i -e "s#$PACKAGEDIR#$TMPDIR/dependencies#g" {} \; export PKG_CONFIG_PATH="$TMPDIR/dependencies/Qt-4.7.4/lib/pkgconfig" rm molecuilder -rf ./CheckAllPossibleEnables.sh $MOLECUILDERDIR molecuilder $1 --with-Qt-dir=$TMPDIR/dependencies/Qt-4.7.4 --with-Qt-bin=$TMPDIR/dependencies/Qt-4.7.4/bin --with-codepatterns=$TMPDIR/dependencies/CodePatterns-1.2.3 --with-jobmarket=$TMPDIR/dependencies/JobMarket-1.1.1 --with-boost=$TMPDIR/dependencies/boost-1.47 --with-vmg-mpi CCACHE_DIR="/tmp/ccache-heber/" CXX="ccache g++" MPICXX="mpicxx.openmpi" CXXFLAGS="-Wall -g3" MPICXX=mpicxx.openmpi PKG_CONFIG_PATH="$TMPDIR/dependencies/Qt-4.7.4/lib/pkgconfig"