source: trunk/gs2build-extra/packages.configure@ 13512

Last change on this file since 13512 was 13512, checked in by kjdon, 17 years ago

forgot to add in variable and configure option for enabling accentfolding

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