From 0c2e71480db27449dfa93093301b8334838dbefe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20K=C3=B6cher?= Date: Mon, 30 Nov 2015 20:02:57 +0100 Subject: [PATCH] candi: adds creation of individual package configuration files --- candi.sh | 13 +++++++++---- deal.II-toolchain/packages/boost.package | 12 ++++++++++++ deal.II-toolchain/packages/bzip2.package | 10 ++++++++++ deal.II-toolchain/packages/cmake.package | 9 +++++++++ deal.II-toolchain/packages/dealii.package | 19 ++++++++++++++----- deal.II-toolchain/packages/hdf5.package | 9 +++++++++ .../packages/opencascade.package | 9 +++++++++ deal.II-toolchain/packages/p4est.package | 9 +++++++++ deal.II-toolchain/packages/parmetis.package | 10 ++++++++++ deal.II-toolchain/packages/petsc.package | 9 +++++++++ deal.II-toolchain/packages/slepc.package | 9 +++++++++ .../packages/superlu_dist.package | 9 +++++++++ deal.II-toolchain/packages/trilinos.package | 9 +++++++++ deal.II-toolchain/packages/zlib.package | 11 +++++++++++ project-deal.II-toolchain.cfg | 3 +++ 15 files changed, 141 insertions(+), 9 deletions(-) diff --git a/candi.sh b/candi.sh index ef0ebd6..5c0396c 100755 --- a/candi.sh +++ b/candi.sh @@ -585,6 +585,7 @@ default DOWNLOAD_PATH=${PREFIX_PATH}/src default UNPACK_PATH=${PREFIX_PATH}/${PROJECT}-unpack default BUILD_PATH=${PREFIX_PATH}/${PROJECT}-build default INSTALL_PATH=${PREFIX_PATH}/${PROJECT} +default CONFIGURATION_PATH=${PREFIX_PATH}/${PROJECT}/share/configuration default CLEAN_BUILD=false default STABLE_BUILD=true @@ -710,10 +711,11 @@ cecho ${GOOD} "Platform: ${PLATFORM}" echo echo "-------------------------------------------------------------------------------" -cecho ${INFO} "Downloading files to: $(prettify_dir ${DOWNLOAD_PATH})" -cecho ${INFO} "Unpacking files to: $(prettify_dir ${UNPACK_PATH})" -cecho ${INFO} "Building packages in: $(prettify_dir ${BUILD_PATH})" -cecho ${GOOD} "Installing packages in: $(prettify_dir ${INSTALL_PATH})" +cecho ${INFO} "Downloading files to: $(prettify_dir ${DOWNLOAD_PATH})" +cecho ${INFO} "Unpacking files to: $(prettify_dir ${UNPACK_PATH})" +cecho ${INFO} "Building packages in: $(prettify_dir ${BUILD_PATH})" +cecho ${GOOD} "Installing packages in: $(prettify_dir ${INSTALL_PATH})" +cecho ${GOOD} "Package configuration in: $(prettify_dir ${CONFIGURATION_PATH})" echo echo "-------------------------------------------------------------------------------" @@ -845,9 +847,11 @@ mkdir -p ${DOWNLOAD_PATH} mkdir -p ${UNPACK_PATH} mkdir -p ${BUILD_PATH} mkdir -p ${INSTALL_PATH} +mkdir -p ${CONFIGURATION_PATH} ORIG_INSTALL_PATH=${INSTALL_PATH} +ORIG_CONFIGURATION_PATH=${CONFIGURATION_PATH} ORIG_PROCS=${PROCS} guess_architecture @@ -899,6 +903,7 @@ for PACKAGE in ${PACKAGES[@]}; do TARGETS=('' install) PROCS=${ORIG_PROCS} INSTALL_PATH=${ORIG_INSTALL_PATH} + CONFIGURATION_PATH=${ORIG_CONFIGURATION_PATH} # Reset package-specific functions package_specific_setup () { true; } diff --git a/deal.II-toolchain/packages/boost.package b/deal.II-toolchain/packages/boost.package index c24ed3c..93001e8 100644 --- a/deal.II-toolchain/packages/boost.package +++ b/deal.II-toolchain/packages/boost.package @@ -23,3 +23,15 @@ package_specific_register () { export BOOST_LIBRARYDIR=${INSTALL_PATH}/lib export BOOST_USE_MULTITHREADED=OFF } + +package_specific_conf () { + # Generate configuration file + CONFIG_FILE=${CONFIGURATION_PATH}/${NAME} + rm -f $CONFIG_FILE + echo " +export BOOST_ROOT=${INSTALL_PATH} +export BOOST_INCLUDEDIR=${INSTALL_PATH}/include +export BOOST_LIBRARYDIR=${INSTALL_PATH}/lib +export BOOST_USE_MULTITHREADED=OFF +" >> $CONFIG_FILE +} diff --git a/deal.II-toolchain/packages/bzip2.package b/deal.II-toolchain/packages/bzip2.package index c08c919..38c1186 100644 --- a/deal.II-toolchain/packages/bzip2.package +++ b/deal.II-toolchain/packages/bzip2.package @@ -21,3 +21,13 @@ package_specific_register () { export BZIP2_INCLUDE=${INSTALL_PATH}/include export BZIP2_LIBPATH=${INSTALL_PATH}/lib } + +package_specific_conf () { + # Generate configuration file + CONFIG_FILE=${CONFIGURATION_PATH}/${NAME} + rm -f $CONFIG_FILE + echo " +export BZIP2_INCLUDE=${INSTALL_PATH}/include +export BZIP2_LIBPATH=${INSTALL_PATH}/lib +" >> $CONFIG_FILE +} diff --git a/deal.II-toolchain/packages/cmake.package b/deal.II-toolchain/packages/cmake.package index 63a967d..7d73c1d 100644 --- a/deal.II-toolchain/packages/cmake.package +++ b/deal.II-toolchain/packages/cmake.package @@ -12,3 +12,12 @@ package_specific_install () { package_specific_register () { export PATH=${INSTALL_PATH}/${EXTRACTSTO}/bin:${PATH} } + +package_specific_conf () { + # Generate configuration file + CONFIG_FILE=${CONFIGURATION_PATH}/${NAME} + rm -f $CONFIG_FILE + echo " +export PATH=${INSTALL_PATH}/${EXTRACTSTO}/bin:\${PATH} +" >> $CONFIG_FILE +} diff --git a/deal.II-toolchain/packages/dealii.package b/deal.II-toolchain/packages/dealii.package index 444d75d..bc21b2f 100644 --- a/deal.II-toolchain/packages/dealii.package +++ b/deal.II-toolchain/packages/dealii.package @@ -177,9 +177,10 @@ if [ ! -z "${OPENCASCADE_DIR}" ]; then fi ################################################################################ -################################################################################ -# ********************************************************************************** + package_specific_conf() { + ############################################################################ + # Generate modulefile # Prepare modulefile path and config file name if [ -z "${COMPILER}" ]; then @@ -192,9 +193,7 @@ if [ -z "${MODULEFILE_PATH}" ]; then MODULEFILE_PATH=${INSTALL_PATH}/share/modulefiles${MODULEFILE_PATH} fi -if [ -z "${CONFIG_FILE}" ]; then - CONFIG_FILE=${MODULEFILE_PATH}/${COMPILER} -fi +CONFIG_FILE=${MODULEFILE_PATH}/${COMPILER} CURRENT_MODULES=$(echo ${LOADEDMODULES} | sed 's/:/\ /g') @@ -224,4 +223,14 @@ setenv DEAL_II_DIR ${INSTALL_PATH} echo export DEAL_II_DIR=${INSTALL_PATH} + + ############################################################################ + # Generate configuration file + CONFIG_FILE=${CONFIGURATION_PATH}/${NAME} + rm -f $CONFIG_FILE + echo " +export DEAL_II_DIR=${INSTALL_PATH} +" >> $CONFIG_FILE } + + diff --git a/deal.II-toolchain/packages/hdf5.package b/deal.II-toolchain/packages/hdf5.package index 1be6113..772c550 100644 --- a/deal.II-toolchain/packages/hdf5.package +++ b/deal.II-toolchain/packages/hdf5.package @@ -12,3 +12,12 @@ INSTALL_PATH=${INSTALL_PATH}/${NAME} package_specific_register () { export HDF5_DIR=${INSTALL_PATH} } + +package_specific_conf () { + # Generate configuration file + CONFIG_FILE=${CONFIGURATION_PATH}/${NAME} + rm -f $CONFIG_FILE + echo " +export HDF5_DIR=${INSTALL_PATH} +" >> $CONFIG_FILE +} diff --git a/deal.II-toolchain/packages/opencascade.package b/deal.II-toolchain/packages/opencascade.package index 3a56499..52fe279 100644 --- a/deal.II-toolchain/packages/opencascade.package +++ b/deal.II-toolchain/packages/opencascade.package @@ -37,3 +37,12 @@ CONFOPTS="-D OCE_INSTALL_PREFIX=${INSTALL_PATH} \ package_specific_register () { export OPENCASCADE_DIR=${INSTALL_PATH} } + +package_specific_conf () { + # Generate configuration file + CONFIG_FILE=${CONFIGURATION_PATH}/${NAME} + rm -f $CONFIG_FILE + echo " +export OPENCASCADE_DIR=${INSTALL_PATH} +" >> $CONFIG_FILE +} diff --git a/deal.II-toolchain/packages/p4est.package b/deal.II-toolchain/packages/p4est.package index 8782bfb..3af2a52 100644 --- a/deal.II-toolchain/packages/p4est.package +++ b/deal.II-toolchain/packages/p4est.package @@ -91,3 +91,12 @@ package_specific_setup () { package_specific_register () { export P4EST_DIR=${INSTALL_PATH} } + +package_specific_conf () { + # Generate configuration file + CONFIG_FILE=${CONFIGURATION_PATH}/${NAME} + rm -f $CONFIG_FILE + echo " +export P4EST_DIR=${INSTALL_PATH} +" >> $CONFIG_FILE +} diff --git a/deal.II-toolchain/packages/parmetis.package b/deal.II-toolchain/packages/parmetis.package index 1cff76b..833991b 100644 --- a/deal.II-toolchain/packages/parmetis.package +++ b/deal.II-toolchain/packages/parmetis.package @@ -39,3 +39,13 @@ package_specific_register () { export METIS_DIR=${INSTALL_PATH} export PARMETIS_DIR=${INSTALL_PATH} } + +package_specific_conf () { + # Generate configuration file + CONFIG_FILE=${CONFIGURATION_PATH}/${NAME} + rm -f $CONFIG_FILE + echo " +export METIS_DIR=${INSTALL_PATH} +export PARMETIS_DIR=${INSTALL_PATH} +" >> $CONFIG_FILE +} diff --git a/deal.II-toolchain/packages/petsc.package b/deal.II-toolchain/packages/petsc.package index 2054b1c..27baac2 100644 --- a/deal.II-toolchain/packages/petsc.package +++ b/deal.II-toolchain/packages/petsc.package @@ -62,3 +62,12 @@ package_specific_setup () { package_specific_register () { export PETSC_DIR=${INSTALL_PATH} } + +package_specific_conf () { + # Generate configuration file + CONFIG_FILE=${CONFIGURATION_PATH}/${NAME} + rm -f $CONFIG_FILE + echo " +export PETSC_DIR=${INSTALL_PATH} +" >> $CONFIG_FILE +} diff --git a/deal.II-toolchain/packages/slepc.package b/deal.II-toolchain/packages/slepc.package index f469b65..d503a6f 100644 --- a/deal.II-toolchain/packages/slepc.package +++ b/deal.II-toolchain/packages/slepc.package @@ -26,3 +26,12 @@ package_specific_setup () { package_specific_register () { export SLEPC_DIR=${INSTALL_PATH} } + +package_specific_conf () { + # Generate configuration file + CONFIG_FILE=${CONFIGURATION_PATH}/${NAME} + rm -f $CONFIG_FILE + echo " +export SLEPC_DIR=${INSTALL_PATH} +" >> $CONFIG_FILE +} diff --git a/deal.II-toolchain/packages/superlu_dist.package b/deal.II-toolchain/packages/superlu_dist.package index 017e7d6..68834a7 100644 --- a/deal.II-toolchain/packages/superlu_dist.package +++ b/deal.II-toolchain/packages/superlu_dist.package @@ -87,3 +87,12 @@ CDEFS = -DAdd_ package_specific_register () { export SUPERLU_DIR=${INSTALL_PATH} } + +package_specific_conf () { + # Generate configuration file + CONFIG_FILE=${CONFIGURATION_PATH}/${NAME} + rm -f $CONFIG_FILE + echo " +export SUPERLU_DIR=${INSTALL_PATH} +" >> $CONFIG_FILE +} diff --git a/deal.II-toolchain/packages/trilinos.package b/deal.II-toolchain/packages/trilinos.package index 701e3e7..85996dd 100644 --- a/deal.II-toolchain/packages/trilinos.package +++ b/deal.II-toolchain/packages/trilinos.package @@ -141,3 +141,12 @@ CONFOPTS="${TRILINOS_CONFOPTS} \ package_specific_register () { export TRILINOS_DIR=${INSTALL_PATH} } + +package_specific_conf () { + # Generate configuration file + CONFIG_FILE=${CONFIGURATION_PATH}/${NAME} + rm -f $CONFIG_FILE + echo " +export TRILINOS_DIR=${INSTALL_PATH} +" >> $CONFIG_FILE +} diff --git a/deal.II-toolchain/packages/zlib.package b/deal.II-toolchain/packages/zlib.package index dd3544f..5436c3a 100644 --- a/deal.II-toolchain/packages/zlib.package +++ b/deal.II-toolchain/packages/zlib.package @@ -21,3 +21,14 @@ package_specific_register () { export ZLIB_INCLUDE=${INSTALL_PATH}/include export ZLIB_LIBPATH=${INSTALL_PATH}/lib } + +package_specific_conf () { + # Generate configuration file + CONFIG_FILE=${CONFIGURATION_PATH}/${NAME} + rm -f $CONFIG_FILE + echo " +export ZLIB_DIR=${INSTALL_PATH}/ +export ZLIB_INCLUDE=${INSTALL_PATH}/include +export ZLIB_LIBPATH=${INSTALL_PATH}/lib +" >> $CONFIG_FILE +} diff --git a/project-deal.II-toolchain.cfg b/project-deal.II-toolchain.cfg index 72f611d..4c4f1a0 100644 --- a/project-deal.II-toolchain.cfg +++ b/project-deal.II-toolchain.cfg @@ -18,6 +18,9 @@ CLEAN_BUILD=false # Where do you want the compiled software installed? INSTALL_PATH=${PREFIX_PATH}/${PROJECT} +# Where do you want the configuration files placed? +CONFIGURATION_PATH=${PREFIX_PATH}/${PROJECT}/share/configuration + ######################################################################### # Set up mirror server url(s), to speed up downloads, e.g. # MIRROR="${MIRROR} http://server1.org/package_mirror_dir/" -- 2.39.5