#!/bin/bash # only going to make xpdf-tools, not xpdf-reader. So not making all of xpdf package=xpdf version=-4.00 progname=$0 source ../cascade-make/lib/cascade-lib.bash GEXT_XPDFTOOLS ../.. $* prefix=$GEXTXPDFTOOLS_INSTALLED #export CFLAGS="$CFLAGS -I$GEXTAUDIODB_INSTALLED/include" #export CPPFLAGS="$CPPFLAGS -I$GEXTAUDIODB_INSTALLED/include" #export CXXFLAGS="$CXXFLAGS -I$GEXTAUDIODB_INSTALLED/include" #export LDFLAGS="$LDFLAGS -L$GEXTAUDIODB_INSTALLED/lib" #echo GSDLOS = $GSDLOS opt_run_untar $force_untar $auto_untar $package $version # Whether force_config is set for this package depends on CMake test # to see if 'release' directory has been created or not if [ $auto_config = "1" ] ; then if [ ! -d $package$version/release ] ; then force_config=1 fi fi echo "Using cmake: " echo `which cmake` ##exit 0 ##if type -p pdftohtml; then ## echo "found xpdf-tools in PATH" ## _XPDFTOOLS=pdftohtml ##elif [[ -x "$GEXTXPDFTOOLS_INSTALLED/linux/bin/pdftohtml" ]]; then if [[ -x "$GEXTXPDFTOOLS_INSTALLED/bin/pdftohtml" ]]; then echo "found pdftohtml in $GEXTXPDFTOOLS_INSTALLED/bin" _XPDFTOOLS="$GEXTXPDFTOOLS_INSTALLED/bin" fi # IGNORE: See xpdf-tools src' INSTALL instructions: need to create a build dir # cd there and then run cmake from there, providing the xpdf-tools src dir # Actually, doing the above breaks the way cascade-lib.bash does it. It wants # a 'release' directory, so do it the cascade-make way. if [ $force_config = "1" ] ; then echo "[pushd $package$version]" ( cd $package$version ; \ if [ ! -d release ] ; then \ echo "Creating 'release' directory" ; \ mkdir release ; \ fi ; \ cd release ; \ if [ ! -f Makefile ] ; then \ #cmake -D CMAKE_BUILD_TYPE=RELEASE \ # -D CMAKE_INSTALL_PREFIX=$prefix ..; cmake -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=$prefix \ -DCMAKE_DISABLE_FIND_PACKAGE_Qt4=1 \ -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets=1 \ -DCMAKE_C_FLAGS="$CFLAGS" \ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ -DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS" \ $GEXT_XPDFTOOLS/packages/$package$version fi ; \ PKG_CONFIG_PATH=$prefix/lib/pkgconfig:${PKG_CONFIG_PATH}; \ export PKG_CONFIG_PATH; \ ) if [ $? != 0 ] ; then echo " Error encountered running *configure* stage of $progname" exit 1 fi echo "[popd]" opt_run_cmake $compile $package $version "release" opt_run_cmake $install $package $version "release" "install" else if [ $auto_config = "1" ] ; then echo "Found top-level for ${progname%.*} => no need to run configure/initialize CMake" fi fi