source: other-projects/trunk/gs2build-extra/packages.configure@ 15819

Last change on this file since 15819 was 15819, checked in by ak19, 16 years ago

Dr Bainbridge updated the configure and makefiles for GS3 gs2build with 1. COMP32bitFlag stuff and 2. CPP -> CXX stuff

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 5.0 KB
RevLine 
[9749]1#! /bin/sh
2
3PACKAGES=`pwd`
4cd ..
5GSDLHOME=`pwd`
6cd $PACKAGES
7
8GSDLOS=`uname -s |tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9# check for running bash under cygwin
10if test "`echo $GSDLOS | sed 's/cygwin//'`" != "$GSDLOS" ;
11then
12 GSDLOS=windows
13fi
14
15prefix=""
16bindir=""
17HOSTTARGETFLAGS=""
[13405]18# only some of the packages can take environment variables as options to
19# configure
20# format is VAR=value, e.g "LDFLAGS=-static"
[13485]21ENVIRONMENT=""
[9749]22
23# parse any arguments given from toplevel configure
24while test $# -ne 0; do
25 case "$1" in
26 --cache-file=*)
27 cache_filename=`echo $1 | sed s/--cache-file=//`
28 # turn relative path into an absolute path
29 cache_dir=`echo $cache_filename | sed 's@/[^/]*$@@'`
30 cache_dir=`cd $cache_dir 2>/dev/null && pwd`
31
32 cache_basefile=`echo $cache_filename | sed 's@.*/@@'`
33 cache_file="$cache_dir/$cache_basefile"
34 if test ! -f "$cache_file"; then
35 CACHE_FILE=""
36 else
37 CACHE_FILE="--cache-file=$cache_file"
38 fi
39 ;;
40 --prefix=*)
41 prefix=`echo $1 | sed s/--prefix=//`
42 ;;
43 --bindir=*)
44 # where to install binaries to
45 bindir=`echo $1 | sed s/--bindir=//`
46 # turn relative path into an absolute path
47 if test -d "$bindir" ; then
48 bindir=`cd "$bindir" ; pwd `
49 cd "$PACKAGES"
50 elif test -z `echo $bindir | sed '/^\// p;D'` ; then
51 rel_bindir="`echo $bindir | sed s@/.*@@`"
52 cd "$rel_bindir"
53 bindir="`pwd`/`echo $bindir | sed s@^[^/]*/@@`"
54 cd "$PACKAGES"
55 else
56 # bindir doesn't exist, and isn't relative
57 true
58 fi
59 ;;
60 --host=* | --target=*)
61 HOSTTARGETFLAGS="$HOSTTARGETFLAGS $1"
62 ;;
63 *)
64 # ignore all other options for now
65 ;;
66 esac
67 shift
68done
69
70# note! Our GSDL package currently always installs into it's source
71# directory, ignoring any --prefix given to configure.
72# When this is fixed, uncomment the relevant lines below...
73
74##if test -z "$prefix" ; then
75prefix="${GSDLHOME}"
76##fi
77
78##if test -z "$bindir" ; then
79bindir="${prefix}/bin/$GSDLOS"
80##fi
81
82# This loads the top configure's cache file, with variables already set.
83if test -f "$cache_file" ; then
84 . $cache_file
85fi
86
87# we assume that gzip and tar are on the search path.
88# non-GNU versions of tar don't take the -z option.
89
90# configure the wvWare Word document converter
91echo ""
92echo "Configuring wvWare"
93echo ""
94
95cd "$PACKAGES/wv"
96gzip -dc wv-0.7.1-gs.tar.gz | tar -xf -
97# datadir is for default location of wvHtml.xml config file
98cd wv-gs && \
99./configure $CACHE_FILE --prefix=$PACKAGES/wv --bindir="$bindir" --datadir="$prefix/etc/packages" $HOSTTARGETFLAGS
100
101# configure the pdftohtml converter
102echo ""
103echo "Configuring pdftohtml"
104echo ""
105
106cd "$PACKAGES/pdftohtml"
107gzip -dc pdftohtml_0_36_gs.tar.gz | tar -xf -
108cd pdftohtml_gs && \
[13405]109./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS $ENVIRONMENT
[9749]110
111# rtftohtml converter
112echo ""
113echo "Configuring rtftohtml"
114echo ""
115
116cd "$PACKAGES/rtftohtml"
117gzip -dc rtftohtml-gs.tar.gz | tar -xf -
118cd rtftohtml_src && \
119./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
120
121# configure wget
122echo ""
123echo "Configuring wget"
124echo ""
125cd "$PACKAGES/wget"
126gzip -dc wget.tar.gz | tar -xf -
127cd "$PACKAGES/wget/wget-1.9" && \
128./configure $CACHE_FILE --prefix=$PACKAGES/wget --bindir="$bindir" $HOSTTARGETFLAGS
129
130# configure expat (needs to be done before XML::Parser
131echo ""
132echo "Configuring expat"
133echo ""
134cd "$PACKAGES/expat"
135gzip -dc expat-1.95.8.tar.gz | tar -xf -
136cd "$PACKAGES/expat/expat-1.95.8" && \
[15819]137CFLAGS="$CFLAGS $COMPAT32BITFLAGS" CXXFLAGS="$CXXFLAGS $COMPAT32BITFLAGS" LDFLAGS="$LDFLAGS $COMPAT32BITFLAGS" ./configure $CACHE_FILE --prefix=$PACKAGES/expat --bindir="$bindir" $HOSTTARGETFLAGS $ENVIRONMENT
[9749]138
139# configure XML::Parser perl module
140echo ""
141echo "Configuring XML::Parser"
142echo ""
143cd "$PACKAGES/cpan"
144perl_dir=`echo 'my $vn = $]; $vn =~ s/5\.00(\d).*$/perl-5.$1/; print "$vn" ' | perl`
145gzip -dc XML-Parser-2.34.tar.gz | tar -xf -
146cd "$PACKAGES/cpan/XML-Parser-2.34" && \
147perl Makefile.PL \
148 INSTALLSITELIB="$GSDLHOME/perllib/cpan/$perl_dir" \
149 PREFIX="$GSDLHOME/perllib/cpan/XML" \
150 INSTALLMAN1DIR="$GSDLHOME/perllib/cpan/$perl_dir" \
151 INSTALLMAN3DIR="$GSDLHOME/perllib/cpan/$perl_dir" \
152 SITEPREFIX="$GSDLHOME/perllib/cpan" \
153 EXPATINCPATH="$GSDLHOME/packages/expat/include" \
154 EXPATLIBPATH="$GSDLHOME/packages/expat/lib"
155
156# configure powerpoint converter
157echo ""
158echo "Configuring xlhtml (powerpoint & excel converter)"
159echo ""
160cd "$PACKAGES/xlhtml"
161gzip -dc xlhtml-0.4.9.0-gs.tar.gz | tar -xf -
162cd xlhtml-0.4.9.0 && \
163./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS
164
165
166# configure IsisGdl program
167echo ""
168echo "Configuring IsisGdl (CDS/ISIS database reader)"
169echo ""
170cd "$PACKAGES/isis-gdl" && \
[13405]171./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS $ENVIRONMENT
[13507]172
[13980]173# configure HTMLTidy program
174echo ""
175echo "Configuring HTMLTidy"
176echo ""
177cd "$PACKAGES/html-tidy"
178tar -xzvf tidy.tgz
179cd "$PACKAGES/html-tidy/tidy" && \
180./configure $CACHE_FILE --prefix="$prefix" --bindir="$bindir" $HOSTTARGETFLAGS $ENVIRONMENT
Note: See TracBrowser for help on using the repository browser.