root/gs2-extensions/xpdf-tools/trunk/src/packages/CASCADE-MAKE/CMAKE.sh

Revision 32243, 2.2 KB (checked in by sjm84, 19 months ago)

Moving from CMake 3.11.4 to 3.9.6 because of an incompatibility with the installed version of g++ and the newer version of CMake on both Linux LSB and the Mac Mountain Lion machine. CMake 3.11.4 requires a newer verrsion of g++.

  • Property svn:executable set to *
Line 
1#!/bin/bash
2
3package=cmake
4#version=-3.11.4
5version=-3.9.6
6
7progname=$0
8
9source ../cascade-make/lib/cascade-lib.bash GEXT_XPDFTOOLS ../.. $*
10
11prefix=$GEXTXPDFTOOLS_INSTALLED
12
13opt_run_untar $force_untar $auto_untar $package $version
14
15# For configuring cmake, run ./bootstrap <args> instead of ./configure <args>
16# See https://cmake.org/install/
17#opt_run_configure $force_config $auto_config $package $version $prefix
18if [ $force_config = "1" ] ; then
19    echo "[pushd $package$version]"
20    ( cd $package$version ; \
21    echo $CROSSCONFIGURE_VARS ./bootstrap --prefix="$prefix" $CROSSCONFIGURE_ARGS $@ ;
22    eval $CROSSCONFIGURE_VARS ./bootstrap --prefix="$prefix" $CROSSCONFIGURE_ARGS $@ )
23    if [ $? != 0 ] ; then
24        echo "      Error encountered running *bootstrap* stage of $progname"
25        exit 1
26    fi
27    echo "[popd]"
28else
29    if [ $auto_config = "1" ] ; then
30    echo "Found top-level for ${progname%.*} => no need to run ./bootstrap"
31    fi
32fi
33
34# Check that CMake products weren't just moved out of the distribution area,
35# before recompiling all of CMake
36if [[ ! -e "$GEXTXPDFTOOLS_INSTALLED/bin/cmake" && -e "$GEXT_XPDFTOOLS/devel/$GSDLOS/bin/cmake" ]]; then
37    echo "**************************************"
38    echo "Moving intermediary CMake products back for development"
39    $GEXT_XPDFTOOLS/move-cmake.sh back
40    echo "**************************************"
41fi
42
43# Only compile if necessary - we don't edit these source files:
44# Only compile up OUR cmake, and only if we haven't already got OUR cmake.
45# But don't use any system cmake: xpdf-tools is dependent on cmake version (>= 2.8.8)
46if [[ -x "$GEXTXPDFTOOLS_INSTALLED/bin/cmake" ]]; then
47  echo "found cmake in $GEXTXPDFTOOLS_INSTALLED/bin"
48  _CMAKE="$GEXTXPDFTOOLS_INSTALLED/bin/cmake"
49fi
50
51if [[ "$_CMAKE" ]]; then
52  _VERSION=$("$_CMAKE" --version 2>&1 | sed 's/.*cmake version \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/;1q')
53  echo "cmake version $_VERSION"
54fi
55
56if [[ ! "$_CMAKE" ]]; then
57  opt_run_make $compile   $package $version
58  opt_run_make $install   $package $version "install"
59else
60  echo "$package$version already available => no need to recompile"
61fi
62
63opt_run_make $clean     $package $version "clean"
64opt_run_make $distclean $package $version "distclean"
65
66opt_run_tarclean $tarclean $package $version
Note: See TracBrowser for help on using the browser.