]> https://gitweb.dealii.org/ - candi.git/commitdiff
cmake: automatically choice between tarball/cmake or autotools buildchain
authorUwe Köcher <koecher@hsu-hamburg.de>
Wed, 23 May 2018 09:26:48 +0000 (11:26 +0200)
committerUwe Köcher <koecher@hsu-hamburg.de>
Wed, 23 May 2018 09:26:48 +0000 (11:26 +0200)
deal.II-toolchain/packages/cmake.package
deal.II-toolchain/packages/dealii-prepare.package
deal.II-toolchain/packages/dealii.package

index d2f35b8aa230bfa54e3195bae35a3aee36c97286..8ede1d048a51ded420d49bdd73809c4feccb2fd0 100644 (file)
@@ -1,11 +1,47 @@
 MAJOR=3.9
 MINOR=6
 VERSION=${MAJOR}.${MINOR}
-NAME=cmake-${VERSION}
+
+# We try to determine if we have a linux platform to use tarball install
+# instead of configure/make due to possible missing autotools on some
+# HPC clusters. We need to do this, because tarball install on MacOS or
+# other platforms is not maintainable by the candi authors.
+
+if [ -z "${PLATFORM_OSTYPE}" ]; then
+    cecho ${WARN} "WARNING: could not determine your Operating System Type (assuming linux)"
+    PLATFORM_OSTYPE=linux
+fi
+
+if [ ${PLATFORM_OSTYPE} == "linux" ]; then
+    # tarball install
+    NAME=cmake-${VERSION}-Linux-x86_64
+    PACKING=.tar.gz
+    CHECKSUM=3cd4a1e13d2f42f2ff5668b13d7fd23b
+    BUILDCHAIN=ignore
+
+else
+    # configure/make/install
+    NAME=cmake-${VERSION}
+    PACKING=.tar.gz
+    CHECKSUM=084b1c8b2efc1c1ba432dea37243c0ae
+    
+    if builtin command -v cmake > /dev/null; then
+        # configure/make with cmake (older or newer version already installed)    
+        BUILDCHAIN=cmake
+       else
+        # configure/make with autotools
+        BUILDCHAIN=autotools
+    fi
+fi
+
 SOURCE=https://cmake.org/files/v${MAJOR}/
-PACKING=.tar.gz
-CHECKSUM=084b1c8b2efc1c1ba432dea37243c0ae
-BUILDCHAIN=cmake
+
+if [ ${BUILDCHAIN} == "ignore" ]; then
+    package_specific_install () {
+        cp -rf ${UNPACK_PATH}/${EXTRACTSTO} ${INSTALL_PATH}
+        INSTALL_PATH=${INSTALL_PATH}/${EXTRACTSTO}
+    }
+fi
 
 package_specific_register () {
     export PATH=${INSTALL_PATH}/bin:${PATH}
index c79a3b056c580623d3b5ab26268a4d4d224be275..9dd2d452ba3d0601c18221b15d62d91b850bce9d 100644 (file)
@@ -29,7 +29,7 @@ fi
 # Check if we hit cmake-3.10+ and deal.II v8.5.1 configure error (MPI / FindMPI)
 # cf. https://github.com/dealii/dealii/issues/5510
 
-if [ ${DEAL_II_VERSION} = "v8.5.1" ]; then
+if [ ${DEAL_II_VERSION} == "v8.5.1" ]; then
     # check for cmake version 3.10 and above
     CMAKE_VER_MAJOR=$(cmake --version | perl -pe '($_)=/([0-9]+([.][0-9]+)+)/' | cut -d '.' -f1)
     CMAKE_VER_MINOR=$(cmake --version | perl -pe '($_)=/([0-9]+([.][0-9]+)+)/' | cut -d '.' -f2)
index bdac9eaa7a14791a56662caf7689d33a0f3486cc..1996c73d73167b722a14978bb8eada3ec253e5e0 100644 (file)
@@ -34,7 +34,7 @@ ${DEAL_CONFOPTS}"
 # Check if we hit cmake-3.10+ and deal.II v8.5.1 configure error (MPI / FindMPI)
 # cf. https://github.com/dealii/dealii/issues/5510
 
-if [ ${DEAL_II_VERSION} = "v8.5.1" ]; then
+if [ ${DEAL_II_VERSION} == "v8.5.1" ]; then
     # check for cmake version 3.10 and above
     CMAKE_VER_MAJOR=$(cmake --version | perl -pe '($_)=/([0-9]+([.][0-9]+)+)/' | cut -d '.' -f1)
     CMAKE_VER_MINOR=$(cmake --version | perl -pe '($_)=/([0-9]+([.][0-9]+)+)/' | cut -d '.' -f2)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.