source: gs2-extensions/xpdf-tools/trunk/src/packages/CASCADE-MAKE/LIBJPEG.sh@ 32249

Last change on this file since 32249 was 32249, checked in by ak19, 6 years ago

All the changes to incorporate libtiff and libjpeg into the xpdftools GS2 extension, to get libjpeg compiled up on 64 bit machines, and for both libs to be seen and used by xpdftools when this is built.

  • Property svn:executable set to *
File size: 2.7 KB
Line 
1#!/bin/bash
2
3package=jpeg
4version=-6b
5
6progname=$0
7
8(cd .. ; \
9 source setup.bash silent; )
10
11# This syntax is from the realistic books extension:
12#source $GEXT_XPDFTOOLS/cascade-make/lib/cascade-lib.bash
13source ../cascade-make/lib/cascade-lib.bash GEXT_XPDFTOOLS ../.. $*
14
15prefix=$GEXTXPDFTOOLS_INSTALLED
16
17# Unpack the libjpeg tarball
18opt_run_untar $force_untar $auto_untar $package $version
19
20# Patch the unpacked tarball with our fixed up config.sub to get --enable-static to work
21# GS: added x86_64-* to config.sub's $basic_machine list,
22# since configuring produced the following error without it
23# checking host system type... Invalid configuration `x86_64-unknown-linux-gnu': machine `x86_64-unknown' not recognized
24# in which case running make on the libjpeg package then failed with the error:
25# ./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
26# make: ./libtool: Command not found
27# make: *** [jcapimin.lo] Error 127
28# Error encountered running *make * stage of ./CASCADE-MAKE/LIBJPEG.sh
29# The solution is taken from https://sourceforge.net/p/libjpeg/bugs/12/
30if [[ -d "$package$version" && -f "gs-libjpeg-config.sub" ]]; then
31 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"
37fi
38
39# This also seems to make only the static libjpeg.a
40#opt_run_configure $force_config $auto_config $package $version "$prefix"
41# Similarly, despite turning on --enable-shared as well as explained at
42# http://www.linuxfromscratch.org/blfs/view/6.3/general/libjpeg.html
43# only the libjpeg.a is produced with this command
44opt_run_configure $force_config $auto_config $package $version "$prefix" \
45 --enable-static --enable-shared
46# The following didn't fix the configuration and subsequent libtool error described above
47# and with or without it, there's still reference to host=x86_64-unknown(-unknown)-linux-gnu in configure output:
48# --host=x86_64-linux-gnu --build=x86_64-linux-gnu --target=x86_64-linux-gnu --disable-shared --enable-static
49
50opt_run_make $compile $package $version
51opt_run_make $install $package $version "install-lib"
52opt_run_make $clean $package $version "clean"
53opt_run_make $distclean $package $version "distclean"
54
55opt_run_tarclean $tarclean $package $version
56
Note: See TracBrowser for help on using the repository browser.