10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-07-03 09:56:04 +02:00

Separated opam packages and ocaml in configure

This commit is contained in:
Anthony Scemama 2020-02-20 21:05:52 +01:00
parent a05ee8f97a
commit e675192775

20
configure vendored
View File

@ -207,7 +207,7 @@ if [[ "${PACKAGES}.x" != ".x" ]] ; then
fi
if [[ ${PACKAGES} = all ]] ; then
PACKAGES="zlib ninja irpf90 zeromq f77zmq gmp libcap bwrap ocaml ezfio docopt resultsFile bats"
PACKAGES="zlib ninja irpf90 zeromq f77zmq gmp libcap bwrap opam opam_packages ezfio docopt resultsFile bats"
fi
@ -302,7 +302,7 @@ EOF
EOF
elif [[ ${PACKAGE} = ocaml ]] ; then
elif [[ ${PACKAGE} = ocaml || ${PACKAGE} = opam ]] ; then
download ${OCAML_URL} "${QP_ROOT}"/external/opam_installer.sh
@ -321,14 +321,9 @@ ${QP_ROOT}/bin
EOF
rm ${QP_ROOT}/external/opam_installer.sh
# source ${OPAMROOT}/opam-init/init.sh > /dev/null 2> /dev/null || true
#
# opam switch create ocaml-base-compiler.4.07.1
opam init --verbose --yes --compiler=4.07.1 --disable-sandboxing
eval $(opam env)
opam install -y ${OCAML_PACKAGES} || exit 1
else
# Conventional commands
@ -343,17 +338,20 @@ EOF
| sh ${QP_ROOT}/external/opam_installer.sh
EOF
rm ${QP_ROOT}/external/opam_installer.sh
# source ${OPAMROOT}/opam-init/init.sh > /dev/null 2> /dev/null || true
# opam switch create ocaml-base-compiler.4.07.1 || exit 1
opam init --verbose --yes --compiler=4.07.1 --disable-sandboxing
eval $(opam env)
execute << EOF
opam install -y \${OCAML_PACKAGES} || exit 1
EOF
fi
elif [[ ${PACKAGE} = ocaml || ${PACKAGE} = opam_packages ]] ; then
execute << EOF
opam install -y \${OCAML_PACKAGES} || exit 1
EOF
elif [[ ${PACKAGE} = bse ]] ; then
download ${BSE_URL} "${QP_ROOT}"/external/bse.tar.gz