10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-22 12:23:48 +01:00

Installation of zlib

This commit is contained in:
Anthony Scemama 2015-01-12 19:14:00 +01:00
parent 0bd44eb5cc
commit a9fb9ddf31
7 changed files with 41 additions and 5 deletions

View File

@ -31,6 +31,12 @@ EMSL_Basis:
@sleep 1
QPACKAGE_ROOT=$$PWD ./scripts/install_emsl.sh | tee install_emsl.log
zlib:
$(info $(BLUE)===== Fetching Zlib from the web ===== $(BLACK))
@sleep 1
QPACKAGE_ROOT=$$PWD ./scripts/install_zlib.sh | tee install_zlib.log
bin/irpf90:
$(info $(BLUE)===== Fetching IRPF90 from the web ===== $(BLACK))
@sleep 1
@ -61,7 +67,7 @@ bin/m4:
QPACKAGE_ROOT=$$PWD ./scripts/install_m4.sh | tee install_m4.log
ocaml: curl m4 emsl
ocaml: curl m4 emsl zlib
- rm -f -- ocaml/Qptypes.ml
$(MAKE) ocaml/Qptypes.ml

0
include/.empty Normal file
View File

0
lib/.empty Normal file
View File

View File

@ -1,7 +1,7 @@
#!/bin/bash
#
# Installs curl for ocaml
# Thu Oct 23 22:02:08 CEST 2014
# Mon Jan 12 18:52:48 CET 2015
CURL="curl-7.30.0.ermine"
CURL_URL="http://qmcchem.ups-tlse.fr/files/scemama/${CURL}.tar.bz2"

View File

@ -33,7 +33,6 @@ then
fi
scripts/fetch_from_web.py "https://raw.github.com/hcarty/ocamlbrew/master/ocamlbrew-install" ocamlbrew-install.sh
cat < ocamlbrew-install.sh | env OCAMLBREW_FLAGS="-r" bash | tee ocamlbrew_install.log
grep "source " ocamlbrew_install.log | grep "etc/ocamlbrew.bashrc" >> quantum_package.rc
source quantum_package.rc
echo Y | opam install ${PACKAGES}
fi

28
scripts/install_zlib.sh Executable file
View File

@ -0,0 +1,28 @@
#!/bin/bash
#
# Installs zlib for ocaml cryptokit
# Mon Jan 12 18:52:48 CET 2015
ZLIB="zlib-1.2.8"
ZLIB_URL="http://zlib.net/${ZLIB}.tar.gz"
cat > /tmp/main.c << EOF
int main () {}
EOF
gcc /tmp/main.c -lz
if [[ $? -eq 0 ]]
then
rm /tmp/main.c
exit 0
fi
rm /tmp/main.c
cd ${QPACKAGE_ROOT}
${QPACKAGE_ROOT}/scripts/fetch_from_web.py ${ZLIB_URL} ZLIB.tar.gz
tar -zxf ZLIB.tar.gz && rm ZLIB.tar.gz ||exit 1
cd ${ZLIB} || exit 1
./configure && make
make install prefix=$QPACKAGE_ROOT
cd ${QPACKAGE_ROOT}
rm -rf -- ${ZLIB}

View File

@ -31,13 +31,16 @@ cat << EOF > quantum_package.rc
export IRPF90=${IRPF90}
export OCAMLBREW_BASE=${OCAMLBREW_BASE}
export QPACKAGE_ROOT=${QPACKAGE_ROOT}
export LD_LIBRARY_PATH="\${QPACKAGE_ROOT}/lib":\${LD_LIBRARY_PATH}
export LIBRARY_PATH="\${QPACKAGE_ROOT}/lib":\${LIBRARY_PATH}
export C_INCLUDE_PATH=\${QPACKAGE_ROOT}/include:\${C_INCLUDE_PATH}
export PYTHONPATH=\${PYTHONPATH}:\${QPACKAGE_ROOT}/scripts
export PATH=\${PATH}:\${QPACKAGE_ROOT}/scripts
export PATH=\${PATH}:\${QPACKAGE_ROOT}/bin
export PATH=\${PATH}:\${QPACKAGE_ROOT}/ocaml
export QPACKAGE_CACHE_URL="http://qmcchem.ups-tlse.fr/files/scemama/quantum_package/cache"
source "\${QPACKAGE_ROOT}/bin/irpman" > /dev/null
source "\${OCAMLBREW_BASE}"/ocaml-4*/etc/ocamlbrew.bashrc
source "\${QPACKAGE_ROOT}/bin/irpman" &> /dev/null
source "\${OCAMLBREW_BASE}"/ocaml-4*/etc/ocamlbrew.bashrc &> /dev/null
EOF
source quantum_package.rc