Annotation of parser3/buildall-with-xml, revision 1.51
1.2 paf 1: #!/bin/sh
2:
1.51 ! moko 3: # $Id: buildall-with-xml,v 1.50 2012-06-13 21:44:40 moko Exp $
1.2 paf 4:
5: install_directory=$HOME/parser3install
6: sendmail_command="/usr/sbin/sendmail -i -t -f postmaster"
1.48 moko 7: cflags=""
1.49 moko 8: #cflags="--with-pic" #required for apache module on x64
1.2 paf 9:
10: echo "buildall-with-xml"
11: echo "Script author: Alexander Petrosian <paf@design.ru> (http://paf.design.ru)"
12: echo
13: echo "Building..."
14:
1.51 ! moko 15: download=`which fetch 2>/dev/null`
! 16: if test -z "$download"; then
! 17: download="wget -c --passive-ftp"
! 18: fi
! 19:
1.2 paf 20: parser3_directory=`pwd`
21: cd ..
22: project_directory=`pwd`
23: mkdir src >/dev/null 2>&1
24:
25: if test ! -f "$project_directory/gc/lib/libgc.a"; then
26: cd $project_directory/src
1.33 misha 27: # libgc="gc6.8" # FreeBSD 4.X is not supported in newer gc version
1.27 misha 28: libgc="gc-7.1"
1.7 misha 29: if test ! -f "$libgc.tar.gz"; then
1.24 misha 30: echo "Downloading gc [1 lib of 4]..."
1.48 moko 31: $download http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/$libgc.tar.gz
1.7 misha 32: fi
33: echo "Unpacking gc..."
1.9 misha 34: rm -rf $libgc
1.7 misha 35: gunzip -c $libgc.tar.gz | tar vxf - >/dev/null
36: cd $libgc
1.24 misha 37: echo "Configuring gc..."
1.29 misha 38: CPPFLAGS="-DUSE_LIBC_PRIVATES -DUSE_MMAP -DDONT_ADD_BYTE_AT_END" \
1.14 misha 39: ./configure --prefix=$project_directory/gc \
40: --disable-threads \
41: --disable-shared \
1.48 moko 42: --silent $cflags
1.24 misha 43: echo "Building gc..."
1.2 paf 44: make
45: make install
1.16 misha 46: cd ..
1.15 misha 47: rm -rf $libgc
1.2 paf 48: fi
49:
1.24 misha 50: if test ! -f "$project_directory/pcre/lib/libpcre.a"; then
51: cd $project_directory/src
1.42 misha 52: libpcre="pcre-8.30"
1.24 misha 53: if test ! -f "$libpcre.tar.gz"; then
54: echo "Downloading pcre [2 lib of 4]..."
1.48 moko 55: $download ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/$libpcre.tar.gz
1.24 misha 56: fi
57: echo "Unpacking pcre..."
58: rm -rf $libpcre
59: gunzip -c $libpcre.tar.gz | tar vxf - >/dev/null
60: cd $libpcre
61: echo "Configuring pcre..."
62: ./configure --prefix="$project_directory/pcre" \
1.41 misha 63: --with-match-limit=10000 \
64: --with-match-limit-recursion=10000 \
1.24 misha 65: --enable-utf8 \
66: --enable-unicode-properties \
67: --disable-shared \
68: --disable-cpp \
69: --disable-pcregrep-libz \
1.39 misha 70: --disable-pcregrep-libbz2 \
1.48 moko 71: --silent $cflags
1.24 misha 72: echo "Building pcre..."
1.48 moko 73: make install
1.24 misha 74: cd ..
75: rm -rf $libpcre
76: fi
77:
1.2 paf 78: if test ! -f "$project_directory/gnome/lib/libxml2.a"; then
79: cd $project_directory/src
1.43 misha 80: libxml2="libxml2-2.8.0"
1.7 misha 81: if test ! -f "$libxml2.tar.gz"; then
1.24 misha 82: echo "Downloading libxml [3 lib of 4]..."
1.48 moko 83: $download ftp://xmlsoft.org/libxml2/$libxml2.tar.gz
1.7 misha 84: fi
85: echo "Unpacking libxml2... (be patient)"
1.8 misha 86: rm -rf $libxml2
1.7 misha 87: gunzip -c $libxml2.tar.gz | tar vxf - >/dev/null
88: cd $libxml2
1.14 misha 89: #sax1, output, tree, xinclude[in libxslt], html[in libxslt, mode=html?], xptr[xinclude], pattern -- needed!
1.2 paf 90: echo "Configuring libxml..."
91: ./configure --prefix=$project_directory/gnome \
1.31 misha 92: --without-catalog \
1.14 misha 93: --without-iconv \
94: --without-threads \
95: --without-debug \
96: --without-iso8859x \
97: --without-legacy \
98: --without-push \
99: --without-python \
100: --without-reader \
101: --without-writer \
102: --without-readline \
103: --without-regexps \
104: --without-schemas \
105: --without-schematron \
106: --without-modules \
107: --without-ftp \
108: --without-http \
109: --without-docbook \
1.2 paf 110: --without-zlib \
1.44 misha 111: --without-lzma \
1.14 misha 112: --disable-shared \
1.48 moko 113: --silent $cflags
1.2 paf 114: echo "int main(){return 0;}">testapi.c
115: echo "int main(){return 0;}">runtest.c
116: echo "Building libxml..."
117: make
118: make install
1.16 misha 119: cd ..
1.15 misha 120: rm -rf $libxml2
1.2 paf 121: fi
122:
123: if test ! -f "$project_directory/gnome/lib/libxslt.a"; then
124: cd $project_directory/src
1.32 misha 125: libxslt="libxslt-1.1.26"
1.7 misha 126: if test ! -f "$libxslt.tar.gz"; then
1.24 misha 127: echo "Downloading libxslt [4 lib of 4]..."
1.48 moko 128: $download ftp://xmlsoft.org/libxslt/$libxslt.tar.gz
1.7 misha 129: fi
130: echo "Unpacking libxslt... (be patient)"
1.8 misha 131: rm -rf $libxslt
1.7 misha 132: gunzip -c $libxslt.tar.gz | tar vxf - >/dev/null
133: cd $libxslt
1.2 paf 134: echo "Configuring libxslt..."
135: ./configure --prefix=$project_directory/gnome \
136: --with-libxml-prefix=$project_directory/gnome \
1.14 misha 137: --without-debug \
138: --without-debugger \
139: --without-crypto \
140: --without-plugins \
141: --disable-shared \
1.48 moko 142: --silent $cflags
1.2 paf 143: echo "Building libxslt..."
144: make
145: make install
1.16 misha 146: cd ..
1.15 misha 147: rm -rf $libxslt
1.2 paf 148: fi
149:
150: cd $parser3_directory
151:
152: if test ! -f "Makefile"; then
1.45 moko 153: options="$@"
1.50 moko 154: options="$options --with-gc=$project_directory/gc/lib"
155: options="$options --with-pcre=$project_directory/pcre"
156: options="$options --with-xml=$project_directory/gnome"
1.38 moko 157: # options="$options --with-apache"
1.19 misha 158: # options="$options --disable-safe-mode"
1.21 misha 159: # options="$options --disable-stringstream"
1.48 moko 160: options="$options --with-included-ltdl"
161: options="$options --silent $cflags"
1.2 paf 162: echo "Configuring parser3..."
1.19 misha 163: ./configure --prefix=$install_directory "--with-sendmail=$sendmail_command" $options
1.2 paf 164: fi
1.48 moko 165:
1.2 paf 166: echo "Building parser3..."
167: make install
1.48 moko 168: if test $? -ne 0; then exit 1; fi
1.17 misha 169:
170: # remove debug info
171: # strip ${install_directory}/bin/parser3
172:
1.2 paf 173: echo "DONE"
174:
175: echo
176: echo
177: echo "********************************************************************************************************"
1.50 moko 178: echo "Now you can copy $install_directory/bin to your cgi-bin directory"
1.2 paf 179: echo " -Parser3 with XML support-"
180: echo "Read more about installing Parser here:"
181: echo " http://www.parser.ru/en/docs/lang/install4apachecgi.htm in English"
182: echo " http://www.parser.ru/docs/lang/install4apachecgi.htm in Russian"
183: echo "********************************************************************************************************"
E-mail: