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

Revision 32228, 1.9 KB (checked in by ak19, 18 months ago)

Tried to compile xpdf-tools up statically with CMake, but still not successful. For now committing modifications necessary (including the new additional packages) for compiling xpdf-tools agains dynamically linked libs of libpng and zlib and freetype. Although these 3 packages have been introduced and are successfully compiled up (and I can even get the CMake configure stage of xpdf-tools to 'see' them), the xpdftools binaries upon successful compilation are shown by ldd to still refer to system versions of zlib, libpng and freetype. Some modifications to a single file in the xpdftools src package were necessary to get things to compile again with these changes, so recommitting the xpdftools src package with modications using the usual gs- prefix and a readme.

  • Property svn:executable set to *
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.
34#if type -p cmake; then
35#  echo "found cmake in PATH"
36#  _CMAKE=cmake
37#elif [[ -x "$GEXTXPDFTOOLS_INSTALLED/linux/bin/cmake" ]]; then
38# NO. Rather, only compile up OUR cmake if we haven't already got OUR cmake
39# But don't use any system cmake: xpdf-tools is dependent on cmake version (>= 2.8.8)
40if [[ -x "$GEXTXPDFTOOLS_INSTALLED/linux/bin/cmake" ]]; then
41  echo "found cmake in $GEXTXPDFTOOLS_INSTALLED/linux/bin"
42  _CMAKE="$GEXTXPDFTOOLS_INSTALLED/linux/bin/cmake"
43fi
44
45if [[ "$_CMAKE" ]]; then
46  _VERSION=$("$_CMAKE" --version 2>&1 | sed 's/.*cmake version \([0-9]*\.[0-9]*\.[0-9]*\).*/\1/;1q')
47  echo "cmake version $_VERSION"
48fi
49
50if [[ ! "$_CMAKE" ]]; then
51  opt_run_make $compile   $package $version
52  opt_run_make $install   $package $version "install"
53else
54  echo "$package$version already available => no need to recompile"
55fi
56
57opt_run_make $clean     $package $version "clean"
58opt_run_make $distclean $package $version "distclean"
59
60opt_run_tarclean $tarclean $package $version
61
62
63
64
65
Note: See TracBrowser for help on using the browser.