Changeset 32253
- Timestamp:
- 2018-07-10T21:02:50+12:00 (6 years ago)
- Location:
- gs2-extensions/xpdf-tools/trunk/src
- Files:
-
- 5 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
gs2-extensions/xpdf-tools/trunk/src/CASCADE-MAKE.sh
r32227 r32253 14 14 done 15 15 16 if [ $makedist = "1" ] ; then 17 default_toplevel_make_dist $GSDLOS devel.bash 16 # makedist: makes a temporary subdirectory, also called xpdf-tools, puts just the stuff we want in there 17 # and then runs the CASCADE-MAKE command to make a distribution (tar.gz) out of our whitelist temporary folder 18 # then get rid of that temporary xpdf-tools folder. 19 if [ $makedist = "1" ] ; then 20 mkdir -p xpdf-tools 21 cp $GSDLOS/bin/pdf* xpdf-tools/. 22 # See xpdftools' README: licencing files and manpage need to be redistributed with xpdf-tools binaries 23 cp -r $GSDLOS/man xpdf-tools/. 24 cp redistribute/* xpdf-tools/. 25 toplevel_make_dist $GSDLOS xpdf-tools 26 rm -rf xpdf-tools 18 27 fi -
gs2-extensions/xpdf-tools/trunk/src/packages/CASCADE-MAKE/LIBJPEG.sh
r32251 r32253 2 2 3 3 package=jpeg 4 version=-6b 4 #version=-6b 5 # version 9c is from 2018, see www.ijg.org. Version 6b is from 2008 6 version=-9c 7 8 # renamed the downloaded jpegsrc.v9c.tar.gz to jpeg$version.tar.gz 9 # similarly for the earlier 6b version. 5 10 6 11 progname=$0 … … 28 33 # Error encountered running *make * stage of ./CASCADE-MAKE/LIBJPEG.sh 29 34 # The solution is taken from https://sourceforge.net/p/libjpeg/bugs/12/ 30 if [[ -d "$package$version" && -f "gs-libjpeg-config.sub" ]]; then31 echo "*******************************************************************"32 echo "Using our custom gs-libjpeg-config.sub instead of the one included in $package$version"33 echo "Copying across gs-libjpeg-config.sub as $package$version/config.sub"34 echo "*******************************************************************"35 echo `pwd`36 cp "gs-libjpeg-config.sub" "$package$version/config.sub"37 fi35 ##if [[ -d "$package$version" && -f "gs-libjpeg-config.sub" ]]; then 36 ## echo "*******************************************************************" 37 ## echo "Using our custom gs-libjpeg-config.sub instead of the one included in $package$version" 38 ## echo "Copying across gs-libjpeg-config.sub as $package$version/config.sub" 39 ## echo "*******************************************************************" 40 ## echo `pwd` 41 ## cp "gs-libjpeg-config.sub" "$package$version/config.sub" 42 ##fi 38 43 39 44 # This also seems to make only the static libjpeg.a … … 42 47 # http://www.linuxfromscratch.org/blfs/view/6.3/general/libjpeg.html 43 48 # only the libjpeg.a is produced with this command 44 opt_run_configure $force_config $auto_config $package $version "$prefix" 49 opt_run_configure $force_config $auto_config $package $version "$prefix" --disable-shared 45 50 #opt_run_configure $force_config $auto_config $package $version "$prefix" \ 46 51 # --enable-static --enable-shared … … 51 56 52 57 opt_run_make $compile $package $version 53 opt_run_make $install $package $version "install-lib" 58 #opt_run_make $install $package $version "install-lib" 59 # Contrary to the install.txt in version jpeg version 9c, install-lib is an unrecognised make command 60 # I found there was an install-libLTLIBRARIES target in the Makefile, however. And that seems to at least copy over libjpeg.a 61 opt_run_make $install $package $version "install-libLTLIBRARIES" 54 62 opt_run_make $clean $package $version "clean" 55 63 opt_run_make $distclean $package $version "distclean" … … 57 65 opt_run_tarclean $tarclean $package $version 58 66 67 # according to jpeg version 9c's install.txt, these 4 header files need to be copied into the include folder (besides installing libjpeg.a) 68 # if building something against the libjpeg library, as we do with xpdf-tools 69 cp $package$version/jpeglib.h $package$version/jerror.h $package$version/jconfig.h $package$version/jmorecfg.h $GEXTXPDFTOOLS_INSTALLED/include/. 70 -
gs2-extensions/xpdf-tools/trunk/src/packages/GS-README.txt
r32252 r32253 13 13 LIBJPEG related 14 14 G. LIBJPEG and LIBTIFF 15 - Issues building LIBJPEG on 64 bit machines and the patch 16 17 H. PDF2DOM 15 - Moving from 2008's libjpeg version 6b to the newer 2018 version 9c 16 - Issues building LIBJPEG version 6b on 64 bit machines and the patch 17 18 H. Licensing information and making the distributable tarball 19 20 I. PDF2DOM 18 21 unused, replaced by Xpdf-Tools' more suited pdftohtml capabilities 19 22 … … 481 484 __________________________________________________________ 482 485 483 1. Issues building LIBJPEG on 64 bit machines and the patch 486 1. The first version of LIBJPEG to work out was version 6b, which required some patching up before it could be built, see point 2 below. 487 Besides the fact that version 6b needed patching up, it was also from 2008. I've now found a version of libjpeg from Jan 2018, called "jpegsrc.v9c.tar.gz" 488 which was downloadable from www.ijg.org at http://www.ijg.org/files/jpegsrc.v9c.tar.gz. Version 9c can build both static and dynamically linked libraries of 489 libjpeg, though we only want the former. (The older version 6b could only generate the static libjpeg.a library file, and contrary to online instructions.) 490 491 As needed to be done with the older 6b version, this tarball was renamed to jpeg-9c.tar.gz to fit the naming pattern of its folder once extracted. 492 493 There was an incompatibility between the existing CASCADE-MAKE/LIBJPEG.sh and the Makefile generated by configuring the Makefile.in/.am in the jpeg-9c tarball. 494 The LIBJPEG.sh would run "make install-lib" at the end, to install the libjpeg.a in the lib folder and to install 4 header files. This is as per the install.txt 495 instructions in the older and current version of jpeg src tarball. However, the header files never got installed when doing so, whether in version 6b or the 496 current 9c. And install-lib is not a recognised target in 9c's Makefile, where the target is install-libLTLIBRARIES. So LIBJPEG.sh has been modified to use this 497 target name and to moreover copy over the header files (even though they weren't necessary when compiling xpdftools against the libjpeg 6b library previously and 498 possibly now with 9c). 499 500 Since we want to only generate libjpeg.a and not the .so/.dylib dynamically linked versions, the latter is turned off during configure by passing --disable-shared. 501 502 A final change made to LIBJPEG.sh was to undo it copying over the patch file "gs-libjpeg-config.sub" into the extracted jpeg tarball, since the patch was only 503 necessary for libjpeg version 6b and not for 9c. These steps have been commented out in LIBJPEG.sh now. 504 505 506 2. Issues building LIBJPEG VERSION 6b on 64 bit machines and the patch 507 508 LIBJPEG version 6b is from 2008. 484 509 485 510 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). … … 596 621 in the same way now. Not sure where these automatically assigned variables come from in order to check up on them. 597 622 598 599 __________________________________________________________ 600 H. PDF2DOM: tried it out, but wasn't what we wanted 623 __________________________________________________________ 624 H. Licensing information and making the distributable tarball 625 __________________________________________________________ 626 627 XpdfTools' README lists which files need to be included as per its license when redistributing xpdf-tools binaries. 628 629 Running ./CASCADE-MAKE.sh makedist does some custom steps to create a distribution tarball of the xpdf-tools we compile up: 630 it creates a temporary xpdf-tools subdirectory and copies into it the GSDLOS/bin/pdf* statically linked binaries (or dynamic executables linked 631 against mostly static libraries in the case of Macs), the GSDLOS/man folder as well as the "redistribute" folder containing further compulsory 632 files as required by xpdf-tools' license. 633 This temporary xpdf-tools subfolder is then passed as the whitelist folder to the CASCADE-MAKE makedist command, and this folder and its 634 contents are then tarred up into the distribution tarball xpdf-tools-GSDLOS.tar.gz. Finally, the temporary xpdf-tools subfolder is deleted. 635 636 637 __________________________________________________________ 638 I. PDF2DOM: tried it out, but wasn't what we wanted 601 639 __________________________________________________________ 602 640 Using PDFBox to convert a PDF to full HTML, both images and text and placed correctly with respect to each other, is tricky, see https://stackoverflow.com/questions/9671239/pdfbox-convert-a-pdf-to-text-or-html-including-images-from-the-pdf
Note:
See TracChangeset
for help on using the changeset viewer.