#!/usr/bin/env bash
set -a
-# Copyright (C) 2013-2015 by Uwe Koecher, the candi authors #
-# AND by the DORSAL Authors, cf. the file AUTHORS for details #
+# Copyright (C) 2013-2017 by Uwe Koecher, Bruno Turcksin, Timo Heister, #
+# the candi authors AND by the DORSAL Authors, cf. AUTHORS file for details. #
# #
# This file is part of CANDI. #
# #
# Try to guess the name of the platform we're running on
if [ -f /usr/bin/cygwin1.dll ]; then
echo cygwin
-
+
elif [ -f /etc/fedora-release ]; then
local FEDORANAME=`gawk '{if (match($0,/\((.*)\)/,f)) print f[1]}' /etc/fedora-release`
case ${FEDORANAME} in
elif [ -f /etc/redhat-release ]; then
local RHELNAME=`gawk '{if (match($0,/\((.*)\)/,f)) print f[1]}' /etc/redhat-release`
case ${RHELNAME} in
- "Tikanga"*) echo rhel5;;
- "Santiago"*) echo rhel6;;
- "Maipo"*) echo rhel7;;
- "Core"*) echo centos7;;
+ "Tikanga"*) echo rhel5;;
+ "Santiago"*) echo rhel6;;
+ "Maipo"*) echo rhel7;;
+ "Core"*) echo centos7;;
esac
elif [ -x /usr/bin/sw_vers ]; then
local MACOSVER=$(sw_vers -productVersion)
case ${MACOSVER} in
- 10.11*) echo macosx;;
- 10.12*) echo sierra;;
+ 10.11*) echo elcapitan;;
+ 10.12*) echo sierra;;
esac
elif [ -x /usr/bin/lsb_release ]; then
# Try to guess the operating system type (ostype)
if [ -f /usr/bin/cygwin1.dll ]; then
echo cygwin
-
+
elif [ -f /etc/fedora-release ]; then
- echo linux
+ echo linux
elif [ -f /etc/redhat-release ]; then
echo linux
# Guess dynamic shared library file extension -> LDSUFFIX
if [ ${PLATFORM_OSTYPE} == "linux" ]; then
LDSUFFIX=so
-
+
elif [ ${PLATFORM_OSTYPE} == "macos" ]; then
LDSUFFIX=dylib
-
+
elif [ ${PLATFORM_OSTYPE} == "cygwin" ]; then
LDSUFFIX=dll
fi
INSTALL_PATH=${INSTALL_PATH}/${NAME}
-# check candi environment
-if [ -z "${PLATFORM_OSTYPE}" ]; then
- cecho ${BAD} "Error: (internal): variable PLATFORM_OSTYPE not set or empty"
- exit 1
-fi
-
package_specific_build() {
cp -rf ${UNPACK_PATH}/${EXTRACTSTO}/* .
export METIS_DIR=${INSTALL_PATH}
export PARMETIS_DIR=${INSTALL_PATH}
- if [ ${PLATFORM_OSTYPE} == macos ]; then
+ if [ ${PLATFORM_OSTYPE} == macos ]; then
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:${INSTALL_PATH}/lib
- fi
+ fi
}
package_specific_conf () {
" >> $CONFIG_FILE
if [ ${PLATFORM_OSTYPE} == macos ]; then
- echo "export DYLD_LIBRARY_PATH=\$DYLD_LIBRARY_PATH:${INSTALL_PATH}/lib
+ echo "export DYLD_LIBRARY_PATH=\$DYLD_LIBRARY_PATH:${INSTALL_PATH}/lib
" >> $CONFIG_FILE
- fi
+ fi
}
BUILDCHAIN=cmake
INSTALL_PATH=${INSTALL_PATH}/${NAME}
-# check candi environment
-if [ -z "${LDSUFFIX}" ]; then
- cecho ${BAD} "Error: (internal): variable LDSUFFIX not set or empty"
- exit 1
-fi
-
-if [ -z "${PLATFORM_OSTYPE}" ]; then
- cecho ${BAD} "Error: (internal): variable PLATFORM_OSTYPE not set or empty"
- exit 1
-fi
-
-# set up
CONFOPTS=" \
$CONFOPTS \
-D TPL_PARMETIS_INCLUDE_DIRS:PATH=${PARMETIS_DIR}/include \
package_specific_register () {
export SUPERLU_DIR=${INSTALL_PATH}
- if [ ${PLATFORM_OSTYPE} == macos ]; then
+ if [ ${PLATFORM_OSTYPE} == macos ]; then
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:${INSTALL_PATH}/lib
- fi
+ fi
}
package_specific_conf () {
" >> $CONFIG_FILE
if [ ${PLATFORM_OSTYPE} == macos ]; then
- echo "export DYLD_LIBRARY_PATH=\$DYLD_LIBRARY_PATH:${INSTALL_PATH}/lib
+ echo "export DYLD_LIBRARY_PATH=\$DYLD_LIBRARY_PATH:${INSTALL_PATH}/lib
" >> $CONFIG_FILE
- fi
+ fi
}
# Add ParMETIS, if present
if [ ! -z "${PARMETIS_DIR}" ]; then
cecho ${INFO} "trilinos: configuration with ParMETIS"
-
- if [ -z "${LDSUFFIX}" ]; then
- cecho ${BAD} "Error: (internal): variable LDSUFFIX not set or empty"
- exit 1
- fi
-
+
+ # NOTE: if parmetis v4.0.3 is not found, but installed, add
+ # -D HAVE_PARMETIS_VERSION_4_0_3=ON"
+
CONFOPTS="\
${CONFOPTS} \
-D TPL_ENABLE_ParMETIS:BOOL=ON \
-D TPL_ParMETIS_LIBRARIES:FILEPATH=${PARMETIS_DIR}/lib/libparmetis.${LDSUFFIX} \
-D TPL_ParMETIS_INCLUDE_DIRS:PATH=${PARMETIS_DIR}/include"
-###### TODO? -D HAVE_PARMETIS_VERSION_4_0_3=ON"
fi
# Add SuperLU_dist, if present
if [ ! -z "${SUPERLU_DIR}" ]; then
cecho ${INFO} "trilinos: configuration with SuperLU_dist"
-
- if [ -z "${LDSUFFIX}" ]; then
- cecho ${BAD} "Error: (internal): variable LDSUFFIX not set or empty"
- exit 1
- fi
-
+
# we need to disable complex support in teuchos, see
- # https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html
-
+ # https://trilinos.org/pipermail/trilinos-users/2015-March/004802.html
+
CONFOPTS="\
${CONFOPTS} \
-D TPL_ENABLE_SuperLUDist:BOOL=ON \