Changeset 32249 for gs2-extensions/xpdf-tools/trunk/src/packages
- Timestamp:
- 2018-07-09T21:14:55+12:00 (6 years ago)
- Location:
- gs2-extensions/xpdf-tools/trunk/src/packages
- Files:
-
- 5 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/xpdf-tools/trunk/src/packages/CASCADE-MAKE.sh
r32228 r32249 3 3 source ../cascade-make/lib/cascade-lib.bash GEXT_XPDFTOOLS .. $* 4 4 5 PACKAGES="CMAKE LIBZ LIBPNG FREETYPE XPDFTOOLS" 5 # order of image libraries in cascade-make taken from 6 # http://trac.greenstone.org/browser/gs2-extensions/ocr/trunk/packages/cmdline/CASCADE-MAKE.sh 7 #PACKAGES="CMAKE LIBZ LIBPNG FREETYPE XPDFTOOLS" 8 PACKAGES="CMAKE LIBZ LIBTIFF LIBPNG LIBJPEG FREETYPE XPDFTOOLS" 6 9 7 10 for d in $PACKAGES ; do -
gs2-extensions/xpdf-tools/trunk/src/packages/CASCADE-MAKE/XPDFTOOLS.sh
r32248 r32249 28 28 opt_run_untar $force_untar $auto_untar $package $version 29 29 30 # patch the original tarball with our custom makefile?30 # patch the original tarball with our custom CMake configure/makefile 31 31 if [[ -d "$package$version/xpdf" && -f "gs-CMakeLists.txt" ]]; then 32 32 echo "*******************************************************************" 33 echo "Using our custom gs-CMakeLists.txt instead of the one included in $package$version"33 echo "Using our custom gs-CMakeLists.txt instead of the one included in the xpdf subfolder of $package$version" 34 34 echo "Renaming gs-CMakeLists.txt to $package$version/xpdf/CMakeLists.txt" 35 35 echo "*******************************************************************" … … 70 70 cmake -DCMAKE_BUILD_TYPE=Release \ 71 71 -DCMAKE_INSTALL_PREFIX=$prefix \ 72 -DTIFF_INCLUDE_DIR=$prefix/include \ 73 -DJPEG_INCLUDE_DIR=$prefix/include \ 72 74 -DZLIB_LIBRARY=$prefix/lib/libz.a \ 75 -DTIFF_LIBRARY=$prefix/lib/libtiff.a \ 73 76 -DPNG_LIBRARY=$prefix/lib/libpng15.a \ 77 -DJPEG_LIBRARY=$prefix/lib/libjpeg.a \ 74 78 -DFREETYPE_LIBRARY=$prefix/lib/libfreetype.a \ 75 79 -DCMAKE_DISABLE_FIND_PACKAGE_Qt4=1 \ … … 97 101 fi 98 102 103 99 104 ## If compiling statically make sure the above CMake command contains the following 100 105 ## with these values: 101 106 # -DZLIB_LIBRARY=$prefix/lib/libz.a \ 107 # -DTIFF_LIBRARY=$prefix/lib/libtiff.a \ 102 108 # -DPNG_LIBRARY=$prefix/lib/libpng15.a \ 109 # -DJPEG_LIBRARY=$prefix/lib/libjpeg.a \ 103 110 # -DFREETYPE_LIBRARY=$prefix/lib/libfreetype.a \ 104 111 # and … … 106 113 107 114 108 ## For building dynamic xpdf-tools executables, change the above to have the following instead: 115 ## For building dynamic xpdf-tools executables, change the above to have the following instead 116 ## (still unable get the .so for LIBJPEG generated, so could try JPEG_LIBRARY set same as above) 109 117 # -DZLIB_LIBRARY=$prefix/lib/libz.so.1.2.7 \ 118 # -DTIFF_LIBRARY=$prefix/lib/libtiff.so.5.2.2 \ 110 119 # -DPNG_LIBRARY=$prefix/lib/libpng15.so.15.30.0 \ 111 120 # -DFREETYPE_LIBRARY=$prefix/lib/libfreetype.so.6.3.20 \ 112 121 # (The 3rd line can alternatively be "-DFREETYPE_DIR=$prefix") 113 # And removethe following line. Don't comment it out, nor set it to "", but remove it:122 # And REMOVE the following line. Don't comment it out, nor set it to "", but remove it: 114 123 # -DGSDLFLAG_STATIC="$static_flag" \ 115 124 116 125 117 126 # If compilation was successful, then we don't need cmake binaries anymore when 118 # packaging up xpdf-tools 127 # packaging up xpdf-tools. Move them away from the distribution area: 119 128 120 129 if [ -f "$GEXTXPDFTOOLS_INSTALLED/bin/pdftohtml" ]; then -
gs2-extensions/xpdf-tools/trunk/src/packages/GS-README.txt
r32248 r32249 1 __________________________________________________________ 2 CONTENTS 3 __________________________________________________________ 4 5 Xpdf-Tools related 6 A. XPDF 7 B. Mojo::DOM perl package for parsing HTML 8 C. Compiling Xpdf-Tools: statically or dynamically linked 9 D. How we got Xpdf-Tools to compile using CASCADE-MAKE 10 E. Getting more output when running CMake (verbosity) 11 F. APPENDIX - Useful links 12 13 LIBJPEG related 14 G. LIBJPEG and LIBTIFF 15 - Issues building LIBJPEG on 64 bit machines and the patch 16 1 17 __________________________________________________________ 2 18 A. XPDF … … 84 100 __________________________________________________________ 85 101 86 As explained in detail in section D below, gs-CMakeLists.txt allows us to compile xpdf-toolsstatically (as we've now set it up for by default) or dynamically (as its CMake makefiles were originally set up for).102 As explained in detail in section D below, we have a customised gs-CMakeLists.txt file which replaces the one in the xpf-4.00.tar.gz package's xpdf subfolder after this is untarred. This customised CMake configure/make file now allows us to compile xpdf-tools either statically (as we've now set it up for by default) or dynamically (as its CMake makefiles were originally set up for). 87 103 88 104 1. To compile Xpdf-Tools statically, packages/CASCADE-MAKE/XPDFTOOLS.sh should contain: … … 356 372 357 373 ---- 358 /usr/bin/c++ -I/home/greenstone/gs3-svn-26Mar2018/gs2build/ext/xpdf-tools/ trunk/src/linux/include -I/home/greenstone/gs3-svn-26Mar2018/gs2build/ext/xpdf-tools/trunk/src/linux/include -I/home/greenstone/gs3-svn-26Mar2018/gs2build/ext/xpdf-tools/trunk/src/linux/include/libpng15 -O3 -Wall -fPIC -L/home/greenstone/gs3-svn-26Mar2018/gs2build/ext/xpdf-tools/trunk/src/linux/lib -L/home/greenstone/gs3-svn-26Mar2018/gs2build/ext/xpdf-tools/trunk/src/linux/lib -static ***** <- HERE ****** -O2 -Wall -fPIC -rdynamic CMakeFiles/pdftohtml.dir/HTMLGen.cc.o CMakeFiles/pdftohtml.dir/SplashOutputDev.cc.o CMakeFiles/pdftohtml.dir/TextOutputDev.cc.o CMakeFiles/pdftohtml.dir/pdftohtml.cc.o CMakeFiles/xpdf_objs.dir/AcroForm.cc.o CMakeFiles/xpdf_objs.dir/Annot.cc.o CMakeFiles/xpdf_objs.dir/Array.cc.o CMakeFiles/xpdf_objs.dir/BuiltinFont.cc.o CMakeFiles/xpdf_objs.dir/BuiltinFontTables.cc.o CMakeFiles/xpdf_objs.dir/Catalog.cc.o CMakeFiles/xpdf_objs.dir/CharCodeToUnicode.cc.o CMakeFiles/xpdf_objs.dir/CMap.cc.o CMakeFiles/xpdf_objs.dir/Decrypt.cc.o CMakeFiles/xpdf_objs.dir/Dict.cc.o CMakeFiles/xpdf_objs.dir/Error.cc.o CMakeFiles/xpdf_objs.dir/FontEncodingTables.cc.o CMakeFiles/xpdf_objs.dir/Form.cc.o CMakeFiles/xpdf_objs.dir/Function.cc.o CMakeFiles/xpdf_objs.dir/Gfx.cc.o CMakeFiles/xpdf_objs.dir/GfxFont.cc.o CMakeFiles/xpdf_objs.dir/GfxState.cc.o CMakeFiles/xpdf_objs.dir/GlobalParams.cc.o CMakeFiles/xpdf_objs.dir/JArithmeticDecoder.cc.o CMakeFiles/xpdf_objs.dir/JBIG2Stream.cc.o CMakeFiles/xpdf_objs.dir/JPXStream.cc.o CMakeFiles/xpdf_objs.dir/Lexer.cc.o CMakeFiles/xpdf_objs.dir/Link.cc.o CMakeFiles/xpdf_objs.dir/NameToCharCode.cc.o CMakeFiles/xpdf_objs.dir/Object.cc.o CMakeFiles/xpdf_objs.dir/OptionalContent.cc.o CMakeFiles/xpdf_objs.dir/Outline.cc.o CMakeFiles/xpdf_objs.dir/OutputDev.cc.o CMakeFiles/xpdf_objs.dir/Page.cc.o CMakeFiles/xpdf_objs.dir/Parser.cc.o CMakeFiles/xpdf_objs.dir/PDFDoc.cc.o CMakeFiles/xpdf_objs.dir/PDFDocEncoding.cc.o CMakeFiles/xpdf_objs.dir/PSTokenizer.cc.o CMakeFiles/xpdf_objs.dir/SecurityHandler.cc.o CMakeFiles/xpdf_objs.dir/Stream.cc.o CMakeFiles/xpdf_objs.dir/TextString.cc.o CMakeFiles/xpdf_objs.dir/UnicodeMap.cc.o CMakeFiles/xpdf_objs.dir/UnicodeTypeTable.cc.o CMakeFiles/xpdf_objs.dir/UTF8.cc.o CMakeFiles/xpdf_objs.dir/XFAForm.cc.o CMakeFiles/xpdf_objs.dir/XRef.cc.o CMakeFiles/xpdf_objs.dir/Zoox.cc.o -o pdftohtml ../goo/libgoo.a ../fofi/libfofi.a ../splash/libsplash.a -static -lfreetype -lpng -lz -lm -lc -lpthread374 /usr/bin/c++ -I/home/greenstone/gs3-svn-26Mar2018/gs2build/ext/xpdf-tools/linux/include -I/home/greenstone/gs3-svn-26Mar2018/gs2build/ext/xpdf-tools/linux/include -I/home/greenstone/gs3-svn-26Mar2018/gs2build/ext/xpdf-tools/linux/include/libpng15 -O3 -Wall -fPIC -L/home/greenstone/gs3-svn-26Mar2018/gs2build/ext/xpdf-tools/linux/lib -L/home/greenstone/gs3-svn-26Mar2018/gs2build/ext/xpdf-tools/linux/lib -static ***** <- HERE ****** -O2 -Wall -fPIC -rdynamic CMakeFiles/pdftohtml.dir/HTMLGen.cc.o CMakeFiles/pdftohtml.dir/SplashOutputDev.cc.o CMakeFiles/pdftohtml.dir/TextOutputDev.cc.o CMakeFiles/pdftohtml.dir/pdftohtml.cc.o CMakeFiles/xpdf_objs.dir/AcroForm.cc.o CMakeFiles/xpdf_objs.dir/Annot.cc.o CMakeFiles/xpdf_objs.dir/Array.cc.o CMakeFiles/xpdf_objs.dir/BuiltinFont.cc.o CMakeFiles/xpdf_objs.dir/BuiltinFontTables.cc.o CMakeFiles/xpdf_objs.dir/Catalog.cc.o CMakeFiles/xpdf_objs.dir/CharCodeToUnicode.cc.o CMakeFiles/xpdf_objs.dir/CMap.cc.o CMakeFiles/xpdf_objs.dir/Decrypt.cc.o CMakeFiles/xpdf_objs.dir/Dict.cc.o CMakeFiles/xpdf_objs.dir/Error.cc.o CMakeFiles/xpdf_objs.dir/FontEncodingTables.cc.o CMakeFiles/xpdf_objs.dir/Form.cc.o CMakeFiles/xpdf_objs.dir/Function.cc.o CMakeFiles/xpdf_objs.dir/Gfx.cc.o CMakeFiles/xpdf_objs.dir/GfxFont.cc.o CMakeFiles/xpdf_objs.dir/GfxState.cc.o CMakeFiles/xpdf_objs.dir/GlobalParams.cc.o CMakeFiles/xpdf_objs.dir/JArithmeticDecoder.cc.o CMakeFiles/xpdf_objs.dir/JBIG2Stream.cc.o CMakeFiles/xpdf_objs.dir/JPXStream.cc.o CMakeFiles/xpdf_objs.dir/Lexer.cc.o CMakeFiles/xpdf_objs.dir/Link.cc.o CMakeFiles/xpdf_objs.dir/NameToCharCode.cc.o CMakeFiles/xpdf_objs.dir/Object.cc.o CMakeFiles/xpdf_objs.dir/OptionalContent.cc.o CMakeFiles/xpdf_objs.dir/Outline.cc.o CMakeFiles/xpdf_objs.dir/OutputDev.cc.o CMakeFiles/xpdf_objs.dir/Page.cc.o CMakeFiles/xpdf_objs.dir/Parser.cc.o CMakeFiles/xpdf_objs.dir/PDFDoc.cc.o CMakeFiles/xpdf_objs.dir/PDFDocEncoding.cc.o CMakeFiles/xpdf_objs.dir/PSTokenizer.cc.o CMakeFiles/xpdf_objs.dir/SecurityHandler.cc.o CMakeFiles/xpdf_objs.dir/Stream.cc.o CMakeFiles/xpdf_objs.dir/TextString.cc.o CMakeFiles/xpdf_objs.dir/UnicodeMap.cc.o CMakeFiles/xpdf_objs.dir/UnicodeTypeTable.cc.o CMakeFiles/xpdf_objs.dir/UTF8.cc.o CMakeFiles/xpdf_objs.dir/XFAForm.cc.o CMakeFiles/xpdf_objs.dir/XRef.cc.o CMakeFiles/xpdf_objs.dir/Zoox.cc.o -o pdftohtml ../goo/libgoo.a ../fofi/libfofi.a ../splash/libsplash.a -static -lfreetype -lpng -lz -lm -lc -lpthread 359 375 ---- 360 376 … … 396 412 397 413 414 __________________________________________________________ 415 E. Getting more output when running CMake (verbosity) 416 __________________________________________________________ 417 See https://www.linuxquestions.org/questions/programming-9/cmake-or-make-debug-output-show-command-624800/ 418 To turn on debugging: 419 export VERBOSE=1 420 ./CASCADE-MAKE.sh 421 422 To turn off debugging, need to actually make VERBOSE undefined again (don't set it to 0): 423 export VERBOSE= 424 ./CASCADE-MAKE.sh 425 426 427 __________________________________________________________ 428 F. APPENDIX - Useful links 429 __________________________________________________________ 430 A. Helping CMake along. (Not all of this was necessary for compiling xpdftools statically, but they're generally useful links) 431 432 https://github.com/SynoCommunity/spksrc/issues/1779 433 https://stackoverflow.com/questions/1620918/cmake-and-libpthread 434 https://cmake.org/cmake/help/v3.0/prop_tgt/LINK_FLAGS.html 435 https://cmake.org/cmake/help/v3.11/command/target_link_libraries.html?highlight=target_link_libraries 436 https://stackoverflow.com/questions/24648357/compiling-a-static-executable-with-cmake 437 https://stackoverflow.com/questions/42815420/cmake-cant-find-my-static-libs 438 https://cmake.org/cmake/help/v3.0/command/message.html 439 https://stackoverflow.com/questions/30980383/cmake-compile-options-for-libpng 440 https://stackoverflow.com/questions/36220123/undefined-reference-to-png-set-longjmp-fn-when-compiling-pcl-source-file 441 442 443 B. About the error "bash: no such file or directory" when run on a statically generated binary: 444 445 https://askubuntu.com/questions/351827/unable-to-run-a-32-bit-program-on-64-bit-vm/353497#353497 446 https://unix.stackexchange.com/questions/13391/getting-not-found-message-when-running-a-32-bit-binary-on-a-64-bit-system/13409#13409 447 https://arstechnica.com/civis/viewtopic.php?f=16&t=1173118 448 https://superuser.com/questions/344533/no-such-file-or-directory-error-in-bash-but-the-file-exists 449 https://unix.stackexchange.com/questions/45277/executing-binary-file-file-not-found 450 451 C. Other links 452 453 https://unix.stackexchange.com/questions/279397/ldd-dont-find-path-how-to-add 454 455 456 __________________________________________________________ 457 G. LIBJPEG and LIBTIFF 458 __________________________________________________________ 459 460 1. Issues building LIBJPEG on 64 bit machines and the patch 461 462 I copied the LIBJPEG package from http://trac.greenstone.org/browser/other-projects/realistic-books/trunk/packages (also at http://trac.greenstone.org/browser/gs2-extensions/ocr/trunk/packages/cmdline). 463 464 * Configuring out of the box produced the following error: 465 checking host system type... Invalid configuration `x86_64-unknown-linux-gnu': machine `x86_64-unknown' not recognized 466 467 * So that, as a consequence, when running make on the libjpeg package, make failed with the error: 468 ./libtool --mode=compile gcc -I/home/greenstone/gs3-svn-26Mar2018/gs2build/ext/xpdf-tools/linux/include -fPIC -I/home/greenstone/gs3-svn-26Mar2018/gs2build/ext/xpdf-tools/linux/include -I. -c ./jcapimin.c 469 make: ./libtool: Command not found 470 make: *** [jcapimin.lo] Error 127 471 Error encountered running *make * stage of ./CASCADE-MAKE/LIBJPEG.sh 472 473 The same was true when I grabbed the libjpeg from sourceforge (https://sourceforge.net/projects/libjpeg/files/), which was also still version jpeg 6b from 2008. 474 475 I found the following webpages discussing the above error messages: 476 - https://unix.stackexchange.com/questions/80479/how-to-work-with-libtool 477 - https://github.com/rwestlund/freesweep/issues/1 478 - https://ubuntuforums.org/showthread.php?t=1232714 479 - https://stackoverflow.com/questions/12828687/configure-fails-to-detect-proper-ld-on-a-64-bit-system-with-32-bit-userland 480 - SOLUTION: https://sourceforge.net/p/libjpeg/bugs/12/ 481 482 However, the error only strikes when configure is run with --enable-static. 483 484 Note also that contrary to the above pages, running configure with the additional options 485 --host=x86_64-linux-gnu --build=x86_64-linux-gnu --target=x86_64-linux-gnu --disable-shared --enable-static 486 did not help. Nor did adding the above flags get rid of configure attempting to work with host=x86_64-unknown(-unknown)-linux-gnu 487 488 The SOLUTION, found when searching for the error message along with "enable-static", as it's the combination that is relevant, is described 489 at https://sourceforge.net/p/libjpeg/bugs/12/ 490 491 which was to patch up the config.sub filed included in the jpeg-6b tarball, to also cover x86_64-* machines: 492 tahoe | i860 | x86_64-* | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ 493 494 The above change is necessary because this libjpeg is outdated and has been superceded by other JPEG libraries, also discussed at https://sourceforge.net/p/libjpeg/bugs/12/ 495 I'm not sure if those libraries are compatible with XpdfTools however, so I'm sticking with libjpeg as long as I can get it to build and be recognised by XpdfTools. 496 497 The solution is once more to have a patch file: CASCADE-MAKE/LIBJPEG.sh replaces the config.sub with in the jpeg-6b package after this is untarred with packages/gs-libjpeg-config.sub, which contains the patch. 498 499 500 2. I followed the instructions at http://www.linuxfromscratch.org/blfs/view/6.3/general/libjpeg.html 501 to try to build libjpeg with --enable-static and --enable-shared to produce both libjpeg.a and libjpeg.so. 502 503 However, nothing I try gets it to generate a libjpeg.so. It seems to always produce a libjpeg.a in xpdf-tools/linux/lib 504 regardless of whether CASCADE-MAKE/LIBJPEG.sh passes the --enable-static flag to the configure command or not, and regardless of whether --enable-shared is additionally or individually passed in. 505 506 As a consequence, there's no libjpeg.so file to set the -DJPEG_LIBRARY flag in XPDFTOOLS.sh to for when building xpdf-tools against dynamically linked libraries. 507 508 I tried the various combinations with the lib jpeg-6b source tarballs from 509 - sourceforge, https://sourceforge.net/projects/libjpeg/files/, the latest tarball of this was from 2008 510 - http://www.linuxfromscratch.org/blfs/view/6.3/general/libjpeg.html, which was last updated in 2007 511 - http://trac.greenstone.org/browser/other-projects/realistic-books/trunk/packages/jpeg-6b.tar.gz, which was added to trac in 2009 but is probably the 2008 or 2007 version too. 512 513 514 3. Modifications for using TIFF and JPEG libraries when building Xpdf-Tools: 515 516 * CASCADE-MAKE.sh, replaced 517 PACKAGES="CMAKE LIBZ LIBPNG FREETYPE XPDFTOOLS" 518 with 519 PACKAGES="CMAKE LIBZ LIBTIFF LIBPNG LIBJPEG FREETYPE XPDFTOOLS" 520 521 522 * XPDFTOOLS.sh 523 If compiling statically make sure the CMake command contains the following changes: 524 -DTIFF_INCLUDE_DIR=$prefix/include \ # <========== new 525 -DJPEG_INCLUDE_DIR=$prefix/include \ # <========== new 526 -DZLIB_LIBRARY=$prefix/lib/libz.a \ 527 -DTIFF_LIBRARY=$prefix/lib/libtiff.a \ # <========== new 528 -DPNG_LIBRARY=$prefix/lib/libpng15.a \ 529 -DJPEG_LIBRARY=$prefix/lib/libjpeg.a \ # <========== new 530 -DFREETYPE_LIBRARY=$prefix/lib/libfreetype.a \ 531 -DGSDLFLAG_STATIC="$static_flag" \ 532 533 534 535 The above flag names were discovered by deleting the untarred xpdf-4.00 folder. 536 Then in a fresh terminal, source devel.bash from xpdf-tools and re-run CASCADE-MAKE.sh without the above modifications: 537 538 -- Found FreeType (new-style includes): /home/greenstone/gs3-svn-26Mar2018/gs2build/ext/xpdf-tools/linux/lib/libfreetype.a 539 -- Found ZLIB: /home/greenstone/gs3-svn-26Mar2018/gs2build/ext/xpdf-tools/linux/lib/libz.a (found version "1.2.8") 540 -- Found PNG: /home/greenstone/gs3-svn-26Mar2018/gs2build/ext/xpdf-tools/linux/lib/libpng15.a (found version "1.2.50") 541 -- Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR) 542 -- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR) 543 -- lcms2 not found 544 -- No Qt library found 545 546 547 * packages/gs-CMakeLists.txt was modified again, 548 549 - this time to also pass: 550 -ltiff and -ljpeg to all target_link_libraries() commands that run when GSDLFLAG_STATIC is set 551 and 552 ${TIFF_LIBRARY} and ${JPEG_LIBRARY} to all target_link_libraries() commands that run when GSDLFLAG_STATIC is not set 553 554 - And to add in the include directories and defitions if JPEG/TIFF libraries were provided: 555 if (JPEG_FOUND) 556 include_directories("${JPEG_INCLUDE_DIR}") 557 add_definitions("${JPEG_DEFINITIONS}") 558 message(STATUS "@@@@@@@@@@@@@@@ JPEG_FOUND (include_dir ; include_dirs): ${JPEG_INCLUDE_DIR} ; ${JPEG_INCLUDE_DIRS}") 559 else () 560 message(STATUS "@@@@@@@@@@@@@@@ NO JPEG_FOUND") 561 endif () 562 if (TIFF_FOUND) 563 include_directories("${TIFF_INCLUDE_DIRS}") 564 add_definitions("${TIFF_DEFINITIONS}") 565 message(STATUS "@@@@@@@@@@@@@@@ TIFF_FOUND ${TIFF_INCLUDE_DIRS}") 566 else () 567 message(STATUS "@@@@@@@@@@@@@@@ NO TIFF_FOUND") 568 endif () 569 570 Note however that although gs-CMakeLists.txt now knows what the pluralised TIFF_INCLUDE_DIRS is (and TIFF_INCLUDE_DIR) 571 as for PNG and ZLIB, gs-CMakeLists.txt does not have a value for the pluralised JPEG_INCLUDE_DIRS, only the 572 JPEG_INCLUDE_DIRS set above. And both the CMAKE flags in XPDFTOOLS.sh for tiff and jpeg libs seem to have been setup 573 in the same way now. Not sure where these automatically assigned variables come from in order to check up on them. 574 575 -
gs2-extensions/xpdf-tools/trunk/src/packages/gs-CMakeLists.txt
r32248 r32249 32 32 else () 33 33 message(STATUS "@@@@ GSDLFLAG_STATIC not SET. Building dynamically using xpdf-tools' (mostly) original, unmodified linker flags.") 34 endif () 35 if (JPEG_FOUND) 36 include_directories("${JPEG_INCLUDE_DIR}") 37 add_definitions("${JPEG_DEFINITIONS}") 38 message(STATUS "@@@@@@@@@@@@@@@ JPEG_FOUND (include_dir ; include_dirs): ${JPEG_INCLUDE_DIR} ; ${JPEG_INCLUDE_DIRS}") 39 else () 40 message(STATUS "@@@@@@@@@@@@@@@ NO JPEG_FOUND") 41 endif () 42 if (TIFF_FOUND) 43 include_directories("${TIFF_INCLUDE_DIRS}") 44 add_definitions("${TIFF_DEFINITIONS}") 45 message(STATUS "@@@@@@@@@@@@@@@ TIFF_FOUND ${TIFF_INCLUDE_DIRS}") 46 else () 47 message(STATUS "@@@@@@@@@@@@@@@ NO TIFF_FOUND") 34 48 endif () 35 49 if (PNG_FOUND) … … 145 159 if(GSDLFLAG_STATIC) 146 160 target_link_libraries(pdftops goo fofi splash 147 ${GSDLFLAG_STATIC} -lfreetype ${DTYPE_LIBRARY} ${LCMS_LIBRARY} -l z -lm -lc -lpthread)161 ${GSDLFLAG_STATIC} -lfreetype ${DTYPE_LIBRARY} ${LCMS_LIBRARY} -ltiff -ljpeg -lz -lm -lc -lpthread) 148 162 # Threads::Threads instead of -lpthread results in a partially dynamic executable 149 163 else () … … 152 166 ${DTYPE_LIBRARY} 153 167 ${LCMS_LIBRARY} 168 ${TIFF_LIBRARY} ${JPEG_LIBRARY} 154 169 ${ZLIB_LIBRARIES}) 155 170 endif () … … 162 177 ) 163 178 if(GSDLFLAG_STATIC) 164 target_link_libraries(pdftops goo fofi ${GSDLFLAG_STATIC} ${LCMS_LIBRARY} -l m -lc -lpthread)165 else () 166 target_link_libraries(pdftops goo fofi ${LCMS_LIBRARY} )179 target_link_libraries(pdftops goo fofi ${GSDLFLAG_STATIC} ${LCMS_LIBRARY} -ltiff -ljpeg -lm -lc -lpthread) 180 else () 181 target_link_libraries(pdftops goo fofi ${LCMS_LIBRARY} ${TIFF_LIBRARY} ${JPEG_LIBRARY}) 167 182 endif () 168 183 endif () … … 178 193 ) 179 194 if(GSDLFLAG_STATIC) 180 target_link_libraries(pdftotext goo fofi ${GSDLFLAG_STATIC} ${LCMS_LIBRARY} -l pthread)195 target_link_libraries(pdftotext goo fofi ${GSDLFLAG_STATIC} ${LCMS_LIBRARY} -ltiff -ljpeg -lpthread) 181 196 # Threads::Threads instead of -lpthread results in a partially dynamic executable 182 197 else () 183 target_link_libraries(pdftotext goo fofi ${LCMS_LIBRARY} )198 target_link_libraries(pdftotext goo fofi ${LCMS_LIBRARY} ${TIFF_LIBRARY} ${JPEG_LIBRARY}) 184 199 endif () 185 200 install(TARGETS pdftotext RUNTIME DESTINATION bin) … … 198 213 if(GSDLFLAG_STATIC) 199 214 target_link_libraries(pdftohtml goo fofi splash 200 ${GSDLFLAG_STATIC} -lfreetype ${DTYPE_LIBRARY} ${LCMS_LIBRARY} -l png -lz -lm -lc -lpthread)215 ${GSDLFLAG_STATIC} -lfreetype ${DTYPE_LIBRARY} ${LCMS_LIBRARY} -ltiff -ljpeg -lpng -lz -lm -lc -lpthread) 201 216 else () 202 217 target_link_libraries(pdftohtml goo fofi splash 203 218 ${FREETYPE_LIBRARY} ${FREETYPE_OTHER_LIBS} 204 219 ${DTYPE_LIBRARY} 205 ${LCMS_LIBRARY} ${PNG_LIBRARIES}) 220 ${LCMS_LIBRARY} 221 ${TIFF_LIBRARY} ${JPEG_LIBRARY} 222 ${PNG_LIBRARIES}) 206 223 endif () 207 224 install(TARGETS pdftohtml RUNTIME DESTINATION bin) … … 216 233 ) 217 234 if(GSDLFLAG_STATIC) 218 target_link_libraries(pdfinfo goo fofi ${GSDLFLAG_STATIC} ${LCMS_LIBRARY} -l pthread)219 else () 220 target_link_libraries(pdfinfo goo fofi ${LCMS_LIBRARY} )235 target_link_libraries(pdfinfo goo fofi ${GSDLFLAG_STATIC} ${LCMS_LIBRARY} -ltiff -ljpeg -lpthread) 236 else () 237 target_link_libraries(pdfinfo goo fofi ${LCMS_LIBRARY} ${TIFF_LIBRARY} ${JPEG_LIBRARY}) 221 238 endif() 222 239 install(TARGETS pdfinfo RUNTIME DESTINATION bin) … … 230 247 ) 231 248 if(GSDLFLAG_STATIC) 232 target_link_libraries(pdffonts goo fofi ${GSDLFLAG_STATIC} ${LCMS_LIBRARY} -l pthread)233 else () 234 target_link_libraries(pdffonts goo fofi ${LCMS_LIBRARY} )249 target_link_libraries(pdffonts goo fofi ${GSDLFLAG_STATIC} ${LCMS_LIBRARY} -ltiff -ljpeg -lpthread) 250 else () 251 target_link_libraries(pdffonts goo fofi ${LCMS_LIBRARY} ${TIFF_LIBRARY} ${JPEG_LIBRARY}) 235 252 endif () 236 253 install(TARGETS pdffonts RUNTIME DESTINATION bin) … … 244 261 ) 245 262 if(GSDLFLAG_STATIC) 246 target_link_libraries(pdfdetach goo fofi ${GSDLFLAG_STATIC} ${LCMS_LIBRARY} -l pthread)247 else () 248 target_link_libraries(pdfdetach goo fofi ${LCMS_LIBRARY} )263 target_link_libraries(pdfdetach goo fofi ${GSDLFLAG_STATIC} ${LCMS_LIBRARY} -ltiff -ljpeg -lpthread) 264 else () 265 target_link_libraries(pdfdetach goo fofi ${LCMS_LIBRARY} ${TIFF_LIBRARY} ${JPEG_LIBRARY}) 249 266 endif () 250 267 install(TARGETS pdfdetach RUNTIME DESTINATION bin) … … 261 278 if(GSDLFLAG_STATIC) 262 279 target_link_libraries(pdftoppm goo fofi splash 263 ${GSDLFLAG_STATIC} -lfreetype ${DTYPE_LIBRARY} ${LCMS_LIBRARY} -l z -lm -lc -lpthread)280 ${GSDLFLAG_STATIC} -lfreetype ${DTYPE_LIBRARY} ${LCMS_LIBRARY} -ltiff -ljpeg -lz -lm -lc -lpthread) 264 281 else () 265 282 target_link_libraries(pdftoppm goo fofi splash … … 267 284 ${DTYPE_LIBRARY} 268 285 ${LCMS_LIBRARY} 286 ${TIFF_LIBRARY} ${JPEG_LIBRARY} 269 287 ${ZLIB_LIBRARIES}) 270 288 endif () … … 283 301 if(GSDLFLAG_STATIC) 284 302 target_link_libraries(pdftopng goo fofi splash 285 ${GSDLFLAG_STATIC} -lfreetype ${DTYPE_LIBRARY} ${LCMS_LIBRARY} -l png -lz -lm -lc -lpthread)303 ${GSDLFLAG_STATIC} -lfreetype ${DTYPE_LIBRARY} ${LCMS_LIBRARY} -ltiff -ljpeg -lpng -lz -lm -lc -lpthread) 286 304 else () 287 305 target_link_libraries(pdftopng goo fofi splash 288 306 ${FREETYPE_LIBRARY} ${FREETYPE_OTHER_LIBS} 289 307 ${DTYPE_LIBRARY} 308 ${TIFF_LIBRARY} ${JPEG_LIBRARY} 290 309 ${LCMS_LIBRARY} ${PNG_LIBRARIES}) 291 310 endif () … … 302 321 ) 303 322 if(GSDLFLAG_STATIC) 304 target_link_libraries(pdfimages goo fofi ${GSDLFLAG_STATIC} ${LCMS_LIBRARY} -l pthread)305 else () 306 target_link_libraries(pdfimages goo fofi ${LCMS_LIBRARY} )323 target_link_libraries(pdfimages goo fofi ${GSDLFLAG_STATIC} ${LCMS_LIBRARY} -ltiff -ljpeg -lpthread) 324 else () 325 target_link_libraries(pdfimages goo fofi ${LCMS_LIBRARY} ${TIFF_LIBRARY} ${JPEG_LIBRARY}) 307 326 endif () 308 327 install(TARGETS pdfimages RUNTIME DESTINATION bin)
Note:
See TracChangeset
for help on using the changeset viewer.