root/gs2-extensions/xpdf-tools/trunk/src/packages/CASCADE-MAKE/XPDFTOOLS.sh @ 32227

Revision 32227, 2.6 KB (checked in by ak19, 15 months 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 *
Line 
1#!/bin/bash
2
3# only going to make xpdf-tools, not xpdf-reader. So not making all of xpdf
4package=xpdf
5version=-4.00
6
7progname=$0
8
9source ../cascade-make/lib/cascade-lib.bash GEXT_XPDFTOOLS ../.. $*
10
11prefix=$GEXTXPDFTOOLS_INSTALLED
12
13#export CFLAGS="$CFLAGS -I$GEXTAUDIODB_INSTALLED/include"
14#export CPPFLAGS="$CPPFLAGS -I$GEXTAUDIODB_INSTALLED/include"
15#export CXXFLAGS="$CXXFLAGS -I$GEXTAUDIODB_INSTALLED/include"
16#export LDFLAGS="$LDFLAGS -L$GEXTAUDIODB_INSTALLED/lib"
17
18#echo GSDLOS = $GSDLOS
19
20opt_run_untar $force_untar $auto_untar $package $version
21
22# Whether force_config is set for this package depends on CMake test
23# to see if 'release' directory has been created or not
24if [ $auto_config = "1" ] ; then
25  if [ ! -d $package$version/release ] ; then
26    force_config=1
27  fi
28fi
29
30echo "Using cmake: "
31echo `which cmake`
32##exit 0
33
34##if type -p pdftohtml; then
35##  echo "found xpdf-tools in PATH"
36##  _XPDFTOOLS=pdftohtml
37##elif [[ -x "$GEXTXPDFTOOLS_INSTALLED/linux/bin/pdftohtml" ]]; then
38if [[ -x "$GEXTXPDFTOOLS_INSTALLED/bin/pdftohtml" ]]; then
39  echo "found pdftohtml in $GEXTXPDFTOOLS_INSTALLED/bin"
40  _XPDFTOOLS="$GEXTXPDFTOOLS_INSTALLED/bin"
41fi
42
43# IGNORE: See xpdf-tools src' INSTALL instructions: need to create a build dir
44# cd there and then run cmake from there, providing the xpdf-tools src dir
45# Actually, doing the above breaks the way cascade-lib.bash does it. It wants
46# a 'release' directory, so do it the cascade-make way.
47if [ $force_config = "1" ] ; then
48  echo "[pushd $package$version]"
49  ( cd $package$version ; \
50    if [ ! -d release ] ; then \
51      echo "Creating 'release' directory" ; \
52      mkdir release ; \
53    fi ; \
54    cd release ; \
55
56    if [ ! -f Makefile ] ; then \
57      #cmake -D CMAKE_BUILD_TYPE=RELEASE \
58      #      -D CMAKE_INSTALL_PREFIX=$prefix ..;
59    cmake -DCMAKE_BUILD_TYPE=Release \
60        -DCMAKE_INSTALL_PREFIX=$prefix \
61        -DCMAKE_DISABLE_FIND_PACKAGE_Qt4=1 \
62        -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets=1 \
63        -DCMAKE_C_FLAGS="$CFLAGS" \
64        -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
65        -DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS" \
66        $GEXT_XPDFTOOLS/packages/$package$version
67    fi ; \
68    PKG_CONFIG_PATH=$prefix/lib/pkgconfig:${PKG_CONFIG_PATH}; \
69    export PKG_CONFIG_PATH; \
70   )
71  if [ $? != 0 ] ; then
72      echo "      Error encountered running *configure* stage of $progname"
73      exit 1
74  fi
75  echo "[popd]"
76  opt_run_cmake $compile $package $version "release"
77  opt_run_cmake $install $package $version "release" "install"
78else
79  if [ $auto_config = "1" ] ; then
80    echo "Found top-level for ${progname%.*} => no need to run configure/initialize CMake"
81  fi
82fi
Note: See TracBrowser for help on using the browser.