source: gs2-extensions/xpdf-tools/trunk/src/packages/CASCADE-MAKE/CMAKE.sh@ 32227

Last change on this file since 32227 was 32227, checked in by ak19, 6 years ago

First attempt at compiling up xpdf-tools and the cmake that it needs. Haven't yet tried compiling against the FreeType, libpng and zlib libraries needed for xpdf-tools, but at present the compile sequence runs successfully to completion and generates the binaries in the trunk/src/linux/bin folder.

  • Property svn:executable set to *
File size: 1.8 KB
Line 
1#!/bin/bash
2
3package=cmake
4version=-3.11.4
5
6progname=$0
7
8source ../cascade-make/lib/cascade-lib.bash GEXT_XPDFTOOLS ../.. $*
9
10prefix=$GEXTXPDFTOOLS_INSTALLED
11
12opt_run_untar $force_untar $auto_untar $package $version
13
14# For configuring cmake, run ./bootstrap <args> instead of ./configure <args>
15# See https://cmake.org/install/
16#opt_run_configure $force_config $auto_config $package $version $prefix
17if [ $force_config = "1" ] ; then
18 echo "[pushd $package$version]"
19 ( cd $package$version ; \
20 echo $CROSSCONFIGURE_VARS ./bootstrap --prefix="$prefix" $CROSSCONFIGURE_ARGS $@ ;
21 eval $CROSSCONFIGURE_VARS ./bootstrap --prefix="$prefix" $CROSSCONFIGURE_ARGS $@ )
22 if [ $? != 0 ] ; then
23 echo " Error encountered running *bootstrap* stage of $progname"
24 exit 1
25 fi
26 echo "[popd]"
27else
28 if [ $auto_config = "1" ] ; then
29 echo "Found top-level for ${progname%.*} => no need to run ./bootstrap"
30 fi
31fi
32
33# Only compile if necessary - we don't edit these source files.
34if type -p cmake; then
35 echo "found cmake in PATH"
36 _CMAKE=cmake
37elif [[ -x "$GEXTXPDFTOOLS_INSTALLED/linux/bin/cmake" ]]; then
38##if [[ -x "$GEXTXPDFTOOLS_INSTALLED/linux/bin/cmake" ]]; then
39 echo "found cmake in $GEXTXPDFTOOLS_INSTALLED/linux/bin"
40 _CMAKE="$GEXTXPDFTOOLS_INSTALLED/linux/bin/cmake"
41fi
42
43if [[ "$_CMAKE" ]]; then
44 _VERSION=$("$_CMAKE" --version 2>&1 | sed 's/.*cmake version \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/;1q')
45 echo "cmake version $_VERSION"
46fi
47
48if [[ ! "$_CMAKE" ]]; then
49 opt_run_make $compile $package $version
50 opt_run_make $install $package $version "install"
51else
52 echo "$package$version already available => no need to recompile"
53fi
54
55opt_run_make $clean $package $version "clean"
56opt_run_make $distclean $package $version "distclean"
57
58opt_run_tarclean $tarclean $package $version
59
60
61
62
63
Note: See TracBrowser for help on using the repository browser.