mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-12 22:53:29 +01:00
Simplified ocaml installation
This commit is contained in:
parent
a88d7257fc
commit
11f2bd400a
52
configure
vendored
52
configure
vendored
@ -82,7 +82,6 @@ function execute () {
|
||||
}
|
||||
|
||||
PACKAGES=""
|
||||
OCAML_PACKAGES="ocamlbuild cryptokit zmq sexplib ppx_sexp_conv ppx_deriving getopt"
|
||||
|
||||
while true ; do
|
||||
case "$1" in
|
||||
@ -299,55 +298,8 @@ EOF
|
||||
|
||||
elif [[ ${PACKAGE} = ocaml ]] ; then
|
||||
|
||||
download ${OCAML_URL} "${QP_ROOT}"/external/opam_installer.sh
|
||||
|
||||
if [[ -n ${TRAVIS} ]] ; then
|
||||
# Special commands for Travis CI
|
||||
chmod +x "${QP_ROOT}"/external/opam_installer.sh
|
||||
rm --force ${QP_ROOT}/bin/opam
|
||||
if [[ -n ${NO_CACHE} ]] ; then
|
||||
rm -rf ${HOME}/.opam
|
||||
fi
|
||||
export OPAMROOT=${HOME}/.opam
|
||||
cat << EOF | bash ${QP_ROOT}/external/opam_installer.sh --no-backup
|
||||
${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.11.1
|
||||
opam init --verbose --yes --compiler=4.11.1 --disable-sandboxing
|
||||
|
||||
eval $(opam env)
|
||||
opam install -y ${OCAML_PACKAGES} || exit 1
|
||||
|
||||
else
|
||||
# Conventional commands
|
||||
execute << EOF
|
||||
chmod +x "${QP_ROOT}"/external/opam_installer.sh
|
||||
"${QP_ROOT}"/external/opam_installer.sh --no-backup
|
||||
EOF
|
||||
execute << EOF
|
||||
rm --force ${QP_ROOT}/bin/opam
|
||||
export OPAMROOT=${OPAMROOT:-${QP_ROOT}/external/opam}
|
||||
echo ${QP_ROOT}/bin \
|
||||
| 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.11.1 || exit 1
|
||||
|
||||
opam init --verbose --yes --compiler=4.11.1 --disable-sandboxing
|
||||
eval $(opam env)
|
||||
execute << EOF
|
||||
opam install -y \${OCAML_PACKAGES} || exit 1
|
||||
EOF
|
||||
fi
|
||||
|
||||
cd "${QP_ROOT}"/external/
|
||||
./ocaml-bundle.sh
|
||||
|
||||
elif [[ ${PACKAGE} = bse ]] ; then
|
||||
|
||||
|
@ -5,6 +5,8 @@ then
|
||||
|
||||
# Comment these lines if you have a system-wide OCaml installation
|
||||
export OPAMROOT=${QP_ROOT}/external/opam
|
||||
export PATH="${QP_ROOT}/external/ocaml-bundle/bootstrap/bin:$PATH"
|
||||
eval $(opam env --root "${QP_ROOT}/external/ocaml-bundle/opam" --set-root)
|
||||
|
||||
fi
|
||||
source ${OPAMROOT}/opam-init/init.sh > /dev/null 2> /dev/null || true
|
||||
|
BIN
external/ocaml-bundle.sh
vendored
Executable file
BIN
external/ocaml-bundle.sh
vendored
Executable file
Binary file not shown.
Loading…
Reference in New Issue
Block a user