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