#!/bin/bash package=cmake version=-3.11.4 progname=$0 source ../cascade-make/lib/cascade-lib.bash GEXT_XPDFTOOLS ../.. $* prefix=$GEXTXPDFTOOLS_INSTALLED opt_run_untar $force_untar $auto_untar $package $version # For configuring cmake, run ./bootstrap instead of ./configure # See https://cmake.org/install/ #opt_run_configure $force_config $auto_config $package $version $prefix if [ $force_config = "1" ] ; then echo "[pushd $package$version]" ( cd $package$version ; \ echo $CROSSCONFIGURE_VARS ./bootstrap --prefix="$prefix" $CROSSCONFIGURE_ARGS $@ ; eval $CROSSCONFIGURE_VARS ./bootstrap --prefix="$prefix" $CROSSCONFIGURE_ARGS $@ ) if [ $? != 0 ] ; then echo " Error encountered running *bootstrap* stage of $progname" exit 1 fi echo "[popd]" else if [ $auto_config = "1" ] ; then echo "Found top-level for ${progname%.*} => no need to run ./bootstrap" fi fi # Only compile if necessary - we don't edit these source files. #if type -p cmake; then # echo "found cmake in PATH" # _CMAKE=cmake #elif [[ -x "$GEXTXPDFTOOLS_INSTALLED/linux/bin/cmake" ]]; then # NO. Rather, only compile up OUR cmake if we haven't already got OUR cmake # But don't use any system cmake: xpdf-tools is dependent on cmake version (>= 2.8.8) if [[ -x "$GEXTXPDFTOOLS_INSTALLED/linux/bin/cmake" ]]; then echo "found cmake in $GEXTXPDFTOOLS_INSTALLED/linux/bin" _CMAKE="$GEXTXPDFTOOLS_INSTALLED/linux/bin/cmake" fi if [[ "$_CMAKE" ]]; then _VERSION=$("$_CMAKE" --version 2>&1 | sed 's/.*cmake version \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/;1q') echo "cmake version $_VERSION" fi if [[ ! "$_CMAKE" ]]; then opt_run_make $compile $package $version opt_run_make $install $package $version "install" else echo "$package$version already available => no need to recompile" fi opt_run_make $clean $package $version "clean" opt_run_make $distclean $package $version "distclean" opt_run_tarclean $tarclean $package $version