Show
Ignore:
Timestamp:
06.07.2018 21:31:53 (14 months ago)
Author:
ak19
Message:

1. Overhaul to the GS-README for the xpdf-tools extension. 2. Moved a lot of verbose comments that explain reasonings behind doing things from gs-CMakeLists.txt and somewhat from XPDFTOOLS.sh

Files:
1 modified

Legend:

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

    r32246 r32248  
    1919export LDFLAGS="$LDFLAGS -L$GEXTXPDFTOOLS_INSTALLED/lib" 
    2020 
    21 # For Mac OSX, when -static is passed in for linking, we end up with the error "ld: library not found for -lcrt0.o" 
    22 # See https://stackoverflow.com/questions/3801011/ld-library-not-found-for-lcrt0-o-on-osx-10-6-with-gcc-clang-static-flag 
    23 # On Mac OSX, compile it with -Bstatic instead, as per https://stackoverflow.com/questions/844819/how-to-static-link-on-os-x 
    24 # We will pass in the correct static variant as the custom GSDLFLAG_STATIC, so it will be set to either "-static" (for linux) 
    25 # or "-Bstatic" for darwin when CMake starts compiling up xpdf-tools. When the GSDLFLAG_STATIC is set, it will also trigger 
    26 # the branch of the gs-CMakeLists.txt code that does static compiling. If not set, xpdf-tools are compiled against dynamically 
    27 # linked libraries. 
     21# See section D, 4c of the GS-README of this extension. 
    2822if [ "x$GSDLOS" == "xdarwin" ] ; then 
    2923    static_flag=-Bstatic 
     
    10397fi 
    10498 
    105 # If compiling statically, need these above in place of the references to .so files 
     99## If compiling statically make sure the above CMake command contains the following 
     100## with these values: 
    106101#       -DZLIB_LIBRARY=$prefix/lib/libz.a \ 
    107102#       -DPNG_LIBRARY=$prefix/lib/libpng15.a \ 
    108103#       -DFREETYPE_LIBRARY=$prefix/lib/libfreetype.a \ 
    109 # And throw in -DGSDLFLAG_STATIC_BUILD="-static" for linux or with "-Bstatic" for Macs 
    110 # In place of FREETYPE_LIBRARY, could also try the following (then check built bins 
    111 # by running ldd and file over them): 
    112 ##      -DFREETYPE_DIR=$prefix \ 
     104# and 
     105#       -DGSDLFLAG_STATIC="$static_flag" \ 
    113106 
    114107 
    115 ## When -DFREETYPE_DIR is used in place of -DFREETYPE_LIBRARY above, it makes 
    116 ## xpdf-tools compilation find the "libfreetype.so" (no versioning at end) in 
    117 ## our gs ext. 
    118 ## But -DZLIB_DIR and -DPNG_DIR are ignored because they go unrecognised, whereas 
    119 ## -DZLIB_LIBRARY and -DPNG_LIBRARY are recognised by XpdfTools' CMake files. 
    120 ## -DZLIB_LIBRARY and -DPNG_LIBRARY require full paths. So the first 2 lines of the 
    121 ## following won't work: 
    122 #       -DZLIB_DIR=$prefix \ 
    123 #       -DPNG_DIR=$prefix \ 
    124 #       -DFREETYPE_DIR=$prefix \ 
    125  
    126 ## When specified in the following way, all 3 lines are recognised (freetype, zlib, 
    127 ## png). The 3rd line can alternatively still use "-DFREETYPE_DIR=$prefix" 
     108## For building dynamic xpdf-tools executables, change the above to have the following instead: 
    128109#       -DZLIB_LIBRARY=$prefix/lib/libz.so.1.2.7 \ 
    129110#       -DPNG_LIBRARY=$prefix/lib/libpng15.so.15.30.0 \ 
    130111#       -DFREETYPE_LIBRARY=$prefix/lib/libfreetype.so.6.3.20 \ 
    131 # The above is for building dynamic xpdf-tools executables. For which, also don't 
    132 # pass in -DGSDLFLAG_STATIC_BUILD="..." (remove the line, don't comment it out, nor 
    133 # set the value to "") 
     112# (The 3rd line can alternatively be "-DFREETYPE_DIR=$prefix") 
     113# And remove the following line. Don't comment it out, nor set it to "", but remove it: 
     114#       -DGSDLFLAG_STATIC="$static_flag" \ 
     115 
    134116 
    135117# If compilation was successful, then we don't need cmake binaries anymore when