Changeset 32230


Ignore:
Timestamp:
07/02/18 20:52:19 (3 years ago)
Author:
ak19
Message:

Temporarily retracing to before commit 32228: returning to xpdf-4.00.tar.gz xpdftools src code with no gs specific modifications in order to properly compile this up in non-static mode.

Location:
gs2-extensions/xpdf-tools/trunk/src/packages
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • gs2-extensions/xpdf-tools/trunk/src/packages/CASCADE-MAKE/XPDFTOOLS.sh

    r32228 r32230  
    22
    33# only going to make xpdf-tools, not xpdf-reader. So not making all of xpdf
    4 package=gs-xpdf
     4package=xpdf
    55version=-4.00
    66
     
    1212prefix=$GEXTXPDFTOOLS_INSTALLED
    1313
    14 # Use C/CPP/CXX FLAGS and LDFLAGS for setting up
     14# Use C/CPP/CXX FLAGS and LDFLAGS for further setting up
    1515# libpng and libz for compiling xpdftools
    1616export CFLAGS="$CFLAGS -I$GEXTXPDFTOOLS_INSTALLED/include -I$GEXTXPDFTOOLS_INSTALLED/include/libpng15"
     
    1919export LDFLAGS="$LDFLAGS -L$GEXTXPDFTOOLS_INSTALLED/lib"
    2020
    21 #echo GSDLOS = $GSDLOS
    2221
    2322opt_run_untar $force_untar $auto_untar $package $version
     
    3332echo "Using cmake: "
    3433echo `which cmake`
    35 ##exit 0
    3634
    37 # IGNORE: See xpdf-tools src' INSTALL instructions: need to create a 'build' dir
    38 # cd there and then run cmake from there, providing the xpdf-tools src dir
    39 # ACTUALLY: doing the above breaks the way cascade-lib.bash does it. It wants
    40 # a 'release' directory, so do it the cascade-make way as that works.
     35# The xpdf-tools src code's INSTALL instructions say we need to create a 'build' dir,
     36# cd into there and then run cmake from there, providing the xpdf-tools src dir
     37# However, doing so breaks the way cascade-lib.bash runs a CMake compile sequence.
     38# cascade-lib.bash wants a 'release' directory, so do it the cascade-make way as
     39# that works.
    4140# TO AVOID building xpdf(reader), turn off finding Qt libs with the cmake flags below
    4241if [ $force_config = "1" ] ; then
     
    4948    cd release ; \
    5049
     50    # see xpdf-tools src code's INSTALL file for these options
    5151    if [ ! -f Makefile ] ; then \
    5252      #cmake -D CMAKE_BUILD_TYPE=RELEASE \
     
    5454    cmake -DCMAKE_BUILD_TYPE=Release \
    5555        -DCMAKE_INSTALL_PREFIX=$prefix \
    56         -DZLIB_LIBRARY=$prefix/lib/libz.a \
    57         -DPNG_LIBRARY=$prefix/lib/libpng15.a \
    58         -DFREETYPE_LIBRARY=$prefix/lib/libfreetype.a \
     56        -DZLIB_LIBRARY=$prefix/lib/libz.so.1.2.7 \
     57        -DPNG_LIBRARY=$prefix/lib/libpng15.so.15.30.0 \
     58        -DFREETYPE_LIBRARY=$prefix/lib/libfreetype.so.6.3.20 \
    5959        -DCMAKE_DISABLE_FIND_PACKAGE_Qt4=1 \
    6060        -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets=1 \
     
    6262        -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
    6363        -DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS" \
    64         -DPNG_LINK_FLAGS="-lpng15" \
    6564        $GEXT_XPDFTOOLS/packages/$package$version
    6665    fi ; \
     
    8180fi
    8281
    83 ## The -DFREETYPE_DIR to be used in place of -DFREETYPE_LIBRARY above
    84 ## this will help it find the "libfreetype.so" (no versioning at end) in our gs ext
    85 ## But -DZLIB_DIR and -DPNG_DIR are ignored and unrecognised, whereas
    86 ## -DZLIB_LIBRARY and -DPNG_LIBRARY are recognised & supposedly used when compiling
    87 ## but weren't really used as seen when running ldd on the xpdf-tools binaries:
     82# If compiling statically, need these above in place of the references to .so files
     83#       -DZLIB_LIBRARY=$prefix/lib/libz.a \
     84#       -DPNG_LIBRARY=$prefix/lib/libpng15.a \
     85#       -DFREETYPE_LIBRARY=$prefix/lib/libfreetype.a \
     86
     87
     88## When -DFREETYPE_DIR is used in place of -DFREETYPE_LIBRARY above, it makes
     89## xpdf-tools compilation find the "libfreetype.so" (no versioning at end) in
     90## our gs ext.
     91## But -DZLIB_DIR and -DPNG_DIR are ignored because they go unrecognised, whereas
     92## -DZLIB_LIBRARY and -DPNG_LIBRARY are recognised by XpdfTools' CMake files.
     93## -DZLIB_LIBRARY and -DPNG_LIBRARY require full paths. So the first 2 lines of the
     94## following won't work:
    8895#       -DZLIB_DIR=$prefix \
    8996#       -DPNG_DIR=$prefix \
    9097#       -DFREETYPE_DIR=$prefix \
    9198
    92 ## When specified this way, all 3 lines are recognised (freetype, zlib, png)
    93 ## but weren't really used as seen when running ldd on the xpdf-tools binaries:
     99## When specified in the following way, all 3 lines are recognised (freetype, zlib,
     100## png). The 3rd line can alternatively still use "-DFREETYPE_DIR=$prefix"
    94101#       -DZLIB_LIBRARY=$prefix/lib/libz.so.1.2.7 \
    95102#       -DPNG_LIBRARY=$prefix/lib/libpng15.so.15.30.0 \
Note: See TracChangeset for help on using the changeset viewer.