diff --git a/.gitmodules b/.gitmodules index 73299cba..7ac3abbb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "external/irpf90"] path = external/irpf90 url = https://gitlab.com/scemama/irpf90.git +[submodule "external/qp2-dependencies"] + path = external/qp2-dependencies + url = git@github.com:QuantumPackage/qp2-dependencies.git diff --git a/configure b/configure index 9938334b..0b935100 100755 --- a/configure +++ b/configure @@ -18,18 +18,6 @@ export CC=gcc git submodule init git submodule update -# /!\ When updating version, update also etc files -BATS_URL="https://github.com/bats-core/bats-core/archive/v1.1.0.tar.gz" -DOCOPT_URL="https://github.com/docopt/docopt/archive/0.6.2.tar.gz" -BSE_URL="https://github.com/MolSSI-BSE/basis_set_exchange/archive/v0.8.11.tar.gz" -F77ZMQ_URL="https://github.com/scemama/f77_zmq/archive/v4.2.5.tar.gz" -NINJA_URL="https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip" -OCAML_URL="https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh" -RESULTS_URL="https://gitlab.com/scemama/resultsFile/-/archive/v2.0/resultsFile-v2.0.tar.gz" -ZEROMQ_URL="https://github.com/zeromq/libzmq/releases/download/v4.2.5/zeromq-4.2.5.tar.gz" -ZLIB_URL="https://www.zlib.net/zlib-1.2.11.tar.gz" - - function help() { cat < | --config= $(basename $0) -h | --help $(basename $0) -i | --install= - $(basename $0) -d | --download= Options: -c, --config= Define a COMPILATION configuration file, @@ -48,9 +35,6 @@ Options: -i, --install= INSTALL . Use at your OWN RISK: no support will be provided for the installation of dependencies. - -d, --download= DOWNLOAD . Use at your OWN RISK: - no support will be provided for the installation of - dependencies. Example: ./$(basename $0) -c config/gfortran.cfg @@ -102,14 +86,6 @@ while true ; do case "$2" in "") help ; break;; *) PACKAGES="${PACKAGE} $2" - DO_INSTALL=1 - esac - shift 2;; - -d|--download) - case "$2" in - "") help ; break;; - *) PACKAGES="${PACKAGE} $2" - DO_DOWNLOAD=1 esac shift 2;; -h|-help|--help) @@ -143,16 +119,6 @@ function success() { exit 0 } -function download() { - echo "Downloading $1" - echo "" - printf "\e[0;34m" - wget --no-check-certificate $1 --output-document=$2 || error "Unable to download $1" - printf "\e[m" - echo "Saved dowloaded file as $2" - echo "" -} - function not_found() { echo 'not_found' } @@ -222,61 +188,41 @@ for PACKAGE in ${PACKAGES} ; do if [[ ${PACKAGE} = ninja ]] ; then - if [[ $DO_DOWNLOAD == 1 ]] ; then - download ${NINJA_URL} "${QP_ROOT}"/external/ninja.zip - fi - if [[ $DO_INSTALL == 1 ]] ; then execute << EOF rm -f "\${QP_ROOT}"/bin/ninja - unzip "\${QP_ROOT}"/external/ninja.zip -d "\${QP_ROOT}"/bin + unzip "\${QP_ROOT}"/external/qp2-dependencies/ninja.zip -d "\${QP_ROOT}"/bin EOF - fi elif [[ ${PACKAGE} = gmp ]] ; then - if [[ $DO_INSTALL == 1 ]] ; then execute << EOF cd "\${QP_ROOT}"/external - tar --bzip2 --extract --file gmp-6.1.2.tar.bz2 + tar --bzip2 --extract --file qp2-dependencies/gmp-6.1.2.tar.bz2 cd gmp-6.1.2 ./configure --prefix=$QP_ROOT && make -j 8 - make install + make -j 8 install EOF - fi elif [[ ${PACKAGE} = zeromq ]] ; then - if [[ $DO_DOWNLOAD == 1 ]] ; then - download ${ZEROMQ_URL} "${QP_ROOT}"/external/zeromq.tar.gz - fi - - if [[ $DO_INSTALL == 1 ]] ; then execute << EOF export CC=gcc export CXX=g++ cd "\${QP_ROOT}"/external - tar --gunzip --extract --file zeromq.tar.gz - rm zeromq.tar.gz + tar --gunzip --extract --file qp2-dependencies/zeromq-4.2.5.tar.gz cd zeromq-* ./configure --prefix="\$QP_ROOT" --without-libsodium --enable-libunwind=no - make + make -j 8 make install EOF - fi elif [[ ${PACKAGE} = f77zmq ]] ; then - if [[ $DO_DOWNLOAD == 1 ]] ; then - download ${F77ZMQ_URL} "${QP_ROOT}"/external/f77_zmq.tar.gz - fi - - if [[ $DO_INSTALL == 1 ]] ; then execute << EOF cd "\${QP_ROOT}"/external - tar --gunzip --extract --file f77_zmq.tar.gz - rm f77_zmq.tar.gz + tar --gunzip --extract --file qp2-dependencies/f77_zmq-4.2.5.tar.gz cd f77_zmq-* export ZMQ_H="\$QP_ROOT"/include/zmq.h make @@ -284,100 +230,61 @@ EOF cp libf77zmq.so "\${QP_ROOT}"/lib cp f77_zmq_free.h "\${QP_ROOT}"/include EOF - fi elif [[ ${PACKAGE} = ocaml ]] ; then - if [[ $DO_DOWNLOAD == 1 ]] ; then - download ${OCAML_URL} "${QP_ROOT}"/external/ocaml-bundle.sh - fi - - if [[ $DO_INSTALL == 1 ]] ; then + execute <