Improved irpf90 installation

This commit is contained in:
Anthony Scemama 2019-01-13 14:22:10 +01:00
parent b83ab276ad
commit 245d51d118
4 changed files with 31 additions and 22 deletions

10
configure vendored
View File

@ -149,6 +149,7 @@ for PACKAGE in ${PACKAGES} ; do
elif [[ ${PACKAGE} = irpf90 ]] ; then
# When changing version of irpf90, don't forget to update etc/irpf90.rc
download \
"https://gitlab.com/scemama/irpf90/-/archive/v1.7.4/irpf90-v1.7.4.tar.gz" \
"${QP_ROOT}"/external/irpf90.tar.gz
@ -158,15 +159,6 @@ for PACKAGE in ${PACKAGES} ; do
rm irpf90.tar.gz
cd irpf90-*
make
for i in irpf90 irpman irpf90_indent
do
cat << EOF > "${QP_ROOT}"/bin/$i
#!/bin/sh
exec $PWD/bin/$i \$@
EOF
chmod +x "${QP_ROOT}"/bin/$i
done
)

View File

@ -2,11 +2,15 @@
export QP_EZFIO=${QP_ROOT}/external/ezfio
if [[ -f ${QP_EZFIO}/Bash/ezfio.sh ]]; then
if [[ "$(ps -p $$ -ocomm=)" == "zsh" ]] ; then
autoload bashcompinit
bashcompinit
fi
source ${QP_EZFIO}/Bash/ezfio.sh
fi
function source_if_exists() {
if [[ -f $1 ]]; then
if [[ "$(ps -p $$ -ocomm=)" == "zsh" ]] ; then
autoload bashcompinit
bashcompinit
fi
source $1
fi
}
source_if_exists "${QP_EZFIO}/Bash/ezfio.sh"

View File

@ -1,9 +1,21 @@
# Configuration of IRPF90 package
export IRPF90=${QP_ROOT}/bin/irpf90
# Set the path of IRPF90 here:
export IRPF90_PATH=${QP_ROOT}/external/irpf90-v1.7.4
export PATH=${PATH}:${IRPF90_PATH}/bin
# Load irpman shell completion
irpman=$(tail -1 "${QP_ROOT}/bin/irpman" | cut --delimiter " " --field=2)
source $(dirname ${irpman})/../irpman-completions.bash
export IRPF90=${IRPF90_PATH}/bin/irpf90
function source_if_exists() {
if [[ -f $1 ]]; then
if [[ "$(ps -p $$ -ocomm=)" == "zsh" ]] ; then
autoload bashcompinit
bashcompinit
fi
source $1
fi
}
source_if_exists "${IRPF90_PATH}/irpman-completions.bash"

View File

@ -173,8 +173,9 @@ cp --recursive -- ${QP_ROOT}/external/ezfio/Bash ${QPACKAGE_STATIC}/external/e
echo "Creating quantum_package.rc"
# ---------------------------
cp ${QP_ROOT}/quantum_package.rc ${QP_ROOT}/etc/* ${QPACKAGE_STATIC}/
echo 'export QP_ROOT="$( cd $(dirname \${BASH_SOURCE}) ; pwd -P )"' > ${QPACKAGE_STATIC}/etc/00.qp_root
cp ${QP_ROOT}/quantum_package.rc ${QPACKAGE_STATIC}/
cp ${QP_ROOT}/etc/* ${QPACKAGE_STATIC}/etc/
echo 'export QP_ROOT="$( cd $(dirname \${BASH_SOURCE}) ; pwd -P )"' > ${QPACKAGE_STATIC}/etc/00.qp_root.rc